/* ==========================================================================
   Precious Obasa — "Sunrise" direction
   Study: a bold editorial brand system — aubergine / red / dusty orange / light blue / limestone,
   a light high-contrast serif, a sunburst mark, fine line-art motifs, arched sunrise gradients,
   geometric photo collage and small rotating circular stamps.
   Every page is a colour-world poster followed by a calm limestone page.
   ========================================================================== */

:root {
  --red: #EF4520;
  --orange: #F97D24;
  --aub: #340716;
  --blue: #C8DAFF;
  --lime: #FAF5F2;
  --cream: #FCEFE0;
  --white: #FFFFFF;
  --grey: #EBEBE7;
  --ink: #340716;
  --ink-red: #230509;
  --ink-2: rgba(52, 7, 22, 0.76);
  --line: rgba(52, 7, 22, 0.16);
  --surface: #FFFFFF;
  --surface-2: #FCEFE0;
  --btn-bg: #340716;
  --btn-fg: #FCEFE0;
  --hdr-bg: rgba(250, 245, 242, 0.92);
  --acc: #9E2A14;
  --m-red: #D8401F;
  --tri: #CBDBFB;
  --half: #F6BE8C;
  /* colour worlds: soft and light in light mode */
  --w-red: #F7CDBC; --w-red-fg: #340716; --w-red-m: #340716;
  --w-orange: #FBDFBC; --w-orange-fg: #340716; --w-orange-m: #340716;
  --w-aub: #E7D4DC; --w-aub-fg: #340716; --w-aub-m: #B3321A;
  --w-blue: #D3E1FF; --w-blue-fg: #340716; --w-blue-m: #D8401F;
  --w-cream: #FCEFE0; --w-cream-fg: #340716; --w-cream-m: #D8401F;
  --w-sun: linear-gradient(180deg, #FCEFE0 0%, #F8D5C4 38%, #FBDDB9 66%, #D3E1FF 100%); --w-sun-fg: #340716; --w-sun-m: #340716;
  --serif: 'Instrument Serif', 'Iowan Old Style', 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --edge: clamp(8px, 1.1vw, 14px);
  --r: clamp(16px, 1.8vw, 26px);
  --gutter: clamp(20px, 4vw, 64px);
  --gap: clamp(12px, 1.5vw, 20px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --lime: #1B0510;
  --ink: #FCEFE0;
  --ink-2: rgba(252, 239, 224, 0.78);
  --line: rgba(252, 239, 224, 0.2);
  --surface: #2A0A18;
  --surface-2: #35101F;
  --btn-bg: #FCEFE0;
  --btn-fg: #340716;
  --hdr-bg: rgba(27, 5, 16, 0.9);
  --acc: #FF9C66;
  --m-red: #E0805E;
  --tri: #2F3F73;
  --half: #7A3D1A;
  /* ...and deep and muted in dark mode */
  --w-red: #561A1C; --w-red-fg: #FCEFE0; --w-red-m: #D9805E;
  --w-orange: #5A3014; --w-orange-fg: #FCEFE0; --w-orange-m: #F2A76B;
  --w-aub: #2E0E1D; --w-aub-fg: #FCEFE0; --w-aub-m: #A9C0F2;
  --w-blue: #1E2A4D; --w-blue-fg: #FCEFE0; --w-blue-m: #9DB8F5;
  --w-cream: #34101F; --w-cream-fg: #FCEFE0; --w-cream-m: #F59A5A;
  --w-sun: linear-gradient(180deg, #1B0510 0%, #4A0F20 26%, #6A2A1C 58%, #5A3A33 76%, #26305A 100%); --w-sun-fg: #FCEFE0; --w-sun-m: #FCEFE0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--red) var(--lime); }
body {
  margin: 0; background: var(--lime); color: var(--ink); font-family: var(--sans);
  font-size: clamp(0.98rem, 0.3vw + 0.9rem, 1.12rem); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--red); color: var(--cream); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
em { font-style: italic; }
input, textarea { caret-color: var(--red); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--aub); color: var(--cream); padding: 10px 18px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(1320px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }

/* ---------- type ---------- */
.d1 { font-size: clamp(2.9rem, 6.6vw + 0.4rem, 7.4rem); line-height: 0.95; }
.d2 { font-size: clamp(2.6rem, 5.4vw + 0.4rem, 6.2rem); line-height: 0.97; }
.h2 { font-size: clamp(1.8rem, 2.8vw + 0.8rem, 3.6rem); line-height: 1.04; }
.h3 { font-size: clamp(1.4rem, 1.5vw + 0.9rem, 2.2rem); line-height: 1.1; }
.lead { font-size: clamp(1.08rem, 0.7vw + 0.95rem, 1.45rem); line-height: 1.55; }
.small { font-size: 0.88rem; }
.label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 60; padding-block: 14px; transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease; color: var(--hc, var(--ink)); }
.site-header.scrolled { background: var(--hdr-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); color: var(--ink); padding-block: 8px; }
.hdr-light { --hc: var(--cream); }
.hdr-dark { --hc: var(--ink-red); }
.bar { display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.55rem; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-left: 2px; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.primary { display: flex; gap: clamp(2px, 0.6vw, 8px); margin-left: auto; }
.primary a { padding: 8px 12px; border-radius: 999px; text-decoration: none; font-size: 0.9rem; font-weight: 500; position: relative; }
.primary a:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.primary a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 1.5px; background: currentColor; }
.bar-actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; place-items: center; }
.menu-btn svg { width: 20px; height: 20px; }
.menu-panel { position: fixed; inset: 0; z-index: 80; background: var(--aub); color: var(--cream); padding: 90px var(--gutter) 40px; display: none; align-content: start; gap: 4px; overflow: auto; }
.menu-panel.open { display: grid; animation: fade 0.3s ease; }
.menu-panel a { font-family: var(--serif); font-size: clamp(2.2rem, 8vw, 4rem); line-height: 1.15; text-decoration: none; border-bottom: 1px solid rgba(252, 239, 224, 0.18); padding: 6px 0; display: flex; justify-content: space-between; align-items: baseline; }
.menu-panel a[aria-current="page"] { color: var(--orange); }
.menu-panel a svg { width: 22px; height: 22px; flex: none; }
.menu-panel .mclose { position: absolute; top: 14px; right: var(--gutter); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--cream); background: transparent; color: var(--cream); display: grid; place-items: center; cursor: pointer; padding: 0; font-size: 0; }
.menu-panel .mclose svg { width: 20px; height: 20px; }
@media (max-width: 1180px) { .primary { display: none; } .menu-btn { display: grid; } .bar-actions { margin-left: auto; } }
@media (max-width: 560px) { .bar-actions .btn { display: none; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font: 600 0.95rem/1 var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; transition: transform 0.15s ease, translate 0.2s ease, background-color 0.2s ease, color 0.2s ease; }
.btn:active { transform: scale(0.97); }
.btn:hover { translate: 0 -2px; }
.btn svg { width: 16px; height: 16px; transition: translate 0.25s var(--ease); }
.btn:hover svg { translate: 3px 0; }
.btn-dark { background: var(--btn-bg); color: var(--btn-fg); }
.btn-dark:hover { opacity: 0.88; }
.btn-red { background: var(--red); color: var(--ink-red); }
.btn-red:hover { background: #ff5530; }
.btn-light { background: var(--cream); color: var(--aub); }
.btn-light:hover { background: #fff; }
.btn-line { border-color: currentColor; color: inherit; background: transparent; }
.btn-line:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* ---------- poster (full-bleed colour world) ---------- */
.poster { --btn-bg: var(--aub); --btn-fg: var(--cream); position: relative; isolation: isolate; overflow: hidden; margin: var(--edge); border-radius: var(--r); background: var(--bg); color: var(--fg); }
.p-red { --bg: var(--red); --fg: var(--ink-red); --m: var(--aub); }
.p-orange { --bg: var(--orange); --fg: var(--aub); --m: var(--aub); }
.p-aub { --bg: var(--aub); --fg: var(--cream); --m: var(--blue); }
.p-blue { --bg: var(--blue); --fg: var(--aub); --m: var(--red); }
.p-cream { --bg: var(--cream); --fg: var(--aub); --m: var(--red); }
.p-sun { --bg: linear-gradient(180deg, var(--aub) 0%, #6b1427 22%, var(--red) 52%, var(--orange) 70%, var(--blue) 100%); --fg: var(--cream); --m: var(--cream); }
.poster-inner { min-height: clamp(520px, 74svh, 820px); display: grid; align-items: center; gap: clamp(28px, 5vw, 80px); padding-block: clamp(110px, 12vw, 150px) clamp(40px, 5vw, 80px); }
.poster.home .poster-inner { min-height: min(900px, calc(100svh - 2 * var(--edge))); }
.poster .copy { display: grid; gap: clamp(18px, 2.4vw, 32px); align-content: center; position: relative; z-index: 2; }
.poster .art { position: relative; z-index: 1; }
@media (min-width: 980px) { .poster-inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .poster-inner.art-left { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .poster-inner.art-left .art { order: -1; } }
.poster .kicker { display: inline-flex; align-items: center; gap: 10px; width: fit-content; }
.poster .kicker::before { content: ""; width: 26px; height: 1.5px; background: currentColor; }
.motif { color: var(--m); width: 100%; height: auto; display: block; overflow: visible; }
.motif .spin { transform-box: fill-box; transform-origin: center; animation: spin 90s linear infinite; animation-play-state: paused; }
.poster.motion-in-view .motif .spin { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.poster a:not(.btn) { text-decoration-color: color-mix(in srgb, currentColor 50%, transparent); }

/* home collage */
.collage { position: relative; width: min(100%, 560px); aspect-ratio: 1; margin-inline: auto; }
.collage .rays { position: absolute; inset: -10%; width: 120%; height: 120%; color: var(--aub); }
.collage .tri { position: absolute; width: 62%; aspect-ratio: 1; right: -4%; top: 2%; background: var(--blue); clip-path: polygon(0 100%, 100% 100%, 100% 0); }
.collage .half { position: absolute; width: 46%; aspect-ratio: 2 / 1; left: 0; bottom: 6%; background: var(--orange); border-radius: 999px 999px 0 0; }
.collage .photo { position: absolute; width: 66%; aspect-ratio: 1; left: 17%; top: 12%; border-radius: 50%; overflow: hidden; border: 6px solid var(--cream); }
.collage .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; }
.collage .pip { position: absolute; width: 11%; aspect-ratio: 1; border-radius: 50%; background: var(--cream); right: 8%; bottom: 14%; }
.collage .stamp { position: absolute; left: -2%; top: 4%; }
.fact { position: absolute; z-index: 3; background: var(--cream); color: var(--aub); border-radius: 18px; padding: 12px 16px; max-width: 240px; font-size: 0.82rem; line-height: 1.4; box-shadow: 0 18px 30px -20px rgba(35, 5, 9, 0.7); }
.fact b { font-family: var(--serif); font-weight: 400; font-size: 2.1rem; line-height: 1; display: block; letter-spacing: -0.03em; }
.fact.f1 { right: -2%; bottom: 8%; } .fact.f2 { left: -4%; bottom: 22%; }
@media (max-width: 979px) { .fact.f1 { right: 0; } .fact.f2 { left: 0; } }

/* stamps (rotating circular text) */
.stamp { width: clamp(76px, 7vw, 104px); aspect-ratio: 1; border-radius: 50%; background: var(--cream); color: var(--aub); display: grid; place-items: center; position: relative; flex: none; }
.stamp svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 24s linear infinite; animation-play-state: paused; }
.motion-in-view .stamp svg.ring, .poster.motion-in-view .stamp svg.ring { animation-play-state: running; }
.stamp svg.ring text { font: 600 9.6px var(--sans); letter-spacing: 0.16em; text-transform: uppercase; fill: currentColor; }
.stamp .arr { width: 34%; height: 34%; transition: rotate 0.35s var(--ease); }
a:hover .stamp .arr, .stamp:hover .arr { rotate: -45deg; }
.stamp.dark { background: var(--aub); color: var(--cream); }
.stamp.red { background: var(--red); color: var(--ink-red); }

/* ---------- sections ---------- */
.section { padding-block: clamp(36px, 6vw, 96px); }
.stack { display: grid; gap: var(--gap); }
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
html.js .reveal.in { opacity: 1; transform: none; }
.rise { animation: rise 0.95s var(--ease) both; animation-delay: calc(var(--d, 0) * 110ms); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }

.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(22px, 3vw, 44px); border-bottom: 1.5px solid var(--ink); padding-bottom: 14px; }

/* poster cards (home index) */
.cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.pcard { position: relative; display: flex; flex-direction: column; min-height: clamp(380px, 34vw, 500px); border-radius: 12px; overflow: hidden; background: var(--bg); color: var(--fg); text-decoration: none; transition: translate 0.4s var(--ease); isolation: isolate; }
.pcard:hover { translate: 0 -8px; }
.pcard .top { padding: clamp(18px, 1.8vw, 26px); display: grid; gap: 14px; position: relative; z-index: 2; }
.pcard .top .h3 { font-size: clamp(1.5rem, 1.5vw + 1rem, 2.2rem); line-height: 1.04; }
.pcard .art { position: absolute; inset: auto 0 0 0; height: 56%; z-index: 0; display: grid; align-items: end; }
.pcard .art .motif { height: 100%; width: 100%; }
.pcard .stamp { position: absolute; right: 14px; bottom: 14px; z-index: 3; width: 72px; }

/* stats */
.numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 48px) var(--gap); }
@media (min-width: 880px) { .numbers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.number { border-top: 1.5px solid currentColor; padding-top: 14px; display: grid; gap: 6px; align-content: start; }
.number b { font-family: var(--serif); font-weight: 400; font-size: clamp(3.2rem, 5.4vw + 0.5rem, 6.8rem); line-height: 0.95; letter-spacing: -0.04em; color: var(--red); }
.p-aub .number b, .panel.aub .number b { color: var(--orange); }
.p-red .number b { color: var(--aub); }
.number span { font-size: 0.92rem; }

/* panels */
.panel { position: relative; overflow: hidden; border-radius: 14px; padding: clamp(22px, 3vw, 44px); background: var(--white); color: var(--aub); }
.panel.aub { background: var(--aub); color: var(--cream); } .panel.blue { background: var(--blue); } .panel.orange { background: var(--orange); } .panel.red { background: var(--red); color: var(--ink-red); } .panel.cream { background: var(--cream); }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid > * { grid-column: span 12; }
@media (min-width: 800px) { .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } }
.big { font-family: var(--serif); font-size: clamp(1.7rem, 2.8vw + 0.8rem, 3.4rem); line-height: 1.08; letter-spacing: -0.02em; }

/* timeline */
.tl { display: grid; }
.tl-row { display: grid; gap: 6px 40px; padding: clamp(22px, 2.6vw, 34px) 0; border-top: 1.5px solid var(--ink); }
.tl-row:last-child { border-bottom: 1.5px solid var(--ink); }
.tl-yr { font-family: var(--serif); font-size: clamp(2rem, 2.8vw + 0.8rem, 3.6rem); line-height: 1; color: var(--red); letter-spacing: -0.03em; }
.tl-role { font-weight: 600; font-size: clamp(1.05rem, 0.5vw + 1rem, 1.3rem); }
.tl-co { font-weight: 400; opacity: 0.7; }
@media (min-width: 800px) { .tl-row { grid-template-columns: minmax(180px, 3fr) minmax(0, 9fr); align-items: baseline; } }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pill { padding: 12px 24px; border-radius: 999px; border: 1.5px solid currentColor; font-weight: 600; transition: background-color 0.2s ease, color 0.2s ease, translate 0.2s ease; }
.pill:hover { background: var(--aub); color: var(--cream); translate: 0 -3px; }
.split { display: grid; gap: clamp(28px, 4vw, 72px); }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; } .split.photo { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; } .split.photo.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .sticky { position: sticky; top: 100px; } }

/* credentials (poster tickets) */
.tickets { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.ticket { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: clamp(260px, 22vw, 330px); padding: clamp(22px, 2.4vw, 32px); border-radius: 12px; overflow: hidden; background: var(--bg); color: var(--fg); transition: translate 0.4s var(--ease); }
.ticket:hover { translate: 0 -6px; }
.ticket .h3 { font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem); }
.ticket .foot { margin-top: auto; padding-top: 22px; font-size: 0.86rem; border-top: 1.5px solid currentColor; }

/* research */
.papers { display: grid; }
.paper { display: grid; gap: 14px 40px; padding: clamp(26px, 3.2vw, 46px) 0; border-top: 1.5px solid var(--ink); }
.paper:last-child { border-bottom: 1.5px solid var(--ink); }
@media (min-width: 900px) { .paper { grid-template-columns: minmax(160px, 2fr) minmax(0, 7fr) minmax(0, 3fr); align-items: start; } }
.paper .where { font-size: 0.88rem; display: grid; gap: 6px; align-content: start; }
.paper .rank { color: var(--red); font-weight: 600; }
.paper .h3 { font-size: clamp(1.6rem, 2vw + 1rem, 2.7rem); line-height: 1.04; }
.paper .desc { margin-top: 10px; opacity: 0.85; }
.paper .authors { margin-top: 14px; font-size: 0.84rem; line-height: 1.65; display: grid; opacity: 0.85; }
.paper .actions { display: flex; flex-wrap: wrap; gap: 10px; align-content: start; }
@media (min-width: 900px) { .paper .actions { justify-content: flex-end; } }
.feature-paper { display: grid; gap: 26px; align-items: end; margin-top: clamp(10px, 2vw, 28px); padding-top: clamp(22px, 3vw, 40px); border-top: 1.5px solid currentColor; }
@media (min-width: 900px) { .feature-paper { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }
.feature-paper .rank { font-weight: 600; margin-top: 10px; }
.feature-paper .authors { margin-top: 16px; font-size: 0.86rem; display: grid; }

/* marquee */
.marquee { overflow: hidden; margin-top: 18px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { --mgap: clamp(40px, 5vw, 72px); display: flex; align-items: center; gap: var(--mgap); padding-right: var(--mgap); width: max-content; animation: marquee 38s linear infinite; animation-play-state: paused; }
.marquee.motion-in-view .marquee-track { animation-play-state: running; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.logo { height: clamp(24px, 2.2vw, 32px); width: auto; flex: none; filter: brightness(0) opacity(0.72); }
.p-aub .logo, .panel.aub .logo { filter: brightness(0) invert(1) opacity(0.8); }
.logo-text { font-family: var(--serif); font-size: 1.7rem; letter-spacing: 0.06em; flex: none; opacity: 0.75; }
.partners-img { height: clamp(40px, 4vw, 56px); width: auto; flex: none; filter: brightness(0) opacity(0.7); }

.typewriter { white-space: nowrap; font-style: italic; }
.tw-cursor { animation: blink 1s step-end infinite; font-style: normal; }
@keyframes blink { 50% { opacity: 0; } }

/* photos */
.frame { position: relative; overflow: hidden; border-radius: 12px; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.arch { border-radius: 999px 999px 12px 12px; }

.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.7rem, 2.6vw + 0.8rem, 3.2rem); line-height: 1.1; letter-spacing: -0.02em; }
.quote cite { display: block; margin-top: 24px; font-style: normal; font-size: 0.92rem; opacity: 0.85; }

/* book */
.book { display: grid; gap: clamp(26px, 4vw, 72px); align-items: center; }
@media (min-width: 860px) { .book { grid-template-columns: minmax(240px, 4fr) minmax(0, 8fr); } }
.cover-wrap { display: grid; place-items: center; perspective: 900px; }
.cover { width: min(100%, 340px); height: auto; aspect-ratio: 2 / 3; border-radius: 6px; object-fit: cover; box-shadow: 0 44px 70px -26px rgba(35, 5, 9, 0.8), 0 14px 22px -12px rgba(35, 5, 9, 0.5); rotate: y -16deg; transition: rotate 0.6s var(--ease), translate 0.6s var(--ease); }
.book:hover .cover { rotate: y 0deg; translate: 0 -8px; }
.book-desc { font-family: var(--serif); font-size: clamp(1.6rem, 2vw + 0.9rem, 2.8rem); line-height: 1.12; letter-spacing: -0.015em; margin-top: 16px; }

/* connect */
.link-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: clamp(22px, 3.4vw, 44px) 0; border-top: 1.5px solid var(--ink); text-decoration: none; color: var(--ink); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; text-align: left; cursor: pointer; }
.link-row:last-child { border-bottom: 1.5px solid var(--ink); }
.link-row .lc-name { display: block; font-family: var(--serif); font-size: clamp(2.6rem, 5.4vw + 0.6rem, 6.4rem); line-height: 0.98; letter-spacing: -0.03em; transition: translate 0.4s var(--ease), color 0.25s ease; }
.link-row:hover .lc-name { translate: 14px 0; color: var(--red); }
.link-row .lc-val { display: block; margin-top: 8px; opacity: 0.75; }

/* next + footer */
.next { display: grid; gap: 26px; align-items: end; padding: clamp(30px, 5vw, 80px); min-height: clamp(300px, 34vw, 480px); text-decoration: none; position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r); margin: var(--edge); background: var(--aub); color: var(--cream); }
.next .d2 { color: var(--cream); margin-top: 14px; }
.next .label { color: var(--orange); }
.next .go { justify-self: end; }
.next .rays { position: absolute; z-index: -1; width: min(60%, 620px); right: -6%; top: -18%; color: var(--red); opacity: 0.9; transition: rotate 1s var(--ease); }
.next:hover .rays { rotate: 18deg; }
@media (min-width: 860px) { .next { grid-template-columns: 1fr auto; } }
.site-footer { margin: var(--edge); padding: clamp(28px, 4vw, 64px); border-radius: var(--r); background: var(--aub); color: var(--cream); display: grid; gap: clamp(28px, 4vw, 56px); position: relative; overflow: hidden; isolation: isolate; }
@media (min-width: 900px) { .site-footer { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.site-footer .wordmark { font-family: var(--serif); font-size: clamp(3rem, 9vw, 9.5rem); line-height: 0.9; letter-spacing: -0.035em; }
.site-footer p { opacity: 0.85; margin-top: 14px; }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; align-content: start; }
.foot-links a { text-decoration: none; padding: 10px 0; font-weight: 500; border-bottom: 1px solid rgba(252, 239, 224, 0.2); }
.foot-links a:hover { color: var(--orange); }
.fineprint { grid-column: 1 / -1; font-size: 0.84rem; opacity: 0.8; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 20px; border-top: 1px solid rgba(252, 239, 224, 0.2); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(35, 5, 9, 0.6); }
.modal.open { display: flex; animation: fade 0.25s ease; }
.modal-card { position: relative; width: min(480px, 100%); background: var(--cream); color: var(--aub); border-radius: 18px; padding: clamp(24px, 3vw, 38px); animation: pop 0.3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.modal-card h3 { font-size: 2.2rem; margin-bottom: 10px; }
.modal-card .small { margin-bottom: 22px; opacity: 0.85; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--aub); background: transparent; color: var(--aub); cursor: pointer; display: grid; place-items: center; }
.modal-close svg { width: 18px; height: 18px; }
.modal form { display: grid; gap: 14px; }
.modal label { display: grid; gap: 6px; font-size: 0.8rem; font-weight: 600; }
.modal input, .modal textarea { font: 400 1rem var(--sans); color: var(--aub); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical; }
.modal input:focus, .modal textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.4s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
}

.p-aub .typewriter { color: var(--orange); }
.p-sun .typewriter { color: var(--cream); }
.d1 { font-size: clamp(2.8rem, 5.4vw + 0.4rem, 6.8rem); }
@media (max-width: 979px) { .fact.f2 { display: none; } .fact.f1 { right: 0; bottom: 1%; } }

/* ---------- themes, back, toggle ---------- */
.site-header:not(.scrolled) .btn-dark { background: var(--aub); color: var(--cream); }
.hdr-light:not(.scrolled) .btn-dark { background: var(--cream); color: var(--aub); }
.panel { background: var(--surface); color: var(--ink); }
.panel.aub { background: var(--aub); color: var(--cream); }
.panel.blue { background: var(--blue); color: var(--aub); }
.panel.orange { background: var(--orange); color: var(--aub); }
.panel.red { background: var(--red); color: var(--ink-red); }
.panel.cream { background: var(--surface-2); color: var(--ink); }
.pill:hover { background: var(--btn-bg); color: var(--btn-fg); }
.modal-card { background: var(--surface-2); color: var(--ink); }
.modal-close { border-color: var(--ink); color: var(--ink); }
.modal input, .modal textarea { background: var(--surface); color: var(--ink); }
[data-theme="dark"] .p-cream { --bg: #34101F; --fg: var(--cream); --m: var(--orange); }
[data-theme="dark"] .logo, [data-theme="dark"] .partners-img { filter: brightness(0) invert(1) opacity(0.82); }
[data-theme="dark"] .panel.blue .logo, [data-theme="dark"] .panel.orange .logo { filter: brightness(0) opacity(0.72); }
[data-theme="dark"] .menu-panel { background: #12030A; }

.theme-toggle, .back { height: 44px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; text-decoration: none; display: inline-grid; place-items: center; transition: background-color 0.2s ease, transform 0.15s ease; }
.theme-toggle { width: 44px; border-radius: 50%; }
.theme-toggle:hover, .back:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.theme-toggle:active, .back:active { transform: scale(0.94); }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; transition: opacity 0.3s ease, transform 0.45s var(--ease); }
.theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg); }
[data-theme="dark"] .theme-toggle .i-sun { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg); }
.back { display: inline-flex; align-items: center; gap: 8px; padding: 0 18px 0 12px; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.back svg { width: 18px; height: 18px; transition: translate 0.25s var(--ease); }
.back:hover svg { translate: -3px 0; }
@media (max-width: 560px) { .back { padding: 0; width: 44px; justify-content: center; } .back span { display: none; } }
@media (max-width: 460px) { .bar { gap: 8px; } .brand { font-size: 1.3rem; gap: 8px; } .brand .dot { display: none; } .bar-actions { gap: 8px; } }
[data-theme="dark"] .pcard.p-aub, [data-theme="dark"] .panel.aub { box-shadow: inset 0 0 0 1px rgba(252, 239, 224, 0.22); }
.where a { text-decoration: underline; text-underline-offset: 3px; }
.where a:hover { color: var(--red); }
[data-theme="dark"] .where a:hover { color: var(--orange); }

/* ---------- colour worlds follow the theme ---------- */
.p-red { --bg: var(--w-red); --fg: var(--w-red-fg); --m: var(--w-red-m); }
.p-orange { --bg: var(--w-orange); --fg: var(--w-orange-fg); --m: var(--w-orange-m); }
.p-aub { --bg: var(--w-aub); --fg: var(--w-aub-fg); --m: var(--w-aub-m); }
.p-blue { --bg: var(--w-blue); --fg: var(--w-blue-fg); --m: var(--w-blue-m); }
.p-cream { --bg: var(--w-cream); --fg: var(--w-cream-fg); --m: var(--w-cream-m); }
.p-sun { --bg: var(--w-sun); --fg: var(--w-sun-fg); --m: var(--w-sun-m); }
[data-theme="dark"] .p-cream { --bg: var(--w-cream); --fg: var(--w-cream-fg); --m: var(--w-cream-m); }
.poster, .pcard { --btn-bg: var(--ink); --btn-fg: var(--lime); }
.p-aub .typewriter, .p-sun .typewriter { color: var(--acc); }
.p-red .number b { color: var(--fg); }
.p-aub .number b, .panel.aub .number b { color: var(--acc); }
.paper .rank { color: var(--acc); }
.where a:hover { color: var(--acc); }

.panel.aub { background: var(--w-aub); color: var(--w-aub-fg); }
.panel.blue { background: var(--w-blue); color: var(--w-blue-fg); }
.panel.orange { background: var(--w-orange); color: var(--w-orange-fg); }
.panel.red { background: var(--w-red); color: var(--w-red-fg); }
.panel.cream { background: var(--w-cream); color: var(--w-cream-fg); }
.panel .label[style] { color: var(--acc) !important; }

.collage .rays { color: var(--m); }
.collage .tri { background: var(--tri); }
.collage .half { background: var(--half); }
.collage .photo { border-color: var(--surface-2); }
.collage .pip, .fact, .stamp { background: var(--surface-2); color: var(--ink); }
.stamp.dark { background: var(--ink); color: var(--lime); }
.fact { box-shadow: 0 18px 30px -20px rgba(35, 5, 9, 0.55); }

/* header reads against the poster in either theme */
.hdr-light, .hdr-dark { --hc: var(--ink); }
.site-header:not(.scrolled) .btn-dark, .hdr-light:not(.scrolled) .btn-dark { background: var(--btn-bg); color: var(--btn-fg); }

/* footer + next card stay as the deep anchors; give them an edge in dark */
[data-theme="dark"] .site-footer, [data-theme="dark"] .next { background: #12030A; box-shadow: inset 0 0 0 1px rgba(252, 239, 224, 0.14); }
[data-theme="dark"] .pcard.p-aub, [data-theme="dark"] .panel.aub { box-shadow: none; }

/* nav: sit inside the poster with the same inset as its content */
.site-header { padding-top: calc(var(--edge) + 14px); padding-bottom: 12px; }
.site-header.scrolled { padding-block: 8px; }
.site-header .wrap { width: min(1320px, calc(100% - 2 * (var(--gutter) + var(--edge)))); }
.bar { gap: 14px; }
.primary { margin-left: auto; padding-inline: 8px; }
.bar-actions { gap: 10px; }
@media (max-width: 1180px) { .bar-actions { margin-left: auto; } }

.fineprint a { text-decoration-color: color-mix(in srgb, currentColor 50%, transparent); }
.fineprint a:hover { color: var(--orange); }
