/* ==========================================================================
   Hadjoudj Idris, Portfolio
   Design system + components. No frameworks, no build-time CSS.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg:            #08080a;
  --bg-veil:       rgba(8, 8, 10, .72);
  --surface:       #0e0e12;
  --surface-2:     #141419;
  --surface-3:     #1b1b21;

  /* Lines */
  --line:          rgba(255, 255, 255, .08);
  --line-2:        rgba(255, 255, 255, .14);
  --line-3:        rgba(255, 255, 255, .24);

  /* Ink */
  --fg:            #f4f4f6;
  --fg-2:          #a2a2ad;
  --fg-3:          #6d6d79;

  /* Brand */
  --accent:        #ff2e4d;
  --accent-soft:   rgba(255, 46, 77, .14);
  --accent-line:   rgba(255, 46, 77, .38);

  --ok:            #35d07f;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --step--2: clamp(.6875rem, .66rem + .12vw, .75rem);
  --step--1: clamp(.8125rem, .78rem + .16vw, .875rem);
  --step-0:  clamp(.9375rem, .9rem + .2vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.05rem + .34vw, 1.375rem);
  --step-2:  clamp(1.375rem, 1.2rem + .8vw, 2rem);
  --step-3:  clamp(1.625rem, 1.4rem + 1.4vw, 2.75rem);
  --step-4:  clamp(2rem, 1.6rem + 1.9vw, 3.25rem);
  --step-5:  clamp(2.5rem, 1.85rem + 2.7vw, 4.5rem);

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wrap: 1280px;
  --section-y: clamp(4.5rem, 9vw, 9rem);

  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, .05, .36, 1);

  --radius: 14px;
  --radius-lg: 20px;

  --header-h: 68px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg:          #fbfbfc;
  --bg-veil:     rgba(251, 251, 252, .78);
  --surface:     #ffffff;
  --surface-2:   #f4f4f6;
  --surface-3:   #eaeaee;
  --line:        rgba(10, 10, 15, .09);
  --line-2:      rgba(10, 10, 15, .15);
  --line-3:      rgba(10, 10, 15, .28);
  --fg:          #0b0b0f;
  --fg-2:        #56566b;
  --fg-3:        #83838f;
  --accent:      #e01038;
  --accent-soft: rgba(224, 16, 56, .09);
  --accent-line: rgba(224, 16, 56, .34);
}

/* ---------- 2. Reset ----------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; height: auto; }
img { background: var(--surface-2); }

h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.03em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

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

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

/* Available to screen readers, invisible on screen, used to keep the heading
   outline unbroken where the visual design has no matching headline. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. Layout primitives ---------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--top0 { padding-top: 0; }

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 2rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.sec-head__title { font-size: var(--step-3); max-width: 20ch; margin-top: .75rem; }
.sec-head__lede { color: var(--fg-2); max-width: 46ch; font-size: var(--step-0); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  flex: none;
}

/* ---------- 4. Buttons --------------------------------------------------- */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  --btn-line: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .8rem 1.3rem;
  border: 1px solid var(--btn-line);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease),
              color .25s var(--ease), transform .25s var(--ease), filter .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { flex: none; }

.btn--primary { --btn-bg: var(--accent); --btn-fg: #fff; --btn-line: var(--accent); }
.btn--primary:hover { filter: brightness(1.12); }

.btn--solid { --btn-bg: var(--fg); --btn-fg: var(--bg); --btn-line: var(--fg); }
.btn--ghost:hover { --btn-bg: var(--surface-2); --btn-line: var(--line-3); }
.btn--sm { padding: .55rem 1rem; font-size: var(--step--2); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.tlink {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--fg);
  font-weight: 500;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .35s var(--ease), color .25s var(--ease);
}
.tlink:hover { background-size: 100% 1px; color: var(--accent); }

/* ---------- 5. Header ---------------------------------------------------- */

.skip {
  position: fixed;
  top: .5rem; left: .5rem;
  z-index: 400;
  padding: .7rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: var(--step--1);
  transform: translateY(-250%);
  transition: transform .2s var(--ease);
}
.skip:focus { transform: translateY(0); }

.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--accent);
  z-index: 120;
  pointer-events: none;
}

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: var(--bg-veil);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}
.header__inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand { display: inline-flex; align-items: center; gap: .65rem; margin-right: auto; }
.brand__mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -.02em;
  background: var(--surface-2);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.brand:hover .brand__mark { border-color: var(--accent-line); color: var(--accent); }
