/* ============================================================
   Muhammad Irfan — portfolio
   Hand-written CSS. No framework.
   ============================================================ */

/* Self-hosted latin subsets. Variable fonts, so one file covers every weight. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #070a10;
  --bg-alt:    #0a0e16;
  --surface:   #0f1521;
  --surface-2: #141c2b;
  --border:    #1c2634;
  --border-hi: #2b3a52;

  --text:      #e9eff7;
  --text-dim:  #9cabbd;
  --text-mute: #8695aa;   /* lifted from #6b7a8f — that was 3.90:1, below AA */

  --accent:    #4d9fff;
  --accent-2:  #38d9a9;
  --accent-3:  #a78bfa;
  --gold:      #ffb84d;
  --danger:    #ff6b6b;

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --wrap:      1140px;

  --shadow:    0 18px 40px -22px rgba(0, 0, 0, .9);
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, 1);

  --ff-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

/* `hidden` must win over any display rule set on these elements */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
button { font: inherit; color: inherit; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #04070c; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(77, 159, 255, .3); color: #fff; }

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

/* Film grain over the whole page */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress */
.progress {
  position: fixed; inset: 0 0 auto 0; z-index: 110;
  height: 2px; pointer-events: none;
}
.progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(77, 159, 255, .7);
  transition: width .08s linear;
}

/* ───────────────────────── Buttons ───────────────────────── */

.btn {
  --btn-pad: .85rem 1.5rem;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: var(--btn-pad);
  border-radius: 100px;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--sm { --btn-pad: .55rem 1.05rem; font-size: .85rem; }
.btn--lg { --btn-pad: 1rem 1.9rem; font-size: 1rem; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #3b7fe0);
  color: #04070c;
  box-shadow: 0 10px 30px -12px rgba(77, 159, 255, .95);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -12px rgba(77, 159, 255, 1); }

.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-hi); }
.btn--ghost:hover { transform: translateY(-2px); background: var(--surface-2); border-color: var(--accent); }

.btn--quiet { background: transparent; color: var(--text-dim); }
.btn--quiet:hover { color: var(--accent); }

/* ───────────────────────── Nav ───────────────────────── */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 10, 16, .6);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.nav.is-stuck { border-bottom-color: var(--border); background: rgba(7, 10, 16, .92); }

.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.nav__brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; }
.nav__mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; font-size: .82rem; letter-spacing: .04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04070c;
}
.nav__name { font-size: .97rem; letter-spacing: -.01em; }

.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links > a:not(.btn) {
  font-size: .91rem; color: var(--text-dim); font-weight: 500; position: relative; padding: .25rem 0;
  transition: color .18s ease;
}
.nav__links > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); border-radius: 2px; transition: width .22s ease;
}
.nav__links > a:not(.btn):hover,
.nav__links > a.is-active { color: var(--text); }
.nav__links > a.is-active::after { width: 100%; }

/* ⌘K hint button */
.kbd-hint {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  padding: .38rem .6rem .38rem .62rem; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-mute); transition: border-color .18s ease, color .18s ease;
}
.kbd-hint:hover { border-color: var(--border-hi); color: var(--text); }
.kbd-hint .ico { width: 14px; height: 14px; }
.kbd-hint__keys { display: flex; gap: 2px; }
kbd {
  font-family: var(--ff-mono); font-size: .68rem; line-height: 1;
  padding: .2rem .32rem; border-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-mute);
}

.nav__toggle { display: none; background: none; border: 0; padding: .45rem; cursor: pointer; }
.nav__toggle span {
  display: block; width: 23px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .25s ease, opacity .2s ease;
}
.nav__toggle span + span { margin-top: 5px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ───────────────────────── Hero ───────────────────────── */

.hero { position: relative; padding: 9.5rem 0 3.5rem; overflow: hidden; }

/* Dot field. The canvas takes over when JS runs; this CSS grid is the
   fallback for no-JS, reduced motion and touch. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 30%, #000 30%, transparent 100%);
          mask-image: radial-gradient(ellipse 78% 68% at 50% 30%, #000 30%, transparent 100%);
  transition: opacity .6s ease;
}
.hero.has-dots::before { opacity: 0; }

.hero__dots {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0; transition: opacity .8s ease;
}
.hero.has-dots .hero__dots { opacity: 1; }

/* Slow-drifting aurora.
   No filter: blur() here — the radial gradients are already soft, and a
   large blurred layer re-rasterises on every scroll frame. */
.aurora { position: absolute; inset: -20% -10% auto -10%; height: 900px; pointer-events: none; }
.aurora__blob { position: absolute; border-radius: 50%; opacity: .55; will-change: transform; }
.aurora__blob--1 {
  width: 560px; height: 420px; top: 4%; left: 8%;
  background: radial-gradient(circle, rgba(77, 159, 255, .55), transparent 68%);
  animation: drift1 19s ease-in-out infinite alternate;
}
.aurora__blob--2 {
  width: 500px; height: 440px; top: 0; right: 14%;
  background: radial-gradient(circle, rgba(56, 217, 169, .34), transparent 68%);
  animation: drift2 23s ease-in-out infinite alternate;
}
.aurora__blob--3 {
  width: 460px; height: 380px; top: 26%; left: 42%;
  background: radial-gradient(circle, rgba(167, 139, 250, .3), transparent 68%);
  animation: drift3 27s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(90px, 60px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-80px, 50px) scale(1.08); } }
