/* ==========================================================================
   Sufian Abu Laban — personal portfolio design system
   Static CSS. No build step, no preprocessor, no external requests.
   Sections: 1 tokens · 2 reset · 3 layout · 4 typography · 5 components
             6 header/nav · 7 hero · 8 page blocks · 9 work · 10 footer
             11 utilities · 12 motion
   ========================================================================== */

/* 1 ─ Design tokens ─────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  --bg:            #080a12;
  --bg-grad-a:     #0c1020;
  --bg-grad-b:     #080a12;
  --elev:          #0e1220;
  --surface:       #121729;
  --surface-hi:    #1a2038;
  --line:          rgba(255, 255, 255, .09);
  --line-strong:   rgba(255, 255, 255, .16);

  --text:          #e8edf4;
  --text-mid:      #b8c4d2;
  --muted:         #8b98a9;

  /* Indigo. Chosen to read as engineering rather than agency, and to be
     unmistakably not the Mayaal amber — these are two separate brands. */
  --accent:        #7c8cff;
  --accent-hi:     #a3adff;
  --accent-ink:    #070a18;
  --accent-soft:   rgba(124, 140, 255, .13);
  --accent-line:   rgba(124, 140, 255, .32);

  --cool:          #35d6c3;
  --cool-soft:     rgba(53, 214, 195, .12);

  --ok:            #4ade80;
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .5);
  --shadow:        0 18px 40px -22px rgba(0, 0, 0, .85);
  --shadow-lg:     0 42px 80px -34px rgba(0, 0, 0, .9);

  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     22px;
  --radius-pill:   999px;

  --step--1:       clamp(.8125rem, .79rem + .1vw, .875rem);
  --step-0:        clamp(.9375rem, .91rem + .13vw, 1rem);
  --step-1:        clamp(1.0625rem, 1.01rem + .28vw, 1.1875rem);
  --step-2:        clamp(1.25rem, 1.14rem + .55vw, 1.5rem);
  --step-3:        clamp(1.5rem, 1.29rem + 1.05vw, 2rem);
  --step-4:        clamp(1.875rem, 1.47rem + 2.03vw, 2.875rem);
  --step-5:        clamp(2.25rem, 1.43rem + 4.1vw, 4.25rem);

  --gutter:        clamp(1.125rem, .7rem + 2.1vw, 2.25rem);
  --block:         clamp(4rem, 2.6rem + 7vw, 7.5rem);
  --wrap:          1180px;
  --wrap-narrow:   760px;

  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", "JetBrains Mono",
               Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg:            #fafbfe;
  --bg-grad-a:     #ffffff;
  --bg-grad-b:     #f3f5fb;
  --elev:          #ffffff;
  --surface:       #ffffff;
  --surface-hi:    #eef1f9;
  --line:          rgba(16, 22, 44, .11);
  --line-strong:   rgba(16, 22, 44, .2);

  --text:          #0c1122;
  --text-mid:      #38425c;
  --muted:         #5b6580;

  /* Same hue, darkened until it clears 4.5:1 on the pale background. */
  --accent:        #4a4fd0;
  --accent-hi:     #3a3eb4;
  --accent-ink:    #ffffff;
  --accent-soft:   rgba(74, 79, 208, .09);
  --accent-line:   rgba(74, 79, 208, .28);

  --cool:          #0e8f80;
  --cool-soft:     rgba(14, 143, 128, .1);

  --shadow-sm:     0 1px 2px rgba(16, 24, 40, .06);
  --shadow:        0 16px 34px -20px rgba(16, 24, 40, .35);
  --shadow-lg:     0 36px 70px -32px rgba(16, 24, 40, .4);
}

