/* ==========================================================================
   Gagandeep Singh / Portfolio
   Three colours: #141414 base, #303030 graphite surfaces and one orange
   accent (#FF6B35) kept to CTAs, active nav, highlighted words, hovers and
   small motion. Native CSS, no build step. Sections set
   data-theme="dark|alt" and every component reads that theme's tokens.
   ========================================================================== */

/* ---------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------- */
:root {
  /* Brand */
  --ink:      #141414;   /* page background */
  --graphite: #303030;   /* tiles, chips, raised controls */
  --accent:   #ff6b35;   /* the one vibrant colour: use sparingly */
  --accent-soft: rgba(255, 107, 53, .14);
  --accent-ring: rgba(255, 107, 53, .24);

  /* Steps between the base and graphite, for layered surfaces */
  --ink-2:    #1b1b1b;
  --ink-3:    #222222;
  --ink-4:    #282828;

  /* Shape: pills for anything you press, 20px for containers, 14px for inputs and images */
  --r-pill: 999px;
  --r-card: 20px;
  --r-img:  14px;
  --r-input: 14px;

  /* Layout */
  --container: 1400px;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --nav-h: 72px;
  --nav-gap: 16px;
  --section-y: clamp(5rem, 10vw, 9rem);

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io:  cubic-bezier(.65, 0, .35, 1);
  --dur: .55s;

  /* Type: Plus Jakarta Sans for headings and display text, Inter for
     paragraphs and secondary text, JetBrains Mono for the labels,
     counters, tags and code that sit around it. */
  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

/* Semantic tokens per theme */
[data-theme="dark"],
[data-theme="alt"] {
  --bg:      var(--ink);
  --bg-2:    var(--ink-2);
  --card:    var(--ink-3);
  --fg:      #ffffff;
  --fg-2:    rgba(255, 255, 255, .64);
  --fg-3:    rgba(255, 255, 255, .42);
  --line:    rgba(255, 255, 255, .12);
  --line-2:  rgba(255, 255, 255, .07);
  --chip:    var(--ink-3);
  --chip-fg: #ffd9ca;
  --glass:   rgba(255, 255, 255, .08);
  --glass-hover: rgba(255, 255, 255, .14);
  --shadow:  0 24px 60px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* Alternate band: a step lighter, so sections still read as blocks. */
[data-theme="alt"] {
  --bg:      var(--ink-2);
  --bg-2:    var(--ink);
  --card:    var(--ink-4);
}

/* Highlighted keyword */
.accent { color: var(--accent); }

/* ---------------------------------------------------------------
   2. Reset and base
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--nav-gap) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: #fff;
  background: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.menu-open, body.modal-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
textarea { resize: vertical; }
strong { font-weight: 600; }
code, kbd, samp, pre { font-family: var(--font-mono); }

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

::selection { background: var(--accent); color: var(--ink); }

.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;
}

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

section[data-theme], footer[data-theme] {
  background: var(--bg);
  color: var(--fg);
}

/* Section header row: title left, parenthesised count right */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------
   3. Type
   --------------------------------------------------------------- */
/* Headings and display-sized text use the heading face. */
h1, h2, h3, h4, h5, h6,
.display, .h2, .h3,
.nav__brand,
.menu__links a,
.stackcard__title,
.fact__num,
.cs-hero__title,
.tcard__mark,
.tcard__cta-title,
.tempty__mark,
.tempty__title {
  font-family: var(--font-heading);
}

.display {
  font-size: clamp(3.4rem, 9vw, 9.25rem);
  font-weight: 500;
  line-height: .94;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.h2--xl {
  font-size: clamp(2.6rem, 6vw, 5.6rem);
}

.h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.015em;
}

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--fg-2);
  max-width: 60ch;
}

/* Lead paragraph: one tone throughout, no greying and no underline. */
.two-tone {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -.02em;
  color: var(--fg);
  text-wrap: pretty;
}
.two-tone span:not(.accent) { color: inherit; }

/* "( Label )" meta in mono: the parentheses recede, the word stays. */
.paren {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--fg);
  white-space: nowrap;
}
.paren::before, .paren::after { color: var(--fg-3); }
.paren::before { content: "("; }
.paren::after  { content: ")"; }

.paren-link {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  font-size: 1rem;
  font-weight: 500;
  transition: gap .3s var(--ease-out);
}
.paren-link i { font-size: .9em; transition: transform .35s var(--ease-out), color .25s; }
.paren-link:hover { gap: 1.2rem; }
.paren-link:hover i { transform: translate(2px, -2px); color: var(--accent); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.eyebrow--plain { color: var(--fg-2); }
.eyebrow--plain::before { display: none; }

/* Scroll progress: an accent hairline across the top driven by the scroll
   position itself, no JS. Browsers without scroll timelines never show it. */
.progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 70;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .progress { animation: progress-grow linear both; animation-timeline: scroll(root); }
}
@keyframes progress-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hairline {
  border: 0;
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------
   4. Buttons, pills, chips
   --------------------------------------------------------------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--ink);
  --btn-ico-bg: var(--ink);
  --btn-ico-fg: #fff;

  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  height: 52px;
  padding: 0 1.5rem 0 .375rem;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: transform .25s var(--ease-out), background .25s var(--ease-out), box-shadow .25s var(--ease-out);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -10px var(--btn-glow, rgba(255, 107, 53, .55)); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

.btn__ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--btn-ico-bg);
  color: var(--btn-ico-fg);
  overflow: hidden;
  flex: none;
  transition: background .25s var(--ease-out), color .25s var(--ease-out);
}
.btn__ico i {
  font-size: .85rem;
  transition: transform .4s var(--ease-out);
}
/* Font Awesome Free has no arrow-up-right: rotate the right arrow instead.
   `rotate` is its own property, so hover translates still compose with it. */