@keyframes drift3 { to { transform: translate(50px, -60px) scale(1.15); } }

.hero__spot {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  transition: opacity .45s ease;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(77, 159, 255, .12), transparent 72%);
}
.hero:hover .hero__spot { opacity: 1; }

.hero__inner { position: relative; z-index: 2; }

/* Two columns so the right half of a wide screen isn't dead space */
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: 3rem; align-items: center;
}
.hero__main { min-width: 0; }

/* ─── "Shipped & running" panel ─── */

.shipped {
  background: linear-gradient(160deg, rgba(20, 28, 43, .92), rgba(10, 14, 22, .92));
  border: 1px solid var(--border-hi); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
.shipped__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.2rem; border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .018);
}
.shipped__title {
  font-family: var(--ff-mono); font-size: .74rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim);
}
.shipped__count {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--ff-mono); font-size: .7rem; color: var(--accent-2);
  letter-spacing: .06em;
}

.shipped__list { padding: .5rem .55rem; }
.shipped__list li {
  display: flex; align-items: center; gap: .7rem;
  padding: .62rem .65rem; border-radius: var(--radius-sm);
  transition: background .18s ease;
}
.shipped__list li:hover { background: rgba(255, 255, 255, .03); }

.shipped__dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 10px -1px var(--accent-2);
}
/* stagger the pulse so the column feels alive rather than synchronised */
.shipped__list li:nth-child(1) .shipped__dot { animation: pulse 2.4s infinite; }
.shipped__list li:nth-child(2) .shipped__dot { animation: pulse 2.4s .45s infinite; }
.shipped__list li:nth-child(3) .shipped__dot { animation: pulse 2.4s .9s infinite; }
.shipped__list li:nth-child(4) .shipped__dot { animation: pulse 2.4s 1.35s infinite; }
.shipped__list li:nth-child(5) .shipped__dot { animation: pulse 2.4s 1.8s infinite; }

.shipped__name { font-size: .93rem; font-weight: 600; letter-spacing: -.01em; }
.shipped__who {
  margin-left: auto; font-family: var(--ff-mono); font-size: .7rem;
  color: var(--text-mute); white-space: nowrap;
}

.shipped__foot {
  display: flex; flex-wrap: wrap; gap: .35rem;
  padding: .85rem 1.2rem 1rem; border-top: 1px solid var(--border);
}
.shipped__foot span {
  font-family: var(--ff-mono); font-size: .69rem; color: var(--text-mute);
  padding: .18rem .5rem; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--border);
}

.hero__status {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .42rem 1rem; border: 1px solid var(--border-hi); border-radius: 100px;
  background: rgba(15, 21, 33, .7); backdrop-filter: blur(8px);
  font-size: .82rem; color: var(--text-dim); margin: 0 0 1.7rem; font-weight: 500;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(56, 217, 169, .65); animation: pulse 2.2s infinite; flex: none;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(56, 217, 169, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 217, 169, 0); }
}