.brand__name { font-size: var(--step--1); font-weight: 600; letter-spacing: -.02em; }
.brand__name span { color: var(--fg-3); font-weight: 400; }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  position: relative;
  padding: .5rem .85rem;
  font-size: var(--step--1);
  color: var(--fg-2);
  border-radius: 999px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav a:hover { color: var(--fg); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%; bottom: .15rem;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}

.header__tools { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg-2);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.icon-btn:hover { color: var(--fg); border-color: var(--line-2); background: var(--surface-2); }

.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

.burger { display: none; }
.burger .cross { display: none; }
.burger[aria-expanded="true"] .cross { display: block; }
.burger[aria-expanded="true"] .bars { display: none; }
.burger[aria-expanded="true"] { color: var(--fg); border-color: var(--line-2); }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  padding: calc(var(--header-h) + 2rem) var(--gutter) 2rem;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.sheet.is-open { opacity: 1; visibility: visible; transform: none; }
.sheet a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--step-2);
  letter-spacing: -.03em;
}
.sheet a span { font-family: var(--font-mono); font-size: var(--step--2); color: var(--fg-3); }
.sheet__foot { margin-top: auto; padding-top: 2rem; color: var(--fg-3); font-size: var(--step--1); }

@media (max-width: 860px) {
  .nav { display: none; }
  .burger { display: grid; }
}

/* ---------- 6. Hero ------------------------------------------------------ */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(3.5rem, 9vw, 7rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -32%; left: 50%;
  width: min(1100px, 130vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 62%);
  pointer-events: none;
}
.hero > * { position: relative; }

/* The availability line belongs to the same label system as .eyebrow rather
   than being a bordered status pill. The capsule, the tinted plate and the
   pulsing halo are the stock hero-badge component, and three borrowed tricks
   sat oddly on an otherwise typographic page. What is left is the mono
   uppercase label used for every other section marker on the site, with the
   green kept only as the status cue it actually earns. */
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}

.hero__title {
  margin-top: 1.6rem;
  font-size: var(--step-5);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .94;
  max-width: 15ch;
}
.hero__title em { font-style: normal; color: var(--fg-3); }
.hero__lede {
  margin-top: 1.75rem;
  max-width: 58ch;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--fg-2);
  letter-spacing: -.015em;
}
.hero__lede strong { color: var(--fg); font-weight: 500; }
.hero__cta { margin-top: 2.25rem; }

/* Upwork credential badge */

.uw {
  --uw-green: #14a800;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-top: 1.75rem;
  padding: .5rem .95rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--step--1);
  line-height: 1;
  color: var(--fg-2);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
a.uw:hover { border-color: var(--line-3); background: var(--surface-2); }

.uw__logo { width: 22px; height: 22px; object-fit: contain; background: none; }
.uw__word {
  color: var(--uw-green);
  font-weight: 700;
  letter-spacing: -.035em;
  font-size: var(--step-0);
}
:root[data-theme="light"] .uw { --uw-green: #108a00; }

.uw__sep { width: 1px; height: 14px; background: var(--line-2); flex: none; }
.uw__rating { color: var(--fg); font-weight: 600; }
.uw__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-3); flex: none; }
.uw__success { white-space: nowrap; }
.uw svg { color: var(--fg-3); }

@media (max-width: 520px) {
  .uw { flex-wrap: wrap; border-radius: 14px; row-gap: .4rem; }
  .uw__sep { display: none; }
}

/* Compact variant for the ~230px article sidebar, where the single-line pill
   is 80px too wide. Wordmark and rating share a line, the score drops below. */
.uw--compact {
  width: 100%;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .5rem;
  margin-top: .6rem;
  padding: .6rem .75rem;
  border-radius: 10px;
  font-size: var(--step--2);
  line-height: 1.4;
}
.uw--compact .uw__sep,
.uw--compact .uw__dot { display: none; }
.uw--compact .uw__word { font-size: var(--step--1); }
.uw--compact .uw__logo { width: 18px; height: 18px; }
.uw--compact .uw__success {
  flex-basis: 100%;
  white-space: normal;
  color: var(--fg-3);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 6vw, 5rem);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--bg); padding: 1.4rem 1.25rem; }