/* 2 ─ Reset & base ──────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient backdrop: a soft amber bloom top-right, cool bloom bottom-left. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(58rem 34rem at 82% -8%, var(--accent-soft), transparent 62%),
    radial-gradient(46rem 30rem at 6% 102%, var(--cool-soft), transparent 60%),
    linear-gradient(180deg, var(--bg-grad-a), var(--bg-grad-b));
  pointer-events: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* 3 ─ Layout ────────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: var(--wrap-narrow); }

.block { padding-block: var(--block); }
.block--tight { padding-block: calc(var(--block) * .58); }

.block--alt {
  background: linear-gradient(180deg, transparent, var(--elev) 12%, var(--elev) 88%, transparent);
  border-block: 1px solid var(--line);
}

.grid { display: grid; gap: clamp(1rem, .5rem + 1.4vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }

.skip-link {
  position: absolute;
  left: 50%;
  top: -4rem;
  translate: -50% 0;
  z-index: 200;
  padding: .7rem 1.2rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 650;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* 4 ─ Typography ────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -.022em;
  font-weight: 680;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.62;
  color: var(--text-mid);
  max-width: 62ch;
}

.muted { color: var(--muted); }

.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 1.2rem + 2.6vw, 3.5rem); }
.section-head p { margin-top: 1rem; color: var(--text-mid); }

.prose > * + * { margin-top: 1.15em; }
.prose p { color: var(--text-mid); }
.prose strong { color: var(--text); font-weight: 650; }

/* 5 ─ Components ────────────────────────────────────────────────────────── */

/* Buttons ---------------------------------------------------------------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .78rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: .005em;
  cursor: pointer;
  white-space: nowrap;
  transition: translate .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { translate: 0 -2px; box-shadow: 0 12px 26px -14px var(--accent); }
.btn:active { translate: 0 0; }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  background: var(--surface-hi);
  border-color: var(--accent-line);
  box-shadow: none;
}

.btn--sm { padding: .55rem 1rem; font-size: .8125rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

/* Text link with animated rule ------------------------------------------- */
.link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--accent);
  font-weight: 620;
  font-size: var(--step--1);
}
.link::after {
  content: "→";
  transition: translate .18s var(--ease);
}
.link:hover::after { translate: .25rem 0; }

/* Pills / tags ----------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text-mid);
  white-space: nowrap;
}
.tag--accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.tag--live::before {
  content: "";
  width: .45rem; height: .45rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent);
}

.tag-row { display: flex; flex-wrap: wrap; gap: .45rem; }

/* Card ------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 1.1rem + .8vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease), translate .2s var(--ease),
              box-shadow .2s var(--ease);
}
.card:hover { border-color: var(--accent-line); translate: 0 -3px; box-shadow: var(--shadow); }

.card__icon {
  display: grid;
  place-items: center;
  width: 2.9rem; height: 2.9rem;
  margin-bottom: 1.15rem;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}
.card__icon svg { width: 1.4rem; height: 1.4rem; }

.card h3 { margin-bottom: .55rem; }
.card p { color: var(--muted); font-size: var(--step--1); line-height: 1.62; }
.card__foot { margin-top: auto; padding-top: 1.15rem; }

/* Stats ------------------------------------------------------------------ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
  overflow: hidden;
}
.stat { padding: 1.35rem 1.5rem; background: var(--elev); }
.stat dt {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat dd {
  margin: .3rem 0 0;
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Client logo strip ------------------------------------------------------ */
.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.logos li {
  display: grid;
  place-items: center;
  width: clamp(9.5rem, 8rem + 6vw, 12rem);
  height: 5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .2s var(--ease), translate .2s var(--ease);
}
.logos li:hover { border-color: var(--accent-line); translate: 0 -2px; }
.logos img { max-height: 2.6rem; width: auto; object-fit: contain; }

/* Timeline --------------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 2.4rem 2rem;
  border-left: 1px solid var(--line);
}
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -.3rem; top: .5rem;
  width: .6rem; height: .6rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.timeline .t-when {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .35rem;
}
.timeline h3 { font-size: var(--step-1); margin-bottom: .15rem; }
.timeline .t-org { font-size: var(--step--1); color: var(--muted); margin-bottom: .6rem; }
.timeline p { font-size: var(--step--1); color: var(--text-mid); }

/* Notice / callout ------------------------------------------------------- */
.note {
  padding: 1.25rem 1.45rem;
  border: 1px solid var(--accent-line);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: var(--step--1);
  color: var(--text-mid);
}

/* 6 ─ Header & navigation ───────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Tall enough for the lockup, which needs a generous box to stay legible. */
  min-height: 4.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-right: auto;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -.02em;
}
/* A typographic monogram, not an image — this is a personal site and the name
   is the brand. Swap for an <img> if a designed mark ever arrives. */