.hero__title {
  font-size: clamp(3rem, 9.5vw, 6.6rem); font-weight: 900;
  letter-spacing: -.045em; line-height: .95;
}
.hero__line { display: block; }
.hero__line--grad {
  /* inline-block so the gradient spans the glyphs, not the whole line box */
  display: inline-block;
  background: linear-gradient(96deg,
    var(--accent) 0%, var(--accent-2) 28%, var(--accent-3) 52%,
    var(--accent-2) 76%, var(--accent) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 11s ease-in-out infinite;
}
@keyframes sheen {
  0%, 100% { background-position:   0% 50%; }
  50%      { background-position: 100% 50%; }
}
.hero__role {
  font-size: clamp(1.05rem, 2.6vw, 1.5rem); font-weight: 600;
  color: var(--text-dim); margin: 1rem 0 .9rem; letter-spacing: -.015em;
}

.hero__typed {
  font-family: var(--ff-mono); font-size: clamp(.82rem, 2.1vw, .95rem);
  color: var(--text-mute); margin: 0 0 1.5rem; min-height: 1.6em;
}
.hero__prompt { color: var(--accent-2); margin-right: .45rem; }
.caret {
  display: inline-block; width: 8px; height: 1.05em; margin-left: 2px;
  background: var(--accent); vertical-align: -.18em;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__lede { max-width: 60ch; font-size: 1.08rem; color: var(--text-dim); }
.hero__lede strong { color: var(--text); font-weight: 600; }

.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; margin: 2rem 0 2.6rem; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  backdrop-filter: blur(6px);
}
.stats li { background: rgba(15, 21, 33, .82); padding: 1.5rem 1.2rem; }
.stats strong {
  display: block; font-size: 2.1rem; font-weight: 800; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats span { font-size: .82rem; color: var(--text-mute); line-height: 1.45; display: block; margin-top: .2rem; }

.scroll-cue {
  margin: 2rem auto 0; width: 24px; height: 38px;
  border: 1.5px solid var(--border-hi); border-radius: 100px;
  display: grid; justify-items: center; padding-top: 7px;
}
.scroll-cue span {
  width: 3px; height: 7px; border-radius: 2px; background: var(--accent);
  animation: cue 1.9s ease-in-out infinite;
}
@keyframes cue { 0%,100% { transform: translateY(0); opacity: 1; } 55% { transform: translateY(12px); opacity: .15; } }

/* ───────────────────────── Sections ───────────────────────── */

.section { position: relative; z-index: 2; padding: 4.5rem 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section__eyebrow {
  font-family: var(--ff-mono); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 .5rem;
}
.section__title { font-size: clamp(1.9rem, 4.2vw, 2.8rem); font-weight: 800; margin-bottom: .7rem; }
.section__sub { max-width: 60ch; color: var(--text-dim); margin-bottom: 1.9rem; }

/* Heading left, the supporting line beside it rather than stacked under it */
.section__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  gap: 2.5rem; align-items: end; margin-bottom: 2rem;
}
.section__head .section__title { margin-bottom: 0; }
.section__head .section__sub { margin-bottom: 0; }
.section__title + .about,
.section__title + .skills,
.section__title + .timeline,
.section__title + .why,
.section__title + .feature { margin-top: 1.5rem; }

/* ───────────────────────── About + console ───────────────────────── */

.about { display: grid; grid-template-columns: 1fr 1.05fr; gap: 2.6rem; align-items: start; }
.about__text p { color: var(--text-dim); font-size: 1.02rem; }
.about__text strong { color: var(--text); font-weight: 600; }

.console {
  background: #060910; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); position: sticky; top: 100px;
}
.console__bar {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .9rem; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.console__dots { display: flex; gap: .4rem; }
.d { width: 11px; height: 11px; border-radius: 50%; display: block; }
.d--r { background: #ff5f57; } .d--y { background: #febc2e; } .d--g { background: #28c840; }
.console__host {
  font-family: var(--ff-mono); font-size: .74rem; color: var(--text-mute);
  margin-left: .2rem;
}
.console__live {
  margin-left: auto; display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--ff-mono); font-size: .68rem; color: var(--accent-2);
  text-transform: uppercase; letter-spacing: .08em;
}

.console__routes {
  display: flex; flex-wrap: wrap; gap: .4rem;
  padding: .85rem .9rem; border-bottom: 1px solid var(--border);
  background: rgba(15, 21, 33, .5);
}
.route {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font-family: var(--ff-mono); font-size: .74rem;
  padding: .35rem .6rem; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim);
  transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease;
}
.route:hover { color: var(--text); border-color: var(--border-hi); transform: translateY(-1px); }
.route.is-active { border-color: var(--accent); color: var(--text); background: rgba(77, 159, 255, .09); }
.verb { font-weight: 600; font-size: .66rem; letter-spacing: .04em; }
.verb--get  { color: var(--accent-2); }
.verb--post { color: var(--gold); }

/* ─── Request trace ─── */

.trace {
  padding: 1.15rem .9rem 1rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(77, 159, 255, .05), transparent 70%),
    rgba(10, 14, 22, .5);
}
.trace__track { display: flex; align-items: flex-start; justify-content: space-between; }

.hop { display: grid; justify-items: center; gap: .3rem; flex: 0 0 auto; width: 64px; }
.hop__ring {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px; color: var(--text-mute);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: color .18s ease, border-color .18s ease, box-shadow .25s ease, transform .18s ease;
}
.hop__ring .ico { width: 17px; height: 17px; }
.hop__name {
  font-family: var(--ff-mono); font-size: .66rem; letter-spacing: .02em;
  color: var(--text-mute); transition: color .18s ease; text-align: center;
}
.hop__ms {
  font-family: var(--ff-mono); font-size: .64rem; color: var(--text-mute);
  opacity: .5; font-variant-numeric: tabular-nums; transition: color .18s ease, opacity .18s ease;
}

.hop.is-hot .hop__ring {
  color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(77, 159, 255, .1), 0 0 20px -4px rgba(77, 159, 255, .8);
  transform: translateY(-2px);
}
.hop.is-hot .hop__name { color: var(--text); }
.hop.is-done .hop__ring { color: var(--accent-2); border-color: rgba(56, 217, 169, .45); }
.hop.is-done .hop__ms { color: var(--accent-2); opacity: 1; }

/* Connector that charges as the request passes through */
.wire {
  flex: 1 1 auto; height: 2px; margin-top: 18px; position: relative;
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.wire i {
  position: absolute; inset: 0 100% 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: right .28s linear;
}
.wire.is-live i { right: 0; }

.console__foot {
  margin: 0; padding: .6rem .95rem .75rem;
  border-top: 1px solid var(--border);
  font-family: var(--ff-mono); font-size: .67rem; color: var(--text-mute);
  text-align: center; letter-spacing: .01em;
}

.console__meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: .55rem .95rem; border-bottom: 1px solid var(--border);
  font-family: var(--ff-mono); font-size: .72rem; color: var(--text-mute);
}
.status { display: inline-flex; align-items: center; gap: .45rem; color: var(--accent-2); }
.status__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.is-busy { color: var(--gold); }
.status.is-created { color: var(--accent-3); }

.console__out {
  margin: 0; padding: 1.05rem 1.1rem 1.25rem;
  font-family: var(--ff-mono); font-size: .76rem; line-height: 1.8;
  white-space: pre-wrap; word-break: break-word;
  color: var(--text-dim); min-height: 330px;
  overflow-x: auto;
}
.j-key   { color: var(--accent); }
.j-str   { color: var(--accent-2); }
.j-num   { color: var(--gold); }
.j-bool  { color: var(--accent-3); }
.j-punct { color: var(--text-mute); }
.con-caret {
  display: inline-block; width: 7px; height: 1em;
  background: var(--accent); vertical-align: -.15em;
  animation: blink 1.05s steps(1) infinite;
}

/* ───────────────────────── Skills ───────────────────────── */

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr)); gap: 1.1rem; }
.skill {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: transform .2s ease, border-color .2s ease;
}
.skill:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.skill h3 { font-size: 1rem; display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem; }
.skill__ico {
  display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px;
  border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--accent);
}
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skill__ctx {
  font-size: .87rem; color: var(--text-mute); line-height: 1.55;
  margin: -.5rem 0 1rem;
}

.tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.tags li {
  font-family: var(--ff-mono); font-size: .78rem;
  padding: .32rem .7rem; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ───────────────────────── Timeline ───────────────────────── */

.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: .5rem; bottom: .5rem; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
  opacity: .5;
}
.tl { position: relative; padding-bottom: 1.6rem; }
.tl:last-child { padding-bottom: 0; }
.tl__dot {
  position: absolute; left: -2rem; top: .55rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(77, 159, 255, .22);
}
.tl__body {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem;
  transition: border-color .2s ease, transform .2s ease;
}
.tl__body:hover { border-color: var(--border-hi); transform: translateX(3px); }

/* Role/company/stack on the left, what I did on the right — otherwise the
   bullets leave most of a 1140px card empty. */
.tl__body { display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: 1.9rem; }
.tl__meta { min-width: 0; }

.tl__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.tl__head h3 { font-size: 1.14rem; }
.tl__org { color: var(--text-dim); font-weight: 500; margin: .3rem 0 .85rem; font-size: .93rem; }
.tl__meta .chip { margin-left: 0; margin-top: .4rem; display: inline-block; }
.tl__meta .tl__stack { margin-top: .9rem; }

/* What the role actually produced, sitting under the company name */
.tl__impact {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin: 0 0 .1rem;
}
.tl__impact span {
  font-size: .76rem; color: var(--text-mute); line-height: 1.4;
  padding: .24rem .6rem; border-radius: 100px;
  background: rgba(56, 217, 169, .08);
  border: 1px solid rgba(56, 217, 169, .2);
}
.tl__impact strong {
  color: var(--accent-2); font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chip {
  display: inline-block; margin-left: .45rem; padding: .12rem .55rem;
  font-size: .71rem; border-radius: 100px; font-weight: 600;
  background: rgba(56, 217, 169, .12); color: var(--accent-2);
  border: 1px solid rgba(56, 217, 169, .3);
  vertical-align: middle;
}
.chip--past { background: var(--surface-2); color: var(--text-mute); border-color: var(--border); }
.chip--now::before {
  content: ""; display: inline-block; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent-2); margin-right: .4rem;
  vertical-align: .08em; animation: pulse 2.2s infinite;
}

