/* ============================================================
   Fahad Hussain — portfolio
   Direction: "instrument panel". The subject is operational
   software, so the page borrows that vernacular: monospaced
   status rails, precise alignment, restrained signal colour.
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --paper:        #F7F5F2;
  --paper-raised: #FFFFFF;
  --paper-sunk:   #EFECE7;
  --ink:          #101418;
  --ink-soft:     #333B44;
  --slate:        #5A6470;
  /* Darkened from #8A929C to clear 4.5:1 on --paper; it carries
     small uppercase labels, which need the contrast most. */
  --slate-faint:  #676E79;
  --line:         #DFDAD3;
  --line-strong:  #C9C2B9;
  --signal:       #00694A;
  --signal-bright:#00875A;
  --amber:        #9A4A08;

  --shadow-card: 0 1px 2px rgba(16, 20, 24, .04), 0 8px 24px -12px rgba(16, 20, 24, .10);
  --shadow-lift: 0 2px 4px rgba(16, 20, 24, .05), 0 18px 40px -18px rgba(16, 20, 24, .18);

  --display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --body:    'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --stack:  clamp(4.5rem, 10vw, 9rem);
  --radius: 14px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Dark is a designed alternate, not an inversion: the surface
   picks up a blue cast and the signal green is lifted so it
   still reads against a dark field. */
:root[data-theme="dark"] {
  --paper:        #0E1216;
  --paper-raised: #161B21;
  --paper-sunk:   #0A0D10;
  --ink:          #EEF1F4;
  --ink-soft:     #C2C9D1;
  --slate:        #929BA6;
  /* Lightened from #6B747E to clear 4.5:1 on the dark surface. */
  --slate-faint:  #8B939E;
  --line:         #242B33;
  --line-strong:  #333C46;
  --signal:       #3DD68C;
  --signal-bright:#5BE3A0;
  --amber:        #E8A055;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .40), 0 8px 24px -12px rgba(0, 0, 0, .60);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .45), 0 18px 40px -18px rgba(0, 0, 0, .70);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Clears the sticky bar when jumping to an anchor. */
  scroll-padding-top: 5.5rem;
  color-scheme: light;
  /* Kills the 300ms double-tap zoom delay on touch. */
  touch-action: manipulation;
}
:root[data-theme="dark"] { color-scheme: dark; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, .97rem + .15vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

img { max-width: 100%; display: block; height: auto; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; }

/* Long unbroken strings (URLs, tokens) must never force a
   horizontal scrollbar on the page. */
p, li, h1, h2, h3 { overflow-wrap: break-word; }
h1, h2, h3 { text-wrap: balance; }

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

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

.skip-link {
  position: absolute; top: -100%; left: var(--gutter); z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.1rem; border-radius: 0 0 8px 8px;
  font: 500 .875rem/1 var(--body); text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Status rail — the signature device ─────────────────── */
/* Monospaced readout carrying something true: deployment
   state, real scale, market. Not decoration. */
.rail {
  display: flex; align-items: center; gap: .55rem;
  font: 500 .6875rem/1.4 var(--mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--slate);
}
.rail__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line-strong); flex: none;
}
.rail__dot--live {
  background: var(--signal-bright);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal-bright) 18%, transparent);
}
.rail--hero { margin-bottom: 1.75rem; }

/* ── Top bar ────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .875rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.topbar--stuck { border-bottom-color: var(--line); }

.topbar__mark {
  font: 700 1rem/1 var(--display);
  letter-spacing: .04em; text-decoration: none;
  display: flex; align-items: baseline; gap: 3px;
}
.topbar__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--signal-bright);
}

.topbar__nav {
  margin-left: auto;
  display: flex; gap: clamp(1rem, 3vw, 2rem);
}
.topbar__nav a {
  font: 500 .875rem/1 var(--body);
  text-decoration: none; color: var(--slate);
  padding: .4rem 0; position: relative;
  transition: color .2s var(--ease);
}
.topbar__nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--signal-bright);
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.topbar__nav a:hover { color: var(--ink); }
.topbar__nav a:hover::after { transform: scaleX(1); }

/* Always-visible booking link: on mobile it is the only nav item. */
.topbar__cta {
  font: 500 .8125rem/1 var(--body);
  text-decoration: none;
  padding: .55rem .95rem; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  white-space: nowrap;
  transition: transform .2s var(--ease);
}
.topbar__cta:hover { transform: translateY(-1px); }