.stat__n {
  margin-top: .75rem;
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
}
.stat__l {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-3);
  line-height: 1.4;
}

/* ---------- 7. Marquee --------------------------------------------------- */

.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 1.5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  width: max-content;
}
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: slide 46s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
  @keyframes slide { to { transform: translateX(-50%); } }
}
/* Logos are painted from a silhouette mask, so they follow the theme.
   mask-image itself is set inline per logo (see build/build.mjs). */
.marquee__logo, .client__mark {
  display: block;
  background-color: currentColor;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}
/* The personal logo bird, painted the same way. It sits *inside* its mark chip
   (header brand, hire bar, hire block) rather than on it, so the chip keeps its
   own plate and border, and the bird inherits that chip's colour instead of
   stamping its original black plate onto the light theme. */
.logomark {
  display: block;
  width: 62%;
  height: 62%;
  background-color: currentColor;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}

.marquee__logo {
  width: clamp(96px, 12vw, 140px);
  height: 30px;
  color: var(--fg-3);
  flex: none;
  transition: color .3s var(--ease);
}
.marquee__logo:hover { color: var(--fg); }

/* ---------- 8. Work cards ------------------------------------------------ */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr));
  gap: clamp(1.75rem, 3vw, 3rem) clamp(1.25rem, 2.4vw, 2rem);
}
.work-grid--feature > *:first-child { grid-column: 1 / -1; }

.card { position: relative; display: flex; flex-direction: column; }

.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
/* The lead card spans the grid but keeps the same 16:9 frame as every other
   thumbnail, so nothing is cropped out of the artwork. */
.work-grid--feature > *:first-child .card__media { aspect-ratio: 16 / 9; }
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.card:hover .card__media img { transform: scale(1.035); }

.card__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .5));
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.card:hover .card__veil { opacity: 1; }

.card__badge {
  position: absolute;
  top: .85rem; left: .85rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: rgba(10, 10, 14, .72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.card__badge--live { background: var(--accent); border-color: transparent; }

.card__arrow {
  position: absolute;
  right: .85rem; bottom: .85rem;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #111;
  opacity: 0;
  transform: translateY(8px) scale(.9);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.card:hover .card__arrow { opacity: 1; transform: none; }

.card__body { padding-top: 1.1rem; }
.card__title { font-size: var(--step-1); letter-spacing: -.03em; }
.work-grid--feature > *:first-child .card__title { font-size: var(--step-2); }
.card__desc {
  margin-top: .5rem;
  color: var(--fg-2);
  font-size: var(--step--1);
  line-height: 1.65;
  max-width: 64ch;
}
.card__meta { margin-top: .95rem; display: flex; flex-wrap: wrap; gap: .4rem; }

.tag {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .04em;
  color: var(--fg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .2rem .5rem;
  background: var(--surface);
  white-space: nowrap;
}
.tag--accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }

/* ---------- 9. Filters --------------------------------------------------- */

.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding-block: 1rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  background: var(--bg-veil);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-2);
  font-size: var(--step--1);
  transition: background .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}
.chip:hover { color: var(--fg); border-color: var(--line-2); }
.chip b { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--fg-3); }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chip[aria-pressed="true"] b { color: var(--bg); opacity: .55; }

.filters__count { margin-left: auto; font-family: var(--font-mono); font-size: var(--step--2); color: var(--fg-3); }

.card.is-hidden { display: none; }

.empty-state { padding: 5rem 0; text-align: center; color: var(--fg-3); }

/* ---------- 10. Interior page hero --------------------------------------- */

.page-hero {
  padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 5.5rem));
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}
.crumbs {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--fg-3);
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.crumbs a { transition: color .2s var(--ease); }
.crumbs a:hover { color: var(--fg); }
.crumbs i { font-style: normal; opacity: .45; }