.tl__points li { position: relative; padding-left: 1.3rem; margin-bottom: .5rem; color: var(--text-dim); font-size: .95rem; }
.tl__points li::before {
  content: ""; position: absolute; left: .25rem; top: .68em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .75;
}
.tl__points strong { color: var(--text); font-weight: 600; }

.tl__stack { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; }
.tl__stack span {
  font-family: var(--ff-mono); font-size: .74rem; padding: .22rem .6rem;
  border-radius: 6px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text-mute);
}

/* ───────────────────────── Featured project ───────────────────────── */

.feature {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center;
  background: linear-gradient(145deg, var(--surface), var(--bg));
  border: 1px solid var(--border-hi); border-radius: var(--radius-lg);
  padding: 2.2rem; margin-bottom: 1.6rem; box-shadow: var(--shadow);
}
.feature__tag {
  font-family: var(--ff-mono); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold); margin-bottom: .5rem;
}
.feature h3 { font-size: 1.55rem; margin-bottom: .9rem; }
.feature p { color: var(--text-dim); font-size: .98rem; }
.feature strong { color: var(--text); font-weight: 600; }
.feature__links { display: flex; align-items: center; gap: .7rem; margin-top: 1.3rem; flex-wrap: wrap; }

.chart {
  position: relative; background: #070b12; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; overflow: hidden;
}
.chart svg { width: 100%; height: 170px; }
.chart__line { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart__badge {
  position: absolute; top: .8rem; right: .9rem;
  font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .07em;
  padding: .2rem .55rem; border-radius: 5px;
  background: rgba(255, 184, 77, .12); color: var(--gold);
  border: 1px solid rgba(255, 184, 77, .3);
}

/* ───────────────────────── Project cards ───────────────────────── */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.1rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-5px); border-color: var(--border-hi); box-shadow: var(--shadow); }
.card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.card__ico {
  display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--accent);
}
.card__ico .ico { width: 19px; height: 19px; }
.card h3 { font-size: 1.1rem; margin-bottom: .55rem; }
.card p { color: var(--text-dim); font-size: .92rem; }
.card .tl__stack { margin-top: auto; padding-top: .8rem; }
.card__more {
  margin-top: .85rem; font-size: .83rem; font-weight: 600; color: var(--accent);
  opacity: .65; transition: opacity .2s ease, transform .2s ease;
}
.card:hover .card__more, .card:focus-visible .card__more { opacity: 1; transform: translateX(3px); }

/* A card that has a live link as well as a case study */
.card__links {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem;
  margin: .85rem 0 0;
}
.card__links .card__more { margin-top: 0; }
.card__live {
  font-size: .8rem; font-weight: 600; color: var(--accent-2);
  padding: .3rem .7rem; border-radius: 100px;
  background: rgba(56, 217, 169, .1);
  border: 1px solid rgba(56, 217, 169, .3);
  transition: background .18s ease, border-color .18s ease;
}
.card__live:hover { background: rgba(56, 217, 169, .18); border-color: var(--accent-2); }

/* the radio link sitting in the hero panel's infra line */
.shipped__infra a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.shipped__infra a:hover { color: var(--text); }

.badge {
  font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .06em;
  text-transform: uppercase; padding: .22rem .6rem; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-mute);
}
.badge--live { background: rgba(56, 217, 169, .12); color: var(--accent-2); border-color: rgba(56, 217, 169, .3); }

/* ───────────────────────── Why me ───────────────────────── */

.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 1.1rem; }
.why__item {
  overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.7rem 1.6rem 1.6rem;
  transition: transform .2s ease, border-color .2s ease;
}
.why__item:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.why__num {
  position: absolute; top: .4rem; right: .9rem;
  font-family: var(--ff-mono); font-size: 3.1rem; font-weight: 500;
  color: var(--text); opacity: .045; line-height: 1; pointer-events: none;
}
.why__item { display: flex; flex-direction: column; }
.why__item h3 { font-size: 1.08rem; margin-bottom: .6rem; padding-right: 2rem; }
.why__item p { color: var(--text-dim); font-size: .94rem; margin: 0; }