.fa-ne { rotate: -45deg; }
/* The arrow leaves top-right and re-enters from bottom-left */
.btn__ico i + i {
  position: absolute;
  transform: translate(-130%, 130%);
}
.btn:hover .btn__ico i:first-child { transform: translate(130%, -130%); }
.btn:hover .btn__ico i + i { transform: translate(0, 0); }
/* Straight-right arrows slide horizontally instead */
.btn__ico--right i + i { transform: translate(-200%, 0); }
.btn:hover .btn__ico--right i:first-child { transform: translate(200%, 0); }

.btn--white  { --btn-bg: #fff; --btn-fg: var(--ink); --btn-ico-bg: var(--ink); --btn-ico-fg: #fff; --btn-glow: rgba(0, 0, 0, .4); }
.btn--glass  { --btn-bg: var(--glass); --btn-fg: var(--fg); --btn-ico-bg: var(--fg); --btn-ico-fg: var(--bg); --btn-glow: transparent; }
.btn--glass:hover { background: var(--glass-hover); }
/* Secondary buttons only light up their icon on hover. */
.btn--glass:hover .btn__ico { background: var(--accent); color: var(--ink); }
.btn--ink    { --btn-bg: var(--graphite); --btn-fg: #fff; --btn-ico-bg: var(--accent); --btn-ico-fg: var(--ink); --btn-glow: transparent; }
.btn--plain  { padding: 0 1.5rem; }

/* Social pill: icon + label, translucent */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  height: 46px;
  padding: 0 1.25rem;
  border-radius: var(--r-pill);
  background: var(--glass);
  color: var(--fg);
  font-size: .95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .25s var(--ease-out), transform .25s var(--ease-out);
}
.pill i { font-size: .95em; transition: color .25s var(--ease-out); }
.pill:hover { background: var(--glass-hover); transform: translateY(-2px); }
.pill:hover i { color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
/* Tags carry a faint ember: a warm tint, a thin orange edge and a soft
   orange glow underneath, brighter on hover. */
.chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 .9rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 107, 53, .38);
  background: linear-gradient(180deg, rgba(255, 107, 53, .2), rgba(255, 107, 53, .06)), var(--chip);
  color: var(--chip-fg);
  box-shadow: 0 6px 18px -10px rgba(255, 107, 53, .7), inset 0 1px 0 rgba(255, 140, 100, .22);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out), color .25s var(--ease-out);
}
.chip:hover {
  border-color: rgba(255, 107, 53, .65);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(255, 107, 53, .8), inset 0 1px 0 rgba(255, 140, 100, .3);
}

/* Round icon button (nav menu, back to top) */
.icon-btn {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--graphite);
  color: #fff;
  transition: transform .25s var(--ease-out), background .25s var(--ease-out), color .25s var(--ease-out);
}
.icon-btn:hover { transform: translateY(-2px); background: var(--accent); color: var(--ink); }
.icon-btn:active { transform: scale(.96); }

/* ---------------------------------------------------------------
   5. Navigation
   --------------------------------------------------------------- */
.nav {
  position: fixed;
  top: var(--nav-gap);
  left: 0; right: 0;
  z-index: 50;
  pointer-events: none;
}
.nav__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--nav-h);
  padding: 0 .75rem 0 1.25rem;
  border-radius: var(--r-card);
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: box-shadow .3s var(--ease-out);
}
.nav--scrolled .nav__bar { box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.nav__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  outline: 2px solid var(--graphite);
  outline-offset: 2px;
}

