:root {                    /* default: Royal — royal blue & gold */
  --bg: #0d1322; --panel: #15203a; --panel2: #1d2b4e; --line: #2b3c66;
  --text: #e9ecf5; --muted: #96a2c4; --accent: #d9b45b;
  --up: #66c98a; --down: #e0716f;
}
html[data-theme="ember"] {
  --bg: #111318; --panel: #191c24; --panel2: #222633; --line: #2a2f3c;
  --text: #eae7e0; --muted: #9298a8; --accent: #e5a558;
  --up: #69c98a; --down: #e0716f;
}
html[data-theme="ice"] {
  --bg: #0d1418; --panel: #141d23; --panel2: #1c2830; --line: #263540;
  --text: #e4ebee; --muted: #8fa3ad; --accent: #56c3dc;
  --up: #69c98a; --down: #e0716f;
}
html[data-theme="nocturne"] {
  --bg: #141020; --panel: #1c1730; --panel2: #262040; --line: #322a52;
  --text: #eae6f2; --muted: #9d94b8; --accent: #a78bda;
  --up: #69c98a; --down: #e0716f;
}
html[data-theme="paper"] { /* light */
  --bg: #f5f2ec; --panel: #fdfbf7; --panel2: #ece6d8; --line: #d8d1c0;
  --text: #29261f; --muted: #7a7468; --accent: #8a6d1d;
  --up: #1a8f4a; --down: #c04543;
}
:root {
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --up-soft: color-mix(in srgb, var(--up) 14%, transparent);
  --down-soft: color-mix(in srgb, var(--down) 14%, transparent);
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}

/* ------------------------------------------------------------ site tokens
   The palettes above are the house theme block, verbatim. Everything below
   uses only those variables. Type is a system stack on purpose: no webfont
   download, and each platform's best book serif (Baskerville on Apple, Sitka
   on Windows) stands in for the original site's Cormorant Garamond. */
:root {
  --display: Baskerville, "Hoefler Text", "Sitka Banner", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --serif: Baskerville, "Hoefler Text", "Sitka Heading", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 44px);
  --head-h: 64px;
  --accent-line: color-mix(in srgb, var(--accent) 42%, transparent);
  --shade: color-mix(in srgb, var(--panel) 62%, var(--bg));
  --soft-text: color-mix(in srgb, var(--text) 82%, var(--bg));
  --hair: color-mix(in srgb, var(--line) 70%, transparent);
  --accent-ink: var(--accent);   /* accent as small text */
  --muted-ink: var(--muted);     /* muted as small text */
  --on-accent: var(--bg);        /* text on a solid accent fill */
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
html[data-theme="paper"] {
  color-scheme: light;
  /* On the light palette, accent and muted land just under 4.5:1 as small
     text; this is a reading site, so deepen them toward the ink colour. */
  --accent-ink: color-mix(in srgb, var(--accent) 78%, var(--text));
  --muted-ink: color-mix(in srgb, var(--muted) 75%, var(--text));
  --on-accent: var(--panel);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + env(safe-area-inset-top) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .35s ease, color .35s ease;
}
html.locked, html.locked body { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nw { white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: calc(env(safe-area-inset-top) + 10px); }
html:not(.js) .js-only, html:not(.js) .contact-form { display: none; }

/* ----------------------------------------------------------------- type */
.eyebrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  font-family: var(--sans); font-size: .72rem; font-weight: 600; line-height: 1.5;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow::before { content: ""; flex: none; width: 28px; height: 1px; background: var(--accent-line); }
.label {
  font-family: var(--sans); font-size: .72rem; font-weight: 600; line-height: 1.5;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted-ink);
}
.statement {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.55rem, 3.2vw, 2.3rem); line-height: 1.3; letter-spacing: -.004em;
  max-width: 25em; margin-top: 22px; text-wrap: balance;
}
.statement.wide { max-width: 31em; }
.body { color: var(--soft-text); max-width: 38em; margin-top: 20px; text-wrap: pretty; }
.fine { color: var(--muted-ink); font-size: .82rem; line-height: 1.6; }
.num {
  font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  color: var(--accent-ink); font-variant-numeric: tabular-nums lining-nums;
}

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent);
  font-size: .95rem; font-weight: 600; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .25s ease, background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -12px var(--accent); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn-sm { min-height: 40px; padding: 0 20px; font-size: .86rem; }