/* The claim above, the evidence for it below */
.why__proof {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-top: auto !important; padding-top: 1rem;
}
.why__proof span {
  font-family: var(--ff-mono); font-size: .71rem; letter-spacing: .01em;
  padding: .25rem .6rem; border-radius: 100px;
  background: rgba(56, 217, 169, .09); color: var(--accent-2);
  border: 1px solid rgba(56, 217, 169, .22);
}

/* ───────────────────────── How I work ───────────────────────── */

.howto {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 1px; margin-bottom: 1.6rem;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.howto li {
  background: var(--surface); padding: 1.4rem 1.35rem;
  display: grid; gap: .3rem; align-content: start;
}
.howto__ico {
  display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: .45rem;
  border-radius: 9px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--accent);
}
.howto__ico .ico { width: 16px; height: 16px; }
.howto strong { font-size: .95rem; }
.howto li > span:last-child { font-size: .86rem; color: var(--text-mute); line-height: 1.55; }

/* ───────────────────────── Closing CTA ───────────────────────── */

.cta {
  overflow: hidden;
  background: linear-gradient(150deg, var(--surface), var(--bg));
  border: 1px solid var(--border-hi); border-radius: var(--radius-lg);
  padding: 2.8rem 2.4rem; margin-bottom: 1.6rem;
  box-shadow: var(--shadow); text-align: center;
}
/* Pitch on the left, the actions on the right. Centred text in a 1140px
   card left roughly half of it empty. */
.cta {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 2.6rem; align-items: center; text-align: left;
}
.cta__text { min-width: 0; }
.cta__title { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; margin-bottom: .8rem; }
.cta__lede { margin: 0; color: var(--text-dim); }
.cta__actions {
  min-width: 0; display: grid; gap: .9rem;
  padding: 1.3rem; border-radius: var(--radius);
  background: rgba(255, 255, 255, .022); border: 1px solid var(--border);
}
.cta__row { display: grid; gap: .7rem; }
.cta__row .btn { width: 100%; }
.cta__note {
  display: flex; align-items: flex-start; gap: .55rem;
  margin: 1.1rem 0 0; font-size: .84rem; color: var(--text-mute); line-height: 1.5;
}
.cta__note .dot { margin-top: .45rem; }
.cta .section__eyebrow { margin-bottom: .6rem; }

/* Cursor-tracked sheen */
.spot { position: relative; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  border-radius: inherit; pointer-events: none; opacity: 0;
  transition: opacity .3s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(77, 159, 255, .10), transparent 70%);
}
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; z-index: 1; }

/* ───────────────────────── Contact ───────────────────────── */

/* Four across on desktop — these are short items, so a 2x2 grid left
   each card half empty. */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr)); gap: 1rem; }
.contact__item {
  position: relative;
  display: grid; gap: .85rem; align-content: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.3rem 1.3rem;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.contact__item:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--surface-2); }
.contact__ico {
  display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px;
  border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: .95rem; font-weight: 700; font-family: var(--ff-mono); color: var(--accent);
}
.contact__meta { display: flex; flex-direction: column; min-width: 0; }
.contact__meta strong { font-size: .95rem; }
.contact__meta span { font-size: .82rem; color: var(--text-mute); overflow-wrap: anywhere; }

.copy {
  position: absolute; top: 1.2rem; right: 1rem;
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-mute);
  opacity: 0; transition: opacity .2s ease, color .2s ease, border-color .2s ease;
}
.contact__item:hover .copy, .copy:focus-visible { opacity: 1; }
.copy:hover { color: var(--accent); border-color: var(--accent); }
.copy .ico { width: 15px; height: 15px; }
.copy.is-done { color: var(--accent-2); border-color: var(--accent-2); opacity: 1; }
@media (hover: none) { .copy { opacity: 1; } }
.contact__item--copy .contact__ico { margin-right: 2.6rem; }

/* ───────────────────────── Footer / to-top / toast ───────────────────────── */

.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.6rem; background: var(--bg-alt);
}
.footer__grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem; padding-bottom: 2.4rem;
}
@media (max-width: 1100px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; gap: 1.7rem; }
}
.footer__brand p { margin: 1rem 0 0; font-size: .89rem; color: var(--text-mute); max-width: 36ch; line-height: 1.6; }
.footer__status {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .9rem !important; font-size: .83rem !important; color: var(--text-dim) !important;
}

.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.footer__col h3 {
  font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: .35rem;
}
.footer__col a {
  font-size: .89rem; color: var(--text-mute);
  max-width: 100%; overflow-wrap: anywhere;
  transition: color .18s ease, transform .18s ease;
}
.footer__col a:hover { color: var(--accent); transform: translateX(2px); }
.footer__note { margin: .4rem 0 0 !important; font-size: .82rem !important; color: var(--text-mute); line-height: 1.6; }

