/* ==========================================================================
   SAKIB NAWAR TANMOY — Editorial / Magazine Portfolio
   Fonts: Fraunces (display serif) + Inter (text/UI)
   ========================================================================== */

:root {
  --paper: #f6f3ec;
  --paper-deep: #efeae0;
  --ink: #191511;
  --ink-soft: #5c554c;
  --ink-faint: #8b8377;
  --line: rgba(25, 21, 17, 0.16);
  --line-strong: rgba(25, 21, 17, 0.85);
  --cream: #f6f3ec;
  --accent: #c2401f;
  --accent-deep: #9e3013;
  --dark: #14110d;
  --dark-soft: #a89f92;
  --body-text: #2e2923;
  --serif: "Fraunces", "Georgia", serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --dot: rgba(25, 21, 17, 0.07);
  --gutter: clamp(20px, 4vw, 64px);
  --maxw: 1320px;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Type helpers ---------- */
.kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ==========================================================================
   MASTHEAD (navigation)
   ========================================================================== */
.masthead {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.masthead-main .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand em {
  display: inline-block;
  font-style: italic;
  color: var(--accent);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-soft);
  padding: 4px 0;
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 11px 22px;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.25s ease;
}

/* --mx/--my come from the magnetic-button JS; the hover lift is added on top */
.nav-email-btn:hover {
  background: var(--accent);
  transform: translate(var(--mx, 0px), calc(var(--my, 0px) - 1px));
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 16px var(--gutter);
  font-family: var(--serif);
  font-size: 22px;
  border-bottom: 1px solid var(--line);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* the 8 section links need ~680px; below this width they move into the Menu */
@media (max-width: 1180px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
}

@media (max-width: 920px) {
  .nav-email-btn {
    display: none;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
/* position: relative anchors the Audit Desk layer; the dot grid is a faint data backdrop */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 26px 26px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-top: clamp(24px, 3vw, 44px);
  padding-bottom: clamp(32px, 4vw, 56px);
}

.hero-issue-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(24px, 4vw, 48px);
}

.hero-issue-line::after {
  content: "";
  flex: 1;
  order: 1;
  height: 1px;
  background: var(--line);
}

.hero-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(56px, 9.5vw, 148px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

/* each row rises in turn on load (@keyframes rise, see MICRO-INTERACTIONS) */
.hero-name .row-1,
.hero-name .row-2,
.hero-name .row-3 {
  display: block;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-name .row-1 {
  animation-delay: 0.12s;
}

.hero-name .row-2 {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  animation-delay: 0.22s;
}

.hero-name .row-3 {
  animation-delay: 0.32s;
}

.hero-standfirst {
  margin-top: clamp(24px, 3.5vw, 44px);
  max-width: 52ch;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
}

.hero-standfirst strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-actions {
  margin-top: clamp(28px, 3.5vw, 44px);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Photo column */
.hero-photo {
  position: relative;
  animation: rise 1s 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

/* frame reacts gently to the cursor (JS sets --rx/--ry) */
.hero-photo-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  padding: 10px;
  background: var(--paper);
  transform: perspective(900px) rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}

.hero-photo-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 50%;
  transition: filter 0.4s ease;
}

.hero-photo-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .hero-photo {
    max-width: 420px;
  }
}

/* ==========================================================================
   SOCIAL ICON BUTTONS (shared)
   ========================================================================== */
.social-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.25s ease;
}

.social-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: translate(var(--mx, 0px), calc(var(--my, 0px) - 2px));
}

/* footer variant */
.footer .social-btn {
  border-color: rgba(246, 243, 236, 0.28);
  color: var(--cream);
}

.footer .social-btn:hover {
  background: var(--cream);
  color: var(--dark);
  border-color: var(--cream);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-editorial {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease,
    border-color 0.25s ease;
}

.btn-editorial:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translate(var(--mx, 0px), calc(var(--my, 0px) - 1px));
}

.btn-editorial.solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-editorial.solid:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ==========================================================================
   SECTION SCAFFOLD
   ========================================================================== */
.section {
  padding-top: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(40px, 5vw, 72px);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  padding-top: 18px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

/* rule line draws itself in when the section reveals */
.section-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.section-head.visible::before,
.section-head:not(.reveal)::before {
  transform: scaleX(1);
}

.section-no {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent); /* #c2401f light · #d95232 dark */
}

.section-aside {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .section-aside {
    display: none;
  }
}

/* ==========================================================================
   01 — ABOUT / MY STORY
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(36px, 6vw, 96px);
}

.about-lede {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.about-lede::first-letter {
  font-size: 2.6em;
  font-weight: 600;
  float: left;
  line-height: 0.85;
  padding-right: 12px;
  color: var(--accent);
}

.about-lede em {
  font-style: italic;
  color: var(--accent);
}

.about-body {
  margin-top: 26px;
  color: var(--ink-soft);
  max-width: 62ch;
  font-size: 16.5px;
}

.signoff {
  margin-top: 30px;
  max-width: 200px;
  mix-blend-mode: multiply;
}

.about-actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Facts card */
.fact-list {
  border-top: 2px solid var(--ink);
}

.fact-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  position: relative;
}

.fact-list .fact-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.fact-list .fact-value {
  text-align: right;
  font-weight: 500;
}