@media (max-width: 760px) {
  .topbar__nav { display: none; }
  .topbar__cta { margin-left: auto; }
}

/* Theme toggle */
.theme-toggle {
  background: none; border: 0; padding: 0;
  cursor: pointer; display: flex; align-items: center;
}
.theme-toggle__track {
  width: 40px; height: 22px; border-radius: 11px;
  background: var(--paper-sunk); border: 1px solid var(--line-strong);
  display: flex; align-items: center; padding: 2px;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.theme-toggle__thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink);
  transition: transform .32s var(--ease), background-color .3s var(--ease);
}
:root[data-theme="dark"] .theme-toggle__thumb {
  transform: translateX(18px);
  background: var(--signal);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  padding: clamp(3rem, 8vw, 6.5rem) var(--gutter) 0;
  max-width: 1240px; margin: 0 auto;
}
.hero__grid {
  display: grid;
  /* Portrait column is narrower than the old full-body frame, so the
     headline gets the extra width. */
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
}

/* The h1 is now the client-facing promise rather than the name, so
   it is sized for a sentence, not two words. */
.hero__title {
  font: 700 clamp(2.25rem, 5.6vw, 4.5rem)/1.02 var(--display);
  letter-spacing: -.035em;
  margin-bottom: 1.25rem;
  max-width: 16ch;
}

.hero__role {
  font: 500 clamp(1.0625rem, 2.4vw, 1.375rem)/1.3 var(--display);
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.hero__sep { color: var(--signal-bright); padding: 0 .2em; }

.hero__lede {
  max-width: 54ch; color: var(--slate);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  margin-bottom: 2.25rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  font: 500 .9375rem/1 var(--body);
  text-decoration: none; border: 1px solid transparent;
  transition: transform .2s var(--ease), background-color .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease);
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn__meta {
  font: 500 .6875rem/1 var(--mono);
  letter-spacing: .1em; color: var(--slate-faint);
}

/* Headshot cutout on a tinted disc. The source is only 430px wide,
   so the frame is capped well under that to keep it crisp — a
   portrait this size reads better restrained than blown up. */
.hero__portrait {
  position: relative;
  width: min(100%, 20rem);
  margin-inline: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 50% 15%,
    color-mix(in srgb, var(--signal) 22%, var(--paper-sunk)),
    var(--paper-sunk) 70%);
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
}
.hero__portrait img {
  /* Sits the shoulders on the lower edge of the disc so the crop
     reads deliberate rather than cut off. */
  width: 88%; height: auto;
  object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 12px 24px rgba(16, 20, 24, .20));
}
:root[data-theme="dark"] .hero__portrait img {
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .45));
}

/* Declared after the base rule so it actually wins the cascade.
   The headshot is compact enough to keep on mobile — it moves above
   the headline and shrinks rather than disappearing. */
@media (max-width: 860px) {
  .hero__grid { grid-template-areas: 'portrait' 'body'; }
  .hero__body { grid-area: body; }
  .hero__portrait {
    grid-area: portrait;
    width: min(40%, 8rem);
    margin-inline: 0;
    margin-bottom: .5rem;
  }
}

/* Stat readout */
.readout {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(3rem, 7vw, 5rem);
}
/* Five facts: one row on desktop, 2+2+1 (last spans) below that,
   so no empty cell shows. */
@media (max-width: 860px) {
  .readout { grid-template-columns: repeat(2, 1fr); }
  .readout__cell:last-child { grid-column: 1 / -1; }
}
.readout__cell {
  background: var(--paper);
  padding: 1.1rem 1.25rem 1.2rem;
}
.readout dt {
  font: 500 .6875rem/1.4 var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--slate-faint); margin-bottom: .4rem;
}
.readout dd {
  font: 600 clamp(1.375rem, 3.2vw, 1.875rem)/1 var(--display);
  letter-spacing: -.02em;
  /* Fixed-width digits so the count-up does not jitter the layout. */
  font-variant-numeric: tabular-nums;
}
/* Text value in a number slot (the client countries). */
.readout dd.readout__text {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.3;
  letter-spacing: 0;
}