.page-hero__title { font-size: var(--step-4); letter-spacing: -.045em; max-width: 18ch; }
.page-hero__lede { margin-top: 1.5rem; max-width: 62ch; color: var(--fg-2); font-size: var(--step-1); line-height: 1.55; }

/* ---------- 11. Case study ----------------------------------------------- */

.cover {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  cursor: zoom-in;
  position: relative;
  display: block;
  width: 100%;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }

.factbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.fact { background: var(--bg); padding: 1.15rem 1.15rem 1.3rem; }
.fact dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.fact dd { margin-top: .5rem; font-size: var(--step--1); font-weight: 500; letter-spacing: -.01em; }

.prose { max-width: 68ch; }
.prose p { color: var(--fg-2); font-size: var(--step-0); line-height: 1.78; }
.prose p + p { margin-top: 1.15rem; }
.prose h3 { font-size: var(--step-2); margin: 2.5rem 0 .9rem; letter-spacing: -.035em; }
.prose h3:first-child { margin-top: 0; }
.prose strong { color: var(--fg); font-weight: 600; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); } }
.two-col__aside { align-self: start; }
@media (min-width: 900px) { .two-col__aside { position: sticky; top: calc(var(--header-h) + 2.5rem); } }

.aside-list {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.aside-list a {
  position: relative;
  padding: .85rem 0 .85rem .9rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  align-items: baseline;
  color: var(--fg-2);
  transition: color .25s var(--ease), padding-left .25s var(--ease);
}
.aside-list a::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 2px; height: 0;
  background: var(--accent);
  transform: translateY(-50%);
  transition: height .3s var(--ease);
}
.aside-list a:hover { color: var(--fg); padding-left: 1.15rem; }
.aside-list a.is-active { color: var(--fg); }
.aside-list a.is-active::before { height: 60%; }
.aside-list b { font-weight: 500; font-size: var(--step--1); }
.aside-list i { font-style: normal; font-family: var(--font-mono); font-size: var(--step--2); color: var(--accent); flex: none; }

.screens { display: grid; gap: clamp(3.5rem, 7vw, 6.5rem); }

.screen__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.15rem; }
.screen__num {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--accent);
  letter-spacing: .1em;
  flex: none;
  padding-top: .3rem;
}
.screen__title { font-size: var(--step-2); letter-spacing: -.035em; }

.shot {
  position: relative;
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface-2);
  cursor: zoom-in;
}
.shot img { width: 100%; transition: transform .7s var(--ease); }
.shot:hover img { transform: scale(1.012); }
.shot__zoom {
  position: absolute;
  right: .75rem; bottom: .75rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: rgba(10, 10, 14, .7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.shot:hover .shot__zoom, .shot:focus-visible .shot__zoom { opacity: 1; transform: none; }

.screen__caption { margin-top: 1rem; max-width: 74ch; color: var(--fg-2); font-size: var(--step--1); line-height: 1.75; }

.wire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(.75rem, 1.6vw, 1.25rem);
}
.wire-grid .shot { border-radius: 10px; }
.wire-grid .shot img {
  filter: saturate(.12) contrast(1.04);
  opacity: .8;
  transition: filter .4s var(--ease), opacity .4s var(--ease), transform .7s var(--ease);
}
.wire-grid .shot:hover img { filter: none; opacity: 1; }

.pager { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
@media (min-width: 700px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a {
  background: var(--bg);
  padding: clamp(1.75rem, 4vw, 3rem) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: .55rem;
  transition: background .3s var(--ease);
}
.pager a:hover { background: var(--surface); }
.pager__dir {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.pager__name { font-size: var(--step-2); letter-spacing: -.035em; }
.pager a.is-next { text-align: right; align-items: flex-end; }

/* ---------- 12. Lightbox ------------------------------------------------- */

/* The stage is full-bleed and the chrome floats over it, so a 1920px screen
   gets the whole viewport instead of the leftovers between two toolbars. */
.lb {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6, 6, 8, .97);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
  overscroll-behavior: contain;
}
.lb.is-open { opacity: 1; visibility: visible; }

.lb__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-in;
}
.lb__stage.is-zoomed { cursor: grab; }
.lb__stage.is-zoomed:active { cursor: grabbing; }

.lb__stage img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  transform-origin: center center;
  background: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

/* Floating chrome */

.lb__bar,
.lb__foot {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem var(--gutter);
  color: #fff;
  pointer-events: none;
}
.lb__bar > *,
.lb__foot > * { pointer-events: auto; }

.lb__bar {
  top: 0;
  background: linear-gradient(180deg, rgba(6, 6, 8, .92), rgba(6, 6, 8, 0));
}
.lb__foot {
  bottom: 0;
  padding-bottom: 1.5rem;
  background: linear-gradient(0deg, rgba(6, 6, 8, .92), rgba(6, 6, 8, 0));
  color: rgba(255, 255, 255, .66);
  font-size: var(--step--1);
}

.lb__count {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .5);
  flex: none;
}
.lb__title {
  font-size: var(--step--1);
  font-weight: 500;
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb__btn {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 .6rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  color: #fff;
  flex: none;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.lb__btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .38); }
.lb__zoom {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  min-width: 58px;
  letter-spacing: .02em;
}

.lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(10, 10, 14, .6);
  backdrop-filter: blur(8px);
  color: #fff;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.lb__nav:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); }
.lb__nav--prev { left: max(1rem, calc(var(--gutter) - 1rem)); }
.lb__nav--next { right: max(1rem, calc(var(--gutter) - 1rem)); }

.lb__cap {
  max-width: 78ch;
  line-height: 1.6;
  max-height: 4.8em;
  overflow: hidden;
}
.lb__keys {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .35rem;
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: rgba(255, 255, 255, .45);
  white-space: nowrap;
}
kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: .2rem .4rem;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 5px;
  color: rgba(255, 255, 255, .7);
}