.brand__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.4rem; height: 2.4rem;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--accent), var(--cool));
  color: var(--accent-ink);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.brand__name { font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }

@media (max-width: 520px) {
  .brand__name { font-size: .9375rem; }
}


.nav__links {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: block;
  padding: .5rem .8rem;
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 580;
  color: var(--text-mid);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav__links a:hover { color: var(--text); background: var(--surface-hi); }
.nav__links a[aria-current] { color: var(--accent); background: var(--accent-soft); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.4rem; height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.icon-btn:hover { border-color: var(--accent-line); background: var(--surface-hi); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }

.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

.nav__burger { display: none; }

@media (max-width: 880px) {
  .nav__burger { display: grid; }
  .nav__cta { display: none; }

  .nav__links {
    position: fixed;
    inset: 4.75rem 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    padding: 1rem var(--gutter) 1.6rem;
    background: var(--elev);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    translate: 0 -120%;
    visibility: hidden;
    transition: translate .3s var(--ease), visibility .3s;
  }
  .nav__links.is-open { translate: 0; visibility: visible; }
  .nav__links a { padding: .8rem .9rem; font-size: var(--step-0); }
}

/* 7 ─ Hero ──────────────────────────────────────────────────────────────── */

/* Hero */

.hero { position: relative; padding-block: clamp(3.5rem, 2rem + 7vw, 7rem) var(--block); }

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  align-items: center;
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.15fr .85fr; }
}

.hero h1 { margin-bottom: 1.4rem; }
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  /* underline that sits below the descenders */
  background-image: linear-gradient(var(--accent-line), var(--accent-line));
  background-size: 100% 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: .08em;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.6rem;
  padding: .4rem .85rem .4rem .5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-mid);
}
.hero__badge b {
  padding: .12rem .5rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .04em;
}

.hero__actions { margin-top: 2rem; }

.hero__panel {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--surface-hi), var(--surface));
  box-shadow: var(--shadow-lg);
}
.hero__panel::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, var(--accent-line), transparent 42%, transparent 62%, var(--cool-soft));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.spec {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.9;
}
.spec li {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px dashed var(--line);
}
.spec li:last-child { border-bottom: 0; }
.spec span:first-child { color: var(--muted); }
.spec span:last-child { color: var(--text); text-align: right; font-weight: 600; }

/* 8 ─ Page blocks ───────────────────────────────────────────────────────── */

.page-head { padding-block: clamp(2.5rem, 1.6rem + 4vw, 4.5rem) 0; }
.page-head h1 { font-size: var(--step-4); margin-bottom: 1.1rem; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.4rem;
  font-size: .8125rem;
  color: var(--muted);
}
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-hidden] { opacity: .5; }

.split {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
  .split--sidebar { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}

.cta-band {
  position: relative;
  padding: clamp(2.5rem, 1.6rem + 4vw, 4rem);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(38rem 20rem at 88% -30%, var(--accent-soft), transparent 65%),
    var(--elev);
  text-align: center;
}
.cta-band h2 { font-size: var(--step-3); margin-bottom: 1rem; }
.cta-band p { margin-inline: auto; max-width: 52ch; color: var(--text-mid); }
.cta-band .btn-row { justify-content: center; margin-top: 1.9rem; }

/* Contact rows ----------------------------------------------------------- */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.contact-list a,
.contact-list .row {
  display: flex;
  align-items: center;
  gap: .95rem;
  padding: 1.05rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s var(--ease), translate .18s var(--ease);
}
.contact-list a:hover { border-color: var(--accent-line); translate: 0 -2px; }
.contact-list svg { width: 1.2rem; height: 1.2rem; flex: none; color: var(--accent); }
.contact-list b { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
                  text-transform: uppercase; color: var(--muted); }
.contact-list span { font-size: var(--step-0); }

/* 9 ─ Work grid & project pages ─────────────────────────────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
}
.filter {
  padding: .5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease),
              background-color .18s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.filter .n { opacity: .6; margin-left: .35rem; font-variant-numeric: tabular-nums; }
.filter[aria-pressed="true"] .n { opacity: .75; }

.work-grid { display: grid; gap: clamp(1rem, .6rem + 1.2vw, 1.5rem); }
@media (min-width: 620px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color .22s var(--ease), translate .22s var(--ease),
              box-shadow .22s var(--ease);
}
.pcard:hover { border-color: var(--accent-line); translate: 0 -4px; box-shadow: var(--shadow); }
.pcard[hidden] { display: none; }

.pcard__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(16rem 10rem at 50% 0%, var(--surface-hi), transparent 70%),
    var(--elev);
  border-bottom: 1px solid var(--line);
}
/* Thumbnails are pre-composed at exactly 16:10 by tools/build_site.py, with the
   artwork already centred on the brand tile, so `cover` never crops anything.
   The background above only shows through while the image is still loading. */
.pcard__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: scale .5s var(--ease);
}
.pcard:hover .pcard__media img { scale: 1.045; }