.footer__bar {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center;
  padding-top: 1.4rem; border-top: 1px solid var(--border);
}
.footer p { margin: 0; font-size: .85rem; color: var(--text-mute); }
.footer__built { font-family: var(--ff-mono); font-size: .78rem !important; }

/* ─── hero panel: infrastructure line ─── */
.shipped__infra {
  display: flex; align-items: center; gap: .55rem; margin: 0;
  padding: .75rem 1.2rem; border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--text-mute);
}
.shipped__infra .ico { width: 15px; height: 15px; color: var(--accent); flex: none; }
.shipped__infra strong { color: var(--text-dim); font-weight: 600; }

.totop {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-hi); color: var(--text);
  font-size: 1.1rem; display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, border-color .2s ease;
}
.totop.is-shown { opacity: 1; visibility: visible; transform: translateY(0); }
.totop:hover { border-color: var(--accent); color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: 2rem; z-index: 130;
  transform: translate(-50%, 18px);
  padding: .7rem 1.2rem; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--accent-2);
  color: var(--text); font-size: .88rem; font-weight: 500;
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, .95);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.toast.is-shown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ───────────────────────── Case studies / modal ───────────────────────── */

/* Case studies live in the page so they exist without JS; the modal borrows them. */
.cases { display: none; }
.no-js .cases {
  display: block; width: min(100% - 2.5rem, var(--wrap));
  margin: 0 auto 5rem; padding-top: 2rem; border-top: 1px solid var(--border);
}
.no-js .cases > article { margin-bottom: 2.5rem; }
.no-js .cases h3 { font-size: 1.4rem; margin-bottom: .7rem; }
.no-js .cases h4 {
  font-family: var(--ff-mono); font-size: .76rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin: 1.4rem 0 .5rem;
}
.no-js .cases p { color: var(--text-dim); }
.no-js .cases a { color: var(--accent); text-decoration: underline; }

.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.5rem; }
.modal__scrim {
  position: absolute; inset: 0; background: rgba(4, 7, 12, .78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade .22s ease;
}
@keyframes fade { from { opacity: 0; } }

.modal__panel {
  position: relative; width: min(100%, 720px); max-height: min(86vh, 820px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  animation: pop .26s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }

.modal__close {
  position: absolute; top: .9rem; right: .9rem; z-index: 2;
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  display: grid; place-items: center; font-size: .9rem;
  transition: color .18s ease, border-color .18s ease;
}
.modal__close:hover { color: var(--text); border-color: var(--border-hi); }

.modal__body { overflow-y: auto; padding: 2rem 2rem 1.5rem; }
.modal__body h3 { font-size: 1.5rem; margin-bottom: .7rem; padding-right: 2.5rem; }
.modal__body h4 {
  font-family: var(--ff-mono); font-size: .76rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  margin: 1.5rem 0 .5rem;
}
.modal__body p { color: var(--text-dim); font-size: .96rem; }
.modal__body strong { color: var(--text); font-weight: 600; }
.modal__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.case__meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.case__meta span {
  font-family: var(--ff-mono); font-size: .72rem; padding: .22rem .6rem;
  border-radius: 6px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text-mute);
}

.modal__foot {
  display: flex; gap: .6rem; flex-wrap: wrap;
  padding: 1.1rem 2rem; border-top: 1px solid var(--border);
  background: rgba(10, 14, 22, .6);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ───────────────────────── Command palette ───────────────────────── */

.palette { position: fixed; inset: 0; z-index: 210; display: grid; justify-items: center; align-items: start; padding: 10vh 1.25rem 1.25rem; }
.palette__scrim {
  position: absolute; inset: 0; background: rgba(4, 7, 12, .72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease;
}
.palette__panel {
  position: relative; width: min(100%, 540px);
  background: var(--surface); border: 1px solid var(--border-hi);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden; animation: pop .22s cubic-bezier(.2, .9, .3, 1.1);
}
.palette__search {
  display: flex; align-items: center; gap: .7rem;
  padding: .9rem 1rem; border-bottom: 1px solid var(--border);
}
.palette__search .ico { color: var(--text-mute); flex: none; }
.palette__search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--text); font-size: .98rem;
}
.palette__search input::placeholder { color: var(--text-mute); }

.palette__list { max-height: 50vh; overflow-y: auto; padding: .4rem; }
.palette__list li {
  display: flex; align-items: center; gap: .8rem; cursor: pointer;
  padding: .65rem .8rem; border-radius: var(--radius-sm);
  font-size: .92rem; color: var(--text-dim);
}
.palette__list li .ico { color: var(--text-mute); flex: none; width: 16px; height: 16px; }
.palette__list li.is-sel { background: var(--surface-2); color: var(--text); }
.palette__list li.is-sel .ico { color: var(--accent); }
.palette__list li small { margin-left: auto; font-family: var(--ff-mono); font-size: .7rem; color: var(--text-mute); }
.palette__empty { padding: 1.6rem; text-align: center; color: var(--text-mute); font-size: .9rem; }

body.is-locked { overflow: hidden; }

/* ───────────────────────── Reveal ───────────────────────── */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ───────────────────────── Responsive ───────────────────────── */

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .section__head { grid-template-columns: 1fr; gap: .9rem; align-items: start; }
  .tl__body { grid-template-columns: 1fr; gap: 1.1rem; }
  .tl__meta .tl__stack { margin-top: .6rem; }
  .cta { grid-template-columns: 1fr; gap: 1.8rem; }
  .about { grid-template-columns: 1fr; }
  .console { position: static; }
  .console__out { min-height: 0; }
  .feature { grid-template-columns: 1fr; }
  .feature__art { order: -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cta { padding: 2.2rem 1.5rem; }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 78px; }
  .hero { padding: 8rem 0 3rem; }
  .section { padding: 3.5rem 0; }

  .nav__toggle { display: block; }
  .kbd-hint { display: none; }
  .nav__links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(7, 10, 16, .98);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: .5rem 1.25rem 1.5rem;
    transform: translateY(-120%); opacity: 0; visibility: hidden;
    transition: transform .3s ease, opacity .25s ease, visibility .3s ease;
  }
  .nav__links.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__links > a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .nav__cv { margin-top: 1.1rem; }
  .nav__name { display: none; }

  .timeline { padding-left: 1.5rem; }
  .tl__dot { left: -1.5rem; }
  .feature { padding: 1.5rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bar { flex-direction: column; text-align: center; }
  .modal__body, .modal__foot { padding-inline: 1.3rem; }
}