.fact-list .fact-value a {
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.fact-list .fact-value a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   02 — EXPERIENCE  &  03 — EDUCATION (index list)
   ========================================================================== */
.xp-list {
  border-top: 1px solid var(--line);
}

.xp-item {
  display: grid;
  grid-template-columns: 150px 1.15fr 1.3fr;
  gap: clamp(18px, 3vw, 48px);
  padding: clamp(24px, 3vw, 38px) 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.3s ease;
}

.xp-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.xp-item:hover {
  background: var(--paper-deep);
}

/* hover nudge uses transforms, so text never re-wraps mid-animation.
   Offsets match the old 10px padding shift (the fr-sized description
   column only moved ~5px of it). */
.xp-item > * {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.xp-item:hover > :nth-child(-n + 2) {
  transform: translateX(10px);
}

.xp-item:hover > .xp-desc {
  transform: translateX(5px);
}

.xp-item:hover::before {
  transform: scaleY(1);
}

.xp-date {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 6px;
}

.xp-role {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.xp-org {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.xp-org img {
  height: 32px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  border-radius: 6px;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.75;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

/* logos regain color and lift a little with the row */
.xp-item:hover .xp-org img {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.12);
}

.xp-desc {
  color: var(--ink-soft);
  font-size: 15px;
  padding-top: 5px;
}

.xp-desc .thesis-label {
  font-weight: 700;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-right: 6px;
}

@media (max-width: 860px) {
  .xp-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .xp-date {
    padding-top: 0;
  }
  .xp-desc {
    padding-top: 4px;
  }
}

/* ==========================================================================
   05 — DOMAIN EXPERTISE  (editorial panel cards)
   ========================================================================== */
.domain-group + .domain-group {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.domain-group h4 {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.tag:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 21, 17, 0.15);
}

.domain-list li {
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
  color: var(--ink-soft);
  transition: padding-left 0.3s ease, color 0.3s ease;
}

.domain-list li:last-child {
  border-bottom: none;
}

.domain-list li:hover {
  padding-left: 8px;
  color: var(--ink);
}

.domain-list strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- dossier index (expanding rows) ---------- */
.domain-index {
  border-top: 1px solid var(--line);
}

.dx-item {
  border-bottom: 1px solid var(--line);
}

.dx-head {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 84px 1fr auto 44px;
  align-items: center;
  gap: clamp(14px, 2.5vw, 32px);
  padding: clamp(22px, 3.4vw, 38px) 12px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.3s ease;
}

.dx-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dx-head:hover,
.dx-item.is-open .dx-head {
  background: var(--paper-deep);
}

/* number and title nudge right with a transform (no text re-wrap);
   the meta and the +/× toggle stay where the old padding shift left them */
.dx-no,
.dx-title {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dx-head:hover .dx-no,
.dx-head:hover .dx-title,
.dx-item.is-open .dx-no,
.dx-item.is-open .dx-title {
  transform: translateX(10px);
}

.dx-head:hover::before,
.dx-item.is-open .dx-head::before {
  transform: scaleY(1);
}

.dx-no {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.dx-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 4.2vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.dx-title em {
  font-style: italic;
  font-weight: 400;
}

.dx-item.is-open .dx-title em,
.dx-head:hover .dx-title em {
  color: var(--accent);
}

.dx-meta {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.dx-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.dx-item.is-open .dx-toggle {
  transform: rotate(45deg);
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* drawer opens via the grid-rows trick: no height math needed */
.dx-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.dx-item.is-open .dx-drawer {
  grid-template-rows: 1fr;
}

.dx-drawer-inner {
  overflow: hidden;
  min-height: 0;
  padding-left: clamp(12px, calc(84px + 2.5vw), 138px);
  padding-right: 12px;
}

.dx-item.is-open .dx-drawer-inner {
  padding-bottom: clamp(28px, 4vw, 46px);
}

.dx-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 58ch;
  margin-bottom: 22px;
}

.dx-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 48px);
}

@media (max-width: 820px) {
  .dx-head {
    grid-template-columns: auto 1fr 40px;
  }
  .dx-meta {
    display: none;
  }
  .dx-toggle {
    width: 38px;
    height: 38px;
  }
  .dx-drawer-inner {
    padding-left: 12px;
  }
  .dx-cols {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dx-drawer,
  .dx-toggle,
  .dx-head {
    transition: none;
  }
}







/* ==========================================================================
   06 — SYSTEMS IN PRACTICE  (fanned card deck: active case + cards)
   ========================================================================== */
/* fanned cards may reach past the page edge; clip them without a scrollbar */
#work {
  overflow-x: clip;
}

.deck-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4.5vw, 72px);
  align-items: center;
}

/* ---------- left page: the active case ---------- */
.deck-copy {
  border-top: 2px solid var(--ink);
  padding-top: clamp(20px, 2.4vw, 30px);
}

.deck-lede {
  margin-top: 14px;
  max-width: 44ch;
  font-size: 15px;
  color: var(--ink-soft);
}

.deck-case {
  margin-top: clamp(26px, 3.6vw, 44px);
  padding: clamp(18px, 2vw, 24px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.deck-case.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

.deck-meta {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.deck-title {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.deck-desc {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-soft);
}

.deck-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 34px);
}

.deck-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-right: auto;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.deck-count b {
  font-family: var(--serif);
  font-size: clamp(48px, 5.5vw, 76px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* prev / next reuse the round social buttons */
.deck-btn {
  background: transparent;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.deck-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.deck-hint {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- case plates: abstract system diagrams ----------
   Keep confidential work visual without client screenshots or internal data. */
.wp-system {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: clamp(8px, 1.2vw, 16px);
  padding: clamp(26px, 4vw, 58px);
  overflow: hidden;
  color: #f6f3ec;
  background-color: #16130f;
  background-image:
    linear-gradient(rgba(246, 243, 236, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 243, 236, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

.wp-system::before {
  content: "";
  position: absolute;
  width: 52%;
  aspect-ratio: 1;
  top: -24%;
  right: -10%;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.18;
  box-shadow: 0 0 0 34px rgba(246, 243, 236, 0.05),
    0 0 0 68px rgba(246, 243, 236, 0.035);
}

.wp-system strong {
  position: relative;
  z-index: 1;
  max-width: 90%;
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 52px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.wp-system i {
  position: relative;
  z-index: 1;
  color: #ef6b47;
  font-family: var(--mono);
  font-size: clamp(14px, 2vw, 24px);
  font-style: normal;
}

.wp-kicker {
  position: absolute;
  top: clamp(20px, 3vw, 38px);
  left: clamp(26px, 4vw, 58px);
  z-index: 1;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ef6b47;
}

.wp-cms { background-color: #24332c; }
.wp-dms { background-color: #26324a; }
.wp-mcp { background-color: #3a2525; }
.wp-mobile { background-color: #2e2944; }
.wp-skills { background-color: #413520; }

/* ---------- right page: the fanned deck ----------
   JS sets --d (signed distance from the active card) and --ad (its absolute
   value); every card's fan position is derived from those two numbers. */
.deck {
  --card-w: clamp(230px, 22vw, 300px);
  --spread: clamp(24px, 2.6vw, 38px);
  --tilt: 6deg;
  position: relative;
  height: calc(var(--card-w) * 1.4 + 72px);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.deck.is-dragging {
  cursor: grabbing;
}

.deck-card {
  --d: 0;
  --ad: 0;
  position: absolute;
  top: 24px;
  left: 50%;
  width: var(--card-w);
  aspect-ratio: 5 / 7;
  margin-left: calc(var(--card-w) / -2);
  padding: 24px 22px 20px;
  gap: 8px;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  outline: 1px solid rgba(246, 243, 236, 0.2);
  outline-offset: -10px;
  box-shadow: 0 30px 50px -30px rgba(25, 21, 17, 0.55);
  transform-origin: 50% 135%;
  transform: translateX(calc(var(--d) * var(--spread)))
    translateY(calc(var(--ad) * 8px)) rotate(calc(var(--d) * var(--tilt)))
    scale(calc(1 - var(--ad) * 0.03));
  opacity: clamp(0, calc(3 - var(--ad)), 1); /* two cards show on each side */
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    translate 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease,
    box-shadow 0.4s ease, outline-color 0.3s ease;
}

/* while dragging, the deck leans with the pointer (JS sets `translate`) */
.deck.is-dragging .deck-card {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    translate 0.12s ease-out, opacity 0.4s ease, box-shadow 0.4s ease,
    outline-color 0.3s ease;
}

/* back cards are shaded by a black layer: the same result as
   filter: brightness(1 - ad × 0.14), but opacity animates on the compositor
   instead of repainting a filter on every frame */
.deck-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000;
  opacity: calc(var(--ad) * 0.14);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.deck-card:not(.is-active):hover::after {
  opacity: calc(var(--ad) * 0.14 - 0.08);
}

.deck-card.is-active {
  cursor: grab;
  outline-color: rgba(239, 107, 71, 0.55);
  box-shadow: 0 44px 70px -34px rgba(25, 21, 17, 0.7);
}

.deck-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.deck-card .wp-kicker {
  top: 24px;
  left: 22px;
}

.deck-card strong {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1;
}

.deck-card i {
  font-size: 15px;
}

.deck-card-no {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 1;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(246, 243, 236, 0.6);
}

.deck-card-foot {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(246, 243, 236, 0.18);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 243, 236, 0.62);
}

html.dark-mode .deck-card {
  box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  .deck-card,
  .deck-case {
    transition: none;
  }
}

@media (max-width: 920px) {
  .deck-stage {
    grid-template-columns: 1fr;
  }
  /* cards first on small screens, the case details below them */
  .deck {
    order: -1;
    --card-w: min(62vw, 270px);
    --spread: clamp(16px, 4.5vw, 26px);
    --tilt: 5deg;
    overflow: hidden;
    margin: 0 calc(var(--gutter) * -1);
  }
}

/* ==========================================================================
   BLOG TEASER (index) & BLOG PAGES
   ========================================================================== */
.article-list {
  border-top: 1px solid var(--line);
}

.article-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: baseline;
  padding: clamp(22px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}

.article-row:hover {
  background: var(--paper-deep);
}

/* number and title nudge right with a transform (no text re-wrap);
   the date stays where the old padding shift left it */
.article-row > :not(.article-date) {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-row:hover > :not(.article-date) {
  transform: translateX(14px);
}

/* font-family comes from the shared mono metadata rule (EDITORIAL ELEVATION) */
.article-no {
  font-style: normal;
  font-size: 13px;
  color: var(--ink-faint);
}

.article-row h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  transition: color 0.25s ease;
}

.article-row:hover h3 {
  color: var(--accent);
}

.article-excerpt {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 70ch;
}

.article-date {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.section-foot {
  margin-top: clamp(28px, 4vw, 44px);
  text-align: center;
}

@media (max-width: 640px) {
  .article-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .article-no {
    display: none;
  }
}

/* Page-level (blog index / archive) headers */
.page-hero {
  padding-top: clamp(48px, 7vw, 90px);
  padding-bottom: clamp(28px, 4vw, 48px);
}

.page-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 28px;
  transition: color 0.25s ease;
}

.page-hero .back-link:hover {
  color: var(--accent);
}

.page-hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.page-hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.page-hero .page-sub {
  margin-top: 18px;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 56ch;
}

.page-body {
  padding-bottom: clamp(64px, 8vw, 110px);
}

/* ==========================================================================
   POST (single article)
   ========================================================================== */
.post-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) var(--gutter) clamp(64px, 8vw, 110px);
  position: relative;
}

.post-header {
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(28px, 4vw, 44px);
  margin-bottom: clamp(28px, 4vw, 44px);
}

.post-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.post-meta {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.post-meta .tag {
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
}

.post-content {
  font-size: 17.5px;
  line-height: 1.8;
  color: var(--body-text);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 1.6em 0 0.6em;
}

.post-content h2 {
  font-size: 30px;
}

.post-content h3 {
  font-size: 24px;
}

.post-content p {
  margin-bottom: 1.2em;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.2em 1.4em;
}

.post-content ul {
  list-style: disc;
}

.post-content ol {
  list-style: decimal;
}

.post-content li {
  margin-bottom: 0.4em;
}

.post-content img {
  margin: 1.6em auto;
  border: 1px solid var(--line);
}

.post-content blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 1.6em 0;
  color: var(--ink);
}

.post-content a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

.post-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
  background: var(--paper-deep);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-content pre {
  background: #1d1a16;
  color: #ece7de;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.6em 0;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 15px;
}

.post-content th,
.post-content td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}

.post-content th {
  font-weight: 600;
  background: var(--paper-deep);
}

.post-footer {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* Post utility toggles (dark mode / translate) */
.post-tools {
  position: absolute;
  top: 18px;
  right: var(--gutter);
  display: flex;
  gap: 10px;
}

.tool-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.tool-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.d-none {
  display: none;
}

/* Magic overlay + language swap (kept from previous design) */
.magic-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(194, 64, 31, 0.18) 40%,
    rgba(194, 64, 31, 0.32) 50%,
    rgba(194, 64, 31, 0.18) 60%,
    transparent 100%
  );
  transform: translateX(-100%);
  pointer-events: none;
  z-index: 1200;
}

.magic-overlay.active {
  animation: magic-sweep 1.4s ease-in-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .magic-overlay.active {
    animation: none;
  }
}

@keyframes magic-sweep {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

.ai-glow-active {
  box-shadow: 0 0 0 4px rgba(194, 64, 31, 0.25);
}

.lang-content.fade-in {
  animation: fadeInContent 0.5s ease;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Custom modal */
.custom-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 13, 0.6);
  z-index: 1300;
  align-items: center;
  justify-content: center;
}

.custom-modal .modal-content {
  background: var(--paper);
  color: var(--ink);
  padding: 36px 44px;
  text-align: center;
  border: 1px solid var(--line-strong);
  max-width: 90%;
}

.custom-modal .modal-text {
  font-family: var(--serif);
  font-size: 20px;
  margin-bottom: 20px;
}

.custom-modal .modal-btn {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  padding: 12px 32px;
  cursor: pointer;
}

.custom-modal .modal-btn:hover {
  background: var(--accent);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--dark);
  color: var(--cream);
  overflow: hidden;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

/* Giant name */
.footer-big-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(26px, 10.5vw, 176px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(246, 243, 236, 0.4);
  padding: clamp(30px, 5vw, 60px) 8px 0;
  user-select: none;
  transition: color 0.6s ease;
}

.footer-big-name:hover {
  color: rgba(246, 243, 236, 0.92);
  -webkit-text-stroke: 1px transparent;
}

/* ==========================================================================
   REVEAL ANIMATION
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   MICRO-INTERACTIONS & ENTRANCE ANIMATIONS
   ========================================================================== */

/* Scroll progress bar (bottom edge of masthead) */
.scroll-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* Hero entrance — staggered rise on page load */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-copy > * {
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-copy .hero-issue-line {
  animation-delay: 0.05s;
}

.hero-copy .hero-name {
  animation: none;
}

.hero-copy .hero-standfirst {
  animation-delay: 0.45s;
}

.hero-copy .hero-actions {
  animation-delay: 0.58s;
}

.hero-photo:hover .hero-photo-frame {
  box-shadow: 0 24px 48px -28px rgba(25, 21, 17, 0.4);
}

/* Marquee pauses while you read it */
/* Article rows grow an arrow */
.article-row h3::after {
  content: "→";
  display: inline-block;
  margin-left: 10px;
  font-family: var(--sans);
  font-weight: 400;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-row:hover h3::after {
  opacity: 1;
  transform: none;
}

/* Brand dot winks on hover */
.brand:hover em {
  transform: translateY(-3px);
}

/* Fact rows underline sweep */
.fact-list li::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.fact-list li:hover::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-copy > *,
  .hero-name .row-1,
  .hero-name .row-2,
  .hero-name .row-3,
  .hero-photo {
    animation: none;
  }
  .section-head::before {
    transform: scaleX(1);
    transition: none;
  }
  .hero-photo-frame {
    transform: none;
  }
}

/* ==========================================================================
   EDITORIAL ELEVATION — mono data accents, stats, TOC, stamps, colophon
   ========================================================================== */

/* Monospace for all "metadata" — the data-engineer's typeface */
.section-no,
.section-aside,
.xp-date,
.article-date,
.article-no,
.hero-photo-caption,
.stat-label,
.stamp,
.colophon .wrap {
  font-family: var(--mono);
}

/* ---------- Hero stat strip ---------- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  margin-top: clamp(8px, 2vw, 24px);
  animation: rise 1s 0.72s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.stat {
  padding: clamp(18px, 2.5vw, 28px) clamp(14px, 2vw, 28px)
    clamp(18px, 2.5vw, 28px) 0;
}

.stat + .stat {
  border-left: 1px solid var(--line);
  padding-left: clamp(14px, 2vw, 28px);
}

.stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat-num b {
  font-weight: inherit;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(odd) {
    border-left: none;
    padding-left: 0;
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

/* ---------- Pull quote interlude ---------- */
.pullquote-section {
  background: var(--dark);
  color: var(--cream);
}

.pullquote {
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding-top: clamp(10px, 2vw, 24px);
}

.pullquote::before {
  content: "“";
  display: block;
  font-family: var(--serif);
  font-size: clamp(70px, 9vw, 130px);
  line-height: 0.6;
  color: var(--accent);
  margin-bottom: clamp(14px, 2vw, 26px);
}

.pullquote blockquote {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.6vw, 44px);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.pullquote blockquote em {
  font-style: italic;
  color: var(--accent);
}

.pullquote figcaption {
  margin-top: clamp(22px, 3vw, 36px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark-soft);
}

.pullquote figcaption::before {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 16px;
}

/* ---------- Certification stamps ---------- */
.stamp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stamp {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  background: var(--paper);
  padding: 12px 18px 10px 15px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: background 0.25s ease, color 0.25s ease,
    transform 0.25s ease, box-shadow 0.25s ease;
}

.stamp i {
  font-style: normal;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.3;
}

.stamp:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -14px rgba(25, 21, 17, 0.5);
}

.stamp:hover i {
  color: var(--dark-soft);
}

/* ---------- Scrollspy — active nav link ---------- */
.nav-links a.active {
  color: var(--ink);
}

.nav-links a.active::after {
  transform: scaleX(1);
}

/* ---------- Colophon & barcode ---------- */
.colophon {
  border-top: 1px solid rgba(246, 243, 236, 0.14);
  margin-top: clamp(30px, 5vw, 56px);
}

.colophon .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark-soft);
}

.barcode-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.barcode {
  display: block;
  width: 108px;
  height: 26px;
  color: rgba(246, 243, 236, 0.6);
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 2px,
    transparent 2px 5px,
    currentColor 5px 6px,
    transparent 6px 7px,
    currentColor 7px 11px,
    transparent 11px 13px,
    currentColor 13px 14px,
    transparent 14px 18px
  );
}

.barcode-label {
  font-size: 8px;
  letter-spacing: 0.3em;
}

/* ---------- Reduced motion for new elements ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-stats {
    animation: none;
  }
  .stamp,
  .stamp:nth-child(even) {
    transform: none;
  }
}

.colophon a {
  transition: color 0.25s ease;
}

.colophon a:hover {
  color: var(--cream);
}

/* ==========================================================================
   PROGRAMMER / DATA-SCIENTIST PASS - terminal, grid, ticks, decode
   ========================================================================== */

/* deep links land clear of the sticky masthead */
.section[id],
.hero[id],
.footer[id] {
  scroll-margin-top: 96px;
}

/* Availability status pill (pulsing dot) */
.hero-issue-line .status-pill {
  order: 2;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--paper);
  white-space: nowrap;
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e7d4f;
  position: relative;
  flex-shrink: 0;
}

.status-pill i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  75%,
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .hero-issue-line .status-pill {
    display: none;
  }
}

/* Hero terminal line (typed roles) */
.hero-terminal {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink-soft);
  min-height: 22px;
}

.term-prompt {
  color: var(--accent);
  font-weight: 600;
}

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--ink);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Section asides read as code comments */
.section-aside::before {
  content: "// ";
  color: var(--accent);
}

/* Blueprint corner marks on the portrait */
.hero-photo-frame::before,
.hero-photo-frame::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  transition: width 0.3s ease, height 0.3s ease;
}

.hero-photo-frame::before {
  top: -7px;
  left: -7px;
  border-right: none;
  border-bottom: none;
}

.hero-photo-frame::after {
  bottom: -7px;
  right: -7px;
  border-left: none;
  border-top: none;
}

.hero-photo:hover .hero-photo-frame::before,
.hero-photo:hover .hero-photo-frame::after {
  width: 30px;
  height: 30px;
}

.hero-photo:hover .hero-photo-frame img {
  filter: saturate(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .status-pill i::after,
  .term-cursor {
    animation: none;
  }
}

/* ==========================================================================
   FOOTER v2 - editorial grid with contact index rows
   ========================================================================== */

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 110px);
  align-items: center;
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(40px, 5vw, 70px);
}

.footer-left .kicker {
  color: var(--dark-soft);
  display: block;
  margin-bottom: 20px;
}

.footer-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 4.8vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.footer-title em {
  font-style: italic;
  color: var(--accent);
}

.footer-lede {
  margin-top: 20px;
  color: var(--dark-soft);
  max-width: 40ch;
  font-size: 16px;
}

.footer-left .footer-social {
  justify-content: flex-start;
  margin-top: 34px;
}

/* Contact index rows */
.footer-links {
  border-top: 1px solid rgba(246, 243, 236, 0.18);
}

.footer-link-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(246, 243, 236, 0.18);
  color: var(--cream);
}

/* the label nudges right with a transform; meta and arrow stay put,
   exactly where the old padding shift left them */
.footer-link-row:hover .flr-label {
  transform: translateX(14px);
}

.flr-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-link-row.is-primary .flr-label {
  color: var(--accent);
}

.flr-meta {
  flex: 1;
  text-align: right;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-soft);
  transition: color 0.25s ease;
}

.flr-arrow {
  font-size: 20px;
  color: var(--dark-soft);
  margin-left: auto;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}

.footer-link-row:hover .flr-arrow {
  transform: translateX(6px);
  color: var(--accent);
}

.footer-link-row:hover .flr-meta {
  color: var(--cream);
}

/* Footer mobile optimization */
@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 64px;
    padding-bottom: 36px;
  }

  .footer-link-row {
    padding: 20px 0;
  }

  .flr-meta {
    display: none;
  }

  .footer-big-name {
    padding-top: 40px;
  }

  .colophon .wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding-top: 22px;
    padding-bottom: 22px;
  }
}