/* Loading state */
.lb.is-loading .lb__stage::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 26px; height: 26px;
  margin: -13px 0 0 -13px;
  border: 2px solid rgba(255, 255, 255, .2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lb-spin .7s linear infinite;
}
@keyframes lb-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .lb__keys { display: none; }
  .lb__cap { max-height: 3.2em; font-size: var(--step--2); }
  .lb__nav { width: 40px; height: 40px; }
  .lb__title { display: none; }
  .lb__count { margin-right: auto; }
}
/* ---------- 13. About blocks --------------------------------------------- */

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 880px) { .split { grid-template-columns: .8fr 1.4fr; } }

/* About-page portrait, in the narrow column under the section label. It fills
   that column at the same breakpoint .split becomes two columns, and keeps its
   own aspect ratio rather than being forced into a square: nothing is cropped
   off the photo. Below that breakpoint the column is the full page width, so
   the portrait is capped to stop it dominating the profile copy. */
.portrait {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-top: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  filter: saturate(.92);
}
@media (min-width: 880px) { .portrait { max-width: none; } }

.svc-grid, .tool-grid, .client-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.svc-grid { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr)); }
.client-grid { grid-template-columns: repeat(auto-fill, minmax(min(170px, 45%), 1fr)); }

.svc { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: .85rem; transition: background .3s var(--ease); }
.svc:hover { background: var(--surface); }
.svc__n { font-family: var(--font-mono); font-size: var(--step--2); color: var(--accent); letter-spacing: .1em; }
.svc h3 { font-size: var(--step-1); letter-spacing: -.03em; }
.svc p { color: var(--fg-2); font-size: var(--step--1); line-height: 1.7; }

.tool { background: var(--bg); padding: 1.6rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .85rem; text-align: center; transition: background .3s var(--ease); }
.tool:hover { background: var(--surface); }
/* A light plate keeps every brand icon legible in both themes. Several of the
   source icons are dark artwork on transparency and would vanish on the dark
   background otherwise. */
.tool__plate {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .3s var(--ease);
}
.tool:hover .tool__plate { transform: translateY(-2px); }
.tool img { width: 32px; height: 32px; object-fit: contain; background: none; }
.tool span { font-size: var(--step--2); color: var(--fg-2); letter-spacing: -.01em; line-height: 1.35; }

.client { background: var(--bg); padding: 1.85rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; transition: background .3s var(--ease); }
.client:hover { background: var(--surface); }
.client__mark {
  width: 100%;
  max-width: 130px;
  height: 42px;
  color: var(--fg-3);
  transition: color .3s var(--ease);
}
.client:hover .client__mark { color: var(--fg); }
.client span { font-size: var(--step--2); color: var(--fg-3); font-family: var(--font-mono); letter-spacing: .04em; text-align: center; }