.nav__links {
  position: relative;
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}
/* Pill that slides behind whichever link's section is on screen */
.nav__indicator {
  position: absolute;
  left: 0; top: 50%;
  height: 36px;
  width: 0;
  translate: 0 -50%;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  opacity: 0;
  pointer-events: none;
  transition: transform .45s var(--ease-out), width .45s var(--ease-out), opacity .3s;
}
.nav__indicator.is-on { opacity: 1; }
.nav__link {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: .55rem .9rem;
  border-radius: var(--r-pill);
  font-size: .95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .78);
  transition: color .2s;
}
.nav__link:hover { color: #fff; }
.nav__link.is-active { color: var(--accent); }

.nav__cta { height: 48px; margin-left: .5rem; }
.nav__cta .btn__ico { width: 36px; height: 36px; }

.nav__toggle { display: none; }

/* Mobile overlay menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  color: #fff;
  padding: calc(var(--nav-gap) + var(--nav-h) + 2rem) var(--gutter) 2.5rem;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), visibility 0s .35s;
}
.menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), visibility 0s;
}
.menu__close {
  position: absolute;
  top: calc(var(--nav-gap) + (var(--nav-h) - 48px) / 2);
  right: calc(var(--gutter) + .75rem);
}
.menu__links { display: grid; gap: .25rem; margin-top: auto; }
.menu__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1;
  transition: color .2s;
}
.menu__links a:hover { color: var(--accent); }
.menu__links a i { font-size: .5em; color: var(--accent); transition: transform .3s var(--ease-out); }
.menu__links a:hover i { transform: translateX(4px); }
.menu__foot {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
}
.menu__socials { display: flex; gap: .5rem; }

/* ---------------------------------------------------------------
   6. Hero
   --------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  --hero-pt: calc(var(--nav-gap) + var(--nav-h) + 3.5rem);
  --hero-fs: clamp(3.4rem, 9vw, 9.25rem);
  padding-top: var(--hero-pt);
  padding-bottom: 2rem;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}
/* Graphite haze with one faint ember glow drifting top right. */
.hero__ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 60% at 80% 8%, rgba(255, 107, 53, .09), transparent 70%),
    radial-gradient(50% 60% at 20% 100%, rgba(48, 48, 48, .6), transparent 70%),
    radial-gradient(40% 50% at 95% 85%, rgba(48, 48, 48, .45), transparent 70%);
}
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .9;
  will-change: transform;
}
.hero__blob--a { width: 46vw; height: 46vw; right: -8vw; top: -12vw; background: radial-gradient(circle, rgba(255, 107, 53, .26) 0%, rgba(255, 107, 53, 0) 65%); }
.hero__blob--b { width: 34vw; height: 34vw; left: 18vw; bottom: -14vw; background: radial-gradient(circle, #303030 0%, rgba(48, 48, 48, 0) 65%); }
.hero__blob--c { width: 28vw; height: 28vw; right: 22vw; bottom: 8vh;  background: radial-gradient(circle, rgba(255, 107, 53, .16) 0%, rgba(255, 107, 53, 0) 65%); opacity: .5; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
  flex: 1;
}
.hero__intro {
  display: grid;
  gap: 1.1rem;
  align-content: start;
  margin-top: .5rem;
}
/* Shrink to the name itself, so the diagonal split below runs corner to
   corner across the text rather than across the whole column. */
.hero__title { color: #fff; justify-self: start; }
/* One box per line; positioned so the typewriter caret can sit inside it */
.hero__title .line {
  position: relative;
  display: block;
  overflow: hidden;
  padding-bottom: .08em;
  margin-bottom: -.08em;
}
.hero__title .line > span { display: block; }

/* Name split diagonally: white top-left, orange bottom-right. Each line
   paints its own part of one gradient that spans both lines (the top line
   shows the upper part, the bottom line the lower), so the edge stays one
   straight diagonal. The padding keeps descenders inside the painted box. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero__title .line > span {
    padding-bottom: .1em;
    margin-bottom: -.1em;
    background-image: linear-gradient(to bottom right, #fff calc(50% - .5px), var(--accent) calc(50% + .5px));
    background-size: 100% calc(200% - .1em);
    background-repeat: no-repeat;
    background-position: 0 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
  .hero__title .line + .line > span { background-position: 0 100%; }
}

/* Typewriter on load. index.js splits each .tw into letters and shows them
   one at a time; hidden letters drop out of the gradient's text clip, so
   the diagonal split is already in place as the name types out. Without
   JS the fallback animation shows the whole name after a moment. */
@media (prefers-reduced-motion: no-preference) {
  .hero__title .tw { visibility: hidden; animation: tw-fallback 0s 3.5s forwards; }
  .hero__title.tw-run .tw { animation: none; }
  .hero__title .tw__c.is-on,
  .hero__title.tw-done .tw { visibility: visible; }
}
@keyframes tw-fallback { to { visibility: visible; } }
.tw-caret {
  position: absolute;
  top: .1em;
  left: 0;
  width: .06em;
  height: .76em;
  border-radius: 2px;
  background: var(--accent);
  pointer-events: none;
}
/* After the last letter: three blinks, then it fades away */
.tw-caret.is-done { animation: blink 1s steps(1) 3, tw-caret-out .4s var(--ease-out) 3s forwards; }
@keyframes tw-caret-out { to { opacity: 0; } }
.hero__aside {
  padding-top: clamp(.5rem, 2vw, 1.5rem);
  display: grid;
  gap: 1.75rem;
  align-content: start;
}
.hero__aside .two-tone { text-align: right; }
.hero__aside .hairline { border-color: rgba(255, 255, 255, .16); }
.hero__contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero__contact-label { font-weight: 500; font-size: 1.05rem; }
.hero__contact-row { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.hero [data-theme] { background: transparent; }
.hero .pill { --glass: rgba(255,255,255,.1); --glass-hover: rgba(255,255,255,.18); --fg: #fff; }

.hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  flex-wrap: wrap;
}
.hero__cta { display: flex; gap: .6rem; flex-wrap: wrap; }
.hero__foot .paren-link {
  padding-bottom: .9rem;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  min-width: min(100%, 420px);
  justify-content: space-between;
}
.hero .btn--glass { --btn-bg: rgba(255,255,255,.12); --btn-fg: #fff; --btn-ico-bg: #fff; --btn-ico-fg: var(--ink); }
.hero .btn--glass:hover { background: rgba(255,255,255,.2); }

/* Syntax colours for the floating snippets */
.tok-k { color: var(--accent); }               /* keywords */
.tok-p { color: rgba(255, 255, 255, .42); }    /* punctuation */

/* Floating code layer. Pieces sit behind the copy, float on their own
   loop and lean away from the pointer (index.js sets --px/--py, -1..1). */
.hero__code {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Same width as .container, so --x lines up with the copy */
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  --px: 0;
  --py: 0;
  /* Free band above the hero buttons, measured from the bottom: under the
     name on the left, under the contact row on the right. */
  --bmin: 96px;
  --lmax: calc(100vh - 226px - 1.88 * min(9vw, 9.25rem));
  --rmax: calc(100vh - 620px);
}
/* Pieces hang from the bottom (--b, the preferred height) and are clamped
   into that band, so short screens pull them down rather than over text. */
.cf {
  --zone: var(--lmax);
  position: absolute;
  left: var(--x);
  bottom: clamp(var(--bmin), var(--b), calc(var(--zone) - var(--h, 58px)));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: var(--o, 1);
  rotate: var(--r, 0deg);
  translate: calc(var(--px) * var(--z, 12) * -1px) calc(var(--py) * var(--z, 12) * -1px);
  transition: translate 1.2s var(--ease-out);
}
.cf--far { --o: .55; filter: blur(.4px); }
.cf--r { --zone: var(--rmax); }

/* The </> mark: the one orange piece in the layer */
.cf--tag {
  --h: 116px;
  width: 116px; height: 116px;
  border-radius: 26px;
  background: linear-gradient(160deg, #3a3a3a, var(--graphite) 55%, #2a2a2a);
  border: 1px solid rgba(255, 107, 53, .28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 70px -12px rgba(255, 107, 53, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.cf__glyph {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -.08em;
  color: var(--accent);
}

/* Language tiles */
.cf--logo {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: rgba(48, 48, 48, .6);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.cf--logo img { width: 26px; height: 26px; opacity: .88; }

/* One-line snippets */
.cf--snip {
  --h: 34px;
  height: 34px;
  padding: 0 .85rem;
  border-radius: 10px;
  background: rgba(27, 27, 27, .82);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .35);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .86);
  white-space: nowrap;
}

/* Bare glyph, no tile */
.cf--glyph {
  --h: 44px;
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .16);
}

@media (prefers-reduced-motion: no-preference) {
  .cf {
    animation:
      cf-in 1s var(--ease-out) var(--in, 1s) backwards,
      cf-float var(--dur, 8s) var(--ease-io) var(--in, 1s) infinite alternate;
  }
  .hero__code.is-paused .cf { animation-play-state: paused; }
}
@keyframes cf-in { from { opacity: 0; scale: .8; } }
@keyframes cf-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-16px); }
}

/* Short or narrow two-column screens: drop the dim background pieces. */
@media (min-width: 961px) and (max-height: 780px), (max-width: 1100px) {
  .cf--far { display: none; }
}

/* ---------------------------------------------------------------
   Code-glyph backdrop for homepage sections: a faint tiled pattern of
   { } </> => ; that fades out from one corner (--cb-at) and drifts.
   --------------------------------------------------------------- */
/* clip, not hidden: the projects section's sticky cards need their
   ancestors to stay non-scrolling. */
.codebg { position: relative; isolation: isolate; overflow: clip; }
.codebg::before {
  content: "";
  position: absolute;
  inset: -40px;
  z-index: -1;
  pointer-events: none;
  background: url("../assets/svg/code-glyphs.439d4eabd831.svg") repeat 0 0 / 280px 280px;
  -webkit-mask-image: radial-gradient(var(--cb-size, 85% 80%) at var(--cb-at, 85% 15%), #000 0%, rgba(0, 0, 0, .6) 50%, transparent 88%);
          mask-image: radial-gradient(var(--cb-size, 85% 80%) at var(--cb-at, 85% 15%), #000 0%, rgba(0, 0, 0, .6) 50%, transparent 88%);
}
@media (prefers-reduced-motion: no-preference) {
  .codebg::before { animation: codebg-drift 60s linear infinite alternate; }
}
@keyframes codebg-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(32px, -28px, 0); }
}

/* Entrance: the headline arrives first, the rest follows. */
@media (prefers-reduced-motion: no-preference) {
  .hero__intro > .eyebrow, .hero__aside > *, .hero__foot > * {
    opacity: 0;
    transform: translateY(22px);
    animation: rise .9s var(--ease-out) forwards;
  }
  .hero__intro > .eyebrow { animation-delay: .1s; }
  .hero__aside > :nth-child(1) { animation-delay: .25s; }
  .hero__aside > :nth-child(2) { animation-delay: .35s; }
  .hero__aside > :nth-child(3) { animation-delay: .45s; }
  .hero__foot > :nth-child(1)  { animation-delay: .55s; }
  .hero__foot > :nth-child(2)  { animation-delay: .65s; }

  .hero__blob--a { animation: drift 18s var(--ease-io) infinite alternate; }
  .hero__blob--b { animation: drift 22s var(--ease-io) infinite alternate-reverse; }
  .hero__blob--c { animation: drift 26s var(--ease-io) infinite alternate; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-6vw, 4vh, 0) scale(1.08); }
}

/* ---------------------------------------------------------------
   7. Stack (tools)
   --------------------------------------------------------------- */
.stack {
  padding: var(--section-y) 0;
  overflow: hidden;
}
.stack__label { display: flex; justify-content: center; margin-bottom: 3rem; }

.fan {
  display: flex;
  justify-content: center;
  gap: clamp(.5rem, 1.2vw, 1rem);
  padding: 1.5rem 0 2.5rem;
}
.fan__card {
  flex: 0 0 auto;
  width: clamp(120px, 10vw, 150px);
  aspect-ratio: 4 / 5;
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .05) inset;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .9rem;
  padding: 1rem;
  text-align: center;
  rotate: var(--tilt, 0deg);
  translate: 0 var(--lift, 0px);
  transition: rotate .5s var(--ease-out), translate .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s;
}
.fan__card:hover {
  rotate: 0deg;
  translate: 0 -10px;
  border-color: var(--accent-ring);
  box-shadow: 0 28px 60px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .05) inset;
}
.fan__card img { width: 40px; height: 40px; }
.fan__card span { font-size: .9rem; font-weight: 500; color: var(--fg); }

.fan__card:nth-child(1) { --tilt: -9deg;  --lift: 14px; }
.fan__card:nth-child(2) { --tilt: 5deg;   --lift: -4px; }
.fan__card:nth-child(3) { --tilt: -3deg;  --lift: 8px; }
.fan__card:nth-child(4) { --tilt: 7deg;   --lift: -10px; }
.fan__card:nth-child(5) { --tilt: -6deg;  --lift: 2px; }
.fan__card:nth-child(6) { --tilt: 4deg;   --lift: 12px; }
.fan__card:nth-child(7) { --tilt: -8deg;  --lift: -6px; }
.fan__card:nth-child(8) { --tilt: 6deg;   --lift: 6px; }

.stack__statement {
  max-width: 54rem;
  margin: clamp(2.5rem, 6vw, 4.5rem) auto 0;
  text-align: center;
}
.stack__statement .two-tone { font-size: clamp(1.5rem, 2.8vw, 2.5rem); }

/* ---------------------------------------------------------------
   8. Projects: sticky stack of rows
   --------------------------------------------------------------- */
.work {
  padding: var(--section-y) 0 calc(var(--section-y) * 1.1);
}
.work__list {
  display: grid;
  gap: 1.5rem;
}
.stackcard {
  position: sticky;
  top: calc(var(--nav-gap) + var(--nav-h) + 1.25rem + var(--i, 0) * 10px);
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--line-2);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .25);
  transform-origin: top center;
}
.stackcard__link {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(1.25rem, 2.4vw, 2rem);
  align-items: stretch;
  border-radius: inherit;
}
.stackcard__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto auto;
  column-gap: 1rem;
  align-content: start;
  min-width: 0;
}
/* Desktop relies on the arrow; tablet and phone get an explicit button. */
.stackcard__btn {
  display: none;
  grid-column: 1 / -1;
  grid-row: 4;
  justify-self: start;
  margin-top: 1.25rem;
}
.stackcard__num {
  grid-column: 1;
  grid-row: 1;
  padding-top: .75em;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
  color: var(--accent);
}
.stackcard__title {
  grid-column: 2;
  grid-row: 1;
  font-size: clamp(1.9rem, 3.6vw, 3.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
  transition: transform .5s var(--ease-out);
}
.stackcard__link:hover .stackcard__title { transform: translateX(6px); }
.stackcard__arrow {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 1rem;
  transition: background .3s var(--ease-out), color .3s var(--ease-out), transform .35s var(--ease-out), border-color .3s;
}
.stackcard__link:hover .stackcard__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  transform: translateX(4px);
}
.stackcard__rule {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  margin: 1.25rem 0 1rem;
  border-top: 1px solid var(--line);
}
.stackcard__desc {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  margin-top: 3rem;
  color: var(--fg-2);
  font-size: .98rem;
  max-width: 52ch;
}
.stackcard__chips {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 1.5rem;
  align-self: end;
}
.stackcard__media {
  border-radius: var(--r-img);
  overflow: hidden;
  background: var(--ink-3);
  height: clamp(240px, 40vh, 440px);
}
.stackcard__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .9s var(--ease-out);
}
.stackcard__link:hover .stackcard__media img { transform: scale(1.03); }

