/* ==========================================================
   Upasana Barahi portfolio
   Palette: mist, ink, lapis (accent), malachite, saffron
   Type: Bricolage Grotesque (headings, UI) + Literata (reading)
   ========================================================== */

:root {
  --bg: #F2F5F9;
  --surface: #FFFFFF;
  --tint: #E6ECF5;
  --ink: #0F1A2E;
  --muted: #53607A;
  --line: #D3DBE8;
  --accent: #2A4FD6;
  --accent-ink: #FFFFFF;
  --good: #12805C;
  --mark: #F2B01E;

  --head: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Literata", Georgia, "Times New Roman", serif;

  --radius: 10px;
  --wrap: 1420px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(72px, 11vw, 140px);
}

:root[data-theme="dark"] {
  --bg: #0C1424;
  --surface: #131D33;
  --tint: #101A2E;
  --ink: #E8EDF7;
  --muted: #9AA7C2;
  --line: #26324D;
  --accent: #8AA4FF;
  --accent-ink: #0C1424;
  --good: #3DD6A0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1424;
    --surface: #131D33;
    --tint: #101A2E;
    --ink: #E8EDF7;
    --muted: #9AA7C2;
    --line: #26324D;
    --accent: #8AA4FF;
    --accent-ink: #0C1424;
    --good: #3DD6A0;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1.1em; max-width: 64ch; }
h1, h2, h3 { font-family: var(--head); margin: 0; line-height: 1.08; letter-spacing: -0.02em; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; font-family: var(--head);
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { font-family: var(--head); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; text-decoration: none; }

.nav { display: flex; gap: 6px; }
.nav a {
  font-family: var(--head); font-weight: 500; font-size: 0.95rem;
  text-decoration: none; color: var(--muted);
  padding: 8px 12px; border-radius: 8px;
  transition: color .15s, background-color .15s;
}
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.bar-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; transition: background-color .15s;
}
.icon-btn:hover { background: var(--tint); }
.menu-btn { display: none; }

#theme-toggle .sun { display: none; }
:root[data-theme="dark"] #theme-toggle .sun { display: inline; }
:root[data-theme="dark"] #theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme-toggle .sun { display: inline; }
  :root:not([data-theme="light"]) #theme-toggle .moon { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--head); font-weight: 600; font-size: 1rem;
  text-decoration: none; text-align: center;
  padding: 14px 24px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--accent); cursor: pointer;
  transition: transform .15s, background-color .15s, color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-small { padding: 9px 16px; font-size: 0.92rem; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.text-link {
  font-family: var(--head); font-weight: 600;
  color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.text-link:hover { text-decoration-thickness: 3px; }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(56px, 8vw, 100px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }

h1 { font-size: clamp(3.4rem, 10vw, 7.4rem); font-weight: 700; letter-spacing: -0.045em; line-height: .94; }
.lead { font-size: 1.25rem; line-height: 1.6; color: var(--muted); margin: 28px 0 32px; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* the one memorable thing: a search results page */
.serp {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 60px -30px color-mix(in srgb, var(--ink) 40%, transparent);
}
.serp-search {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 18px; margin-bottom: 22px;
  font-family: var(--head); font-size: 1rem; color: var(--ink);
  min-height: 48px;
}
.serp-search svg { color: var(--muted); flex: none; }
.caret { width: 2px; height: 1.2em; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.serp-hit { padding: 4px 6px 10px; }
.serp-url { font-family: var(--head); font-size: .85rem; color: var(--good); margin: 0 0 4px; }
.serp-title { font-size: 1.3rem; letter-spacing: -0.01em; line-height: 1.25; margin-bottom: 8px; }
.serp-title a { color: var(--accent); text-decoration: none; }
.serp-title a:hover { text-decoration: underline; }
.serp-snippet { font-size: .95rem; line-height: 1.6; color: var(--muted); margin-bottom: 12px; }
.sitelinks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.sitelinks a { font-family: var(--head); font-size: .92rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.sitelinks a:hover { text-decoration: underline; }

.serp-ghost { padding: 14px 6px 4px; display: grid; gap: 8px; }
.serp-ghost span { height: 9px; border-radius: 5px; background: var(--tint); }
.serp-ghost span:nth-child(1) { width: 38%; }
.serp-ghost span:nth-child(2) { width: 72%; height: 12px; }
.serp-ghost span:nth-child(3) { width: 90%; }

/* the single page-load sequence: result appears after the query is typed */
.js .serp-hit, .js .serp-ghost { opacity: 0; transform: translateY(10px); }
.js .serp.done .serp-hit, .js .serp.done .serp-ghost { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
.js .serp.done .serp-ghost:nth-of-type(1) { transition-delay: .15s; }
.js .serp.done .serp-ghost:nth-of-type(2) { transition-delay: .3s; }
.js .serp.done .caret { animation: none; opacity: 0; }

/* ---------- sections ---------- */
.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.section.tint { background: var(--tint); }

h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.split > h2 { position: sticky; top: 100px; }
.solo { margin-bottom: 14px; }
.section-note { color: var(--muted); margin-bottom: 40px; }
.big { font-size: 1.35rem; line-height: 1.6; color: var(--ink); max-width: 44ch; }
.small { font-size: .95rem; color: var(--muted); }

/* about */
/* .about { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 36px; }
.portrait { margin: 0; }
.portrait img, .monogram {
  width: 100%; aspect-ratio: 6 / 7; object-fit: cover; border-radius: 14px;
  background: var(--tint);
}
.monogram { display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 4rem; color: var(--accent); letter-spacing: -0.04em; }
.monogram[hidden], .portrait img[hidden] { display: none; }

.facts { margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--head); font-weight: 600; font-size: .95rem; color: var(--muted); }
.facts dd { margin: 0; }

.about-photo {
  margin: 0;
  position: sticky;
  top: 100px;
} */
/* .about-photo img {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 6 / 7;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  background: var(--tint);
} */

/* .about-photo img {
  display: block;
  width: 100%;
  max-width: 1500px;          
  height: auto;
  aspect-ratio: 1/1;       
  object-fit: cover;
  object-position: center top;   
  border-radius: 14px;
}

.about-photo {
  margin: 0;
  position: sticky;
  top: 100px;
  align-self: start;
}

.about-title {
  margin-bottom: 24px;
} */

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
}

.about-media {
  position: relative;
  margin: 0;
  max-width: 420px;
}

/* tinted card behind the photo, straightens on hover */
.about-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 24px;
  transform: rotate(-5deg) translate(-8px, 8px);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.about-media:hover::before {
  transform: rotate(-1.5deg) translate(-12px, 12px);
}

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: var(--tint);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out;
}
.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.about-media:hover .photo-frame img {
  transform: scale(1.06);
}

.about-text h2 { margin-bottom: 24px; }

/* .skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.skill-tags li {
  font-family: var(--head);
  font-size: .92rem;
  font-weight: 500;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  transition: transform .2s, background-color .2s, color .2s, border-color .2s;
}
.skill-tags li:hover {
  transform: translateY(-3px);
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
} */

/* scroll-in animation */
/* .js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.from-left { transform: translateX(-40px) scale(.96); }
.js .reveal.in { opacity: 1; transform: none; } */

/* tags pop in one after another */
/* .js .skill-tags.reveal li {
  opacity: 0;
  transform: scale(.8);
}
.js .skill-tags.reveal.in li {
  opacity: 1;
  transform: none;
  transition: opacity .4s ease, transform .5s cubic-bezier(.3, 1.4, .5, 1),
              background-color .2s, color .2s, border-color .2s;
  transition-delay: calc(.5s + var(--i) * .07s);
}
.js .skill-tags.reveal.in li:hover { transition-delay: 0s; transform: translateY(-3px); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 300px; margin: 0 auto 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .skill-tags.reveal li { opacity: 1; transform: none; }
  .photo-frame { transform: none !important; }
} */

/* ---------- skills: rings ---------- */
.rings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}

.ring-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 20px 24px;
  text-align: center;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), border-color .3s;
}
.ring-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}
.ring-card h3 { margin: 18px 0 4px; font-size: 1.15rem; }
.ring-card p { margin: 0 auto; font-size: .95rem; color: var(--muted); }

.ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto;
}
.ring svg { display: block; width: 100%; height: 100%; }

.ring-track,
.ring-fill {
  fill: none;
  stroke-width: 9;
}
.ring-track { stroke: var(--line); }
.ring-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  opacity: 0;
  transition: stroke-dashoffset 1.6s cubic-bezier(.2, .7, .2, 1) .2s,
              stroke-width .3s;
}
.ring-card.in .ring-fill {
  stroke-dashoffset: calc(100 - var(--pct));
  opacity: 1;
}
.ring-card:hover .ring-fill { stroke-width: 11; }

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--head);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.ring-num { font-size: 2.2rem; line-height: 1; }
.ring-unit { font-size: 1.1rem; margin-left: 2px; color: var(--muted); }

.js .ring-card {
  opacity: 0;
  transform: translateY(28px);
}
.js .ring-card.in {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1), border-color .3s;
  transition-delay: var(--d, 0s);
}
.js .ring-card.in:hover { transform: translateY(-6px); transition-delay: 0s; }

.seo-skills h3 { margin-bottom: 4px; }
.seo-skills .skill-tags { margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .js .ring-card { opacity: 1; transform: none; }
  .ring-fill { opacity: 1; stroke-dashoffset: calc(100 - var(--pct)); }
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
}
.skill-tags li {
  font-family: var(--head);
  font-size: .92rem;
  font-weight: 500;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  transition: transform .2s, background-color .2s, color .2s, border-color .2s;
}
.skill-tags li:hover {
  transform: translateY(-3px);
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.js .skill-tags.reveal li {
  opacity: 0;
  transform: scale(.8);
  justify-content: left;
}
.js .skill-tags.reveal.in li {
  opacity: 1;
  transform: none;
  transition: opacity .4s ease, transform .5s cubic-bezier(.3, 1.4, .5, 1),
              background-color .2s, color .2s, border-color .2s;
  transition-delay: calc(.5s + var(--i) * .07s);
}
.js .skill-tags.reveal.in li:hover { transition-delay: 0.1s; transform: translateY(-3px); }

/* skills */
.skills { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 48px; }
.skills h3 { margin-bottom: 22px; }
.bars { display: grid; gap: 22px; margin-bottom: 22px; }
.bars li { display: grid; grid-template-columns: 110px 1fr 48px; align-items: center; gap: 14px; font-family: var(--head); font-weight: 500; }
.bar-track { height: 10px; background: var(--tint); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: calc(var(--level) * 1%); background: var(--accent); border-radius: 999px; }
.bar-num { color: var(--muted); text-align: right; font-size: .95rem; }
.plain { display: grid; gap: 0; }
.plain li { padding: 11px 0; border-bottom: 1px solid var(--line); font-family: var(--head); font-weight: 500; }
.plain li:first-child { border-top: 1px solid var(--line); }

/* experience */

.experience { border-top: 1px solid var(--ink); }
.experience { border-bottom: 1px solid var(--line); }
.experience summary {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 28px; gap: 24px; align-items: baseline;
  padding: 28px 0; cursor: pointer; list-style: none;
}
.experience summary::-webkit-details-marker { display: none; }
.p-title { font-family: var(--head); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2.1rem); letter-spacing: -0.025em; line-height: 1.1; }
.p-kind { color: var(--muted); font-size: 1rem; }
.p-toggle { width: 22px; height: 22px; position: relative; align-self: center; justify-self: end; }
.p-toggle::before, .p-toggle::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--ink); transition: transform .25s; }
.p-toggle::after { transform: rotate(90deg); }
.experience[open] .p-toggle::after { transform: rotate(0); }
.experience summary:hover .p-title { color: var(--accent); }
.p-body { padding: 0 0 32px; margin-left: calc(41.6% + 12px); animation: open .3s ease; }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-family: var(--head); font-size: .88rem; font-weight: 500; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.more { margin: 32px 0 0; }