.pcard__body { display: flex; flex-direction: column; flex: 1; padding: 1.3rem 1.4rem 1.45rem; }
.pcard__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: .65rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.pcard__kicker .cat { color: var(--accent); }
.pcard h3 { font-size: var(--step-1); margin-bottom: .5rem; letter-spacing: -.015em; }
.pcard p { font-size: var(--step--1); line-height: 1.6; color: var(--muted); }
.pcard__foot { margin-top: auto; padding-top: 1.1rem; }

/* Whole card is clickable, but only the title is a real link. */
.pcard__link::after { content: ""; position: absolute; inset: 0; }
.pcard__link:hover { color: var(--accent); }

.empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}

/* Project detail --------------------------------------------------------- */
.project-hero { padding-block: clamp(2rem, 1.4rem + 2.6vw, 3.25rem) 0; }
.project-hero h1 { font-size: var(--step-4); margin-bottom: 1.1rem; }
.project-hero .lede { margin-bottom: 1.6rem; }

.factsheet {
  list-style: none;
  margin: 0;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  gap: 1.05rem;
}
.factsheet div { display: grid; gap: .2rem; }
.factsheet dt, .factsheet b {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.factsheet dd { margin: 0; font-size: var(--step--1); color: var(--text); }

/* Padding + absolute marker, deliberately NOT grid: a grid container blockifies
   its element children, so any inline <a> inside a bullet would be promoted to
   its own grid item and wrap vertically. */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.checks li {
  position: relative;
  padding-left: 1.9rem;
  font-size: var(--step--1);
  line-height: 1.62;
  color: var(--text-mid);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 1.15rem; height: .1rem;
  background: var(--accent);
  border-radius: 2px;
}

/* Gallery ---------------------------------------------------------------- */
.gallery {
  display: grid;
  gap: clamp(.75rem, .5rem + .8vw, 1.1rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
}
.gallery--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }

.shot {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--elev);
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color .2s var(--ease), translate .2s var(--ease);
}
.shot:hover { border-color: var(--accent-line); translate: 0 -3px; }
.shot img { width: 100%; height: auto; }

