/* anamaya.fyi
   ---------------------------------------------------------------------------
   Type does the work here. There is one accent colour per project and almost no
   chrome otherwise: no shadows on text, no borders that a gap could do instead,
   no gradient that is not lighting something. Motion is a single gesture --
   16px up and into opacity -- reused everywhere so the page feels like one
   object rather than a stack of effects.
--------------------------------------------------------------------------- */

/* ------------------------------------------------------------- tokens ---- */
:root {
  --bg:        #fbfbfd;
  --bg-raised: #ffffff;
  --bg-sunken: #f5f5f7;
  --ink:       #1d1d1f;
  --ink-2:     #48484a;
  --ink-3:     #86868b;
  --hair:      rgba(0, 0, 0, .10);
  --hair-soft: rgba(0, 0, 0, .06);
  --accent:    #0b66c3;
  --nav-bg:    rgba(251, 251, 253, .72);
  --shadow-lg: 0 18px 60px -20px rgba(0, 0, 0, .22);
  --shadow-sm: 0 2px 14px -6px rgba(0, 0, 0, .18);

  --maxw: 1120px;
  --gut: clamp(20px, 5vw, 56px);
  --section: clamp(72px, 11vw, 152px);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "New York", "Iowan Old Style", "Palatino Linotype", Palatino,
           "Source Serif 4", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: light;
}

/* The three theme states: explicit light, system, explicit dark. Every colour
   is defined on bare :root above so nothing is only defined inside a query. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #000000;
    --bg-raised: #1c1c1e;
    --bg-sunken: #131315;
    --ink:       #f5f5f7;
    --ink-2:     #c7c7cc;
    --ink-3:     #8e8e93;
    --hair:      rgba(255, 255, 255, .14);
    --hair-soft: rgba(255, 255, 255, .08);
    --accent:    #4ea3ff;
    --nav-bg:    rgba(0, 0, 0, .68);
    --shadow-lg: 0 18px 60px -20px rgba(0, 0, 0, .8);
    --shadow-sm: 0 2px 14px -6px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:        #000000;
  --bg-raised: #1c1c1e;
  --bg-sunken: #131315;
  --ink:       #f5f5f7;
  --ink-2:     #c7c7cc;
  --ink-3:     #8e8e93;
  --hair:      rgba(255, 255, 255, .14);
  --hair-soft: rgba(255, 255, 255, .08);
  --accent:    #4ea3ff;
  --nav-bg:    rgba(0, 0, 0, .68);
  --shadow-lg: 0 18px 60px -20px rgba(0, 0, 0, .8);
  --shadow-sm: 0 2px 14px -6px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* -------------------------------------------------------------- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.022em; line-height: 1.07; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }

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

/* ------------------------------------------------------------ scaffold --- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.wrap-narrow { max-width: 760px; }
.wrap-wide { max-width: 1320px; }
.section { padding-block: var(--section); }
.section-tight { padding-block: clamp(52px, 7vw, 96px); }
.sunken { background: var(--bg-sunken); }

.hr { height: 1px; background: var(--hair-soft); border: 0; margin: 0; }

/* --------------------------------------------------------------- type ---- */
.display {
  font-size: clamp(2.6rem, 7.4vw, 5.4rem);
  letter-spacing: -.035em;
  line-height: 1.02;
  font-weight: 640;
}
.h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -.028em; }
.h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); letter-spacing: -.024em; }
.h3 { font-size: clamp(1.16rem, 1.7vw, 1.42rem); letter-spacing: -.016em; }

.lede {
  font-size: clamp(1.12rem, 1.9vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -.014em;
}
.body-lg { font-size: 1.06rem; line-height: 1.65; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; line-height: 1.5; }

.eyebrow {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }

/* ---------------------------------------------------------------- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 90;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--hair-soft); }
.nav-in {
  height: 52px;
  display: flex; align-items: center; gap: 8px;
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut);
}
.nav-name { font-weight: 600; font-size: .96rem; letter-spacing: -.01em; margin-right: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: .85rem; color: var(--ink-2);
  padding: 7px 11px; border-radius: 980px;
  transition: color .2s ease, background-color .2s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--hair-soft); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 550; }

.theme-btn {
  appearance: none; border: 0; cursor: pointer;
  background: transparent; color: var(--ink-2);
  width: 34px; height: 34px; border-radius: 980px;
  display: inline-grid; place-items: center;
  transition: background-color .2s ease, color .2s ease;
}
.theme-btn:hover { background: var(--hair-soft); color: var(--ink); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
}

@media (max-width: 640px) {
  .nav-links a { padding: 7px 8px; font-size: .8rem; white-space: nowrap; }
  .nav-in { gap: 2px; }
  /* Five sections do not fit beside the name on a phone. The links scroll
     sideways inside their own strip (faded at the edge to say so) rather than
     wrapping the name or widening the page. */
  .nav-name { white-space: nowrap; margin-right: 6px; }
  .nav-links {
    flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
  }
  .nav-links::-webkit-scrollbar { display: none; }
}