/* ==========================================================================
   DARK MODE - variable overrides + theme toggle
   ========================================================================== */

html.dark-mode {
  --paper: #16130f;
  --paper-deep: #201b15;
  --ink: #ece7dd;
  --ink-soft: #b5ab9d;
  --ink-faint: #8b8173;
  --line: rgba(236, 231, 221, 0.14);
  --line-strong: rgba(236, 231, 221, 0.7);
  --accent: #d95232;
  --accent-deep: #e8683f;
  --dot: rgba(236, 231, 221, 0.07);
  --body-text: #cfc7ba;
}

html.dark-mode body {
  color-scheme: dark;
}

/* signature gif is dark ink - invert it on dark paper */
html.dark-mode .signoff {
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: screen;
}

/* dim photos slightly on dark */
html.dark-mode .hero-photo-frame img {
  filter: saturate(0.9) brightness(0.92);
}

/* company logos stay readable on dark */
html.dark-mode .xp-org img {
  background: #f1ece2;
  padding: 3px;
  opacity: 0.9;
}

/* Theme toggle button */
.masthead-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.theme-toggle:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

.theme-toggle .icon-moon,
.theme-toggle .icon-sun {
  display: inline-flex;
}

.theme-toggle .icon-sun {
  display: none;
}

html.dark-mode .theme-toggle .icon-moon {
  display: none;
}