/* ------------------------------------------------------- concept marker */
.concept {
  display: flex; align-items: center; justify-content: center; gap: 6px 16px; flex-wrap: wrap;
  padding: calc(env(safe-area-inset-top) + 8px) var(--gutter) 8px;
  background: var(--accent-soft); border-bottom: 1px solid var(--hair);
  color: var(--soft-text); font-size: .8rem; line-height: 1.5; text-align: center;
}
.concept strong { color: var(--accent-ink); font-weight: 600; letter-spacing: .04em; }
.concept a { text-underline-offset: 3px; text-decoration-color: var(--accent-line); }
.concept a:hover { color: var(--accent-ink); }
.concept-x {
  min-height: 28px; padding: 0 12px; border: 1px solid var(--accent-line); border-radius: 999px;
  color: var(--muted-ink); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.concept-x:hover { color: var(--accent-ink); border-color: var(--accent); }
html.no-concept .concept { display: none; }

/* --------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .35s ease;
}
.site-head.scrolled { border-bottom-color: var(--hair); }
.head-row { display: flex; align-items: center; justify-content: space-between; height: var(--head-h); }
.brand { display: inline-flex; align-items: baseline; gap: 9px; color: var(--text); text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 1.4rem; line-height: 1; letter-spacing: .005em; }
.brand-cred { font-size: .64rem; font-weight: 600; letter-spacing: .24em; color: var(--accent-ink); }
.nav { display: none; align-items: center; gap: 30px; }
.nav a:not(.btn) {
  position: relative; padding: 8px 0; color: var(--muted-ink); text-decoration: none;
  font-size: .9rem; letter-spacing: .02em; transition: color .2s;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:not(.btn):hover, .nav a[aria-current] { color: var(--text); }
.nav a:not(.btn)[aria-current]::after { transform: scaleX(1); }
.menu-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px 0 12px;
  font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
}
.menu-ico { position: relative; width: 20px; height: 8px; border-block: 1.5px solid var(--accent); }
@media (min-width: 880px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
}

/* ----------------------------------------------------------------- menu */
.menu {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: var(--bg); overflow-y: auto;
  padding: calc(env(safe-area-inset-top) + 0px) calc(env(safe-area-inset-right) + var(--gutter))
           calc(env(safe-area-inset-bottom) + 28px) calc(env(safe-area-inset-left) + var(--gutter));
  animation: menu-in .3s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
.menu-top { display: flex; align-items: center; justify-content: space-between; height: var(--head-h); flex: none; }
.menu-close {
  min-height: 44px; padding: 0 4px 0 12px;
  font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink);
}
.menu-links { margin-top: 12px; }
.menu-links a {
  display: flex; align-items: baseline; gap: 18px; padding: 15px 0;
  font-family: var(--display); font-size: clamp(1.9rem, 8.4vw, 2.6rem); line-height: 1.1;
  text-decoration: none; border-bottom: 1px solid var(--hair);
}
.menu-links a[aria-current] { color: var(--accent-ink); }
.menu-foot { margin-top: auto; padding-top: 30px; display: grid; gap: 22px; justify-items: center; }
.menu-mail { color: var(--muted-ink); font-size: .95rem; }
.menu .theme-row { margin-top: 0; }

/* ----------------------------------------------------------------- hero */
.hero { position: relative; overflow: clip; padding-block: clamp(34px, 6vw, 60px) clamp(56px, 9vw, 104px); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(52% 58% at 82% 34%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%),
    radial-gradient(46% 52% at 4% 4%, color-mix(in srgb, var(--panel2) 62%, transparent), transparent 72%);
}
.hero-grid { position: relative; display: grid; justify-items: center; gap: 38px; text-align: center; }
.portrait { position: relative; width: min(60vw, 264px); }
.portrait picture { position: relative; z-index: 1; display: block; }
.portrait img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--panel);
  border-radius: 999px 999px var(--radius) var(--radius);
  box-shadow: 0 34px 70px -34px rgb(0 0 0 / .6);
}
.rings { position: absolute; inset: 0; pointer-events: none; }
.rings i {
  position: absolute; left: 50%; top: 46%; aspect-ratio: 1; translate: -50% -50%;
  border: 1px solid var(--accent); border-radius: 50%;
  animation: breathe 11s ease-in-out infinite;
}
.rings i:nth-child(1) { width: 146%; opacity: .34; }
.rings i:nth-child(2) { width: 196%; opacity: .21; animation-delay: -2.4s; }
.rings i:nth-child(3) { width: 254%; opacity: .12; animation-delay: -4.8s; }
.rings i:nth-child(4) { width: 322%; opacity: .06; animation-delay: -7.2s; }
@keyframes breathe { 50% { scale: 1.04; } }
.hero-copy { display: grid; justify-items: center; }
.hero .eyebrow { justify-content: center; }
.hero .eyebrow::before { display: none; }
@media (max-width: 519px) { .hero .eyebrow .sep { display: none; } }
h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3.7rem, 13.5vw, 6.5rem); line-height: .96; letter-spacing: -.014em;
  margin-top: 16px;
}
h1 .cred {
  font-family: var(--sans); font-size: max(.16em, .7rem); font-weight: 600;
  letter-spacing: .26em; color: var(--accent-ink); margin-left: .9em;
}
.tagline {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.28rem, 3.3vw, 1.85rem); line-height: 1.36;
  color: var(--soft-text); margin-top: 20px; text-wrap: balance;
}
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.hero-note { color: var(--muted-ink); font-size: .86rem; line-height: 1.6; max-width: 31em; margin-top: 22px; text-wrap: pretty; }
.hero-note a { color: var(--soft-text); text-underline-offset: 3px; text-decoration-color: var(--accent-line); }
.hero-note a:hover { color: var(--accent-ink); }
@media (min-width: 880px) {
  .hero { display: grid; align-items: center; min-height: min(calc(100svh - var(--head-h)), 800px); }
  .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; justify-items: start; gap: 56px; text-align: left; }
  .hero-copy { justify-items: start; order: 1; }
  .portrait { order: 2; justify-self: center; width: min(31vw, 380px); }
  .hero .eyebrow { justify-content: flex-start; }
  .hero .eyebrow::before { display: block; }
  .cta-row { justify-content: flex-start; }
}
html.js .hero-copy > *, html.js .portrait { animation: rise .9s var(--ease) both; }
html.js .hero-copy > :nth-child(2) { animation-delay: .08s; }
html.js .hero-copy > :nth-child(3) { animation-delay: .16s; }
html.js .hero-copy > :nth-child(4) { animation-delay: .24s; }
html.js .hero-copy > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ------------------------------------------------------------- sections */
html.js .view { animation: fade .4s ease; }
.section { position: relative; padding-block: clamp(64px, 9.5vw, 118px); }
.shade { background: var(--shade); border-block: 1px solid var(--hair); }
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }

/* about */
.about-grid { display: grid; gap: 44px; }
.index-cards { display: grid; gap: 26px; align-content: start; }
.index-card { border-top: 1px solid var(--line); padding-top: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags li {
  padding: 7px 15px; border-radius: 999px; font-size: .9rem; line-height: 1.4;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
@media (min-width: 880px) {
  .about-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); gap: 72px; align-items: end; }
}

/* background */
.lead-in { margin-top: clamp(44px, 6vw, 64px); }
.lessons { display: grid; gap: 14px; margin-top: 18px; }
.lesson {
  display: grid; gap: 14px; align-content: start; padding: 22px 22px 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.lesson p { font-family: var(--serif); font-size: 1.32rem; line-height: 1.34; text-wrap: pretty; }
.closing {
  display: flex; align-items: center; gap: 14px; margin-top: 34px;
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.4; color: var(--soft-text);
}
.closing::before { content: ""; flex: none; width: 36px; height: 1px; background: var(--accent); }
@media (min-width: 880px) {
  .lessons { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .lesson { padding: 26px 26px 30px; }
  html.js .lesson:nth-child(2) { transition-delay: .08s; }
  html.js .lesson:nth-child(3) { transition-delay: .16s; }
}

/* credentials */
.cred-grid { display: grid; gap: 48px; margin-top: 34px; }
.col-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.2rem); line-height: 1.15; }
.timeline { margin-top: 22px; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 26px 24px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 8px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--accent);
}
.timeline li:first-child::before { background: var(--accent); }
.when {
  font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-ink); font-variant-numeric: lining-nums;
}
.what { font-family: var(--serif); font-size: 1.28rem; line-height: 1.3; margin-top: 4px; text-wrap: balance; }
.where { color: var(--muted-ink); font-size: .94rem; line-height: 1.5; margin-top: 3px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.facts { margin-top: 22px; padding: 6px 22px; }
.facts > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 15px 0; border-bottom: 1px solid var(--hair);
}
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted-ink); font-size: .9rem; }
.facts dd { font-size: 1.02rem; font-variant-numeric: tabular-nums lining-nums; text-align: right; }
.copy {
  position: relative; padding: 2px 0; font-variant-numeric: tabular-nums lining-nums;
  border-bottom: 1px dashed var(--accent-line); transition: color .2s, border-color .2s;
}
.copy:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }
.copy[data-done]::after {
  content: attr(data-done); position: absolute; right: 0; bottom: calc(100% + 6px);
  padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: .7rem; font-weight: 600; letter-spacing: .08em; white-space: nowrap;
}
.cred-grid + .supervision, .supervision { margin-top: 40px; }
.cred-grid .fine { margin-top: 12px; }
.supervision { padding: 22px 24px 24px; border-left: 2px solid var(--accent); }
.supervision p { color: var(--soft-text); margin-top: 10px; max-width: 52em; text-wrap: pretty; }
.supervision a, .direct a, .crisis a, .foot-note a { text-underline-offset: 3px; text-decoration-color: var(--accent-line); }
.supervision a:hover, .direct a:hover, .crisis a:hover, .foot-note a:hover { color: var(--accent-ink); }
@media (min-width: 880px) {
  .cred-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 72px; }
}