.tl { border-top: 1px solid var(--line); }
.tl li { display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem 2rem; padding: 1.7rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .tl li { grid-template-columns: 150px minmax(0, 1fr); } }
.tl__when { font-family: var(--font-mono); font-size: var(--step--2); color: var(--fg-3); letter-spacing: .06em; padding-top: .35rem; }
.tl__what h3, .tl__what h4 { font-size: var(--step-1); letter-spacing: -.03em; margin-bottom: .45rem; }
.tl__what p { color: var(--fg-2); font-size: var(--step--1); line-height: 1.7; }

/* ---------- 14. CTA + footer -------------------------------------------- */

.cta { position: relative; border-top: 1px solid var(--line); padding-block: clamp(4.5rem, 10vw, 8rem); overflow: hidden; }
.cta::before {
  content: "";
  position: absolute;
  bottom: -60%; left: 50%;
  width: min(900px, 120vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-soft), transparent 60%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta__title { font-size: var(--step-4); letter-spacing: -.045em; max-width: 16ch; margin-top: 1rem; }
.cta__lede { margin-top: 1.25rem; max-width: 52ch; color: var(--fg-2); font-size: var(--step-1); }

.contact-rows { margin-top: 3rem; border-top: 1px solid var(--line); }
.contact-row { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.contact-row__k {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-3);
  width: 116px;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
/* The icon is decorative, the label beside it carries the meaning, so it sits
   a step dimmer than the text and never shrinks. */
.contact-row__k svg { flex: none; opacity: .75; }
.contact-row__v { font-size: var(--step-1); letter-spacing: -.025em; overflow-wrap: anywhere; }
.contact-row .copy { margin-left: auto; }
.copy {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--fg-3);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .35rem .6rem;
  white-space: nowrap;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.copy:hover { color: var(--fg); border-color: var(--line-2); }
.copy.is-done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }

@media (max-width: 560px) {
  .contact-row { flex-wrap: wrap; gap: .35rem 1rem; }
  .contact-row__k { width: 100%; }
  .contact-row__v { font-size: var(--step-0); }
}

.footer { border-top: 1px solid var(--line); padding-block: 2.5rem; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  font-size: var(--step--2);
  color: var(--fg-3);
  font-family: var(--font-mono);
  letter-spacing: .03em;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-left: auto; }
.footer__links a { transition: color .2s var(--ease); }
.footer__links a:hover { color: var(--fg); }

/* ---------- 15. Blog: cards ---------------------------------------------- */

.post-grid {
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
}

.pcard { position: relative; display: flex; flex-direction: column; }

.pcard__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.pcard:hover .pcard__media img { transform: scale(1.035); }
.pcard:hover .card__veil { opacity: 1; }

.pcard__body { padding-top: 1.15rem; display: flex; flex-direction: column; gap: .7rem; }

.pcard__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .85rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--fg-3);
  letter-spacing: .04em;
}
.pcard__tag {
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: .2rem .6rem;
}

.pcard__title { font-size: var(--step-1); letter-spacing: -.03em; line-height: 1.2; }
.pcard:hover .pcard__title { color: var(--accent); }
.pcard__desc {
  color: var(--fg-2);
  font-size: var(--step--1);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard__more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .06em;
  color: var(--fg-3);
  transition: color .25s var(--ease), gap .25s var(--ease);
}
.pcard:hover .pcard__more { color: var(--fg); gap: .8rem; }

/* The newest article leads the index, wide and side by side on desktop. */
@media (min-width: 900px) {
  .pcard--wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: clamp(2rem, 4vw, 3.5rem); }
  .pcard--wide .pcard__media { flex: 1 1 55%; aspect-ratio: 16 / 9; }
  .pcard--wide .pcard__body { flex: 1 1 45%; padding-top: 0; }
  .pcard--wide .pcard__title { font-size: var(--step-3); }
  .pcard--wide .pcard__desc { font-size: var(--step-0); -webkit-line-clamp: 4; line-clamp: 4; }
}