/* ── Sections ───────────────────────────────────────────── */
.section {
  padding: var(--stack) var(--gutter) 0;
  max-width: 1240px; margin: 0 auto;
}
.section__head { margin-bottom: clamp(2rem, 4vw, 3rem); }

.section__title {
  font: 600 clamp(1.5rem, 3.4vw, 2.125rem)/1.1 var(--display);
  letter-spacing: -.025em;
  display: flex; align-items: center; gap: .9rem;
}
.section__title::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.section__note {
  margin-top: .9rem; max-width: 52ch;
  color: var(--slate); font-size: .9375rem;
}

/* ── Project cards ──────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  /* Cards vary in body length; stretching keeps each row flush
     instead of leaving ragged gaps under the shorter ones. */
  align-items: stretch;
}
@media (max-width: 820px) {
  .cards { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: var(--line-strong);
}
.card--wide { grid-column: 1 / -1; }

/* Base media band. Standard cards get a fixed ratio so banners of
   differing shapes line up across a row. */
.card__media {
  background: var(--paper-sunk);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.card:hover .card__media img { transform: scale(1.02); }

/* Wide (feature) cards: side-by-side, and the banner is contained
   rather than cropped — these are designed compositions, so cutting
   off a logo or edge label would damage them. Declared after the
   base rules so these overrides actually win. */
@media (min-width: 821px) {
  .card--wide { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; }
  .card--wide .card__media {
    aspect-ratio: auto;
    height: 100%;
    border-bottom: 0;
    padding: clamp(1rem, 2vw, 1.75rem);
  }
  .card--wide .card__media img {
    height: auto;
    object-fit: contain;
    border-radius: 8px;
  }
}

.card__body {
  padding: clamp(1.25rem, 2.5vw, 1.85rem);
  display: flex; flex-direction: column; gap: .7rem;
  flex: 1;
}

.card__title {
  font: 600 clamp(1.25rem, 2.4vw, 1.5rem)/1.15 var(--display);
  letter-spacing: -.02em;
  margin-top: .15rem;
}
.card__alt { color: var(--slate-faint); font-weight: 500; }

.card__kicker {
  font: 500 .8125rem/1.3 var(--body);
  color: var(--signal); margin-top: -.5rem;
}
:root[data-theme="dark"] .card__kicker { color: var(--signal); }

.card__desc { color: var(--slate); font-size: .9375rem; }

/* Authorship — the accuracy rule made visible */
.authorship {
  display: flex; flex-direction: column; gap: .3rem;
  margin-top: auto; padding-top: .9rem;
  border-top: 1px solid var(--line);
  font: 500 .75rem/1.45 var(--mono);
  letter-spacing: .04em;
}
.authorship__built { color: var(--signal); }
.authorship__led   { color: var(--amber); }

/* Live links — where you can actually get the thing. Sits directly
   under the authorship line so "who built it" and "where it ships"
   read together. */
.links {
  display: flex; flex-wrap: wrap; gap: .4rem .5rem;
}
.links a {
  display: inline-flex; align-items: center; gap: .35rem;
  font: 500 .6875rem/1 var(--mono);
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--ink);
  padding: .42rem .6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease),
              color .2s var(--ease);
}
.links a::after {
  content: '↗';
  font-size: .9em;
  color: var(--slate-faint);
  transition: color .2s var(--ease);
}
.links a:hover {
  border-color: var(--signal);
  background: color-mix(in srgb, var(--signal) 8%, transparent);
  color: var(--signal);
}
.links a:hover::after { color: var(--signal); }

.card__points {
  display: flex; flex-direction: column; gap: .5rem;
  font-size: .875rem; color: var(--ink-soft);
}
.card__points li {
  position: relative; padding-left: 1.05rem;
}
.card__points li::before {
  content: ''; position: absolute; left: 0; top: .58em;
  width: 5px; height: 1.5px; background: var(--line-strong);
}
.card__points strong { font-weight: 600; color: var(--ink); }