/* Lightbox --------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  place-items: center;
  padding: clamp(1rem, 3vw, 3rem);
  background: rgba(4, 6, 10, .9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox.is-open { display: grid; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.lightbox__close {
  position: absolute;
  top: clamp(.75rem, 2vw, 1.5rem);
  right: clamp(.75rem, 2vw, 1.5rem);
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 2.8rem; height: 2.8rem;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}
.lightbox__nav--prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lightbox__nav--next { right: clamp(.5rem, 2vw, 1.5rem); }
.lightbox__count {
  position: absolute;
  bottom: clamp(.75rem, 2vw, 1.5rem);
  left: 50%;
  translate: -50% 0;
  font-size: .8125rem;
  color: rgba(255, 255, 255, .7);
  font-variant-numeric: tabular-nums;
}

/* Prev / next ------------------------------------------------------------ */
.pager {
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
@media (min-width: 700px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a {
  display: grid;
  gap: .3rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s var(--ease), translate .18s var(--ease);
}
.pager a:hover { border-color: var(--accent-line); translate: 0 -2px; }
.pager b { font-size: .7rem; font-weight: 700; letter-spacing: .13em;
           text-transform: uppercase; color: var(--muted); }
.pager span { font-size: var(--step-0); font-weight: 620; }
.pager .next { text-align: right; }

/* 10 ─ Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: var(--block);
  border-top: 1px solid var(--line);
  background: var(--elev);
}
.footer__grid {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 1.8rem + 3vw, 4rem);
}
@media (min-width: 760px) {
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer__grid h4 {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer__grid a { font-size: var(--step--1); color: var(--text-mid); }
.footer__grid a:hover { color: var(--accent); }
.footer__blurb { font-size: var(--step--1); color: var(--muted); max-width: 34ch; margin-top: 1rem; }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: .8125rem;
  color: var(--muted);
}

/* 11 ─ Utilities ────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.stack > * + * { margin-top: var(--stack-gap, 1.5rem); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }

.scroll-x { overflow-x: auto; }

/* Narrow-screen hardening ───────────────────────────────────────────────
   Long unbroken strings (URLs, provider lists, stack lines) must never push
   the page into a horizontal scroll. */

p, li, dd, .spec span, .factsheet dd, .contact-list span { overflow-wrap: break-word; }

@media (max-width: 560px) {

  .spec li { flex-wrap: wrap; gap: .1rem .75rem; }
  .spec span:last-child { text-align: left; }

  .hero__badge { flex-wrap: wrap; line-height: 1.5; }

  .stat { padding: 1.1rem 1.15rem; }

  .btn { width: 100%; }
  .btn-row .btn { flex: 1 1 100%; }
  .cta-band .btn-row, .hero__actions { width: 100%; }
}

@media (max-width: 380px) {
  .logos li { width: 100%; }
}

/* 12 ─ Motion ───────────────────────────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  translate: 0 14px;
  transition: opacity .6s var(--ease), translate .6s var(--ease);
}
[data-reveal].is-in { opacity: 1; translate: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; translate: none; }
}

@media print {
  body::before, .site-header, .site-footer, .lightbox, .filters { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ── Portfolio-specific components ──────────────────────────────────────── */

/* Hero: name, role, portrait, contact chips */
.hero h1 { letter-spacing: -.035em; }

.hero__role {
  font-size: var(--step-2);
  font-weight: 620;
  color: var(--text-mid);
  margin: .9rem 0 1.4rem;
  letter-spacing: -.015em;
}
.hero__role em {
  font-style: normal;
  color: var(--accent);
  background-image: linear-gradient(var(--accent-line), var(--accent-line));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: .06em;
}

.hero__portrait {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1;
  max-width: 26rem;
  margin-inline: auto;
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; }
/* A soft brand wash so the photo sits inside the palette rather than beside it */
.hero__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, transparent 45%, var(--accent-soft));
  pointer-events: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}
.chips a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: .8125rem;
  font-weight: 550;
  color: var(--text-mid);
  transition: border-color .18s var(--ease), color .18s var(--ease),
              translate .18s var(--ease);
}
.chips a:hover { border-color: var(--accent-line); color: var(--text); translate: 0 -2px; }
.chips svg { width: 1rem; height: 1rem; flex: none; color: var(--accent); }

/* Timeline entries carry a company logo and a bullet list */
.timeline li { padding-bottom: 3rem; }
.timeline .t-head {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  margin-bottom: .95rem;
}
.t-logo {
  flex: none;
  width: 2.6rem; height: 2.6rem;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  padding: 3px;
}
.t-logo--text {
  display: grid;
  place-items: center;
  background: var(--surface-hi);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .02em;
  padding: 0;
}
.timeline h3 { font-size: var(--step-1); margin-bottom: .25rem; }
.timeline .t-org { font-size: var(--step--1); color: var(--muted); margin: 0; }
.timeline .t-org a { border-bottom: 1px solid var(--line-strong); }
.timeline .t-org a:hover { color: var(--accent); border-bottom-color: currentColor; }
/* The bullet list nests inside .timeline li, so it would otherwise inherit that
   rule's padding, border and timeline dot. Reset all three. */
.timeline .checks li {
  padding: 0 0 0 1.9rem;
  border: 0;
  margin: 0;
}
.timeline .checks li::before {
  left: 0;
  top: .72em;
  width: 1.15rem;
  height: .1rem;
  margin: 0;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: none;
}
.timeline .checks a { color: var(--accent); }
.timeline .checks a:hover { text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 640px) {
  .hero__portrait { max-width: 15rem; }
  .timeline .t-head { gap: .7rem; }
  .t-logo { width: 2.2rem; height: 2.2rem; }
}