/* --------------------------------------------------------------- hero ---- */
.hero {
  padding-top: clamp(72px, 13vh, 148px);
  padding-bottom: clamp(56px, 9vh, 104px);
  text-align: center;
}
.hero .display { max-width: 16ch; margin-inline: auto; }
.hero .lede { max-width: 58ch; margin: 26px auto 0; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px; border-radius: 980px;
  font-size: .95rem; font-weight: 500;
  background: var(--ink); color: var(--bg);
  border: 1px solid var(--ink);
  transition: transform .22s cubic-bezier(.2,.7,.2,1), opacity .22s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-1.5px); opacity: .88; }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn-ghost:hover { background: var(--hair-soft); opacity: 1; }

/* ------------------------------------------------------- project cards --- */
.cards { display: grid; gap: clamp(18px, 2.4vw, 26px); }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--hair-soft);
  border-radius: 22px;
  overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease, border-color .4s ease;
  will-change: transform;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--hair); }

.card-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-sunken);
  /* The full hairline, not the soft one: since these shots follow the reader's
     theme, a dark screenshot now sits on a dark card and a light one on white,
     and at --hair-soft the edge of the product disappeared into the card. */
  border-bottom: 1px solid var(--hair);
}
.card-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.card:hover .card-shot img { transform: scale(1.028); }

/* Projects with no public deployment get a drawn mark instead of a screenshot,
   rather than a stock photo standing in for a product that is not shown. */
.card-mark {
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  border-bottom: 1px solid var(--hair-soft);
  background:
    radial-gradient(120% 130% at 50% 0%,
      color-mix(in srgb, var(--tint) 22%, transparent) 0%,
      transparent 62%),
    var(--bg-sunken);
}
.card-mark span {
  font-family: var(--serif);
  font-size: clamp(3.4rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -.04em;
  color: color-mix(in srgb, var(--tint) 82%, var(--ink));
  opacity: .92;
}

.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-kind {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
}
.card-kind::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--tint, var(--accent));
}
.card-body h3 { font-size: 1.3rem; }
.card-body p { color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.card-foot {
  margin-top: auto; padding-top: 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: .85rem; color: var(--ink-3);
}
.card-cta { color: var(--accent); font-weight: 500; }
.card-cta::after { content: " →"; }

/* The whole card is the link target; the visible <a> just carries the label. */
.card-link::after { content: ""; position: absolute; inset: 0; }

/* ------------------------------------------------------------ spotlight -- */
/* The newest project, one per landing page. A card in the grid below cannot be
   made to mean "new" -- every card is the same size, which is the point of a
   grid -- so this is a different object: wider, with room for the finding and
   not just the one-liner, and lit by the project's own accent rather than by a
   badge. One tint, one glow, no second border. */
.spot {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 3vw, 44px);
  align-items: center;
  padding: clamp(18px, 2.2vw, 26px);
  border-radius: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--hair-soft);
  background:
    radial-gradient(120% 140% at 0% 0%,
      color-mix(in srgb, var(--tint) 13%, transparent) 0%, transparent 58%),
    var(--bg-raised);
  box-shadow: var(--shadow-sm);
}
.spot-shot {
  display: block;
  border-radius: clamp(12px, 1.6vw, 18px);
  overflow: hidden;
  /* Same reason as .card-shot, and more so: this one floats inside the panel
     rather than sitting against its edge, so it is the border alone that says
     where the product stops and the page starts. */
  border: 1px solid var(--hair);
  background: var(--bg-sunken);
  aspect-ratio: 16 / 10;
}
.spot-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.spot-mark {
  display: grid; place-items: center;
  background:
    radial-gradient(120% 130% at 50% 0%,
      color-mix(in srgb, var(--tint) 24%, transparent) 0%, transparent 62%),
    var(--bg-sunken);
}
.spot-mark span {
  font-family: var(--serif); font-size: clamp(3.4rem, 7vw, 5rem); font-weight: 500;
  letter-spacing: -.04em; color: color-mix(in srgb, var(--tint) 82%, var(--ink));
}

/* The shot keeps its 16/10 frame at every width rather than stretching to the
   height of the prose beside it. Stretching was tried: filling a 561x671 column
   with a 1440x900 page crops 256px off each side, which takes the product's own
   name off its own screenshot. A band of quiet card above and below is the
   cheaper price. */
@media (min-width: 940px) {
  .spot { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); }
}

.spot-body { display: flex; flex-direction: column; gap: 14px; padding: clamp(4px, 1vw, 14px); }
.spot-new { color: color-mix(in srgb, var(--tint) 72%, var(--ink-2)); }
.spot-new::before {
  content: ""; display: inline-block; vertical-align: middle;
  width: 7px; height: 7px; border-radius: 50%; margin-right: 9px;
  background: var(--tint);
}
.spot-body .body-lg { max-width: 56ch; }