/* seo */
.triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 36px 0; }
.triple li { border-top: 2px solid var(--ink); padding-top: 14px; }
.triple strong { display: block; font-family: var(--head); font-size: 1.1rem; margin-bottom: 6px; }
.triple span { display: block; font-size: .95rem; color: var(--muted); line-height: 1.55; }

/* blog */
/* .posts { border-top: 1px solid var(--ink); }
.posts li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.posts time { font-family: var(--head); font-size: .95rem; color: var(--muted); padding-top: 6px; }
.post-cat { font-family: var(--head); font-size: .9rem; font-weight: 600; color: var(--good); margin: 0 0 6px; }
.posts h3 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); margin-bottom: 8px; }
.posts h3 a { text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size .25s; }
.posts h3 a:hover { background-size: 100% 2px; color: var(--accent); }
.posts p:last-child { color: var(--muted); margin: 0; } */

/* .explore-card {
  display: block;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  transition: transform .25s, border-color .25s;
}
.explore-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.explore-card h3 { margin-bottom: 6px; }
.explore-card p { margin: 0; color: var(--muted); font-size: .95rem; } */

/* blog */
.blog-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 16px;
}

.blog-intro {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 16px;
  padding: clamp(22px, 4vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}
.blog-intro h3 { font-size: clamp(1.5rem, 3vw, 2rem); color: inherit; margin-bottom: 10px; }
.blog-intro p { color: inherit; margin: 0 0 18px; }
.blog-intro .btn { align-self: flex-start; color: var(--accent-ink); border-color: var(--accent-ink); }
.blog-intro .btn:hover { background: var(--accent-ink); color: var(--accent); }

.blog-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-topics li {
  font-family: var(--head);
  font-size: .88rem;
  font-weight: 500;
  padding: 5px 12px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
}

.blog-posts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 30px);
}
.blog-label { font-family: var(--head); font-weight: 600; font-size: .95rem; color: var(--muted); margin: 0 0 14px; }

