/* =================================================================
   Ankush Kumar — Portfolio
   Palette: cool chalk paper · graphite ink · single cobalt accent
   Type:    Bricolage Grotesque (display) · Inter (body) · JetBrains Mono (data)
   ================================================================= */

:root {
  /* light theme (default) */
  --paper:     #ebede8;   /* cool chalk */
  --paper-2:   #e3e5df;   /* raised surface */
  --paper-3:   #dcded6;   /* pressed / hover surface */
  --ink:       #16181c;   /* near-black, cool */
  --ink-soft:  #33363c;
  --graphite:  #5b6067;   /* secondary text */
  --hairline:  #c8cbc1;   /* lines */
  --accent:    #2438e0;   /* cobalt */
  --accent-2:  #1b2bb0;   /* pressed accent */
  --ok:        #2f8f5b;   /* status */
  --shadow:    rgba(22, 24, 28, 0.10);

  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --rail: 96px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

[data-theme="dark"] {
  --paper:     #101216;
  --paper-2:   #171a1f;
  --paper-3:   #1e2127;
  --ink:       #e9eae4;
  --ink-soft:  #c3c5be;
  --graphite:  #8b8f95;
  --hairline:  #2a2d34;
  --accent:    #7d90ff;
  --accent-2:  #a3b1ff;
  --ok:        #4fbe83;
  --shadow:    rgba(0, 0, 0, 0.45);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }

/* subtle paper grain for texture (very low opacity) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: 0.05; }

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { position: relative; padding-block: clamp(5.5rem, 13vh, 9.5rem); }
section[id] { scroll-margin-top: 90px; }

/* ---------- typography helpers ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--graphite);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.kicker::before {
  content: "";
  width: 1.6em; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.section-head { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-top: 1rem;
}

/* =================================================================
   TOP BAR
   ================================================================= */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--hairline);
  padding-block: 0.8rem;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.brand .mark {
  width: 11px; height: 11px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  position: relative;
}
.brand .mark::after {
  content: ""; position: absolute; inset: 2px;
  background: var(--accent); border-radius: 50%;
  transform: scale(0.6); transition: transform 0.4s var(--ease);
}
.brand:hover .mark::after { transform: scale(1); }

.topbar-right { display: flex; align-items: center; gap: 0.5rem; }
.nav-links { display: flex; gap: 0.35rem; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.7rem;
  border-radius: 100px;
  color: var(--graphite);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.icon-btn:hover { border-color: var(--ink); background: var(--paper-2); }
.icon-btn svg { width: 17px; height: 17px; stroke: var(--ink); fill: none; stroke-width: 1.7; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.menu-btn { display: none; }

/* =================================================================
   RAIL — the signature "stack thread"
   ================================================================= */
.rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--rail);
  z-index: 60;
  display: none;              /* shown on wide screens only */
  align-items: center;
  pointer-events: none;
}
.rail-inner {
  position: relative;
  height: 52vh;
  margin-left: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: auto;
}
.rail-line {
  position: absolute;
  left: 4px; top: 4px; bottom: 4px;
  width: 1px;
  background: var(--hairline);
}
.rail-fill {
  position: absolute;
  left: 4px; top: 4px;
  width: 1px;
  height: 0;
  background: var(--accent);
  transition: height 0.15s linear;
}
.rail-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  background: none;
  padding: 0;
}
.rail-node .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--hairline);
  flex: none;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.rail-node .rl {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.4s var(--ease);
  white-space: nowrap;
}
.rail-node:hover .rl { opacity: 1; transform: translateX(0); }
.rail-node.active .dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.35);
}
.rail-node.active .rl { opacity: 1; transform: translateX(0); color: var(--ink); }

/* =================================================================
   HERO
   ================================================================= */
.hero { padding-top: clamp(8rem, 20vh, 12rem); padding-bottom: clamp(4rem, 9vh, 7rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.55fr 0.85fr; }
}
.hero-eyebrow {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 1.6rem;
}
.hero-eyebrow .sep { color: var(--hairline); }
.hero-eyebrow #clock { color: var(--ink); font-variant-numeric: tabular-nums; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 11vw, 7.4rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; }

.hero-lede {
  max-width: 44ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  margin-top: 2rem;
}
.hero-lede b { font-weight: 600; color: var(--ink); }

.status {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em;
  color: var(--graphite); margin-top: 1.9rem;
}
.status .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  position: relative;
}
.status .pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--ok); opacity: 0.6;
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(1.8); opacity: 0; } }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }

.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.5rem;
  border-radius: 100px;
  background: var(--bg); color: var(--fg);
  font-size: 0.95rem; font-weight: 500;
  border: 1px solid var(--bg);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translate(3px, -3px); }