/* The finding, not the description. Set apart by a rule in the project's own
   colour so the eye can take it alone, and still a paragraph rather than a
   pull-quote -- it is an argument, and an argument needs its sentences. */
.spot-pitch {
  color: var(--ink-2); font-size: .95rem; line-height: 1.6; max-width: 58ch;
  padding-left: 16px;
  border-left: 2px solid color-mix(in srgb, var(--tint) 55%, transparent);
}

.spot-figs {
  display: grid; gap: 18px 26px; margin-top: 4px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
}
.spot-fig .n {
  font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 620;
  letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums;
}
.spot-fig .l { margin-top: 7px; font-size: .8rem; color: var(--ink-3); line-height: 1.35; }

.spot-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }

/* --------------------------------------------------- shots, per theme ---- */
/* Half the projects are dark-first, and a dark product shot in a light card
   read as a rendering fault rather than as the product. Where both exist the
   page carries both images and this picks -- the same three states the theme
   toggle uses (explicit light, system, explicit dark), so a reader who has
   chosen a theme sees the screenshots in it too. Pages with a single shot emit
   one <img> and never reach these rules. */
.shot-d { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-l { display: none; }
  :root:not([data-theme="light"]) .shot-d { display: block; }
}
:root[data-theme="dark"] .shot-l { display: none; }
:root[data-theme="dark"] .shot-d { display: block; }

/* ------------------------------------------------------------- metrics --- */
.metrics {
  display: grid; gap: clamp(20px, 3vw, 34px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}
.metric .n {
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 620; letter-spacing: -.035em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.metric .l { margin-top: 9px; font-size: .87rem; color: var(--ink-3); line-height: 1.4; }

/* --------------------------------------------------------- case layout --- */
.case-hero { padding-top: clamp(48px, 8vh, 92px); padding-bottom: clamp(30px, 5vh, 52px); }
.case-hero .display { max-width: 18ch; }
.case-hero .lede { max-width: 62ch; margin-top: 22px; }

.case-shot {
  border-radius: clamp(14px, 2vw, 22px);
  overflow: hidden;
  border: 1px solid var(--hair-soft);
  box-shadow: var(--shadow-lg);
  background: var(--bg-sunken);
}

.prose { display: flex; flex-direction: column; gap: clamp(38px, 5vw, 60px); }
.prose section { display: flex; flex-direction: column; gap: 13px; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -.022em; }
.prose p { color: var(--ink-2); font-size: 1.06rem; line-height: 1.68; max-width: 68ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: .81rem; color: var(--ink-2);
  padding: 5px 12px; border-radius: 980px;
  border: 1px solid var(--hair); background: var(--bg-raised);
}

.pair { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: 1fr; }
@media (min-width: 900px) { .pair { grid-template-columns: 320px 1fr; } }

/* -------------------------------------------------------------- lists ---- */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; gap: 6px 24px; align-items: baseline;
  padding-block: 22px;
  border-top: 1px solid var(--hair-soft);
  grid-template-columns: 1fr;
}
.row:last-child { border-bottom: 1px solid var(--hair-soft); }
@media (min-width: 760px) { .row { grid-template-columns: 210px 1fr; } }
.row dt, .row .k { font-weight: 550; }
.row .v, .row dd { margin: 0; color: var(--ink-2); }

.bullets { display: flex; flex-direction: column; gap: 11px; }
.bullets li {
  position: relative; padding-left: 20px;
  color: var(--ink-2); line-height: 1.6;
}
.bullets li::before {
  content: ""; position: absolute; left: 3px; top: .68em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink-3);
}

.linklist a {
  display: flex; align-items: baseline; gap: 14px;
  padding-block: 17px;
  border-top: 1px solid var(--hair-soft);
  transition: padding-left .28s cubic-bezier(.2,.7,.2,1);
}
.linklist a:last-child { border-bottom: 1px solid var(--hair-soft); }
.linklist a:hover { padding-left: 8px; }
.linklist .nm { font-weight: 550; min-width: 0; }
.linklist .ds { color: var(--ink-3); font-size: .92rem; flex: 1; }
.linklist .ar { color: var(--ink-3); }

/* -------------------------------------------------------------- footer --- */
.footer { border-top: 1px solid var(--hair-soft); padding-block: 52px 40px; }
.footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}
.footer h4 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.footer ul { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.footer a { color: var(--ink-2); font-size: .92rem; transition: color .2s ease; }
.footer a:hover { color: var(--ink); }
.footer-note { margin-top: 44px; color: var(--ink-3); font-size: .82rem; }

/* ------------------------------------------------------------- reveal ---- */
/* One gesture, reused. Elements are visible by default and only hidden once JS
   confirms it will be the thing revealing them -- so with JS off or broken the
   page is fully readable instead of blank. */
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .72s cubic-bezier(.2,.7,.2,1), transform .72s cubic-bezier(.2,.7,.2,1);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal.in { transition: none; }
  .card, .card-shot img, .btn, .linklist a { transition: none !important; }
  .card:hover { transform: none; }
  .card:hover .card-shot img { transform: none; }
}