html.dark-mode .theme-toggle .icon-sun {
  display: inline-flex;
}

html.dark-mode .footer,
html.dark-mode .pullquote-section {
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   04 — TOOLSET v4 : flip-card shelves
   Five category shelves, every group visible at once; each shelf scrolls
   horizontally and every card flips to reveal its detail on the back.
   ========================================================================== */

#toolset {
  padding-bottom: clamp(16px, 2vw, 28px);
}

.cf-shell {
  --cfw: clamp(150px, 16vw, 186px);
  --cfh: calc(var(--cfw) * 1.3);
}

/* ---------- shelves ---------- */
.shelf + .shelf {
  margin-top: clamp(24px, 3.2vw, 40px);
}

.shelf-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 13px;
}

.shelf-label b {
  color: var(--accent);
  font-weight: 600;
}

.shelf-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- scrollable row with edge fades ---------- */
.shelf-row-wrap {
  position: relative;
}

.shelf-row-wrap::before,
.shelf-row-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 10px;
  width: 48px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.shelf-row-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--paper), transparent);
}

.shelf-row-wrap::after {
  right: 0;
  background: linear-gradient(-90deg, var(--paper), transparent);
}

.shelf-row-wrap.can-left::before,
.shelf-row-wrap.can-right::after {
  opacity: 1;
}