.tags {
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.tags li {
  font: 500 .6875rem/1 var(--mono);
  padding: .38rem .55rem;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--slate);
}

/* Lead case study: the hero's readout, reused as the card's footer so
   the numbers that make the case sit in the page's own instrument. */
.readout--card {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  border: 0; border-top: 1px solid var(--line);
  border-radius: 0;
}
.readout--card .readout__cell { background: var(--paper-raised); }
.readout__unit {
  display: block;
  font: 500 .75rem/1 var(--body);
  letter-spacing: 0; color: var(--slate);
  margin-top: .35rem;
}
/* The composite is 16:9; the standard 16:10 band would crop a phone. */
@media (max-width: 820px) {
  .card--lead .card__media { aspect-ratio: 16 / 9; }
}
@media (max-width: 860px) {
  .readout--card { grid-template-columns: repeat(2, 1fr); }
  .readout--card .readout__cell:last-child { grid-column: auto; }
}
/* The wide grid aligns body to centre; the lead card's body is long,
   so it reads from the top instead. */
@media (min-width: 821px) {
  .card--lead { align-items: stretch; }
  .card--lead .card__media { align-self: stretch; }
}

/* Compact list for older projects: scannable, no images. */
.also {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--line);
}
.also__name {
  font: 500 .6875rem/1.4 var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--slate-faint); margin-bottom: 1rem;
}
.also ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: .7rem 2rem;
  font-size: .875rem; color: var(--slate);
}
.also strong {
  display: block;
  font: 600 .9375rem/1.3 var(--display);
  color: var(--ink);
}

/* ── How I work ─────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  counter-reset: step;
}
.step {
  background: var(--paper);
  padding: 1.5rem clamp(1.1rem, 2vw, 1.4rem);
  counter-increment: step;
  font-size: .875rem; color: var(--slate);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font: 500 .6875rem/1 var(--mono);
  letter-spacing: .1em; color: var(--signal);
  margin-bottom: .9rem;
}
.step__title {
  font: 600 1.0625rem/1.25 var(--display);
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: .5rem;
}

@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:last-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .steps { grid-template-columns: 1fr; }
}

/* Closes the steps panel: same border, same surface, one instrument. */
.ai-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 4fr);
  gap: .5rem 1.4rem;
  padding: 1.5rem clamp(1.1rem, 2vw, 1.4rem);
  background: var(--paper-sunk);
  border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
@media (max-width: 720px) {
  .ai-note { grid-template-columns: 1fr; }
}
.ai-note__title {
  font: 500 .6875rem/1.4 var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--signal);
  padding-top: .3rem;
}
.ai-note p { color: var(--ink-soft); max-width: var(--measure); }

/* ── Offers ─────────────────────────────────────────────── */
/* Three offers side by side; below 960px they stack, so there is never
   an uneven 2 + 1 row. On desktop each card is a subgrid of the same
   five rows (tag, title, lede, list, button), so headings, lists and
   buttons line up across cards even when one has no lede. */
.offers {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.5rem);
}
.offer {
  display: flex; flex-direction: column; align-items: flex-start; gap: .6rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.offer__tag {
  font: 500 .6875rem/1.4 var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--signal);
}
.offer__title {
  font: 600 clamp(1.3rem, 2.6vw, 1.625rem)/1.15 var(--display);
  letter-spacing: -.02em;
}
.offer__lede { color: var(--slate); font-size: .9375rem; }
.offer__list {
  display: flex; flex-direction: column; gap: .5rem;
  margin: .5rem 0 1.5rem;
  font-size: .9375rem; color: var(--ink-soft);
}
.offer__list li { position: relative; padding-left: 1.05rem; }
.offer__list li::before {
  content: ''; position: absolute; left: 0; top: .58em;
  width: 5px; height: 1.5px; background: var(--line-strong);
}
.offer .btn { margin-top: auto; }