/* --------------------------------------------------------------- misc ---- */
.stack { display: flex; flex-direction: column; }
.gap-xs { gap: 8px; } .gap-s { gap: 14px; } .gap-m { gap: 24px; }
.gap-l { gap: clamp(30px, 4vw, 48px); } .gap-xl { gap: clamp(44px, 6vw, 78px); }
.center { text-align: center; }
.mt-s { margin-top: 14px; } .mt-m { margin-top: 26px; } .mt-l { margin-top: clamp(34px, 5vw, 56px); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: #30b85c; }
.dot-idle { background: var(--ink-3); }

a.inline { color: var(--accent); }
a.inline:hover { text-decoration: underline; text-underline-offset: 3px; }

code { font-family: var(--mono); font-size: .88em; }

/* ------------------------------------------------------- refinements ----- */

/* A hero already ends in a large pad; the section that follows it does not need
   its full top pad as well, or the two stack into a screenful of nothing.
   The sibling selector covers the pages where a section follows the hero
   directly; .section-first is for /work, where a wrapping div sits between
   them and there is no sibling relationship to match on. */
.case-hero + .section,
.case-hero + .section-tight,
.section-first { padding-top: clamp(16px, 2.5vw, 34px); }

/* Centred text is right for a short hero line and wrong for a paragraph. Below
   the breakpoint a 60-word lede becomes eight ragged centred lines with no
   common left edge for the eye to return to, so it goes left-aligned -- while
   the headline and the buttons stay centred. */
@media (max-width: 680px) {
  .hero .lede, .center .lede { text-align: left; }
  .hero .display { max-width: none; }
}

/* Phone: the case-study hero carries the same treatment. */
@media (max-width: 680px) {
  .case-hero .lede { text-align: left; }
}

/* ------------------------------------------------------- the catalogue --- */

/* Fifty-seven dated rows want to read like a well-set index, not a spreadsheet.
   The first pass was too airy: 13px of vertical padding per row and a name
   column pinned at 300px, which left a dead gutter between the title and its
   description and pushed the page past 5,000px. Tighter leading, a name column
   that sizes to its content, and the arrow only on hover. */

.cat-hero { padding-block: clamp(40px, 7vh, 78px) clamp(16px, 2.4vw, 26px); }
.cat-hero .lede { max-width: 60ch; margin-top: 18px; }

.jump { display: flex; flex-wrap: wrap; gap: 7px; margin-top: clamp(18px, 2.4vw, 26px); }
.jump a {
  font-size: .8rem; color: var(--ink-2);
  padding: 5px 12px; border-radius: 980px; border: 1px solid var(--hair);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.jump a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.era { padding-block: clamp(22px, 3vw, 34px); scroll-margin-top: 66px; }
.era-head { max-width: 62ch; margin-bottom: 12px; }
.era-head h2 { font-size: clamp(1.12rem, 1.9vw, 1.4rem); letter-spacing: -.018em; }
.era-head p { margin-top: 6px; color: var(--ink-3); font-size: .9rem; line-height: 1.55; }

.cat { display: flex; flex-direction: column; }

.cat-row {
  display: grid;
  gap: 1px 20px;
  align-items: baseline;
  grid-template-columns: 1fr;
  padding: 8px 10px;
  margin-inline: -10px;
  border-radius: 8px;
  border-top: 1px solid var(--hair-soft);
  transition: background-color .16s ease;
}
.cat-row:last-child { border-bottom: 1px solid var(--hair-soft); }
a.cat-row:hover { background: var(--hair-soft); }

/* Columns are shared across the whole list, not per row.
   max-content on an individual row sizes to THAT row's title, so every
   description started at a different x and the left edge came out ragged.
   subgrid lets the container own the tracks while each row stays a real element
   that can carry a border and a hover state. */
@media (min-width: 800px) {
  .cat {
    display: grid;
    grid-template-columns: 46px minmax(0, max-content) 1fr 14px;
  }
  .cat-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
  }
  /* Wide enough that the longest title plus its private badge stays on one
     line; a single wrapping row makes the whole list look uneven. */
  .cat-n { max-width: 44ch; flex-wrap: nowrap; }
}

/* A live dot: this one is open-able right now. */
.cat-live {
  flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: #30b85c; align-self: center; margin-right: 1px;
}

.cat-y {
  font-family: var(--mono); font-size: .76rem; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.cat-n {
  font-weight: 550; font-size: .94rem; line-height: 1.45;
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
}
.cat-d {
  color: var(--ink-3); font-size: .88rem; line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 800px) { .cat-d { white-space: nowrap; } }

.cat-a { color: var(--accent); font-size: .8rem; text-align: right; opacity: 0; transition: opacity .16s ease; }
a.cat-row:hover .cat-a { opacity: 1; }
.cat-dead .cat-n { color: var(--ink-2); }
.cat-vis {
  flex: none;
  font-size: .6rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--hair); border-radius: 980px; padding: 1px 6px;
}
.cat-foot {
  margin-top: clamp(22px, 3vw, 36px);
  padding-top: 18px; border-top: 1px solid var(--hair-soft);
  max-width: 62ch;
}

/* Certifications: several per issuer, so a plain list inside the row's value
   column rather than one row each. */
.certs { display: flex; flex-direction: column; gap: 7px; }
.certs li { position: relative; padding-left: 18px; line-height: 1.5; }
.certs li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3);
}
.certs-wide { gap: 7px; }
@media (min-width: 760px) {
  .certs-wide { display: block; columns: 2; column-gap: 34px; }
  .certs-wide li { break-inside: avoid; margin-bottom: 7px; }
}
.cert-y {
  font-family: var(--mono); font-size: .78rem; color: var(--ink-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ---------------------------------------------------- certifications ---- */

/* The page is the certificates themselves, so the extravagance is theirs: a
   drifting wall of the real images under the headline, tilt and a moving
   highlight when you hover one, and every one opens full size. Everything
   else stays in the house voice -- same type, hairlines, one accent. */

.ct-hero { padding-top: clamp(56px, 10vh, 120px); overflow: hidden; }
.ct-hero .display { max-width: 17ch; margin-inline: auto; margin-top: 16px; }
.ct-hero .lede { max-width: 60ch; margin: 24px auto 0; }

.ct-wall {
  position: relative;
  margin-top: clamp(40px, 6vw, 72px);
  height: clamp(230px, 30vw, 380px);
  perspective: 1400px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent),
                      linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent),
              linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  mask-composite: intersect;
}
.ct-wall-in {
  position: absolute; left: 50%; top: 50%;
  display: flex; flex-direction: column; gap: clamp(12px, 1.6vw, 20px);
  transform: translate(-50%, -50%) rotateX(24deg) rotateZ(-7deg) scale(1.12);
  transform-style: preserve-3d;
}
.ct-wall-row { overflow: visible; }
.ct-wall-track {
  display: flex; width: max-content;
  animation: ct-drift 150s linear infinite;
}
.ct-wall-row.rev .ct-wall-track { animation-direction: reverse; animation-duration: 170s; }
.ct-wall-track img {
  height: clamp(96px, 12vw, 150px); width: auto;
  margin-right: clamp(12px, 1.6vw, 20px);
  border-radius: 5px;
  border: 1px solid var(--hair-soft);
  box-shadow: var(--shadow-sm);
  background: #fff;
}
@keyframes ct-drift { to { transform: translateX(-50%); } }