.shelf-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 14px calc(50% - var(--cfw) / 2) 14px;
  perspective: 1100px;
  scroll-snap-type: x proximity;
  scrollbar-width: none; /* no native scrollbar; fades + arrows signal overflow */
  cursor: grab;
}

.shelf-row::-webkit-scrollbar {
  display: none;
}

.shelf-row.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}




/* ---------- flip cards (front keeps the gallery card design) ---------- */
.cf-card {
  flex: 0 0 var(--cfw);
  height: var(--cfh);
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  scroll-snap-align: center;
  transform-style: preserve-3d;
  will-change: transform;
}

.cf-card.is-center .cf-face {
  box-shadow: 0 26px 48px -26px rgba(25, 21, 17, 0.55);
}

.cf-card:hover .cf-face {
  box-shadow: 0 20px 38px -24px rgba(25, 21, 17, 0.5);
}

.cf-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-card.is-flipped .cf-inner {
  transform: rotateY(180deg);
}

.cf-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 13px 14px 12px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  color: var(--ink);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

/* back face: a filed spec card */
.cf-back {
  justify-content: space-between;
  padding: 0;
  transform: rotateY(180deg);
  background: var(--dark);
  color: var(--cream);
  border-color: var(--dark);
  overflow: hidden;
}

.cf-card.is-core .cf-front {
  border-top: 3px solid var(--accent);
}