/* Previous card recedes as the next one slides over it (scroll-driven). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .stackcard[data-next] {
      animation: recede linear both;
      animation-range: entry 0% entry 100%;
    }
  }
}
/* Brightness, not opacity: a translucent card would show the ones beneath it. */
@keyframes recede {
  to { transform: scale(.94); filter: brightness(.45); }
}

/* ---------------------------------------------------------------
   9. About and experience
   --------------------------------------------------------------- */
.about {
  padding: var(--section-y) 0 calc(var(--section-y) * .6);
}
.about__head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.about__media {
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 4 / 5;
  position: relative;
}
.about__media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Terminal panel: a real session typed out by index.js */
.term {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 460px;
  border-radius: var(--r-card);
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: #fff;
}
.term__bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .55);
}
.term__screen {
  margin: 0;
  padding: 1.25rem 1.4rem 1.5rem;
  font-family: var(--font-mono);
  font-size: .84rem;
  font-weight: 400;
  line-height: 1.75;
  color: rgba(255, 255, 255, .88);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: hidden;
}
.term__prompt { color: var(--accent); }
.term__cmd { color: #fff; }
.term__out { color: rgba(255, 255, 255, .62); }
.term__cursor {
  display: inline-block;
  width: .55em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -.18em;
  background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .term__cursor { animation: blink 1.1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }
.about__text { display: grid; gap: 1.75rem; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.fact__num {
  display: block;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.fact__label {
  display: block;
  margin-top: .4rem;
  color: var(--fg-2);
  font-size: .95rem;
}
.about__skills { display: grid; gap: .8rem; }
.about__skills-label { font-size: .95rem; font-weight: 500; color: var(--fg-2); }

.exp {
  padding: calc(var(--section-y) * .6) 0 var(--section-y);
}
.exp__list {
  border-top: 1px solid var(--line);
}
.exp__row {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.exp__row .h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.exp__company { color: var(--fg-2); font-size: 1.05rem; }
.exp__dates { justify-self: start; }
.exp__row .pill--current {
  --glass: var(--accent);
  --glass-hover: var(--accent);
  --fg: var(--ink);
  height: 34px;
  padding: 0 .9rem;
  font-size: .8rem;
  margin-left: .5rem;
}

/* ---------------------------------------------------------------
   10. Contact
   --------------------------------------------------------------- */
.contact {
  padding: var(--section-y) 0;
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact__intro { display: grid; gap: 1.5rem; align-content: start; }
.contact__intro .lead a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent);
  overflow-wrap: anywhere;
}
.contact__socials { display: flex; gap: .5rem; flex-wrap: wrap; }

.form {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border-radius: var(--r-card);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
}
.field { display: grid; gap: .5rem; }
.field label {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.field input, .field textarea {
  width: 100%;
  padding: .95rem 1.1rem;
  border-radius: var(--r-input);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { min-height: 160px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, .5); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.field input.has-error, .field textarea.has-error {
  border-color: #f0506e;
  box-shadow: 0 0 0 3px rgba(240, 80, 110, .2);
}
.field__error, .form__error {
  color: #ffb3c1;
  font-size: .9rem;
}
.d-none { display: none !important; }
.form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .25rem;
}
.form__note {
  font-size: .85rem;
  color: var(--fg-2);
  max-width: 34ch;
}

/* Success modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 10, 10, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease-out), visibility 0s .3s;
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s var(--ease-out), visibility 0s;
}
.modal__card {
  width: min(100%, 440px);
  padding: 2rem;
  border-radius: var(--r-card);
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  text-align: center;
  display: grid;
  gap: 1rem;
  justify-items: center;
  transform: translateY(14px) scale(.98);
  transition: transform .35s var(--ease-out);
}
.modal.is-open .modal__card { transform: none; }
.modal__check {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-size: 1.3rem;
}
.modal__card h3 { font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; }
.modal__card p { color: rgba(255, 255, 255, .7); }

/* ---------------------------------------------------------------
   11. Footer
   --------------------------------------------------------------- */
.footer {
  padding: calc(var(--section-y) * .8) 0 1.25rem;
  border-top: 1px solid var(--line-2);
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.footer__col {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: start;
}
.footer__col ul { display: grid; gap: .55rem; min-width: 0; }
.footer__col a, .footer__col span.muted {
  color: var(--fg-2);
  font-size: 1rem;
  overflow-wrap: anywhere;
  transition: color .2s;
}
.footer__col a:hover { color: var(--accent); }
.footer__col .paren { color: var(--fg); }
.footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem .75rem .75rem 1.25rem;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--bg-2);
  flex-wrap: wrap;
}
.footer__copy { color: var(--fg-2); font-family: var(--font-mono); font-size: .78rem; }
.footer__copy a { color: var(--accent); }

/* ---------------------------------------------------------------
   12. Inner-page hero and case study page
   .cs-hero is the shared compact hero for every page under the home
   page (case studies, client testimonials, the feedback form).
   --------------------------------------------------------------- */
.cs-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: calc(var(--nav-gap) + var(--nav-h) + clamp(3rem, 8vw, 6rem)) 0 clamp(3rem, 6vw, 5rem);
  background: var(--ink);
  color: #fff;
}
.cs-hero__inner { display: grid; gap: 1.75rem; max-width: 62rem; }
.cs-hero__title {
  font-size: clamp(2.4rem, 6.4vw, 6.2rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.cs-hero .two-tone { font-size: clamp(1.15rem, 1.8vw, 1.5rem); max-width: 52rem; }
.cs-hero__cta { display: flex; gap: .6rem; flex-wrap: wrap; }
.cs-hero .btn--glass { --btn-bg: rgba(255,255,255,.12); --btn-fg: #fff; --btn-ico-bg: #fff; --btn-ico-fg: var(--ink); }

.cs-body { padding: clamp(2rem, 4vw, 3.5rem) 0 var(--section-y); }
/* Sits fully below the hero (no overlap) and never taller than the viewport. */
.cs-body__media {
  width: min(100%, 1100px);
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  max-height: min(68vh, 680px);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.cs-body__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.cs-body__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr);
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
.cs-body__text { display: grid; gap: 1.25rem; }
.prose {
  color: var(--fg-2);
  font-size: 1.05rem;
  line-height: 1.7;
  display: grid;
  gap: 1rem;
}
.prose p { margin: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--fg); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; margin-top: .75rem; }
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.3rem; }
.prose ul, .prose ol { padding-left: 1.25rem; display: grid; gap: .4rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose img { border-radius: var(--r-img); }
.cs-aside {
  position: sticky;
  top: calc(var(--nav-gap) + var(--nav-h) + 1.5rem);
  display: grid;
  gap: 1.75rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--line-2);
}
.cs-aside__block { display: grid; gap: .8rem; }
.cs-aside__block .h3 { font-size: 1.05rem; color: var(--fg-2); font-weight: 500; }
.cs-aside__links { display: grid; gap: .5rem; justify-items: start; }

/* ---------------------------------------------------------------
   12b. Floating quick-contact buttons
   --------------------------------------------------------------- */
.quick {
  position: fixed;
  right: clamp(1rem, 2vw, 1.5rem);
  bottom: clamp(1rem, 2vw, 1.5rem);
  z-index: 55;
  display: grid;
  gap: .6rem;
  justify-items: end;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.quick.is-hidden,
.menu-open .quick,
.modal-open .quick {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.quick__btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  height: 52px;
  padding: 0 1.25rem 0 .375rem;
  border-radius: var(--r-pill);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), opacity .3s var(--ease-out);
}
.quick__btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0, 0, 0, .34); }
.quick__btn:active { transform: translateY(0) scale(.985); }
.quick__btn.is-hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }
.quick__ico {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  flex: none;
}
/* Both float on graphite; WhatsApp is marked by its orange icon only, so the
   page's main CTAs stay the brightest thing on screen. */
.quick__btn--wa,
.quick__btn--contact {
  background: var(--graphite);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
}
.quick__btn--wa .quick__ico { background: var(--accent); color: var(--ink); }
.quick__btn:hover { border-color: var(--accent-ring); }
.quick__btn--contact .quick__ico { background: rgba(255, 255, 255, .12); color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .quick { animation: quick-in .8s var(--ease-out) 1s backwards; }
}
@keyframes quick-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* Phones: round icon buttons, labels hidden */
@media (max-width: 640px) {
  .quick { gap: .5rem; }
  .quick__btn { width: 54px; height: 54px; padding: 0; justify-content: center; }
  .quick__label { display: none; }
  .quick__ico { width: 54px; height: 54px; background: transparent !important; color: inherit !important; font-size: 1.35rem; }
  .quick__btn--wa { color: var(--accent); }
}

/* ---------------------------------------------------------------
   12c. Client feedback form page (/client-feedback-form)
   The hero reuses .cs-hero. The form card is the contact form's .form,
   themed dark on its own so it reads the same in any section.
   --------------------------------------------------------------- */
.fb { padding: var(--section-y) 0; }
.fb__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.fb__intro { display: grid; gap: 1.5rem; align-content: start; }
.fb__steps {
  display: grid;
  gap: 1.25rem;
  margin-top: .5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.fb__step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.fb__step-num {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--graphite);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
}
.fb__step-title { font-size: 1.1rem; font-weight: 500; letter-spacing: -.01em; margin-bottom: .2rem; }
.fb__step p { color: var(--fg-2); font-size: .98rem; max-width: 46ch; }
.fb__step a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* The form card carries its own theme so every token inside reads dark. */
.form[data-theme] { color: var(--fg); background: var(--bg-2); border-color: rgba(255, 255, 255, .08); box-shadow: var(--shadow); }
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.field__req { color: var(--accent); margin-left: .15em; }
.field__opt {
  margin-left: .4em;
  padding: .1em .5em;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .08);
  color: var(--fg-3);
  letter-spacing: .02em;
  text-transform: lowercase;
}
.field__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.field__meta .field__error { flex: 1 1 auto; }
.field__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 500;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color .2s;
}
.field__count.is-near { color: #ffd27a; }
.field__count.is-full { color: #ffb3c1; }
/* Honeypot: off-canvas, never display:none (some bots skip hidden inputs). */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-top: .25rem;
}

/* ---------------------------------------------------------------
   12d. Client testimonials (/client-testimonials)
   A scroll-snap slider: the track scrolls natively (touch, wheel,
   keyboard), index.js only syncs the active card, dots and autoplay.
   --------------------------------------------------------------- */
/* The section is the size container: 100cqw is the full page width, so
   the track can bleed past the content column to both screen edges and
   neighbouring cards run off the page instead of being cut at the gutter. */
.tst {
  padding: var(--section-y) 0;
  overflow: hidden;
  container-type: inline-size;
}
.tslider {
  --card-w: min(560px, 100cqw - 6rem);
  --gap: clamp(1rem, 2vw, 1.5rem);
  --auto-ms: 5000ms;
  display: grid;
  gap: 2rem;
}
.tslider__track {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: var(--gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  /* Bleed from the content column out to the page edges... */
  margin-inline: calc((100% - 100cqw) / 2);
  /* ...and pad so the first and last cards can still sit centred. */
  padding-inline: calc((100cqw - var(--card-w)) / 2);
  padding-block: 1.75rem;
  margin-block: -1.75rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.tslider__track::-webkit-scrollbar { display: none; }
.tslider__track:active { cursor: grabbing; }
/* Mouse drag (index.js): no snapping or text selection mid-drag. */
.tslider__track.is-dragging {
  scroll-snap-type: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grabbing;
}
.tslider__track:focus-visible { outline-offset: -2px; border-radius: var(--r-card); }

.tcard {
  flex: 0 0 var(--card-w);
  min-width: 0;
  display: flex;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transition: scale .6s var(--ease-out);
}
/* Every card is always at full strength: no opacity, no tint. Once
   index.js is running, the neighbours only step back a touch in size. */
.tslider.is-ready .tcard:not(.is-active) { scale: .96; }
.tcard__inner {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .3), 0 1px 0 rgba(255, 255, 255, .05) inset;
  transition: box-shadow .6s var(--ease-out), translate .5s var(--ease-out), border-color .4s;
}
.tcard.is-active .tcard__inner {
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .05) inset;
}
.tcard.is-active .tcard__inner:hover { border-color: var(--accent-ring); }
.tcard.is-active .tcard__inner:hover { translate: 0 -6px; }
.tcard__mark {
  display: block;
  height: 2.4rem;
  font-size: 5.5rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -.06em;
  color: var(--accent);
  transform: translateY(-.1em);
  transition: transform .6s var(--ease-out);
}
.tcard.is-active .tcard__mark { transform: translateY(-.2em) rotate(-6deg); }
/* Status line shown after a plain (non-JavaScript) form submission. */
.notice {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding: .7rem 1.1rem .7rem .8rem;
  border-radius: var(--r-pill);
  background: var(--graphite);
  color: #fff;
  font-size: .95rem;
  font-weight: 500;
}
.notice i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--ink); font-size: .75rem; }
.tcard__quote { margin: 0; }
.tcard__quote p {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -.015em;
  color: var(--fg);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.tcard__foot {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.tcard__avatar {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 500;
  flex: none;
}
.tcard__who { display: grid; gap: .1rem; min-width: 0; }
.tcard__name { font-style: normal; font-weight: 600; font-size: 1rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.tcard__role { font-size: .9rem; color: var(--fg-2); overflow-wrap: anywhere; }
.tcard__date { margin-left: auto; flex: none; }

/* The closing invitation card sits a step lighter, on graphite. */
.tcard--cta .tcard__inner {
  background: var(--graphite);
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
}
.tcard--cta .tcard__mark { color: rgba(255, 255, 255, .18); }
.tcard__cta-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.03em;
  align-self: end;
}
.tcard__cta-text { color: rgba(255, 255, 255, .64); font-size: 1.02rem; max-width: 34ch; }
.tcard__foot--cta { border-top-color: rgba(255, 255, 255, .12); }

/* Controls under the track: counter on the left, then a centred
   arrow-dots-arrow group. The right-hand column stays empty because the
   floating WhatsApp / Contact buttons live in that corner. */
.tslider__bar {
  display: grid;
  grid-template-columns: 1fr auto auto auto 1fr;
  grid-template-areas: "count prev dots next .";
  align-items: center;
  column-gap: 1rem;
}
.tslider__count { grid-area: count; justify-self: start; }
.tslider__btn--prev { grid-area: prev; }
.tslider__btn--next { grid-area: next; }
.tslider__dots {
  grid-area: dots;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  padding-inline: .25rem;
}
.tslider__dot {
  position: relative;
  width: 10px; height: 10px;
  padding: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
  transition: width .45s var(--ease-out), background .3s;
}
.tslider__dot:hover { background: rgba(255, 255, 255, .34); }
.tslider__dot.is-active { width: 48px; background: rgba(255, 255, 255, .12); }
.tslider__dot span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.tslider__dot.is-active span { transform: scaleX(1); }
/* While autoplay runs, the active dot fills over one interval. */
.tslider.is-auto .tslider__dot.is-active span {
  animation: dot-fill var(--auto-ms) linear forwards;
}
/* Paused (hover, drag, keyboard focus, off screen): the fill waits too,
   and the script resumes the countdown with exactly the time left. */
.tslider.is-paused .tslider__dot.is-active span { animation-play-state: paused; }
@keyframes dot-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tslider__btn { border: 1px solid var(--line-2); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }

/* Empty state */
.tempty {
  position: relative;
  display: grid;
  gap: 1rem;
  justify-items: start;
  width: min(100%, 44rem);
  padding: clamp(1.75rem, 3.5vw, 3rem);
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px dashed var(--line);
  overflow: hidden;
}
.tempty__mark {
  position: absolute;
  right: 1.25rem; top: -.5rem;
  font-size: 11rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -.06em;
  color: var(--bg-2);
  pointer-events: none;
}
.tempty__title { position: relative; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.05; }
.tempty__text { position: relative; color: var(--fg-2); font-size: 1.05rem; max-width: 46ch; }
.tempty .btn { position: relative; margin-top: .5rem; }

/* ---------------------------------------------------------------
   13. Reveal on scroll
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
    transition-delay: var(--delay, 0s);
  }
  .reveal.is-in { opacity: 1; transform: none; }

  /* Headings rise out of a clipped box instead of fading. The box clips with
     overflow (not clip-path, which stops IntersectionObserver from ever
     seeing the element); the JS wraps the text in .mask__inner. */
  .reveal--mask {
    opacity: 1;
    transform: none;
    transition: none;
    overflow: hidden;
    padding-bottom: .12em;
    margin-bottom: -.12em;
  }
  .reveal--mask .mask__inner {
    display: block;
    transform: translateY(110%);
    transition: transform .9s var(--ease-out);
    transition-delay: var(--delay, 0s);
  }
  .reveal--mask.is-in .mask__inner { transform: none; }

  /* Tool cards are dealt in flat and settle into their tilt, one after
     another. Animation (not transition) so hover is never delayed after. */
  .fan__card.reveal { opacity: 0; transition: none; }
  .fan__card.reveal.is-in {
    opacity: 1;
    transition: rotate .5s var(--ease-out), translate .5s var(--ease-out), box-shadow .5s var(--ease-out);
    animation: deal .9s var(--ease-out) backwards;
    animation-delay: var(--delay, 0s);
  }
  /* Cards keep their own scale transition next to the reveal's, and only
     the reveal is staggered. */
  .tcard.reveal {
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out), scale .6s var(--ease-out);
    transition-delay: var(--delay, 0s), var(--delay, 0s), 0s;
  }
  .chip.reveal { opacity: 0; transition: none; }
  .chip.reveal.is-in {
    opacity: 1;
    animation: pop .5s var(--ease-out) backwards;
    animation-delay: var(--delay, 0s);
  }
}
@keyframes deal {
  from { opacity: 0; rotate: 0deg; translate: 0 56px; }
  to   { opacity: 1; rotate: var(--tilt, 0deg); translate: 0 var(--lift, 0px); }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* Back-to-top sits in the footer bar; nothing floats over content. */

/* ---------------------------------------------------------------
   14. Responsive
   --------------------------------------------------------------- */
@media (max-width: 1240px) {
  .nav__link { padding: .55rem .7rem; font-size: .9rem; }
  .nav__cta { padding-right: 1.1rem; }
}
@media (max-width: 1100px) {
  .nav__link { padding: .5rem .55rem; font-size: .86rem; }
  .stackcard__link { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
}

@media (max-width: 960px) {
  :root { --nav-h: 64px; }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: grid; width: 44px; height: 44px; }

  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  /* Single column leaves no empty band, so only the </> mark stays, parked
     beside "Singh." (top = intro offset + one name line). */
  .cf:not(.cf--keep) { display: none; }
  .cf--tag {
    --t: 52px;
    left: auto;
    right: var(--gutter);
    bottom: auto;
    /* Just below the top of the second line, clear of the descenders above */
    top: calc(var(--hero-pt) + 2.81rem + .94 * var(--hero-fs) + 10px);
    width: var(--t); height: var(--t);
    border-radius: 15px;
  }
  .cf--tag .cf__glyph { font-size: 1.15rem; }
  .hero__aside .two-tone { text-align: left; }
  .hero__contact-row { justify-content: flex-start; }
  .hero__foot .paren-link { min-width: 0; width: 100%; }

  .fan { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity; padding-inline: var(--gutter); margin-inline: calc(-1 * var(--gutter)); scrollbar-width: none; }
  .fan::-webkit-scrollbar { display: none; }
  .fan__card { scroll-snap-align: center; width: 132px; }

  .stackcard { top: calc(var(--nav-gap) + var(--nav-h) + .75rem + var(--i, 0) * 8px); }
  .stackcard__link { grid-template-columns: 1fr; }
  .stackcard__media { height: clamp(200px, 32vh, 320px); order: -1; }
  .stackcard__desc { margin-top: 2.5rem; }
  .stackcard__arrow { display: none; }
  .stackcard__btn { display: inline-flex; }

  .about__grid { grid-template-columns: 1fr; }
  .about__media { aspect-ratio: 16 / 10; max-height: 380px; }
  .term { min-height: 340px; }
  .term__screen { font-size: .78rem; }
  .exp__row { grid-template-columns: 1fr; gap: .35rem; }
  .exp__dates { order: 3; }

  .contact__grid { grid-template-columns: 1fr; }
  .fb__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .tslider { --card-w: min(520px, 100cqw - 5rem); }
  .footer__cols { grid-template-columns: 1fr; gap: 1.75rem; }
  .cs-body__grid { grid-template-columns: 1fr; }
  .cs-body__media { aspect-ratio: 4 / 3; }
  .cs-aside { position: static; }
}

@media (max-width: 600px) {
  :root { --nav-gap: 10px; }
  .nav__bar { padding: 0 .5rem 0 .9rem; border-radius: 16px; }
  .nav__brand span { font-size: .95rem; }
  .btn { height: 48px; font-size: .9rem; }
  .btn__ico { width: 36px; height: 36px; }
  .hero { --hero-pt: calc(var(--nav-gap) + var(--nav-h) + 2.5rem); }
  .hero__foot .btn { flex: 1 1 auto; justify-content: flex-start; }
  .stackcard__body { grid-template-columns: auto minmax(0, 1fr); }
  .stackcard__arrow { display: none; }
  .stackcard__title { font-size: clamp(1.6rem, 7.5vw, 2.4rem); }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .fact__num { font-size: 1.9rem; }
  .form__foot .btn { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  /* A sliver of each neighbour stays in view as a cue to swipe. */
  .tslider { --card-w: calc(100cqw - 3.5rem); --gap: .75rem; }
  .notice { border-radius: 16px; align-items: flex-start; }
  /* Phones: dots on their own row, then arrows around the counter, all
     centred and clear of the round floating buttons on the right. */
  .tslider__bar {
    grid-template-columns: auto auto auto;
    grid-template-areas: "dots dots dots" "prev count next";
    justify-content: center;
    row-gap: 1.1rem;
    column-gap: 1.25rem;
  }
  .tslider__count { justify-self: center; }
  .tcard__date { display: none; }
  .tempty__mark { font-size: 7rem; }
  .footer__bar { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