.ct-stats {
  display: grid; gap: clamp(22px, 3vw, 36px) clamp(16px, 2.4vw, 30px);
  grid-template-columns: repeat(2, 1fr);
  margin-top: clamp(30px, 4vw, 48px);
  padding-bottom: clamp(56px, 8vw, 104px);
}
@media (min-width: 640px) { .ct-stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .ct-stats { grid-template-columns: repeat(6, 1fr); } }
.ct-stat { border-top: 1px solid var(--hair); padding-top: 14px; }
.ct-stat .n {
  font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 620;
  letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums;
}
.ct-stat .l { margin-top: 9px; font-size: .84rem; line-height: 1.4; color: var(--ink-3); }

.ct-sec-head { max-width: 780px; margin-bottom: clamp(36px, 5vw, 64px); }
/* The stats already close the hero with a generous pad of their own. */
.ct-hero + .section { padding-top: clamp(24px, 4vw, 56px); }
.ct-lb [hidden], .ct-paper[hidden] { display: none !important; }

/* The shared hover gesture: tilt toward the pointer, a light that follows it. */
.ct-tilt { position: relative; perspective: 900px; }
.ct-tilt > img, .ct-tilt > .ct-paper {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease;
}
.ct-tilt.is-tilting > img, .ct-tilt.is-tilting > .ct-paper { transition: transform .08s linear; }
.ct-glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%),
              rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 42%);
  mix-blend-mode: soft-light;
  transition: opacity .4s ease;
}
.ct-tilt:hover .ct-glare { opacity: 1; }