/* portfolio teaser */
.org-cards { display: grid; gap: 16px; margin-top: 40px; }
.org-card {
  display: grid; overflow: hidden; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .35s var(--ease), border-color .25s, opacity .8s var(--ease);
}
.org-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--panel2); transition: scale .6s var(--ease); }
.org-card:hover { border-color: var(--accent-line); }
.org-card:hover img { scale: 1.035; }
.org-card-body { position: relative; display: grid; gap: 6px; padding: 18px 20px 20px; background: var(--panel); }
.org-name { font-family: var(--serif); font-size: 1.36rem; line-height: 1.2; }
.org-kinds { color: var(--muted-ink); font-size: .86rem; line-height: 1.5; }
.more { margin-top: 30px; }
.arrow-link {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 0;
  color: var(--accent-ink); font-weight: 600; font-size: .95rem; text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
}
.arrow-link::after { content: "\2192"; transition: translate .25s var(--ease); }
.arrow-link:hover::after { translate: 4px 0; }
@media (min-width: 760px) {
  .org-cards { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

/* ------------------------------------------------------- portfolio view */
.work-hero { position: relative; padding-block: clamp(26px, 4vw, 44px) clamp(48px, 7vw, 84px); background: var(--shade); border-bottom: 1px solid var(--hair); }
.back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--muted-ink); font-size: .86rem; text-decoration: none; transition: color .2s;
}
.back::before { content: "\2190"; color: var(--accent-ink); }
.back:hover { color: var(--text); }
.display {
  font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 10vw, 5.4rem);
  line-height: 1; letter-spacing: -.012em; margin-top: clamp(18px, 4vw, 40px);
}
.aside-note { font-family: var(--serif); font-style: italic; font-size: 1.16rem; color: var(--muted-ink); margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chips a {
  display: inline-flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 9px 18px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  font-size: .9rem; text-decoration: none; transition: border-color .2s, color .2s;
}
.chips a:hover { border-color: var(--accent); color: var(--accent-ink); }

.org-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.org-title { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 5.4vw, 3.2rem); line-height: 1.05; letter-spacing: -.008em; }
.org-sub { flex-basis: 100%; color: var(--muted-ink); font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.sub { margin-top: 48px; }
.lead { font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; color: var(--text); margin-top: 28px; }

.link-cards { display: grid; gap: 14px; margin-top: 30px; }
.link-card { padding: 22px 22px 12px; }
.link-card h4 { font-family: var(--serif); font-weight: 400; font-size: 1.42rem; line-height: 1.2; }
.link-card ul { margin-top: 12px; }
.link-card li { border-top: 1px solid var(--hair); }
.link-card a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 12px 0;
  color: var(--soft-text); font-size: .94rem; line-height: 1.45; text-decoration: none; transition: color .2s;
}
.link-card a::after { content: "\2197"; color: var(--accent-ink); flex: none; }
.link-card a:hover { color: var(--accent-ink); }
@media (min-width: 760px) {
  .link-cards { grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
}

.videos { display: grid; gap: 22px 18px; margin-top: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.videos.two { margin-top: 30px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.video {
  position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel2);
}
.video img { width: 100%; height: 100%; object-fit: cover; transition: scale .6s var(--ease), opacity .3s; }
.video:hover img { scale: 1.03; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play {
  position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; translate: -50% -50%;
  border-radius: 50%; background: var(--accent); box-shadow: 0 10px 30px -8px rgb(0 0 0 / .6);
  transition: scale .25s var(--ease);
}
.play::after {
  content: ""; position: absolute; left: 54%; top: 50%; width: 18px; height: 20px; translate: -50% -50%;
  background: var(--on-accent); clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.video:hover .play { scale: 1.08; }
.video-card figcaption { margin-top: 12px; color: var(--soft-text); font-size: .93rem; line-height: 1.55; }
.video-card figcaption strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.28rem; line-height: 1.25; color: var(--text); margin-bottom: 6px; }

.event { margin-top: clamp(40px, 6vw, 64px); }
.event-head h4, .series-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3.6vw, 2.1rem); line-height: 1.18; text-wrap: balance; }
.event-head h4 { margin-top: 8px; }
.for { font-family: var(--serif); font-style: italic; font-size: 1.14rem; line-height: 1.4; color: var(--muted-ink); margin-top: 4px; }
.event-head .body { margin-top: 14px; }
.series-head, .articles { margin-top: clamp(56px, 8vw, 88px); padding-top: clamp(30px, 4vw, 44px); border-top: 1px solid var(--line); }
.series-head + .event { margin-top: 30px; }
.features { display: grid; gap: 12px; margin-top: 24px; }
.features.two { grid-template-columns: repeat(2, 1fr); }
.feature { display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel2); cursor: zoom-in; }
.feature img { width: 100%; object-fit: cover; transition: scale .6s var(--ease); }
.feature:hover img { scale: 1.025; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.thumb { overflow: hidden; border-radius: 9px; background: var(--panel2); cursor: zoom-in; aspect-ratio: 4 / 3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: scale .5s var(--ease); }
.thumb:hover img { scale: 1.05; }
.gallery:not(.open) .thumb:nth-child(n + 9) { display: none; }
.gallery.few { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.gallery.few .thumb { border-radius: var(--radius); border: 1px solid var(--line); }
.gallery-more {
  grid-column: 1 / -1; justify-self: start; min-height: 44px; margin-top: 6px; padding: 0 2px;
  color: var(--accent-ink); font-size: .9rem; font-weight: 600; border-bottom: 1px solid var(--accent-line);
}
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(8, 1fr); gap: 10px; }
  .gallery.few { grid-template-columns: repeat(4, 1fr); }
  .event { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 0 48px; align-items: start; }
  .event > .gallery { grid-column: 1 / -1; }
  .event > .features { margin-top: 0; }
  .event > .features + .gallery { margin-top: 14px; }
  .event:not(:has(.features)) { grid-template-columns: 1fr; }
  .event:not(:has(.features)) .event-head { max-width: 46em; }
}