@media (min-width: 960px) {
  .offers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(5, auto);
  }
  .offer {
    display: grid;
    grid-row: span 5;
    grid-template-rows: subgrid;
    row-gap: .6rem;
  }
  .offer__tag   { grid-row: 1; }
  .offer__title { grid-row: 2; }
  .offer__lede  { grid-row: 3; }
  .offer__list  { grid-row: 4; }
  .offer .btn   { grid-row: 5; justify-self: start; align-self: end; }
}

/* ── About ──────────────────────────────────────────────── */
.section--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
@media (max-width: 820px) {
  .section--split { grid-template-columns: 1fr; }
}
.section--split .section__head { margin-bottom: 0; }
.section--split .section__title::after { display: none; }

.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1.1rem; }
.prose p { color: var(--ink-soft); }

/* ── Skills ─────────────────────────────────────────────── */
/* Five groups: one row on desktop, 2+2+1 (last spans) on tablet,
   stacked on phones, so no empty cell is ever left showing. */
.skills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 620px) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skillset:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .skills { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .skillset:last-child { grid-column: auto; }
}
.skillset {
  background: var(--paper);
  padding: 1.5rem clamp(1.1rem, 2vw, 1.5rem);
}
.skillset__name {
  font: 500 .6875rem/1.4 var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--signal); margin-bottom: 1rem;
}
.skillset ul {
  display: flex; flex-direction: column; gap: .6rem;
  font-size: .875rem; color: var(--ink-soft);
}

/* ── Testimonials ───────────────────────────────────────── */
/* Columns rather than a grid: the quotes vary a lot in length, and
   column flow packs them without leaving ragged gaps. */
.quotes {
  columns: 2;
  column-gap: clamp(1rem, 2vw, 1.5rem);
}
@media (max-width: 820px) {
  .quotes { columns: 1; }
}

.quote {
  break-inside: avoid;
  margin: 0 0 clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.quote blockquote {
  margin: 0;
  font-size: .9375rem;
  color: var(--ink-soft);
}
/* Decorative opening mark only — a trailing quote glyph after a
   multi-sentence testimonial reads as a stray character. */
.quote blockquote::before {
  content: '“';
  color: var(--signal);
  font: 600 1.75rem/0 var(--display);
  margin-right: .12em;
  vertical-align: -.3em;
}

.quote figcaption {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem;
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}
.quote__who {
  font: 600 .875rem/1.2 var(--display);
  letter-spacing: -.01em;
}
.quote__role {
  font: 500 .6875rem/1.4 var(--mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--slate);
}

/* ── Contact ────────────────────────────────────────────── */
.section--contact {
  padding-bottom: var(--stack);
  text-align: center;
}
.contact__title {
  font: 700 clamp(2.25rem, 6.5vw, 4rem)/1.05 var(--display);
  letter-spacing: -.04em; margin-bottom: 1rem;
}
.contact__lede {
  max-width: 48ch; margin: 0 auto 2rem;
  color: var(--slate);
}
.contact__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem;
  margin-bottom: 2rem;
}
.contact__mail {
  display: inline-block;
  font: 500 clamp(1.0625rem, 3vw, 1.5rem)/1.2 var(--display);
  text-decoration: none;
  padding-bottom: .3rem;
  border-bottom: 2px solid color-mix(in srgb, var(--signal-bright) 40%, transparent);
  transition: border-color .25s var(--ease), color .25s var(--ease);
  overflow-wrap: anywhere;
}
.contact__mail:hover {
  color: var(--signal); border-bottom-color: var(--signal-bright);
}
.contact__links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: .5rem 2rem;
  margin-top: 2.5rem;
}
.contact__links a {
  font: 500 .6875rem/1 var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--slate); text-decoration: none;
  padding: .5rem 0;
  transition: color .2s var(--ease);
}
.contact__links a:hover { color: var(--ink); }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  padding: 1.75rem var(--gutter);
  border-top: 1px solid var(--line);
  font: 400 .6875rem/1.5 var(--mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--slate-faint);
}

/* ── Motion ─────────────────────────────────────────────── */
/* Reveals are set up only when JS confirms support, so content
   is never left invisible if the observer never runs. */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .card:hover { transform: none; }
  .card:hover .card__media img { transform: none; }
}

@media print {
  .topbar, .theme-toggle, .skip-link { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