.cf-card.is-dim .cf-front {
  border-style: dashed;
  color: var(--ink-soft);
}

.cf-card.is-dim .cf-back {
  border-style: solid;
}

/* front face contents */
/* one mark per card: muted at rest, true colors when centered */
.cfc-logo {
  position: absolute;
  top: 39%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44%;
  height: 34%;
  object-fit: contain;
  pointer-events: none;
  filter: grayscale(1) sepia(0.22) saturate(0.55) opacity(0.55);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s ease;
}

.cf-card.is-center .cfc-logo {
  filter: none;
}

.cf-card:hover .cfc-logo {
  transform: translate(-50%, -50%) scale(1.07);
}

.cfc-no {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  transition: color 0.25s ease;
}

.cf-card:hover .cfc-no {
  color: var(--accent);
}

.cfc-name {
  margin-top: auto;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.cf-card.is-core .cfc-name::after {
  content: " \2605";
  font-size: 10px;
  color: var(--accent);
  vertical-align: 4px;
}

.cfc-group {
  margin-top: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
  color: var(--ink-faint);
}

.cfc-bar {
  margin-top: 10px;
  width: 100%;
  height: 14px;
  opacity: 0.35;
  color: currentColor;
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 2px,
    transparent 2px 5px,
    currentColor 5px 6px,
    transparent 6px 7px,
    currentColor 7px 11px,
    transparent 11px 13px,
    currentColor 13px 14px,
    transparent 14px 18px
  );
}