@media (max-width: 430px) {
  .stats { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
  .console__routes { gap: .35rem; }
  .route { font-size: .7rem; padding: .3rem .5rem; }

  .trace { padding-inline: .6rem; }
  .hop { width: 54px; }
  .hop__ring { width: 32px; height: 32px; border-radius: 9px; }
  .hop__ring .ico { width: 15px; height: 15px; }
  .hop__name { font-size: .6rem; }
  .hop__ms { font-size: .58rem; }
  .wire { margin-top: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .caret, .con-caret, .scroll-cue { display: none; }
  .hero__spot, .spot::before { display: none; }
  .aurora { filter: blur(70px); }
}

/* A recruiter who hits Ctrl+P should get a readable document, not a
   dark screenshot with half the ink missing. */
@media print {
  .nav, .totop, .toast, .grain, .aurora, .hero__spot, .scroll-cue,
  .progress, .hero__cta, .console__routes, .console__bar, .trace,
  .card__more, .kbd-hint, .footer__col, .modal, .palette { display: none !important; }

  :root {
    --bg: #fff; --bg-alt: #fff; --surface: #fff; --surface-2: #fff;
    --text: #111; --text-dim: #333; --text-mute: #555;
    --border: #ccc; --border-hi: #bbb;
    --accent: #14508f; --accent-2: #0a6b52; --gold: #8a5a00;
  }

  body { background: #fff; color: #111; font-size: 11pt; }
  .wrap { width: 100%; }
  .section { padding: 1.2rem 0; break-inside: avoid; }
  .section--alt { border: 0; }

  .hero { padding: 0 0 1rem; }
  .hero__title { font-size: 30pt; }
  .hero__line--grad { color: #14508f !important; -webkit-text-fill-color: #14508f; animation: none; }
  .hero__grid, .about, .cta, .tl__body, .section__head { display: block; }

  a { color: #14508f; text-decoration: underline; }
  /* print the destination of real links, not just the label */
  .footer__bar a[href^="http"]::after,
  .contact__item[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }

  .skill, .card, .why__item, .tl__body, .contact__item, .shipped, .console, .cta,
  .howto li, .stats, .stats li, .shipped__head, .shipped__foot, .console__meta,
  .console__foot, .cta__actions, .feature, .chart, .footer {
    border-color: #ccc !important; box-shadow: none !important;
    background: #fff !important; break-inside: avoid;
  }
  .stats li { border: 1px solid #ccc !important; }
  .stats strong { -webkit-text-fill-color: #14508f; color: #14508f; }
  .stats span, .shipped__who, .console__foot, .tl__stack span, .tags li,
  .badge, .shipped__foot span { color: #444 !important; }
  .console__out { color: #222; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