.btn.ghost { --bg: transparent; --fg: var(--ink); border-color: var(--hairline); }
.btn.ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }

.hero-socials { display: flex; gap: 1.5rem; margin-top: 2.6rem; }
.hero-socials a {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.05em;
  color: var(--graphite); position: relative; padding-bottom: 3px;
  transition: color 0.3s var(--ease);
}
.hero-socials a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.hero-socials a:hover { color: var(--ink); }
.hero-socials a:hover::after { transform: scaleX(1); transform-origin: left; }

/* portrait */
.portrait {
  position: relative;
  justify-self: center;
  width: min(320px, 78vw);
}
.portrait .frame {
  position: relative;
  border-radius: 200px 200px 14px 14px;
  overflow: hidden;
  aspect-ratio: 3 / 3.7;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transition: filter 0.6s var(--ease), transform 0.9s var(--ease);
}
.portrait:hover img { filter: grayscale(0) contrast(1); transform: scale(1.03); }
.portrait .tag {
  position: absolute; left: -12px; bottom: 26px;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 0.8rem; border-radius: 100px;
  box-shadow: 0 8px 30px var(--shadow);
}

/* =================================================================
   ABOUT / STATS
   ================================================================= */
.about-grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 820px) { .about-grid { grid-template-columns: 1.1fr 0.9fr; } }
.about-lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.about-lede em { font-style: normal; color: var(--accent); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.stat { background: var(--paper); padding: 1.6rem 1.4rem; }
.stat:last-child { grid-column: span 2; }
.stat .n {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1; letter-spacing: -0.03em;
}
.stat .n .suffix { color: var(--accent); }
.stat .l {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--graphite); margin-top: 0.7rem;
}

/* =================================================================
   SKILLS
   ================================================================= */
.skill-cols { display: grid; gap: clamp(2.5rem, 5vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 780px) { .skill-cols { grid-template-columns: 1fr 1fr; } }
.skill-group h3 {
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--graphite); padding-bottom: 1rem; margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--hairline);
  display: flex; justify-content: space-between;
}
.skill-group h3 span { color: var(--ink); }
.skill-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0.4rem;
  border-bottom: 1px solid var(--hairline);
  transition: padding-left 0.35s var(--ease);
}
.skill-row:hover { padding-left: 1rem; }
.skill-row .ic {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
}
.skill-row .ic img {
  width: 26px; height: 26px; object-fit: contain;
  filter: grayscale(1); opacity: 0.55;
  transition: filter 0.4s var(--ease), opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.skill-row:hover .ic img { filter: grayscale(0); opacity: 1; transform: scale(1.12); }
.skill-row .nm { font-weight: 500; font-size: 1.02rem; }
.skill-row .idx {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; color: var(--graphite);
}

/* =================================================================
   PATH (qualification)
   ================================================================= */
.path-grid { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); grid-template-columns: 1fr; }
@media (min-width: 820px) { .path-grid { grid-template-columns: 1fr 1fr; } }
.track-title {
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 2rem;
  display: inline-flex; align-items: center; gap: 0.7rem;
}
.track-title .d { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.entry {
  position: relative; padding-left: 1.6rem; padding-bottom: 2rem;
  border-left: 1px solid var(--hairline);
}
.entry:last-child { padding-bottom: 0; }
.entry::before {
  content: ""; position: absolute; left: -4px; top: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--graphite);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.entry:hover::before { background: var(--accent); border-color: var(--accent); }
.entry .when { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--graphite); }
.entry .role { font-weight: 600; font-size: 1.08rem; margin-top: 0.35rem; }
.entry .where { color: var(--graphite); font-size: 0.94rem; margin-top: 0.1rem; }

/* =================================================================
   SERVICES
   ================================================================= */
.svc { border-top: 1px solid var(--hairline); }
.svc-row {
  display: grid; grid-template-columns: auto 1fr; gap: 1.5rem 2rem;
  align-items: start;
  padding: clamp(1.8rem, 4vw, 2.8rem) 0.4rem;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  transition: padding-left 0.4s var(--ease);
}
@media (min-width: 780px) { .svc-row { grid-template-columns: auto 0.9fr 1.1fr; align-items: center; } }
.svc-row:hover { padding-left: 1rem; }
.svc-row .num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--graphite); padding-top: 0.3rem; }
.svc-row h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2.3rem); letter-spacing: -0.02em; line-height: 1.05;
  transition: color 0.35s var(--ease);
}
.svc-row:hover h3 { color: var(--accent); }
.svc-row p { color: var(--graphite); max-width: 46ch; }

/* =================================================================
   WORK / PROJECTS
   ================================================================= */