.pcard.is-hidden { display: none; }

/* ---------- 16. Blog: article -------------------------------------------- */

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem .9rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--fg-3);
  letter-spacing: .06em;
  margin-bottom: 1.35rem;
}
.post-meta__tag {
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: .25rem .7rem;
}

.post-title { max-width: 22ch; }

.post-cover {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

/* A narrower margin than the case-study layout: the column of prose is the
   point of the page, the sidebar is navigation plus one standing offer. */
.post-cols { padding-block: clamp(3rem, 6vw, 5rem); }
@media (min-width: 1000px) {
  .post-cols { grid-template-columns: 270px minmax(0, 1fr); }

  /* A long contents list would push the hire card below the fold while the
     sidebar is stuck, so the column is capped to the viewport and the list
     takes the overflow. The card stays visible for the whole article. */
  .post-cols .two-col__aside {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--header-h) - 4rem);
  }
  .post-cols .aside-list { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  .post-cols .hireside { flex: none; }
}

.post-body { max-width: 72ch; font-size: var(--step-0); }
:is(.post-body, .post-sec) > p { color: var(--fg-2); line-height: 1.8; margin-bottom: 1.3rem; }
:is(.post-body, .post-sec) > p:last-of-type { margin-bottom: 0; }
.post-body strong { color: var(--fg); font-weight: 600; }
.post-body code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .4em;
}

.post-h2 {
  font-size: var(--step-2);
  letter-spacing: -.035em;
  margin: 3.25rem 0 1.1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.post-body > .post-sec:first-child > .post-h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.post-h3 { font-size: var(--step-1); letter-spacing: -.03em; margin: 2.25rem 0 .85rem; }

.post-list { margin: 0 0 1.5rem; display: grid; gap: .85rem; counter-reset: li; }
.post-list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--fg-2);
  line-height: 1.75;
}
.post-list li::before {
  content: "";
  position: absolute;
  left: .4rem; top: .72em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.post-list--num li { counter-increment: li; padding-left: 2.4rem; }
.post-list--num li::before {
  content: counter(li, decimal-leading-zero);
  left: 0; top: 0;
  width: auto; height: auto;
  border-radius: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--accent);
  line-height: 1.9;
}

.note {
  margin: 2rem 0;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
}
.note__title {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .55rem;
}
.note p { color: var(--fg-2); font-size: var(--step--1); line-height: 1.75; }

.pull {
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--line-3);
  font-size: var(--step-1);
  line-height: 1.5;
  letter-spacing: -.02em;
  color: var(--fg);
  text-wrap: pretty;
}

.table-wrap {
  margin: 2rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 520px; }
.table th, .table td { padding: .95rem 1.1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
  background: var(--surface-2);
  white-space: nowrap;
}
.table tbody th { font-weight: 600; color: var(--fg); }
.table td { color: var(--fg-2); line-height: 1.6; }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }

.steps { margin: 2rem 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { display: flex; gap: 1.15rem; padding: 1.4rem 1.5rem; background: var(--bg); }
.step__n { font-family: var(--font-mono); font-size: var(--step--2); color: var(--accent); padding-top: .25rem; flex: none; }
.step__title { font-size: var(--step-0); letter-spacing: -.02em; margin-bottom: .4rem; }
.step p { color: var(--fg-2); font-size: var(--step--1); line-height: 1.7; }

.faq { margin: 2rem 0 0; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 0;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -.02em;
  list-style: none;
  transition: color .2s var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--accent); }
.faq__sign { position: relative; margin-left: auto; width: 12px; height: 12px; flex: none; margin-top: .45rem; }
.faq__sign::before, .faq__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: currentColor;
  transition: transform .3s var(--ease);
}
.faq__sign::after { transform: rotate(90deg); }
.faq__item[open] .faq__sign::after { transform: rotate(0deg); }
.faq__a { padding: 0 2rem 1.35rem 0; }
.faq__a p { color: var(--fg-2); font-size: var(--step--1); line-height: 1.8; }

.post-fig { margin: 2.25rem 0; }
.post-fig img { border-radius: var(--radius); border: 1px solid var(--line); }
.post-fig figcaption { margin-top: .85rem; color: var(--fg-3); font-size: var(--step--2); line-height: 1.7; }