.article-list { margin-top: 26px; }
.article-list li { display: grid; grid-template-columns: 2.2em 1fr; gap: 6px; padding: 22px 0; border-top: 1px solid var(--hair); }
.article-list .num { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; letter-spacing: 0; line-height: 1.25; }
.article-list h5 { font-family: var(--serif); font-weight: 400; font-size: 1.36rem; line-height: 1.25; text-wrap: balance; }
.article-list h5 a { text-decoration: none; background: linear-gradient(var(--accent-line), var(--accent-line)) 0 100% / 100% 1px no-repeat; transition: color .2s; }
.article-list h5 a::after { content: " \2197"; color: var(--accent-ink); font-family: var(--sans); font-size: .8em; }
.article-list h5 a:hover { color: var(--accent-ink); }
.article-list p { color: var(--soft-text); font-size: .95rem; line-height: 1.65; margin-top: 8px; max-width: 46em; text-wrap: pretty; }
@media (min-width: 880px) {
  .articles { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 56px; }
  .article-list { margin-top: 0; }
  .article-list li:first-child { border-top: 0; padding-top: 0; }
}

/* -------------------------------------------------------------- contact */
.contact { border-top: 1px solid var(--hair); overflow: clip; }
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(58% 46% at 50% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 72%);
}
.view[data-view="home"]:not([hidden]) ~ .contact { border-top: 0; }
.contact > .wrap { position: relative; }
.contact-grid { display: grid; gap: 40px; }
.direct { margin-top: 30px; border-top: 1px solid var(--line); }
.direct li { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.direct a { font-family: var(--serif); font-size: clamp(1.18rem, 4.6vw, 1.4rem); line-height: 1.3; overflow-wrap: anywhere; }
.contact-form { display: grid; gap: 16px; padding: clamp(20px, 4vw, 30px); }
.topic { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topic legend { color: var(--muted-ink); font-size: .84rem; margin-bottom: 10px; }
.topic label { position: relative; }
.topic input { position: absolute; opacity: 0; inset: 0; }
.topic span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.topic input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.topic input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.row { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { color: var(--muted-ink); font-size: .84rem; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 16px; line-height: 1.5; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 132px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.bad input, .field.bad textarea { border-color: var(--down); box-shadow: 0 0 0 3px var(--down-soft); }
.contact-form .btn { justify-self: start; min-width: 148px; }
.form-status { font-size: .92rem; line-height: 1.55; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--up); }
.form-status.err { color: var(--down); }
.crisis {
  margin-top: clamp(40px, 6vw, 64px); padding-top: 22px; border-top: 1px solid var(--hair);
  color: var(--muted-ink); font-size: .84rem; line-height: 1.6;
}
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 880px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
}

/* --------------------------------------------------------------- footer */
.site-foot { padding-block: clamp(44px, 6vw, 64px) calc(env(safe-area-inset-bottom) + 34px); border-top: 1px solid var(--hair); }
.foot-grid { display: grid; gap: 30px; }
.foot-text { color: var(--muted-ink); font-size: .86rem; line-height: 1.6; max-width: 30em; margin-top: 12px; }
.foot-links { display: grid; gap: 4px; align-content: start; justify-items: start; }
.foot-links a { padding: 5px 0; color: var(--soft-text); font-size: .92rem; text-decoration: none; overflow-wrap: anywhere; transition: color .2s; }
.foot-links a:hover { color: var(--accent-ink); }
.foot-base { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--hair); }
.theme-row { margin-top: 0; display: flex; align-items: center; gap: 12px; justify-content: center; }
.theme-label { color: var(--muted-ink); font-size: 0.75rem; }
.theme-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); padding: 0; }
.theme-dot.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.foot-note { color: var(--muted-ink); font-size: 0.72rem; text-align: center; margin-top: 16px; line-height: 1.5; }
@media (min-width: 760px) {
  .foot-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr) minmax(0, 1fr); gap: 48px; }
}