/* ---- programmes */
.ct-progs { display: flex; flex-direction: column; gap: clamp(72px, 10vw, 136px); }
.ct-prog { display: grid; gap: clamp(30px, 4vw, 64px); align-items: center; }
@media (min-width: 940px) {
  .ct-prog { grid-template-columns: 1.08fr 1fr; }
  .ct-prog.flip .ct-prog-vis { order: 2; }
}
.ct-prog-vis { position: relative; }
.ct-prog-shot, .ct-prog-badge, .ct-step, .ct-card-shot, .ct-sq, .ct-chip,
.ct-lb-x, .ct-lb-nav {
  appearance: none; border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer; text-align: inherit;
}
.ct-prog-shot { display: block; width: 100%; cursor: zoom-in; border-radius: 14px; }
.ct-prog-shot > img {
  width: 100%; border-radius: 12px;
  border: 1px solid var(--hair-soft);
  box-shadow: var(--shadow-lg);
  background: #fff;
}
.ct-prog-shot .ct-glare { border-radius: 12px; }
.ct-prog-badge {
  position: absolute; right: clamp(-10px, -1vw, -4px); bottom: clamp(-34px, -3vw, -18px);
  width: clamp(92px, 12vw, 132px);
  transform: rotate(9deg);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .22));
}
.ct-prog-badge:hover { transform: rotate(0deg) scale(1.06); }
.ct-prog-body { display: flex; flex-direction: column; gap: 16px; }
.ct-prog-figs { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 4px; }
.ct-prog-figs div { display: flex; flex-direction: column; }
.ct-prog-figs .n {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 620; letter-spacing: -.03em;
  line-height: 1.05; font-variant-numeric: tabular-nums;
}
.ct-prog-figs .l { font-size: .8rem; color: var(--ink-3); }

.ct-path { list-style: none; padding: 0; margin: 6px 0 0; border-bottom: 1px solid var(--hair-soft); }
.ct-step {
  display: grid; width: 100%; align-items: center; gap: 12px;
  grid-template-columns: 26px 1fr 64px 50px;
  padding: 11px 0; border-top: 1px solid var(--hair-soft);
  transition: color .2s ease;
}
.ct-step:hover { color: var(--accent); }
.ct-step-n { font-family: var(--mono); font-size: .74rem; color: var(--ink-3); }
.ct-step-t { font-size: .93rem; line-height: 1.35; }
.ct-step-bar { height: 4px; border-radius: 2px; background: var(--hair-soft); overflow: hidden; }
.ct-step-bar i {
  display: block; height: 100%; width: calc(var(--g) * 100%);
  background: var(--accent); border-radius: 2px;
  transition: width 1.1s cubic-bezier(.2,.7,.2,1) .15s;
}
.js .ct-prog-body:not(.in) .ct-step-bar i { width: 0; }
.ct-step-g {
  font-family: var(--mono); font-size: .8rem; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--ink-2);
}
@media (max-width: 520px) {
  .ct-step { grid-template-columns: 22px 1fr 48px; }
  .ct-step-bar { display: none; }
}

/* ---- timeline */
.ct-tl-wrap { margin-top: 8px; }
.ct-tl {
  display: grid; align-items: end;
  grid-template-columns: repeat(var(--months), minmax(0, 1fr));
  gap: 0 clamp(1px, .35vw, 4px);
  border-bottom: 1px solid var(--hair);
  padding-top: 8px;
}
.ct-tl-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; }
.ct-tl-stack { display: flex; flex-direction: column-reverse; gap: clamp(1px, .35vw, 4px); padding-bottom: 3px; }
.ct-sq {
  display: block; width: 100%; aspect-ratio: 1;
  border-radius: clamp(1px, .3vw, 3px);
  background: var(--accent);
  transition: background-color .3s ease, transform .2s ease, box-shadow .2s ease;
}
.ct-sq:hover, .ct-sq:focus-visible {
  transform: scale(1.35); box-shadow: 0 0 0 2px var(--bg-sunken); position: relative; z-index: 2;
}
.ct-tl.filtering .ct-sq:not(.on) { background: var(--hair); }
.ct-tl-y {
  position: absolute; top: 100%; left: 0; margin-top: 8px;
  font-family: var(--mono); font-size: .72rem; color: var(--ink-3); white-space: nowrap;
}
.ct-tl-y::before {
  content: ""; position: absolute; left: 0; top: -9px; width: 1px; height: 6px; background: var(--hair);
}
.ct-tl-wrap { padding-bottom: 28px; }
.ct-tip {
  position: fixed; z-index: 120; pointer-events: none;
  max-width: 280px; padding: 8px 11px; border-radius: 9px;
  background: var(--ink); color: var(--bg);
  font-size: .8rem; line-height: 1.35;
  box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}
.ct-tip.on { opacity: 1; transform: none; }
.ct-tip small { display: block; opacity: .7; font-family: var(--mono); font-size: .72rem; margin-top: 2px; }