.blog-post { padding: 18px 0; border-top: 1px solid var(--line); }
.blog-post:first-of-type { border-top: 0; padding-top: 4px; }
.blog-meta { font-family: var(--head); font-size: .9rem; color: var(--muted); margin: 0 0 6px; }
.blog-post h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); margin-bottom: 8px; }
.blog-post h3 a { text-decoration: none; }
.blog-post h3 a:hover { color: var(--accent); }
.blog-post p:not(.blog-meta) { color: var(--muted); margin-bottom: 10px; }

@media (max-width: 860px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* contact */
/* .contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.contact-list { margin-top: 28px; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.contact-list li > span { font-family: var(--head); font-weight: 600; font-size: .95rem; color: var(--muted); }
.contact-list a { text-underline-offset: 3px; } */
/* ---------- contact ---------- */
.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 16px;
  padding: 16px;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.contact-info {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 14px;
  padding: clamp(22px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 28px;
  

}
.contact-info h3 { font-size: clamp(1.7rem, 3vw, 2.2rem); color: inherit; margin-bottom: 12px; }
.contact-info p { color: inherit; margin: 0; font-size: 1rem; line-height: 1.65; }
.contact-info :focus-visible { outline-color: var(--accent-ink); }

.info-list { display: grid; gap: 16px; }
.info-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--head);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.info-list a { color: inherit; text-decoration: none; }
.info-list a:hover { text-decoration: underline; text-underline-offset: 4px; }

.contact-info svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social { display: flex; gap: 10px; }
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  color: inherit;
  transition: background-color .2s, color .2s, transform .2s;
}
.social a:hover { background: var(--accent-ink); color: var(--accent); transform: translateY(-3px); }

.contact-card .form { border-radius: 14px; margin: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 860px) {
  .contact-card { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}

.form { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 4vw, 36px); }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--head); font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); }
input, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 14px;
  transition: border-color .15s;
}
textarea { resize: vertical; min-height: 130px; }
input:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, textarea:focus-visible { border-color: var(--accent); outline-offset: 1px; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #C0392B; }
.error { color: #C0392B; font-size: .9rem; margin: 0; min-height: 0; font-family: var(--head); }
:root[data-theme="dark"] .error { color: #FF8A7A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .error { color: #FF8A7A; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; font-family: var(--head); font-weight: 500; }
.form-status.ok { color: var(--good); }
.form-status.bad { color: #C0392B; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-family: var(--head); font-size: .95rem; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot p { margin: 0; max-width: none; }
.foot a { text-underline-offset: 3px; }

/* ---------- responsive ---------- */
@media (min-width: 1000px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split > h2 { position: static; }
  .p-body { margin-left: 0; }
  .project summary { grid-template-columns: minmax(0, 1fr) 28px; gap: 8px 16px; }
  .p-kind { grid-column: 1; grid-row: 2; }
  .p-toggle { grid-column: 2; grid-row: 1; }
  .about-photo { position: static; }
  .about-photo img { max-width: 500px;}
}

@media (max-width: 820px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a.active { box-shadow: none; color: var(--accent); }
  .btn-small { display: none; }
}

@media (max-width: 640px) {
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 200px; }
  .skills { grid-template-columns: 1fr; gap: 36px; }
  .triple { grid-template-columns: 1fr; gap: 20px; }
  .posts li { grid-template-columns: 1fr; gap: 4px; }
  .facts div, .contact-list li { grid-template-columns: 1fr; gap: 2px; }
  .bars li { grid-template-columns: 90px 1fr 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .serp-hit, .js .serp-ghost { opacity: 1; transform: none; }
}

@media print {
  .site-header, .serp, .hero-actions, .form, .icon-btn { display: none !important; }
  body { background: #fff; color: #000; }
}