/* ---------- back face contents ---------- */
/* accent header band with the catalogue number */
.cfb-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background: var(--accent);
  color: var(--paper);
}

.cfb-no {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.cfb-kicker {
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* the note, set as an editorial pull quote */
.cfb-note {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 12px 13px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(12px, 1.15vw, 14.5px);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--cream);
}

/* ruled footer carrying the level */
.cfb-level {
  width: 100%;
  padding: 9px 13px 10px;
  border-top: 1px solid rgba(246, 243, 236, 0.22);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dark-soft);
}

.cf-card.is-core .cfb-level {
  color: var(--accent-deep);
}

/* ---------- legend ---------- */
@media (prefers-reduced-motion: reduce) {
  .cf-inner,
  .cf-card {
    transition: none;
  }
}

/* ==========================================================================
   HERO MINI-GAME — Audit Desk (desktop easter egg)
   Loose records drift across the hero; stamp the ones that violate the
   live audit rule before they escape.
   ========================================================================== */

.hero-game {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

/* ---------- invitation: note pinned to the portrait's corner ---------- */
.ad-pin {
  position: absolute;
  top: clamp(16px, 2.4vw, 30px);
  right: clamp(20px, 4vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.3s ease;
  animation: rise 1s 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.ad-pin.ad-hidden {
  opacity: 0;
  pointer-events: none;
}

.ad-pin-card {
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  font-family: var(--mono);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 12px 18px 10px;
  transform: rotate(2.5deg);
  box-shadow: 0 12px 26px -16px rgba(25, 21, 17, 0.55);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease;
}

/* push-pin dot */
.ad-pin-card::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
  transform: translateX(-50%);
  box-shadow: 0 3px 6px rgba(25, 21, 17, 0.35);
}

.ad-pin-card:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 18px 32px -18px rgba(25, 21, 17, 0.6);
}

.ad-pin-stamp {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 5px 10px;
  transform: rotate(-2deg);
}

.ad-pin-sub {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.ad-hint {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  box-shadow: 0 6px 14px -10px rgba(25, 21, 17, 0.4);
}

/* ---------- shift briefing (click-triggered, centered) ---------- */
.ad-brief {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(25, 21, 17, 0.28);
  backdrop-filter: blur(1.5px);
  z-index: 8;
}

.ad-brief[hidden] {
  display: none;
}

.ad-brief-card {
  width: min(380px, 92%);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 26px 28px 24px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.75;
  color: var(--ink-soft);
  box-shadow: 0 32px 64px -32px rgba(25, 21, 17, 0.6);
  animation: ad-stamp-slap 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ad-brief-kicker {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.ad-brief-card h4 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}

.ad-brief-card em {
  font-style: normal;
  color: var(--accent);
}

.ad-brief-card ul {
  margin: 14px 0;
  border-top: 1px solid var(--line);
}

.ad-brief-card li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.ad-brief-card li b {
  color: var(--accent);
  min-width: 34px;
  text-align: right;
}

.ad-brief-goal {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
}

.ad-brief-card .btn-editorial {
  cursor: pointer;
  font-family: var(--sans);
}

.ad-brief-card .ad-muted {
  margin-top: 14px;
  font-size: 9.5px;
  color: var(--ink-faint);
}

/* ---------- score panel & live rule ---------- */
.ad-panel {
  position: absolute;
  top: 14px;
  right: clamp(24px, 5vw, 90px);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 9px 14px;
  box-shadow: 0 12px 26px -18px rgba(25, 21, 17, 0.5);
  z-index: 5;
}

.ad-panel[hidden] {
  display: none;
}

.ad-stat b {
  color: var(--ink);
  margin-left: 5px;
}

.ad-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-faint);
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.ad-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.ad-rule {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--mono);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--accent);
  padding: 9px 22px 10px;
  box-shadow: 0 12px 26px -18px rgba(25, 21, 17, 0.5);
  z-index: 5;
}