/* ---- skills */
.ct-skills { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.ct-sk {
  padding: 6px 14px; border-radius: 980px;
  border: 1px solid var(--hair); background: var(--bg-raised);
  color: var(--ink-2); font-size: .84rem; line-height: 1.3;
}
.ct-sk span {
  margin-left: 7px; font-family: var(--mono); font-size: .72em; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.ct-sk.s2 { font-size: .96rem; color: var(--ink); }
.ct-sk.s3 { font-size: 1.12rem; color: var(--ink); padding: 7px 16px; }
.ct-sk.s4 { font-size: 1.34rem; color: var(--ink); font-weight: 600; padding: 8px 18px; border-color: var(--ink-3); }

/* ---- gallery */
.ct-controls {
  display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; justify-content: space-between;
  margin-bottom: clamp(24px, 3vw, 34px);
}
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-chip {
  font-size: .82rem; color: var(--ink-2);
  padding: 7px 14px; border-radius: 980px; border: 1px solid var(--hair);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.ct-chip span { font-family: var(--mono); font-size: .74rem; color: var(--ink-3); margin-left: 4px; }
.ct-chip:hover { background: var(--hair-soft); color: var(--ink); }
.ct-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.ct-chip[aria-pressed="true"] span { color: inherit; opacity: .65; }
.ct-sort { display: inline-flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--ink-3); }
.ct-sort select {
  font: inherit; font-size: .84rem; color: var(--ink);
  background: var(--bg-raised); border: 1px solid var(--hair); border-radius: 980px;
  padding: 7px 14px;
}

.ct-grid {
  display: grid; gap: clamp(16px, 2vw, 22px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 252px), 1fr));
}
.ct-card {
  display: flex; flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--hair-soft); border-radius: 18px; overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease, border-color .4s ease;
}
.ct-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--hair); }
.ct-card[hidden] { display: none; }
.ct-card.enter { animation: ct-in .45s cubic-bezier(.2,.7,.2,1); }
@keyframes ct-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.ct-card-shot {
  display: grid; place-items: center;
  aspect-ratio: 4 / 3; padding: 18px;
  background: color-mix(in srgb, var(--bg-sunken) 70%, var(--bg-raised));
  border-bottom: 1px solid var(--hair-soft);
  cursor: zoom-in; overflow: hidden;
}
.ct-card-shot > img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  border-radius: 4px; box-shadow: var(--shadow-sm); background: #fff;
}
.ct-card-shot > img.is-badge, .ct-prog-badge img { box-shadow: none; background: none; border-radius: 0; }
.ct-card-shot > img.is-badge { max-width: 58%; }
.ct-card-body { display: flex; flex-direction: column; flex: 1; padding: 15px 18px 17px; }
.ct-card-meta {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.ct-mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.ct-card-body h3 { font-size: 1.01rem; line-height: 1.3; letter-spacing: -.012em; margin: 8px 0 5px; }
.ct-card-kind { font-size: .8rem; line-height: 1.4; color: var(--ink-3); }
.ct-card-foot {
  margin-top: auto; padding-top: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .84rem;
}
.ct-card-foot .inline { margin-left: auto; }
.ct-grade {
  font-family: var(--mono); font-size: .78rem; font-variant-numeric: tabular-nums;
  padding: 3px 9px; border-radius: 980px;
  color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, transparent);
}