/* ---------- 17. Hire prompts --------------------------------------------- */

/* 1. Under the article title. */
.hirebar {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .85rem 1rem .85rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  max-width: 760px;
}
.hirebar__mark {
  width: 36px; height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .04em;
  color: var(--fg-2);
}
.hirebar__txt { flex: 1 1 300px; font-size: var(--step--1); color: var(--fg-2); line-height: 1.55; }
.hirebar__txt strong { color: var(--fg); font-weight: 600; }
.hirebar__btn { flex: none; }

@media (max-width: 620px) {
  .hirebar { border-radius: var(--radius); }
  .hirebar__btn { width: 100%; justify-content: center; }
}

/* 2. Inline in the flow of the article. */
.hirecard {
  margin: 2.75rem 0;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-line);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
}
.hirecard__title { font-size: var(--step-2); letter-spacing: -.035em; margin: .75rem 0 .8rem; max-width: 24ch; }
.hirecard__body { color: var(--fg-2); font-size: var(--step--1); line-height: 1.75; margin-bottom: 1.5rem; max-width: 56ch; }

/* 3. Sticky in the desktop margin, under the contents list. */
.hireside {
  margin-top: 2rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
}
.hireside__status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .06em;
  color: var(--fg-3);
  margin-bottom: .35rem;
}
.hireside__name { font-size: var(--step-0); font-weight: 600; letter-spacing: -.02em; }
.hireside__role { font-size: var(--step--2); color: var(--fg-3); font-family: var(--font-mono); letter-spacing: .03em; }
.hireside .uw { margin-top: .5rem; }
.hireside__btn { width: 100%; justify-content: center; margin-top: .85rem; }
.hireside__alt { font-size: var(--step--2); color: var(--fg-3); margin-top: .35rem; }

/* On phones the sidebar is stacked above the article, so the sticky card
   would fire before anyone has read a word. The bar and the inline cards
   carry it there instead. */
@media (max-width: 999px) { .hireside { display: none; } }

/* 4. End of the article. */
.hireblock {
  margin-top: 3.5rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(100% 120% at 0% 0%, var(--accent-soft), transparent 55%),
    var(--surface);
}
.hireblock__who { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.5rem; }
.hireblock__mark {
  width: 44px; height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--fg-2);
}
.hireblock__name { font-weight: 600; letter-spacing: -.02em; }
.hireblock__role { font-size: var(--step--2); color: var(--fg-3); font-family: var(--font-mono); letter-spacing: .03em; }
.hireblock__title { font-size: var(--step-2); letter-spacing: -.035em; max-width: 20ch; }
.hireblock__lede { margin: .9rem 0 1.75rem; color: var(--fg-2); font-size: var(--step--1); line-height: 1.75; max-width: 58ch; }
.hireblock .uw { margin-top: 1.5rem; }

/* ---------- 18. Reveal --------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--d, 0ms);
  }
  [data-reveal].is-in { opacity: 1; transform: none; }
}

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

/* ---------- 19. Print ---------------------------------------------------- */

@media print {
  .header, .sheet, .progress, .lb, .cta, .filters, .card__arrow,
  .hireside, .hirebar, .hirecard, .hireblock { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- 20. Toast ----------------------------------------------------- */
/* One live region per page, used to confirm clipboard copies. It is a status
   region so screen readers announce it without stealing focus. */

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  z-index: 500;
  transform: translate(-50%, 1rem);
  display: flex;
  align-items: center;
  gap: .55rem;
  max-width: min(92vw, 30rem);
  padding: .8rem 1.15rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--fg);
  font-size: var(--step--1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.toast.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast::before {
  content: "";
  width: 1rem; height: 1rem;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17l-5-5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17l-5-5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* The contact value doubles as a copy control, so it needs the button reset
   trimmed back to look exactly like the link it replaced. */
.copy-value { padding: 0; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity .01ms; transform: translate(-50%, 0); }
}

/* ---------- 21. Fragment targets ----------------------------------------- */
/* The header is fixed, so anything reached by a #fragment (the contact section
   from a "Hire me" button, a case-study heading from the table of contents)
   would otherwise land underneath it. */

[id] { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