.work-list { border-top: 1px solid var(--hairline); }
.work-item {
  display: block; position: relative;
  border-bottom: 1px solid var(--hairline);
  padding: clamp(1.6rem, 3.5vw, 2.4rem) 0.4rem;
  transition: padding-left 0.45s var(--ease), background 0.45s var(--ease);
}
.work-item:hover { padding-left: 1.2rem; }
.work-top { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: baseline; }
.work-item .num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--graphite); }
.work-item h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 4.5vw, 2.7rem); letter-spacing: -0.025em; line-height: 1;
  transition: color 0.4s var(--ease), transform 0.5s var(--ease);
}
.work-item:hover h3 { color: var(--accent); }
.work-item .stack {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--graphite); text-align: right; align-self: center;
}
.work-item .go {
  align-self: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--hairline); display: grid; place-items: center;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.work-item .go svg { width: 15px; height: 15px; stroke: var(--ink); fill: none; stroke-width: 2; transition: transform 0.4s var(--ease); }
.work-item:hover .go { border-color: var(--accent); background: var(--accent); }
.work-item:hover .go svg { stroke: #fff; transform: translate(2px, -2px); }

/* desktop floating preview */
.work-preview {
  display: none;
  overflow: hidden;
  border-radius: 12px;
  margin-top: 1.2rem;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.55s var(--ease), opacity 0.45s var(--ease), margin-top 0.5s var(--ease);
}
.work-preview img { width: 100%; border-radius: 12px; border: 1px solid var(--hairline); }
@media (max-width: 899px) {
  .work-preview { display: block; max-height: 520px; opacity: 1; }
}
@media (min-width: 900px) {
  .work-item .work-preview { display: block; }
  .work-item:hover .work-preview { max-height: 460px; opacity: 1; }
}

/* =================================================================
   CONTACT
   ================================================================= */
.contact-grid { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 0.85fr 1.15fr; } }
.contact-lines { display: grid; gap: 1.4rem; }
.cline { border-top: 1px solid var(--hairline); padding-top: 1.2rem; }
.cline .k { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite); }
.cline a, .cline .v { display: inline-block; font-size: 1.15rem; font-weight: 500; margin-top: 0.4rem; transition: color 0.3s var(--ease); }
.cline a:hover { color: var(--accent); }

form { display: grid; gap: 1.4rem; }
.field { position: relative; }
.field label {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--graphite);
}
.field input, .field textarea {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid var(--hairline);
  padding: 0.7rem 0; margin-top: 0.4rem; font-size: 1.05rem;
  transition: border-color 0.35s var(--ease);
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.form-foot { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.form-note { font-family: var(--font-mono); font-size: 0.72rem; color: var(--graphite); }
.form-note.ok { color: var(--ok); }
.form-note.err { color: #c0392b; }
[data-theme="dark"] .form-note.err { color: #ff7b6b; }

/* =================================================================
   FOOTER
   ================================================================= */
.footer { border-top: 1px solid var(--hairline); padding-block: clamp(3rem, 7vw, 5rem); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-end; }
.footer h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.5rem, 9vw, 5rem); letter-spacing: -0.04em; line-height: 0.9; }
.footer h2 span { color: var(--graphite); }
.footer-meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--graphite); letter-spacing: 0.05em; line-height: 2; }
.footer-meta a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--graphite);
}
.to-top { display: inline-flex; align-items: center; gap: 0.5rem; transition: color 0.3s var(--ease); }
.to-top:hover { color: var(--accent); }
.to-top svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* =================================================================
   MOBILE MENU OVERLAY
   ================================================================= */
.menu-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--paper);
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease-in-out);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--gutter);
}
.menu-overlay.open { transform: translateY(0); }
.menu-overlay nav { display: grid; gap: 0.5rem; }
.menu-overlay a {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.2rem, 11vw, 3.5rem); letter-spacing: -0.03em; line-height: 1.15;
  display: flex; align-items: baseline; gap: 1rem;
}
.menu-overlay a .mi { font-family: var(--font-mono); font-size: 0.9rem; color: var(--graphite); }
.menu-overlay a:hover { color: var(--accent); }
.menu-close { position: absolute; top: 1.1rem; right: var(--gutter); }

/* =================================================================
   REVEAL ANIMATION (JS-driven, degrades gracefully)
   ================================================================= */
.reveal { opacity: 0; transform: translateY(26px); }
.js-ready .reveal { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (min-width: 1160px) {
  .rail { display: flex; }
  .wrap { padding-left: max(var(--gutter), var(--rail)); }
  .topbar { padding-left: max(var(--gutter), var(--rail)); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .topbar .cta-top { display: none; }
}

/* =================================================================
   ACCESSIBILITY
   ================================================================= */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