/* A certificate with no image anywhere gets set as one, not a grey box. */
.ct-paper {
  width: 92%; aspect-ratio: 1.414;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 8% 10%; text-align: center;
  background: #fffdf8; color: #2b2a27;
  border: 1px solid rgba(0, 0, 0, .12);
  box-shadow: inset 0 0 0 5px #fffdf8, inset 0 0 0 6px rgba(0, 0, 0, .14), var(--shadow-sm);
  border-radius: 3px;
}
.ct-paper-by { font-size: .6rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #6b6a66; }
.ct-paper-t { font-family: var(--serif); font-size: clamp(.9rem, 1.3vw, 1.08rem); line-height: 1.25; }
.ct-paper-to { font-family: var(--mono); font-size: .64rem; color: #6b6a66; }

.ct-empty { padding: 40px 0; text-align: center; }

/* ---- lightbox */
.ct-lb {
  width: min(1180px, 94vw); max-width: none; max-height: 92vh;
  padding: 0; border: 0; border-radius: 20px; overflow: hidden;
  background: var(--bg-raised); color: var(--ink);
  box-shadow: 0 30px 120px -20px rgba(0, 0, 0, .6);
}
.ct-lb[open] { animation: ct-pop .38s cubic-bezier(.2,.7,.2,1); }
.ct-lb::backdrop {
  background: rgba(0, 0, 0, .66);
  -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%);
}
@keyframes ct-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.ct-lb-in { position: relative; display: grid; max-height: 92vh; overflow: auto; }
@media (min-width: 900px) {
  .ct-lb-in { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); overflow: hidden; }
  .ct-lb-side { overflow: auto; max-height: 92vh; }
}
.ct-lb-fig {
  position: relative; margin: 0; display: grid; place-items: center;
  padding: clamp(18px, 3.4vw, 44px); min-height: 260px;
  background: var(--bg-sunken);
}
.ct-lb-fig img {
  max-width: 100%; max-height: calc(92vh - 88px); width: auto; height: auto;
  border-radius: 6px; box-shadow: var(--shadow-lg); background: #fff;
}
.ct-lb-fig img.is-badge { max-height: 46vh; box-shadow: none; background: none; }
.ct-lb-fig img.swap { animation: ct-in .35s cubic-bezier(.2,.7,.2,1); }
.ct-lb-fig .ct-paper { width: min(520px, 100%); }
@media (max-width: 899px) { .ct-lb-fig img { max-height: 46vh; } }
.ct-lb-side { display: flex; flex-direction: column; gap: 12px; padding: 30px 28px 28px; }
.ct-lb-side .h3 { line-height: 1.2; padding-right: 30px; }
.ct-lb-dl {
  display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; margin: 6px 0 2px;
  padding: 14px 0; border-block: 1px solid var(--hair-soft); font-size: .88rem;
}
.ct-lb-dl dt { color: var(--ink-3); }
.ct-lb-dl dd { margin: 0; font-family: var(--mono); font-size: .84rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ct-lb-desc { color: var(--ink-2); line-height: 1.55; }
.ct-lb-desc:empty { display: none; }
.ct-lb-learn h4 { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.ct-lb-learn ul { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--ink-2); line-height: 1.45; }
.ct-lb-learn li { padding-left: 14px; position: relative; }
.ct-lb-learn li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.ct-lb-sk { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-lb-sk li { font-size: .75rem; padding: 3px 10px; border-radius: 980px; border: 1px solid var(--hair); color: var(--ink-2); }
.ct-lb-side .btn { align-self: flex-start; margin-top: 6px; }
.ct-lb-x {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; line-height: 1;
  background: var(--hair-soft); color: var(--ink);
}
.ct-lb-x:hover { background: var(--hair); }
.ct-lb-nav {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-size: 26px; line-height: 1;
  background: rgba(0, 0, 0, .5); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ct-lb-nav:hover { background: rgba(0, 0, 0, .7); }
.ct-lb-nav.prev { left: 12px; }
.ct-lb-nav.next { right: 12px; }
@media (min-width: 900px) { .ct-lb-nav.next { right: calc(38.4% + 12px); } }
@media (max-width: 899px) { .ct-lb-nav { top: min(23vh, 180px); } }

/* Certificates are printed white; on a black page they glare. Take the edge off. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ct-wall-track img,
  :root:not([data-theme="light"]) .ct-card-shot > img:not(.is-badge),
  :root:not([data-theme="light"]) .ct-prog-shot > img,
  :root:not([data-theme="light"]) .ct-paper { filter: brightness(.9); }
}
:root[data-theme="dark"] .ct-wall-track img,
:root[data-theme="dark"] .ct-card-shot > img:not(.is-badge),
:root[data-theme="dark"] .ct-prog-shot > img,
:root[data-theme="dark"] .ct-paper { filter: brightness(.9); }

@media (prefers-reduced-motion: reduce) {
  .ct-wall-track { animation: none; }
  .ct-tilt > img, .ct-tilt > .ct-paper { transform: none !important; }
  .ct-card, .ct-card.enter, .ct-lb[open], .ct-lb-fig img.swap { animation: none; transition: none; }
  .ct-card:hover { transform: none; }
  .ct-step-bar i { transition: none; }
}

/* ---- the landing page's certifications band */
.hc { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (min-width: 940px) { .hc { grid-template-columns: 1fr 1fr; } }
.hc-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hc-fan {
  position: relative; height: clamp(250px, 32vw, 380px);
  perspective: 1200px;
}
.hc-card {
  position: absolute; left: 50%; top: 50%; width: min(78%, 440px);
  transform: translate(-50%, -50%)
             translate(calc((var(--i) - 1) * 13%), calc((var(--i) - 1) * 9%))
             rotate(calc((var(--i) - 1) * 6deg));
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
  z-index: calc(3 - var(--i));
}
.hc-card > img {
  width: 100%; border-radius: 8px; background: #fff;
  border: 1px solid var(--hair-soft); box-shadow: var(--shadow-lg);
}
.hc-fan:hover .hc-card {
  transform: translate(-50%, -50%)
             translate(calc((var(--i) - 1) * 24%), calc((var(--i) - 1) * 5%))
             rotate(calc((var(--i) - 1) * 9deg));
}
.hc-fan .hc-card:hover { z-index: 5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hc-card > img { filter: brightness(.9); }
}
:root[data-theme="dark"] .hc-card > img { filter: brightness(.9); }
@media (prefers-reduced-motion: reduce) { .hc-card { transition: none; } }
