/* ==========================================================================
   Misbah Ur Rehman Saim - portfolio
   Brand carried over from the existing portfolio: near-black base, lime accent,
   Space Grotesk for display, Inter for text. Coral is used only to mean "problem".
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset, variable) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallback so text doesn't jump when Inter loads */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.4%;
  ascent-override: 90.2%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #0a0a0a;
  --panel: #141414;
  --panel-2: #1c1c1c;
  --line: #2b2b2b;
  --line-2: #3d3d3d;
  --text: #fafafa;
  --muted: #a8a8a8;
  --lime: #d4ff00;
  --on-lime: #0a0a0a;
  --flag: #ff6b4a;

  --font-d: "Space Grotesk", "Arial Narrow", system-ui, sans-serif;
  --font-b: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --sec: clamp(4.5rem, 10vw, 8rem);
  --header-h: 68px;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-b);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

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

::selection { background: var(--lime); color: var(--on-lime); }

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: .75rem 1.25rem;
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 600;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* ---------- Section scaffolding ---------- */
.sec { padding-block: var(--sec); scroll-margin-top: var(--header-h); }
.sec--defer { content-visibility: auto; contain-intrinsic-size: auto 900px; }
.sec--tight { padding-top: 0; }

.sec__head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.title {
  font: 700 clamp(2rem, 4.8vw, 3.6rem)/1.05 var(--font-d);
  letter-spacing: -.03em;
  text-wrap: balance;
}
.lead {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 40rem;
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 52px;
  padding: 0 1.6rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1 var(--font-b);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn--primary { background: var(--lime); color: var(--on-lime); }
.btn--primary:hover { background: #e6ff5c; }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--lime); }
.btn--sm { min-height: 44px; padding: 0 1.2rem; font-size: .95rem; }
.btn:active { transform: translateY(1px); }

.textlink {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: .25rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.textlink:hover { color: var(--lime); }

/* ---------- Header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.hdr.is-stuck { border-bottom-color: var(--line); }

.hdr__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.logo {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--lime);
  color: var(--on-lime);
  font: 700 1.5rem/1 var(--font-d);
  text-decoration: none;
}

.menu-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 48px; height: 48px;
  background: transparent;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  transition: transform .2s, opacity .2s;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  padding: .5rem var(--gutter) 1.5rem;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.nav.is-open { display: block; }
.no-js .nav { display: block; position: static; padding: 0; border: 0; }
.no-js .menu-btn { display: none; }

.nav__list { display: grid; }
.nav__link {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font: 500 1.2rem/1 var(--font-d);
  text-decoration: none;
}
.nav__link[aria-current="true"] { color: var(--lime); }
.nav__cta { margin-top: 1.25rem; }
.nav__cta .btn { width: 100%; }

@media (min-width: 960px) {
  .menu-btn { display: none; }
  .nav,
  .no-js .nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    position: static;
    padding: 0;
    background: none;
    border: 0;
  }
  .nav__list { display: flex; gap: 1.6rem; }
  .nav__link {
    min-height: 44px;
    border: 0;
    color: var(--muted);
    font: 500 .98rem/1 var(--font-b);
    transition: color .2s;
  }
  .nav__link:hover { color: var(--text); }
  .nav__link[aria-current="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--lime); }
  .nav__cta { margin: 0; }
  .nav__cta .btn { width: auto; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-top: clamp(2.5rem, 7vw, 5rem);
}
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 3rem; }
}

.hero__title { font-weight: 400; }
.hero__name {
  display: block;
  font: 700 clamp(3rem, 10.5vw, 5.75rem)/.95 var(--font-d);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero__role {
  display: block;
  margin-top: 1.4rem;
  color: var(--muted);
  font: 500 clamp(1.05rem, 2.2vw, 1.15rem)/1.5 var(--font-d);
}
.hero__role .nb { white-space: nowrap; }
.hero__role .bar { margin-inline: .3em; color: var(--lime); }

.hero__lead {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 2rem; }
@media (max-width: 559px) { .cta .btn { flex: 1 1 100%; } }

.hero__loc { margin-top: 1.25rem; color: var(--muted); font-size: .95rem; }

/* 3D card deck (decorative) */
.hero__stage {
  position: relative;
  height: clamp(300px, 56vw, 500px);
  perspective: 1200px;
  perspective-origin: 50% 40%;
}
.deck {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -12deg));
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.hc {
  position: absolute;
  transform: translateZ(var(--z, 0px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 28px 44px -24px rgb(0 0 0 / .9);
}
.hc__in { padding: 1rem 1.1rem; }
.hc--serp { left: 0; top: 2%; width: 82%; --z: 0px; }
.hc--audit { right: 0; top: 33%; width: 60%; --z: 60px; }
.hc--gap { left: 4%; bottom: 4%; width: 56%; --z: 110px; border-color: var(--lime); }
.hc--line { right: 4%; bottom: 0; width: 32%; --z: 150px; }

.hc__url { color: var(--muted); font-size: .78rem; }
.hc__title { margin-top: .2rem; color: var(--lime); font: 600 1.05rem/1.3 var(--font-d); }
.hc__desc { margin-top: .35rem; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.hc__h { font: 700 .95rem/1 var(--font-d); }
.hc__list { display: grid; gap: .5rem; margin-top: .75rem; font-size: .85rem; }
.hc__list li { display: flex; align-items: center; gap: .55rem; }
.hc__list li::before {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--lime);
}
.hc__list .is-flag::before { background: var(--flag); }
.hc__chip {
  display: inline-block;
  margin-top: .6rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--on-lime);
  font: 700 .78rem/1.4 var(--font-d);
}
.hc__spark { display: block; width: 100%; height: auto; }

/* Perspective floor */
.hero__floor {
  position: absolute;
  z-index: -1;
  left: -10%; right: -10%; bottom: 0;
  height: 44%;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 100%;
  transform: perspective(520px) rotateX(64deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 8%, transparent 80%);
  mask-image: linear-gradient(to top, #000 8%, transparent 80%);
  opacity: .45;
}
.hero__glow {
  position: absolute;
  z-index: -1;
  right: -12%; top: 6%;
  width: min(720px, 90vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgb(212 255 0 / .09), transparent);
}

/* idle float - only while hero is on screen */
@keyframes float {
  from { transform: translateY(-5px); }
  to { transform: translateY(6px); }
}
.hero.is-live .hc__in { animation: float 6s ease-in-out infinite alternate; }
.hero.is-live .hc--audit .hc__in { animation-duration: 7.5s; animation-delay: -2s; }
.hero.is-live .hc--gap .hc__in { animation-duration: 6.5s; animation-delay: -4s; }
.hero.is-live .hc--line .hc__in { animation-duration: 8s; animation-delay: -1s; }

/* Pipeline strip - the one orchestrated load moment */
.flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) { .flow { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.flow__a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-height: 72px;
  padding: 1.1rem .75rem 1.4rem 0;
  color: var(--text);
  font: 600 .98rem/1.25 var(--font-d);
  text-decoration: none;
}
.flow__a::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 3px;
  background: var(--lime);
  transform-origin: left;
  animation: fill .45s ease-out both;
  animation-delay: calc(var(--i) * .2s + .3s);
}
.flow__n { color: var(--lime); font-size: .8rem; }
.flow__a:hover .flow__t { text-decoration: underline; text-decoration-color: var(--lime); text-underline-offset: 5px; }

/* ---------- Approach (interactive audit visual) ---------- */
.approach { display: grid; gap: 2.5rem; }
@media (min-width: 960px) {
  .approach { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 3.5rem; align-items: start; }
}

.frame {
  scroll-margin-top: calc(var(--header-h) + 12px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.frame svg { display: block; width: 100%; height: auto; }
.frame__cap { padding: .75rem 1.1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

.wf { fill: #181818; stroke: #333; stroke-width: 1.5; }
.ln { fill: #2b2b2b; }
.chrome { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; }
.chrome-line { stroke: var(--line); stroke-width: 1.5; }
.dot { fill: #3d3d3d; }
.url { fill: var(--muted); font: 500 12px var(--font-b); }
.sk { fill: none; stroke: #333; stroke-width: 1.5; }

.ly { opacity: 0; transition: opacity .4s ease; }
.ly.on { opacity: 1; }
.ly.dim { opacity: .3; }

.mk { stroke: var(--ink); stroke-width: 3; }
.mk--flag { fill: var(--flag); }
.mk--lime { fill: var(--lime); }
.mk--ghost { fill: var(--text); }
.mk-t { fill: var(--on-lime); font: 700 16px var(--font-d); text-anchor: middle; dominant-baseline: central; }
.ghost { fill: none; stroke: var(--text); stroke-opacity: .5; stroke-width: 1.5; stroke-dasharray: 5 5; }
.sbox { fill: rgb(212 255 0 / .05); stroke: var(--lime); stroke-width: 2; stroke-dasharray: 7 5; }
.chip { fill: var(--lime); }
.tick-bg { fill: var(--lime); stroke: var(--ink); stroke-width: 3; }
.tick { fill: none; stroke: var(--on-lime); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.growth { fill: none; stroke: var(--lime); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s ease .15s; }
.ly.on .growth { stroke-dashoffset: 0; }
.growth-dot { fill: var(--lime); stroke: var(--ink); stroke-width: 3; }

@keyframes scan { from { transform: translateY(0); } to { transform: translateY(350px); } }
.scan { fill: url(#scan-grad); }
.ly.on .scan { animation: scan 2.2s ease-in-out 1 both; }

.legend {
  display: grid;
  gap: .6rem;
  min-height: 9.5rem;
  margin-top: 1.25rem;
}
.legend__i { display: flex; align-items: flex-start; gap: .8rem; }
.legend__k {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--on-lime);
  font: 700 .85rem/1 var(--font-d);
}
.legend__k--dot { width: 10px; height: 10px; margin: 8px 8px 0 8px; }
.legend__k--flag { background: var(--flag); }
.legend__k--ghost { background: var(--text); }
.legend__k--sq { border-radius: 7px; }

.stages { border-top: 1px solid var(--line); }
.stage {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 56px;
  padding: .7rem 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 600 1.05rem/1.2 var(--font-d);
  text-align: left;
  cursor: pointer;
  transition: color .2s;
}
.stage:hover { color: var(--text); }
.stage__n {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  font-size: .85rem;
  transition: background-color .2s, border-color .2s, color .2s;
}
.stage[aria-pressed="true"] { color: var(--text); }
.stage[aria-pressed="true"] .stage__n { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }

.stage__d { padding: 0 0 1.1rem 46px; color: var(--muted); }
.js .stage__d { display: none; }
.js .stage[aria-pressed="true"] + .stage__d { display: block; }

.approach__steps { display: flex; flex-direction: column; }
.ctrl { display: flex; flex-wrap: wrap; gap: .6rem; order: -1; margin-bottom: 1.5rem; }
@media (min-width: 960px) { .ctrl { order: 0; margin: 1.5rem 0 0; } }
.ctrl[hidden] { display: none; }
.no-js .ctrl { display: none; }

/* ---------- About ---------- */
.about { display: grid; gap: 3rem; }
@media (min-width: 960px) {
  .about { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 5rem; align-items: start; }
  .about__side { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.formula { display: grid; gap: .35rem; margin-top: 2rem; font: 700 clamp(1.4rem, 3vw, 1.9rem)/1.15 var(--font-d); letter-spacing: -.02em; }
.formula__plus { color: var(--lime); }
.formula__eq { margin-top: .5rem; color: var(--muted); font-size: 1rem; font-weight: 500; letter-spacing: 0; }

.about__blocks { display: grid; gap: 2rem; }
.about__block { padding-left: 1.4rem; border-left: 3px solid var(--line-2); }
.about__block:hover { border-left-color: var(--lime); }
.about__block h3 { font: 700 1.3rem/1.2 var(--font-d); letter-spacing: -.01em; }
.about__block p { margin-top: .6rem; color: var(--muted); max-width: 38rem; text-wrap: pretty; }
.about__block p strong { color: var(--text); font-weight: 600; }

/* ---------- Process ---------- */
.process { position: relative; }
.step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1.25rem; padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.step:last-child { padding-bottom: 0; }

.step::before,
.step::after {
  content: "";
  position: absolute;
  left: 21px; top: 44px; bottom: 0;
  width: 2px;
}
.step::after { background: var(--line); z-index: 0; }
.step::before { background: var(--lime); z-index: 1; transform-origin: top; transform: scaleY(0); transition: transform .6s ease; }
.step.is-done::before { transform: scaleY(1); }
.step:last-child::before,
.step:last-child::after { display: none; }

.step__n {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 2px solid var(--line-2);
  border-radius: 50%;
  background: var(--ink);
  color: var(--muted);
  font: 700 1rem/1 var(--font-d);
  transition: background-color .3s, border-color .3s, color .3s;
}
.step.is-done .step__n { border-color: var(--lime); }
.step.is-active .step__n { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }

.step__body { display: grid; gap: .6rem 3rem; padding-top: .4rem; }
@media (min-width: 900px) { .step__body { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); } }
.step__t { color: var(--muted); font: 700 clamp(1.4rem, 3vw, 2rem)/1.1 var(--font-d); letter-spacing: -.02em; transition: color .3s; }
.step.is-active .step__t,
.step.is-done .step__t { color: var(--text); }
.step__p { color: var(--muted); max-width: 36rem; }
.step__out { margin-top: .6rem; color: var(--text); font-size: .98rem; }
.step__out strong { color: var(--lime); font-weight: 600; }

.no-js .step::before { transform: scaleY(1); }

/* ---------- Services ---------- */
.svc { border-top: 1px solid var(--line); }
.svc__row {
  position: relative;
  display: grid;
  gap: .6rem 3rem;
  padding: 1.9rem 0 1.9rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.svc__row::before {
  content: "";
  position: absolute;
  left: 0; top: 1.9rem; bottom: 1.9rem;
  width: 3px;
  background: var(--lime);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s ease;
}
.svc__row:hover::before { transform: scaleY(1); }
@media (min-width: 900px) { .svc__row { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); } }
.svc__t { font: 700 clamp(1.3rem, 2.6vw, 1.7rem)/1.15 var(--font-d); letter-spacing: -.02em; }
.svc__p { color: var(--muted); max-width: 38rem; }
.svc__tags { margin-top: .75rem; color: var(--text); font-size: .95rem; }

/* ---------- Work / case studies ---------- */
.case {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}
@media (min-width: 1000px) {
  .case { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4.5rem; }
  .case__side { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
}
.case__name { font: 700 clamp(1.8rem, 3.6vw, 2.6rem)/1.05 var(--font-d); letter-spacing: -.03em; }
.case__meta { margin-top: .6rem; color: var(--muted); }
.case__meta + .case__meta { margin-top: .1rem; }

.story { display: grid; margin-top: 1.75rem; border-top: 1px solid var(--line); }
.story__row { display: grid; gap: .35rem 2rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .story__row { grid-template-columns: 9rem minmax(0, 1fr); } }
.story dt { font: 700 1.05rem/1.4 var(--font-d); }
.story dd { color: var(--muted); max-width: 40rem; }
.story__row--flag dt { color: var(--flag); }
.story__row--res dt { color: var(--lime); }
.story__row--res dd { color: var(--text); }

.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.tag { padding: .35rem .85rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); font-size: .88rem; }

/* before / after bars (derived directly from the reported figures) */
.ba { display: grid; gap: 1.25rem; padding: 1.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ba__h { font: 700 1.1rem/1.2 var(--font-d); }
.ba__set { display: grid; gap: .55rem; }
.ba__row { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) 3rem; align-items: center; gap: .75rem; font-size: .92rem; }
.ba__l { color: var(--muted); }
.ba__bar { display: block; height: 14px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.ba__fill { display: block; height: 100%; border-radius: 999px; background: var(--line-2); transform-origin: left; transform: scaleX(0); transition: transform 1s cubic-bezier(.2, .7, .2, 1) .1s; }
.ba__fill--after { background: var(--lime); }
.in .ba__fill,
.no-js .ba__fill { transform: scaleX(var(--w, 1)); }
.ba__v { font: 700 1rem/1 var(--font-d); text-align: right; }
.ba__note { color: var(--muted); font-size: .85rem; }

/* optional proof screenshot frame - used once real images are added (see README) */
.shot { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.shot__bar { display: flex; gap: 6px; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.shot__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.shot img { display: block; width: 100%; height: auto; }

/* ---------- Results ---------- */
.results { display: grid; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .results { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.res { position: relative; padding: 2rem 0 2.25rem; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) {
  .res { padding: 2.5rem 2rem 2.5rem 0; border-bottom: 0; }
  .res + .res { padding-left: 2rem; border-left: 1px solid var(--line); }
}
.res__n { font: 700 clamp(4.5rem, 11vw, 7.5rem)/.95 var(--font-d); letter-spacing: -.05em; color: var(--lime); }
.res__t { margin-top: .75rem; font: 600 1.25rem/1.25 var(--font-d); }
.res__c { margin-top: .4rem; color: var(--muted); font-size: .98rem; max-width: 22rem; }
.results__note { margin-top: 1.75rem; color: var(--muted); font-size: .95rem; max-width: 44rem; }

/* ---------- Skills ---------- */
.skills { display: grid; gap: 1.75rem; }
@media (min-width: 900px) { .skills { grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; align-items: start; } }

.skills__tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 900px) { .skills__tabs { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); } }

.tab {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: .55rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--muted);
  font: 600 .98rem/1.2 var(--font-d);
  text-align: left;
  cursor: pointer;
  transition: color .2s, background-color .2s, border-color .2s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
@media (min-width: 900px) {
  .tab { padding: .75rem 0 .75rem .25rem; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .tab[aria-selected="true"] { background: none; color: var(--lime); box-shadow: inset 3px 0 0 var(--lime); padding-left: 1rem; }
}

.panel { padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.js .panel:not(.is-on) { display: none; }
.no-js .panel + .panel { margin-top: 1rem; }
.panel__t { font: 700 clamp(1.5rem, 3vw, 2rem)/1.1 var(--font-d); letter-spacing: -.02em; }
.panel__p { margin-top: .75rem; color: var(--muted); max-width: 38rem; }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.chips li { padding: .45rem .95rem; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; font-size: .95rem; }

/* ---------- AI / vibe coding ---------- */
.ai { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .ai { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5rem; align-items: start; } }
.ai__tools { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; }
.ai__tools li { padding: .55rem 1.1rem; border: 1.5px solid var(--lime); border-radius: 999px; font: 600 1rem/1 var(--font-d); }
.ai__note { margin-top: 1.75rem; color: var(--muted); max-width: 34rem; }

.pair { display: grid; gap: 1.75rem; }
.pair__col h3 { font: 700 1.2rem/1.2 var(--font-d); }
.pair__list { display: grid; gap: .65rem; margin-top: 1rem; }
.pair__list li { position: relative; padding-left: 1.7rem; }
.pair__list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); }
.pair__col--not .pair__list li::before { background: transparent; border: 2px solid var(--line-2); }
.pair__col--not { padding-top: 1.75rem; border-top: 1px solid var(--line); }

/* ---------- Journey ---------- */
.tl { border-top: 1px solid var(--line); }
.tl__i { display: grid; gap: .5rem 3rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .tl__i { grid-template-columns: 13rem minmax(0, 1fr); } }
.tl__d { color: var(--lime); font: 600 1rem/1.4 var(--font-d); }
.tl__r { font: 700 clamp(1.3rem, 2.6vw, 1.7rem)/1.15 var(--font-d); letter-spacing: -.02em; }
.tl__o { margin-top: .3rem; font-weight: 600; }
.tl__m { color: var(--muted); font-size: .95rem; }
.tl__p { margin-top: .7rem; color: var(--muted); max-width: 38rem; }

.edu { display: grid; gap: .5rem 3rem; margin-top: 3rem; padding: clamp(1.5rem, 4vw, 2.25rem); border: 1.5px solid var(--lime); border-radius: var(--r-lg); }
@media (min-width: 900px) { .edu { grid-template-columns: 13rem minmax(0, 1fr); } }
.edu__t { font: 700 clamp(1.3rem, 2.6vw, 1.7rem)/1.15 var(--font-d); letter-spacing: -.02em; }
.edu__p { margin-top: .7rem; color: var(--muted); max-width: 40rem; }

/* ---------- Working with me ---------- */
.expect { display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 800px) { .expect { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.expect__i { padding: 1.9rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 800px) {
  .expect__i { padding: 2.25rem 2.5rem 2.25rem 0; }
  .expect__i:nth-child(even) { padding: 2.25rem 0 2.25rem 2.5rem; border-left: 1px solid var(--line); }
}
.expect__i h3 { font: 700 1.3rem/1.2 var(--font-d); letter-spacing: -.01em; }
.expect__i p { margin-top: .6rem; color: var(--muted); max-width: 30rem; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 3rem; }
@media (min-width: 960px) { .contact { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 5rem; align-items: start; } }

.contact__list { display: grid; gap: 1.1rem; margin-top: 2.25rem; }
.contact__list dt { color: var(--muted); font-size: .9rem; }
.contact__list dd { font: 600 1.2rem/1.4 var(--font-d); word-break: break-word; }
.contact__list a { text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.contact__list a:hover { color: var(--lime); }

.form { display: grid; gap: 1.1rem; padding: clamp(1.5rem, 4vw, 2.25rem); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.form__h { font: 700 1.3rem/1.2 var(--font-d); }
.form__sub { margin-top: -.5rem; color: var(--muted); font-size: .95rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: .75rem 1rem;
  background: var(--ink);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
}
.field textarea { min-height: 120px; resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23fafafa' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline-offset: 1px; border-color: var(--lime); }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
@media (max-width: 559px) { .form__actions .btn { flex: 1 1 100%; } }
.form__status { min-height: 1.5em; color: var(--muted); font-size: .95rem; }

/* ---------- Footer ---------- */
.ftr { padding: 3rem 0 2.5rem; border-top: 1px solid var(--line); }
.ftr__in { display: grid; gap: 2rem; }
@media (min-width: 800px) { .ftr__in { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }
.ftr__name { font: 700 1.3rem/1.2 var(--font-d); }
.ftr__pos { margin-top: .4rem; color: var(--muted); font-size: .95rem; }
.ftr__nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.ftr__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.ftr__nav a:hover { color: var(--lime); }
.ftr__copy { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

/* ---------- Low-power and reduced-motion handling ---------- */
.lite .deck { transform: none; transition: none; }
.lite .hero.is-live .hc__in { animation: none; }
.lite .hero__floor { display: none; }
.lite .hc--line { display: none; }
@media (max-width: 767px) {
  .hero__stage { height: 330px; perspective: none; }
  .hc--serp { width: 92%; top: 0; }
  .hc--audit { top: 34%; width: 62%; }
  .hc--gap { left: 0; width: 66%; bottom: 0; }
  .hc__desc { display: none; }
  .hc__list li:nth-child(n+3) { display: none; }
  .hc--gap .hc__desc { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .deck { transform: none; }
  .ly.on .scan { animation: none; transform: translateY(160px); }
}

@media print {
  .hdr, .hero__stage, .hero__floor, .hero__glow, .menu-btn { display: none !important; }
  body { background: #fff; color: #000; }
}