.ad-rule[hidden] {
  display: none;
}

.ad-rule-kicker {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.ad-rule b {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
}

.ad-rule.is-updating {
  animation: ad-rule-flash 0.9s ease;
}

@keyframes ad-rule-flash {
  0%, 100% { border-top-color: var(--accent); }
  25%, 75% { border-top-color: var(--ink); transform: translateX(-50%) scale(1.06); }
  50% { transform: translateX(-50%) scale(1); }
}

/* ---------- drifting record cards ---------- */
.ad-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ad-card {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  font-family: var(--mono);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--ink-faint);
  padding: 8px 14px;
  box-shadow: 0 10px 22px -14px rgba(25, 21, 17, 0.45);
  will-change: transform;
  transition: box-shadow 0.2s ease;
  z-index: 2;
}

.ad-card:hover {
  box-shadow: 0 14px 28px -14px rgba(25, 21, 17, 0.6);
}

.ad-card-id {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.ad-card-val {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.ad-card.is-glitch .ad-card-val {
  color: var(--accent);
}

/* judged cards */
.ad-card.is-judged {
  cursor: default;
  pointer-events: none;
}

.ad-card.is-rejected {
  animation: ad-card-drop 0.6s ease forwards;
}

.ad-card.is-void {
  animation: ad-card-shake 0.55s ease forwards;
}

@keyframes ad-card-drop {
  0% { opacity: 1; }
  100% { opacity: 0; translate: 0 34px; rotate: 7deg; }
}

@keyframes ad-card-shake {
  0%, 100% { opacity: 1; margin-left: 0; }
  20% { margin-left: -5px; }
  40% { margin-left: 5px; }
  60% { margin-left: -3px; opacity: 0.6; }
  80% { margin-left: 3px; opacity: 0.3; }
  100% { opacity: 0; }
}

/* stamp slapped onto a judged card */
.ad-card .ad-card-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  background: var(--paper);
  padding: 3px 7px;
  white-space: nowrap;
  animation: ad-stamp-slap 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ad-card .ad-card-stamp.is-void-stamp {
  color: var(--ink-faint);
  border-color: var(--ink-faint);
}

@keyframes ad-stamp-slap {
  0% { opacity: 0; scale: 1.9; }
  100% { opacity: 1; scale: 1; }
}

/* ---------- floating score ticks & final verdict ---------- */
.ad-tick {
  position: absolute;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  animation: ad-tick-rise 0.8s ease forwards;
  z-index: 4;
}

.ad-tick.is-bad {
  color: var(--ink-faint);
}

@keyframes ad-tick-rise {
  0% { opacity: 0; translate: 0 6px; }
  25% { opacity: 1; }
  100% { opacity: 0; translate: 0 -26px; }
}

.ad-verdict-stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
  font-family: var(--mono);
  font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  border: 2.5px solid var(--accent);
  background: var(--paper);
  padding: 16px 28px;
  transform: translate(-50%, -50%) rotate(-6deg);
  animation: ad-stamp-slap 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 6;
}

.ad-verdict-stamp small {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

/* game is desktop-only, motion-friendly */
@media (max-width: 1023px), (hover: none), (prefers-reduced-motion: reduce) {
  .hero-game {
    display: none;
  }
}

/* ==========================================================================
   TOUCH SCREENS — no sticky hover motion
   A tap leaves :hover applied until the next tap elsewhere, so lifts, nudges
   and zooms that only make sense under a mouse are reset where hover isn't
   real. Colors and backgrounds still respond as tap feedback.
   ========================================================================== */
@media (hover: none) {
  .nav-email-btn:hover,
  .social-btn:hover,
  .btn-editorial:hover,
  .theme-toggle:hover,
  .tag:hover,
  .stamp:hover,
  .brand:hover em,
  .xp-item:hover .xp-org img,
  .xp-item:hover > :nth-child(-n + 2),
  .xp-item:hover > .xp-desc,
  .article-row:hover > :not(.article-date),
  .footer-link-row:hover .flr-label,
  .footer-link-row:hover .flr-arrow {
    transform: none;
  }
  /* open dossier rows keep their nudge; only the hover-only one is reset */
  .dx-item:not(.is-open) .dx-head:hover .dx-no,
  .dx-item:not(.is-open) .dx-head:hover .dx-title {
    transform: none;
  }
  .cf-card:hover .cfc-logo {
    transform: translate(-50%, -50%);
  }
}