/* ------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; color: var(--text);
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.lightbox figure {
  display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center; gap: 12px;
  width: 100%; height: 100%;
  padding: calc(env(safe-area-inset-top) + 64px) 14px calc(env(safe-area-inset-bottom) + 22px);
  touch-action: pan-y;
}
.lightbox img {
  max-width: 100%; max-height: 100%; min-height: 0; width: auto; height: auto; object-fit: contain;
  border-radius: 8px; box-shadow: 0 30px 80px -30px rgb(0 0 0 / .7); transition: opacity .2s ease;
}
.lightbox img.loading { opacity: .35; }
.lightbox figcaption { color: var(--muted-ink); font-size: .84rem; text-align: center; min-height: 1.6em; font-variant-numeric: tabular-nums; }
.lb-btn {
  position: absolute; display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, transparent);
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  transition: border-color .2s, color .2s;
}
.lb-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.lb-close { top: calc(env(safe-area-inset-top) + 10px); right: calc(env(safe-area-inset-right) + 12px); }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; padding: 0; font-size: 1.1rem; letter-spacing: 0; }
.lb-prev { left: calc(env(safe-area-inset-left) + 12px); }
.lb-next { right: calc(env(safe-area-inset-right) + 12px); }
@media (max-width: 759px) {
  .lb-prev, .lb-next { top: auto; bottom: calc(env(safe-area-inset-bottom) + 12px); translate: none; }
  .lightbox figure { padding-bottom: calc(env(safe-area-inset-bottom) + 72px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
