/* ============================================================================
   KYM S. EVES — Author site
   Cosmic & cinematic. Hand-crafted, framework-free.
   Sections: tokens · base · typography · layout · nav · hero · starfield
             · statement · multiverse · writing · feed · about
             · contact · footer · motion · responsive
   ========================================================================== */

/* ----------------------------------------------------------------- tokens -- */
:root {
  /* surfaces — warm near-black with a faint violet undertone */
  --bg:        #060509;
  --bg-2:      #0a0911;
  --panel:     #100e1b;
  --panel-2:   #15121f;

  /* ink */
  --ink:       #f5f1e8;   /* warm off-white, never clinical */
  --ink-dim:   #c3bdce;
  --muted:     #8d88a0;
  --faint:     #6f6b84;

  /* lines */
  --line:      rgba(245, 241, 232, 0.09);
  --line-2:    rgba(245, 241, 232, 0.16);

  /* cosmic accents */
  --gold:      #e9b35a;   /* signature — the portal glow */
  --gold-soft: #f6d8a2;
  --violet:    #8a6bff;
  --cyan:      #54d3e0;
  --magenta:   #d65c9a;

  /* gradients */
  --grad-portal: conic-gradient(from 210deg,
                  #f6d8a2, #e9b35a, #b9722e, #5e3aa6,
                  #8a6bff, #54d3e0, #f6d8a2);
  --grad-text:   linear-gradient(100deg, var(--gold-soft), var(--gold) 45%, var(--magenta));

  /* type */
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-cinema:  "Cormorant Garamond", "Fraunces", Georgia, serif;
  --f-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono:    "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* rhythm */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --hero-indent: 72px; /* shared left offset: hero text + nav brand stay aligned */
  --section-y: clamp(4rem, 8vw, 7rem);
  --radius: 18px;

  /* spacing scale */
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;

  /* uppercase-label tracking — one family, two roles */
  --ls-label: 0.3em;  /* eyebrows + mono kickers */
  --ls-btn:   0.2em;  /* buttons */

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* deep-space backdrop layered behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1100px 800px at 78% -10%, rgba(138, 107, 255, 0.16), transparent 60%),
    radial-gradient(900px 700px at 12% 8%,  rgba(233, 179, 90, 0.10), transparent 55%),
    radial-gradient(1200px 900px at 50% 110%, rgba(84, 211, 224, 0.08), transparent 60%),
    var(--bg);
}

/* cinematic film grain */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 50;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -4%); }
  60% { transform: translate(-2%, 2%); }
  80% { transform: translate(2%, -2%); }
}

::selection { background: rgba(233, 179, 90, 0.28); color: var(--ink); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* custom cursor glow (desktop only, toggled by JS) */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 60;
  background: radial-gradient(circle, rgba(233,179,90,0.55), transparent 70%);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease), opacity .3s;
  opacity: 0;
}
body.has-cursor .cursor-glow { opacity: 1; }
body.cursor-hot .cursor-glow { width: 64px; height: 64px; }

/* scroll progress */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0;
  z-index: 45;
  background: linear-gradient(90deg, var(--gold), var(--magenta), var(--violet));
  box-shadow: 0 0 12px rgba(233, 179, 90, 0.6);
}

/* ------------------------------------------------------------- typography -- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  font-optical-sizing: auto;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.eyebrow.center::after {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(270deg, var(--gold), transparent);
}

.display-xl {
  font-size: clamp(3.2rem, 12vw, 9.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.92;
}
.section-title {
  font-size: clamp(2.05rem, 1.4rem + 2.4vw, 3.5rem);
  font-weight: 500;
}
.lead {
  font-size: clamp(1.1rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.55;
  color: var(--ink-dim);
  font-weight: 400;
}
/* Feed intro matches the body-paragraph size used elsewhere (e.g. the Writing section) */
.feed .lead { font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem); line-height: 1.6; }
.muted { color: var(--muted); }
.serif-accent { font-family: var(--f-display); font-style: italic; }
.text-grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------- layout --- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section {
  position: relative;
  padding-block: var(--section-y);
}
/* the scroll-expand portal must stay a tall block (sticky child needs the runway) */
.expanse { display: block; }
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head .lead { margin-top: 1.4rem; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------------------------------------------------------------- buttons - */
/* unified glass-pill buttons — same language as the hero sound toggle */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.65rem;
  border-radius: 100px;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--line-2);
  background: rgba(6, 5, 9, 0.42);
  backdrop-filter: blur(10px);
  transition: color .3s, border-color .3s, background .3s, box-shadow .4s;
}
.btn svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.btn:hover { color: var(--ink); border-color: rgba(245, 241, 232, 0.32); background: rgba(6, 5, 9, 0.62); }
.btn:hover svg { transform: translateX(4px); }

/* primary — same glass form, gold accent + soft glow */
.btn-primary {
  color: var(--gold);
  border-color: rgba(233, 179, 90, 0.4);
  background: rgba(233, 179, 90, 0.06);
}
.btn-primary:hover {
  color: var(--gold-soft);
  border-color: rgba(233, 179, 90, 0.7);
  background: rgba(233, 179, 90, 0.12);
  box-shadow: 0 0 30px -10px rgba(233, 179, 90, 0.45);
}

/* ghost — the plain glass variant */
.btn-ghost { color: var(--ink-dim); }
.btn-ghost:hover { color: var(--ink); }

/* ---- shiny sweep — the shadcn ShinyButton effect, recreated in pure CSS ----
   A registered custom property (--x) is animated, driving a diagonal light
   band across the surface and a shimmering gradient border. No JS / framer. */
@property --x {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 100%;
}
@keyframes btn-shine {
  0%   { --x: 100%; }
  55%  { --x: -100%; }
  100% { --x: -100%; }
}
.btn {
  --shine: 245, 241, 232;            /* light sweep for ghost buttons */
  overflow: hidden;
  animation: btn-shine 5s ease-in-out infinite;
}
.btn-primary { --shine: 246, 216, 162; } /* warm gold sweep for primaries */
.btn:active { transform: scale(0.96); } /* the whileTap feel */

/* moving sheen across the button surface */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(-75deg,
    transparent calc(var(--x) + 18%),
    rgba(var(--shine), 0.22) calc(var(--x) + 26%),
    transparent calc(var(--x) + 38%));
}
/* shimmering gradient border (masked to a 1px ring) */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(-75deg,
    rgba(var(--shine), 0.05) calc(var(--x) + 18%),
    rgba(var(--shine), 0.65) calc(var(--x) + 26%),
    rgba(var(--shine), 0.05) calc(var(--x) + 100%));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
}

.btn-text {
  padding: 0;
  background: none;
  color: var(--gold);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.btn-text:hover { color: var(--gold-soft); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* ------------------------------------------------------------------- nav --- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--gutter);
  transition: padding .4s var(--ease), background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding-block: 0.9rem;
  background: rgba(8, 7, 13, 0.72);
  backdrop-filter: blur(16px) saturate(1.1);
  border-bottom-color: var(--line);
}
/* ---- brand lockup: monogram + wordmark + micro-tag ---- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  white-space: nowrap;
}
/* align the nav logo with the hero text's left edge */
.nav .brand { margin-left: var(--hero-indent); }
/* mirror that inset on the right so the links balance the logo (desktop only) */
@media (min-width: 941px) {
  .nav > nav { margin-left: auto; margin-right: var(--hero-indent); }
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  transition: transform .7s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(20deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand-initial {
  color: var(--gold);
  font-style: italic;
  letter-spacing: 0;
  margin: 0 0.04em;
}
.brand-tag {
  font-family: var(--f-mono);
  font-size: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.4rem;
  padding-left: 0.12em;
}
/* large variant — footer */
.brand-lg { gap: 0.85rem; }
.brand-lg .brand-mark { width: 46px; height: 46px; }
.brand-lg .brand-name { font-size: 1.5rem; letter-spacing: 0.14em; }
.brand-lg .brand-tag { font-size: 0.55rem; letter-spacing: 0.34em; margin-top: 0.5rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  position: relative;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  padding: 0.3rem 0;
  transition: color .25s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-cta { display: flex; align-items: center; gap: 1rem; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  align-items: flex-end;
}
.nav-toggle span {
  display: block;
  height: 1.5px; width: 26px;
  background: var(--ink);
  transition: transform .4s var(--ease), opacity .3s, width .3s;
}
.nav-toggle span:nth-child(2) { width: 18px; }

/* mobile overlay menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(6, 5, 9, 0.96);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  gap: 0.4rem;
  transform: translateY(-100%);
  transition: transform .6s var(--ease);
  visibility: hidden;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu a {
  font-family: var(--f-display);
  font-size: clamp(2rem, 9vw, 3.4rem);
  font-weight: 500;
  color: var(--ink);
  padding: 0.4rem 0;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
}
.mobile-menu.open a { animation: menuIn .6s var(--ease) forwards; }
.mobile-menu a .num {
  font-family: var(--f-mono);
  font-size: 0.8rem;
  color: var(--gold);
}
@keyframes menuIn { to { opacity: 1; transform: translateY(0); } }
.mobile-menu .mobile-foot {
  margin-top: 2rem;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------------ hero --- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 6rem var(--gutter) 4rem;
  overflow: hidden;
}
/* full-bleed hero video */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* legibility gradient: dark on the left where the text sits, blends to page below */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(95deg, rgba(6,5,9,0.95) 0%, rgba(6,5,9,0.80) 30%, rgba(6,5,9,0.32) 60%, rgba(6,5,9,0.55) 100%),
    linear-gradient(180deg, rgba(6,5,9,0.55) 0%, transparent 24%, rgba(6,5,9,0.30) 68%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 540px; margin: 0 0 0 var(--hero-indent); }
.hero .eyebrow { margin-bottom: 1.5rem; }
.hero h1 {
  margin: 0.2rem 0 1.4rem;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  letter-spacing: -0.03em;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.1em; }
.hero h1 .line > span { display: block; }
.hero-sub {
  max-width: 440px;
  margin: 0 0 2.2rem;
  color: var(--ink-dim);
  font-size: clamp(0.98rem, 0.92rem + 0.3vw, 1.1rem);
  line-height: 1.6;
}
.hero .btn-row { justify-content: flex-start; }

/* stylised hero statement */
.hero-rule {
  display: block;
  width: 54px;
  height: 2px;
  margin: 0 0 1.9rem 0;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}
.hero-statement {
  font-family: var(--f-cinema);
  font-weight: 500;
  font-size: clamp(2.5rem, 1.3rem + 4vw, 5.4rem);
  line-height: 1.03;
  letter-spacing: -0.005em;
  color: var(--ink);
  max-width: 13ch;
  margin: 0;
  text-wrap: balance;
  text-shadow: 0 2px 36px rgba(0, 0, 0, 0.55);
}
.hero-statement .it { font-style: italic; color: var(--gold-soft); }
.hero-statement .hl {
  font-style: italic;
  font-weight: 600;
  color: var(--gold-soft);
}
.hero-sub2 {
  margin-top: clamp(1.1rem, 2.2vw, 1.7rem);
  max-width: 100%;
  font-family: var(--f-cinema);
  font-style: italic;
  font-size: clamp(1.02rem, 0.92rem + 0.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-dim);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}
.hero-sub2 em { font-style: italic; color: var(--gold-soft); }

/* the portal — animated archway behind the title */
.portal {
  position: absolute;
  top: 46%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(80vw, 620px);
  aspect-ratio: 1;
  z-index: 1;
  pointer-events: none;
}
.portal-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--grad-portal);
  filter: blur(2px);
  animation: spin 26s linear infinite;
  -webkit-mask: radial-gradient(closest-side, transparent 64%, #000 66%, #000 74%, transparent 78%);
          mask: radial-gradient(closest-side, transparent 64%, #000 66%, #000 74%, transparent 78%);
  opacity: 0.9;
}
.portal-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 55%,
              rgba(246, 216, 162, 0.5), rgba(233, 179, 90, 0.22) 38%,
              rgba(94, 58, 166, 0.18) 62%, transparent 72%);
  filter: blur(14px);
  animation: pulse 7s var(--ease-soft) infinite;
}
.portal-core {
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #1a1428, #0a0814 70%);
  box-shadow: inset 0 0 60px rgba(138,107,255,0.3), inset 0 0 120px rgba(0,0,0,0.8);
}
/* lone figure on the threshold (echoes the reference) */
.portal-figure {
  position: absolute;
  bottom: 8%; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 64px;
  background: linear-gradient(180deg, rgba(8,7,13,0) , #050409);
  border-radius: 40% 40% 6px 6px / 60% 60% 6px 6px;
  filter: drop-shadow(0 0 16px rgba(233,179,90,0.4));
}
.portal-figure::before {
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #050409;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* hero sound toggle */
.sound-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 2.2rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem 0.6rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  background: rgba(6, 5, 9, 0.42);
  backdrop-filter: blur(10px);
  color: var(--ink-dim);
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color .3s, border-color .3s, background .3s;
}
.sound-toggle:hover {
  color: var(--ink);
  border-color: rgba(245, 241, 232, 0.32);
  background: rgba(6, 5, 9, 0.62);
}
.sound-toggle svg { width: 16px; height: 16px; flex: none; }
.sound-toggle .ic-on { display: none; }
.sound-toggle.is-on { color: var(--gold); border-color: rgba(233, 179, 90, 0.45); }
.sound-toggle.is-on .ic-on { display: block; }
.sound-toggle.is-on .ic-muted { display: none; }

.scroll-cue {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.scroll-cue .bar {
  width: 1px; height: 40px;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.4s var(--ease-soft) infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(40px); opacity: 0; }
}

/* starfield canvas */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

/* -------------------------------------------------------------- prologue -- */
.prologue { text-align: center; }
.prologue-inner { max-width: 700px; margin-inline: auto; }
.prologue-lead {
  font-family: var(--f-cinema);
  font-style: italic;
  font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 1.7rem;
}
.prologue-inner p:not(.prologue-lead) {
  max-width: 60ch;
  margin: 0 auto 1.2rem;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--ink-dim);
}
.prologue-inner p:last-child { margin-bottom: 0; }
.prologue-inner em { font-style: italic; color: var(--gold-soft); }
.prologue-inner .gold { color: var(--gold-soft); font-style: italic; }

/* ------------------------------------------------------------- multiverse - */
.multiverse { text-align: center; }
.universe {
  position: relative;
  width: min(92vw, 980px);
  margin: 3rem auto 0;
  aspect-ratio: 16 / 11;
}
/* central body — The First Luminate */
.planet-main {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 30%, #f6d8a2 0%, #e9b35a 18%, #a85f24 46%, #4a2d6e 78%, #1a0f33 100%);
  box-shadow:
    0 0 90px -8px rgba(233,179,90,0.5),
    inset -22px -18px 60px rgba(0,0,0,0.6),
    inset 14px 12px 40px rgba(246,216,162,0.3);
  animation: float 9s var(--ease-soft) infinite;
}
.planet-main::after {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  border: 1px solid rgba(233,179,90,0.25);
  transform: rotate(18deg) scaleY(0.34);
}
.planet-main .label {
  position: absolute;
  top: 104%; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.planet-main .label .t { font-family: var(--f-display); font-style: italic; font-size: clamp(1rem,2.4vw,1.5rem); }
.planet-main .label .s { display:block; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); margin-top: 0.3rem; }

/* orbiting theme planets */
.orbit { position: absolute; inset: 0; }
.planet {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  cursor: pointer;
  transition: transform .4s var(--ease);
}
.planet .body {
  width: 100%; height: 100%;
  border-radius: 50%;
  box-shadow: inset -8px -6px 22px rgba(0,0,0,0.55);
  animation: float var(--dur, 8s) var(--ease-soft) infinite;
}
.planet .tip {
  position: absolute;
  bottom: 118%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(16, 14, 27, 0.92);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  width: max-content;
  max-width: 220px;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  backdrop-filter: blur(10px);
  z-index: 5;
}
.planet .tip b { display: block; font-family: var(--f-display); font-size: 0.98rem; font-weight: 500; }
.planet .tip span { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
.planet:hover { transform: translate(-50%, -50%) scale(1.12); }
.planet:hover .tip, .planet.show .tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.planet:hover .body { animation-play-state: paused; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---- world cards: aged-parchment "tarot" carousel (magic theme) ---- */
.slider { position: relative; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.slides-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-block: 2.6rem;
}
.slides-viewport::-webkit-scrollbar { display: none; }
.slides-track { display: flex; gap: clamp(1rem, 3vw, 2rem); width: max-content; }

.tcard {
  --paper: #ece3d0;
  --paper-lt: #f6f0e2;
  --ink-warm: #3c2e1e;
  --ink-warm-soft: #6f5d46;
  --gold-ink: #9c6c26;
  position: relative;
  flex: 0 0 clamp(270px, 82vw, 372px);
  scroll-snap-align: center;
  aspect-ratio: 3 / 4.5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  gap: 0;
  padding: clamp(12px, 2.4vw, 16px);
  border: 0;
  cursor: pointer;
  color: var(--ink-warm);
  border-radius: 13px 15px 12px 16px;
  background:
    radial-gradient(60% 45% at 72% 8%, rgba(146, 104, 52, 0.14), transparent 60%),
    radial-gradient(55% 40% at 12% 92%, rgba(120, 86, 44, 0.12), transparent 60%),
    linear-gradient(155deg, var(--paper-lt), var(--paper));
  box-shadow:
    0 26px 46px -24px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(120, 90, 50, 0.22),
    inset 0 0 70px rgba(150, 110, 60, 0.10);
  transform: rotate(var(--rot, 0deg));
  transition: transform .45s var(--ease), box-shadow .45s;
}
.tcard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.tcard > * { position: relative; z-index: 1; }
.tcard:hover, .tcard:focus-visible {
  transform: rotate(0deg) translateY(-8px) scale(1.025);
  box-shadow: 0 36px 64px -24px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(120, 90, 50, 0.3), inset 0 0 70px rgba(150, 110, 60, 0.14);
  outline: none;
}
.tcard-top { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.3rem 0 0.6rem; }
.tcard-num { font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: var(--ls-label); color: var(--gold-ink); }
.tcard-orn { width: 15px; height: 15px; color: var(--gold-ink); opacity: 0.85; }
/* the illustration — the dominant element of the card */
.tcard-figure {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(90, 66, 36, 0.5);
  box-shadow: inset 0 0 0 3px rgba(255, 252, 244, 0.5), 0 12px 24px -14px rgba(0, 0, 0, 0.6);
}
.tcard-figure img, .tcard-figure .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcard-cap { padding: 0.7rem 0.2rem 0.15rem; display: flex; flex-direction: column; align-items: center; gap: 0.12rem; }
.tcard-name {
  font-family: var(--f-cinema);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.5rem, 4.6vw, 2rem);
  line-height: 1.02;
  color: var(--ink-warm);
}
.tcard-kicker {
  font-family: var(--f-cinema);
  font-style: italic;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: var(--gold-ink);
}

/* essay-theme cards — same parchment design, static grid, more text */
.feed-strands .tcard--essay { scroll-snap-align: none; aspect-ratio: 3 / 4.3; text-decoration: none; }
.tcard--essay .tcard-figure { flex: 0 0 auto; aspect-ratio: 16 / 10; }
.tcard--essay .tcard-cap {
  flex: 1 1 auto;
  justify-content: flex-start;
  gap: 0.55rem;
  padding-top: 0.9rem;
}
.tcard--essay .tcard-name { font-size: clamp(1.4rem, 3.4vw, 1.85rem); }
.tcard--essay .ecard-text {
  font-family: var(--f-cinema);
  font-style: italic;
  font-size: clamp(0.92rem, 0.88rem + 0.2vw, 1.02rem);
  line-height: 1.4;
  color: var(--ink-warm-soft);
  max-width: 32ch;
}
.tcard--essay .ecard-go {
  margin-top: auto;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-ink);
  transition: color .3s;
}
.tcard--essay:hover .ecard-go { color: var(--ink-warm); }

/* nav */
.slider-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.4rem; }
.slider-dots { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(245, 241, 232, 0.22); cursor: pointer; transition: background .3s, width .3s; }
.dot:hover { background: rgba(245, 241, 232, 0.45); }
.dot.active { background: var(--gold); width: 26px; border-radius: 5px; }
.slider-arrows { display: flex; gap: 0.6rem; flex: none; }
.arrow-btn { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); background: rgba(6, 5, 9, 0.42); backdrop-filter: blur(10px); color: var(--ink-dim); transition: color .3s, border-color .3s, background .3s; }
.arrow-btn:hover { color: var(--gold); border-color: rgba(233, 179, 90, 0.5); background: rgba(6, 5, 9, 0.62); }
.arrow-btn svg { width: 20px; height: 20px; }
.slider:focus-visible { outline: none; }

/* expand-on-click modal — a large parchment card */
.world-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 4vw, 3rem); }
.world-modal[hidden] { display: none; }
.world-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 3, 8, 0.74); backdrop-filter: blur(12px); opacity: 0; transition: opacity .45s var(--ease); }
.world-modal.open .world-modal-backdrop { opacity: 1; }
.world-modal-panel {
  --paper: #ece3d0; --paper-lt: #f6f0e2; --ink-warm: #3c2e1e; --ink-warm-soft: #6f5d46; --gold-ink: #9c6c26;
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  min-width: 0;
  max-width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: clamp(2rem, 5vw, 3.4rem);
  color: var(--ink-warm);
  border-radius: 16px;
  background:
    radial-gradient(50% 35% at 76% 6%, rgba(146, 104, 52, 0.14), transparent 60%),
    radial-gradient(50% 35% at 8% 96%, rgba(120, 86, 44, 0.12), transparent 60%),
    linear-gradient(155deg, var(--paper-lt), var(--paper));
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(120, 90, 50, 0.22);
  opacity: 0;
  transform: scale(0.96) translateY(12px) rotate(-0.6deg);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.world-modal-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.45;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.world-modal-panel > * { position: relative; z-index: 1; }
.world-modal.open .world-modal-panel { opacity: 1; transform: none; }
.world-modal-panel .tcard-num { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: var(--ls-label); color: var(--gold-ink); }
.world-modal-panel .tcard-orn { width: 19px; height: 19px; color: var(--gold-ink); opacity: 0.9; }
.wm-top { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.wm-figure {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0.7rem 0 0.4rem;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(90, 66, 36, 0.5);
  box-shadow: inset 0 0 0 4px rgba(255, 252, 244, 0.5), 0 16px 32px -16px rgba(0, 0, 0, 0.6);
}
.wm-figure img, .wm-figure .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.wm-kicker { font-family: var(--f-cinema); font-style: italic; font-size: 1rem; color: var(--gold-ink); margin-bottom: 0.5rem; }
.wm-name { font-family: var(--f-cinema); font-weight: 600; font-style: italic; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.04; color: var(--ink-warm); margin: 0.3rem 0 0.2rem; }
.wm-text { font-family: var(--f-cinema); font-style: italic; font-size: clamp(1rem, 1rem + 0.3vw, 1.18rem); line-height: 1.6; color: var(--ink-warm-soft); margin: 0; max-width: 42ch; }
.world-modal-close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  z-index: 3;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(90, 66, 36, 0.4);
  background: rgba(60, 46, 30, 0.08);
  color: #6f5d46;
  transition: color .3s, background .3s, border-color .3s;
}
.world-modal-close:hover { color: var(--ink-warm); background: rgba(60, 46, 30, 0.16); }
.world-modal-close svg { width: 18px; height: 18px; }

/* ---- scroll-to-expand portal (intro to the Multiverse) ----
   The whole effect is driven by one custom property, --p (0 → 1), which JS
   updates from the page's own scroll position (no scroll-jacking). */
.expanse { position: relative; height: 200vh; }
.expanse-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.expanse-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 720px at 50% 38%, rgba(138, 107, 255, 0.18), transparent 60%),
    radial-gradient(820px 600px at 18% 82%, rgba(233, 179, 90, 0.12), transparent 60%),
    var(--bg);
  opacity: calc(1 - var(--p, 0));
}
.expanse-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.expanse-media {
  position: relative;
  margin: 0;
  width: calc(300px + (96vw - 300px) * var(--p, 0));
  height: calc(420px + (86vh - 420px) * var(--p, 0));
  max-width: 96vw;
  max-height: 86vh;
  border-radius: calc(20px - 12px * var(--p, 0));
  overflow: hidden;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.8);
}
.expanse-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.expanse-veil { position: absolute; inset: 0; background: #06050a; opacity: calc(0.55 - 0.45 * var(--p, 0)); }
.expanse-title {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  font-family: var(--f-cinema);
  font-size: clamp(2.4rem, 8vw, 6rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: clamp(0, calc(1 - var(--p, 0) * 1.4), 1);
}
.ex-a { transform: translateX(calc(var(--p, 0) * -42vw)); }
.ex-b { transform: translateX(calc(var(--p, 0) * 42vw)); color: var(--gold-soft); }
.expanse-reveal {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem) clamp(2.5rem, 6vw, 5rem);
  text-align: center;
  opacity: clamp(0, calc((var(--p, 0) - 0.55) * 3.3), 1); /* fades in from ~55%, fully visible by ~85% open */
  background: linear-gradient(0deg, rgba(6, 5, 9, 0.88) 0%, transparent 100%);
}
.expanse-reveal p {
  font-family: var(--f-cinema);
  font-style: italic;
  font-size: clamp(1.1rem, 1rem + 1vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink);
  max-width: 46ch;
  margin: 0 auto;
}
.expanse-reveal p em { font-style: italic; color: var(--gold-soft); }
.expanse-down {
  display: inline-block;
  margin-top: 1.2rem;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.expanse-hint {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: clamp(0, calc(1 - var(--p, 0) * 4), 1);
}
@media (prefers-reduced-motion: reduce) {
  .expanse { height: auto; }
  .expanse-sticky { position: static; height: auto; padding-block: var(--section-y); }
  .expanse-bg { opacity: 1; }
  .expanse-media { width: min(96vw, 920px); height: clamp(320px, 60vh, 560px); margin-inline: auto; }
  .expanse-veil { opacity: 0.3; }
  .expanse-title { position: static; opacity: 1; margin-bottom: 2.2rem; }
  .ex-a, .ex-b { transform: none; }
  .expanse-reveal { position: static; opacity: 1; background: none; padding: 1.6rem 0 0; }
  .expanse-hint { display: none; }
}

/* ---- world sphere: drag-to-rotate 3D cluster of the worlds ---- */
.sphere-section { text-align: center; }
.sphere-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
}
.sphere-grid .sphere { width: min(480px, 100%); margin: 0 auto; }
.sphere-copy {
  text-align: left;
  max-width: 30rem;
  padding-right: clamp(0.5rem, 3.5vw, 3.5rem); /* right-hand indent */
}
.sphere-copy .lead { max-width: 46ch; font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem); line-height: 1.6; }
.sphere-copy em { font-style: italic; color: var(--gold-soft); }
.sphere {
  position: relative;
  isolation: isolate; /* contain the nodes' high z-indices below the modal */
  width: min(560px, 86vw);
  aspect-ratio: 1;
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.sphere:active { cursor: grabbing; }
.sphere-node {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  will-change: transform, opacity;
}
.sphere-node .nimg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(233, 179, 90, 0.45);
  box-shadow: 0 0 0 4px rgba(6, 5, 9, 0.45), 0 12px 26px -10px rgba(0, 0, 0, 0.6);
  transition: border-color .3s, box-shadow .3s;
}
.sphere-node:hover .nimg, .sphere-node:focus-visible .nimg {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(6, 5, 9, 0.45), 0 0 28px -4px rgba(233, 179, 90, 0.6);
  outline: none;
}
.sphere-node .nlabel {
  position: absolute;
  left: 50%;
  bottom: -1.5em;
  transform: translateX(-50%);
  font-family: var(--f-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.sphere-node:hover .nlabel, .sphere-node:focus-visible .nlabel { opacity: 1; }

/* ---------------------------------------------------------------- writing - */
.writing-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.writing-copy h2 { margin-bottom: 1.6rem; }
.writing-copy p { color: var(--ink-dim); margin: 0 0 1.2rem; max-width: 62ch; }
.spec-list {
  list-style: none;
  margin: 2rem 0;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1rem;
}
.spec-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.spec-list .k { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.spec-list .v { font-family: var(--f-display); font-size: 1.05rem; color: var(--ink); text-align: right; }

/* the book object */
.book-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
}
.book-stage .halo {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138,107,255,0.3), rgba(233,179,90,0.12) 45%, transparent 70%);
  filter: blur(28px);
  animation: pulse 8s infinite;
}
.book {
  position: relative;
  width: 64%;
  aspect-ratio: 3 / 4.4;
  border-radius: 6px 12px 12px 6px;
  background: linear-gradient(135deg, #181228, #0d0a17 60%, #060409);
  border: 1px solid var(--line-2);
  box-shadow: -14px 24px 60px -20px rgba(0,0,0,0.9), inset 0 0 60px rgba(138,107,255,0.08);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: rotateY(-14deg) rotateX(4deg);
  transform-style: preserve-3d;
  transition: transform .6s var(--ease);
}
.book:hover { transform: rotateY(-6deg) rotateX(2deg) translateY(-6px); }
.book::before { /* spine highlight */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 10px;
  background: linear-gradient(180deg, rgba(233,179,90,0.5), rgba(138,107,255,0.3));
  border-radius: 6px 0 0 6px;
}
.book .b-top { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.book .b-title { font-family: var(--f-display); font-size: clamp(1.6rem, 4vw, 2.4rem); font-style: italic; line-height: 1.02; }
.book .b-mini { width: 46px; height: 46px; align-self: flex-end; }
.book .b-author { font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-dim); }
/* --------------------------------------------------------------- the feed - */
.feed-strands {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.strand {
  position: relative;
  padding: 2rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(245,241,232,0.025), transparent);
  overflow: hidden;
  transition: border-color .4s, transform .4s var(--ease), background .4s;
}
.strand::before {
  content: "";
  position: absolute;
  top: -40%; right: -30%;
  width: 60%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--c, var(--gold)), transparent 70%);
  opacity: 0.12;
  transition: opacity .4s;
}
.strand:hover { transform: translateY(-6px); border-color: var(--line-2); background: linear-gradient(180deg, rgba(245,241,232,0.05), transparent); }
.strand:hover::before { opacity: 0.22; }
.strand .s-num { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--gold); }
.strand h3 { font-size: 1.5rem; margin: 1rem 0 0.7rem; }
.strand p { color: var(--muted); font-size: 0.96rem; margin: 0; }

/* essay archive / catalogue */
.archive-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.95rem;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  transition: color .25s, border-color .25s, background .25s;
}
.chip:hover { color: var(--ink-dim); border-color: var(--line-2); }
.chip.active { color: #2a1b06; background: var(--gold); border-color: var(--gold); }

.archive { display: grid; gap: 0; border-top: 1px solid var(--line); }
.essay {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  transition: background .35s, padding .35s var(--ease), color .35s;
}
.essay:hover { background: rgba(245,241,232,0.03); padding-inline: 1.2rem; }
.essay .e-num { font-family: var(--f-mono); font-size: 0.8rem; color: var(--gold); }
.essay .e-main h3 { font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-weight: 500; transition: color .3s; }
.essay:hover .e-main h3 { color: var(--gold-soft); }
.essay .e-cat { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: var(--ls-btn); text-transform: uppercase; color: var(--muted); margin-top: 0.4rem; display:inline-block; }
.essay .e-meta { font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); text-align: right; white-space: nowrap; display:flex; align-items:center; gap: 1rem; }
.essay .e-arrow { color: var(--ink-dim); transition: transform .35s var(--ease), color .3s; }
.essay:hover .e-arrow { transform: translateX(5px); color: var(--gold); }
.essay.hide { display: none; }
.archive-note { margin-top: 1.4rem; font-size: 0.84rem; color: var(--faint); font-style: italic; }

/* ----------------------------------------------------------------- about -- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.about-grid .about-copy { order: 1; } /* text on the left */
.about-grid .portrait { order: 2; }   /* portrait on the right */
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(233,179,90,0.22), transparent 55%),
    radial-gradient(120% 90% at 80% 90%, rgba(138,107,255,0.28), transparent 55%),
    var(--panel);
}
/* woven tapestry texture — a nod to the brief's "tapestries" idea */
.portrait .weave {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(245,241,232,0.05) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(233,179,90,0.04) 0 2px, transparent 2px 9px);
  mix-blend-mode: overlay;
}
.portrait .mono {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: clamp(4rem, 16vw, 9rem);
  font-style: italic;
  color: rgba(245,241,232,0.9);
  text-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  z-index: 0;
}
/* soft scrim so the caption stays legible over the photo */
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(6, 5, 9, 0.62) 100%);
}
.portrait .cap {
  position: absolute;
  left: 1.2rem; bottom: 1.2rem;
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.about-copy h2 { margin-bottom: 1.8rem; }
.about-copy p { color: var(--ink-dim); margin: 0 0 1.3rem; max-width: 62ch; }
.about-copy p em { color: var(--gold-soft); font-style: italic; }
.about-copy .btn-row { margin-top: 2.2rem; }

/* --------------------------------------------------------------- form bits -- */
.field { position: relative; flex: 1; text-align: left; }
.input {
  width: 100%;
  padding: 0.95rem 1.2rem;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  background: rgba(6,5,9,0.6);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.98rem;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.input::placeholder { color: var(--faint); }
.input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(233,179,90,0.18);
  background: rgba(6,5,9,0.85);
}
.input[aria-invalid="true"] { border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(214,92,154,0.18); }
.form-note { margin-top: 1.2rem; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: var(--ls-btn); text-transform: uppercase; color: var(--muted); }
.field-error {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--magenta);
}
.field.invalid .field-error { display: block; }

.form-success {
  display: none;
  align-items: center;
  gap: 0.8rem;
  justify-content: center;
  padding: 1.1rem 1.4rem;
  border-radius: 100px;
  background: rgba(84,211,224,0.1);
  border: 1px solid rgba(84,211,224,0.4);
  color: var(--ink);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto;
  animation: popIn .5s var(--ease);
}
.form-success.show { display: flex; }
.form-success svg { width: 20px; height: 20px; color: var(--cyan); flex-shrink: 0; }
@keyframes popIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* --------------------------------------------------------------- contact -- */
.contact { padding-block: clamp(3.5rem, 6vw, 6rem); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
}
.contact-copy h2 { margin-bottom: 1.4rem; }
.contact-copy p { color: var(--ink-dim); max-width: 44ch; }
.contact-social {
  margin-top: 2.4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--f-mono);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  transition: color .3s;
}
.ig-link svg { width: 22px; height: 22px; transition: transform .35s var(--ease); }
.ig-link:hover { color: var(--gold); }
.ig-link:hover svg { transform: scale(1.1) rotate(-6deg); }

.contact-form { display: grid; gap: 1.1rem; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.contact-form label {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.input.area { border-radius: 18px; resize: vertical; min-height: 150px; }
.contact-form .btn-primary { justify-self: start; }

/* ----------------------------------------------------------------- footer - */
.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 6vw, 5rem) 2.5rem;
  position: relative;
  overflow: hidden;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}
.footer .brand-block { max-width: 320px; }
.footer .brand-block .brand { display: inline-flex; margin-bottom: 1.4rem; }
.footer .brand-block p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.footer-cols { display: flex; gap: clamp(2.5rem, 8vw, 6rem); flex-wrap: wrap; }
.footer-col h4 { font-family: var(--f-mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.footer-col a { font-size: 0.92rem; color: var(--ink-dim); transition: color .25s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  background: none;
  border: 0;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color .3s;
}
.to-top:hover { color: var(--gold); }
.to-top svg { width: 14px; height: 14px; }
.footer .ghost-word {
  position: absolute;
  bottom: -3vw; left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-display);
  font-size: 22vw;
  font-weight: 600;
  color: rgba(245,241,232,0.02);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: -0.04em;
}

/* --------------------------------------------------------------- motion --- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

.reveal-line > span { display: block; overflow: hidden; }
.reveal-line .inner {
  display: block;
  transform: translateY(110%);
  transition: transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal-line.is-visible .inner { transform: translateY(0); }

/* ----------------------------------------------------------- responsive --- */
@media (max-width: 940px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .writing-grid, .about-grid, .contact-grid, .sphere-grid { grid-template-columns: 1fr; }
  .latest-essay { grid-template-columns: 1fr; gap: 1.3rem; }
  .sphere-copy { text-align: center; padding-right: 0; margin-inline: auto; }
  .sphere-copy .lead { margin-inline: auto; }
  .about-grid .portrait { max-width: 420px; order: -1; } /* photo back on top when stacked */
  .feed-strands { grid-template-columns: 1fr; }
  .book-stage { max-width: 360px; margin-inline: auto; }
}
@media (max-width: 600px) {
  .form-2col { grid-template-columns: 1fr; }
  .essay { grid-template-columns: 40px 1fr; }
  .essay .e-meta { grid-column: 2; justify-content: flex-start; margin-top: 0.4rem; }
  .footer-top { flex-direction: column; }
  .nav-active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
}

/* nav toggle → X */
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); width: 26px; }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); width: 26px; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .reveal-line .inner { opacity: 1 !important; transform: none !important; }
  body::after { display: none; }
}

/* ============================================ featured latest essay (feed) -- */
.latest-essay {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0; /* below the three cards, edges aligned */
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.6rem, 4vw, 2.8rem);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(233, 179, 90, 0.06), rgba(16, 14, 27, 0.5));
  backdrop-filter: blur(8px);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .3s, box-shadow .4s, transform .4s var(--ease);
}
.le-main { position: relative; }
.le-aside { position: relative; display: flex; flex-direction: column; gap: 1.1rem; }
.latest-essay::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 120% at 100% 0%, rgba(233, 179, 90, 0.12), transparent 55%);
}
.latest-essay:hover {
  border-color: rgba(233, 179, 90, 0.5);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8), 0 0 44px -16px rgba(233, 179, 90, 0.35);
  transform: translateY(-3px);
}
.le-flag { position: relative; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.le-tag { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: var(--ls-btn); text-transform: uppercase; color: #06050b; background: var(--gold); padding: 0.35em 0.75em; border-radius: 100px; }
.le-no { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--muted); }
.le-title { position: relative; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.3rem); line-height: 1.08; color: var(--ink); margin: 1rem 0 0; }
.latest-essay:hover .le-title { color: var(--gold-soft); }
.le-standfirst { color: var(--ink-dim); margin: 0; }
.le-standfirst em { color: var(--gold-soft); font-style: italic; }
.le-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0; }
.le-meta { font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.le-go { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: var(--ls-btn); text-transform: uppercase; color: var(--gold); }
.le-go svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.latest-essay:hover .le-go svg { transform: translateX(4px); }

/* ===================================================== essay / article page -- */
.article-page { padding-top: clamp(8rem, 16vh, 11rem); }
.article { max-width: 720px; margin-inline: auto; }
.article-back { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: var(--ls-btn); text-transform: uppercase; color: var(--muted); margin-bottom: 1.8rem; transition: color .3s; }
.article-back:hover { color: var(--gold-soft); }
.article-eyebrow { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--gold); }
.article-title { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.8rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0.7rem 0 0; }
.article-dek { font-family: var(--f-cinema); font-style: italic; font-size: clamp(1.2rem, 1rem + 0.9vw, 1.6rem); line-height: 1.45; color: var(--ink-dim); margin: 1.3rem 0 0; max-width: 60ch; }
.article-dek em { color: var(--gold-soft); }
.article-meta { display: flex; align-items: center; gap: 1rem; margin-top: 1.6rem; font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.article-rule { height: 1px; background: var(--line); border: 0; margin: clamp(2rem, 4vw, 3rem) 0; }
.article-body p { color: var(--ink-dim); font-size: clamp(1.05rem, 1rem + 0.3vw, 1.18rem); line-height: 1.75; margin: 0 0 1.5rem; }
.article-body > p:first-of-type::first-letter { float: left; font-family: var(--f-display); font-weight: 600; font-size: 3.4em; line-height: 0.76; padding: 0.04em 0.14em 0 0; color: var(--gold); }
.article-body em { color: var(--gold-soft); font-style: italic; }
/* standout lines: written as Markdown blockquotes ( > … ) */
.article-body p.article-accent,
.article-body blockquote { color: var(--ink); font-family: var(--f-cinema); font-style: italic; font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem); line-height: 1.35; margin: clamp(1.6rem, 3.5vw, 2.4rem) 0; }
.article-body blockquote { border: 0; padding: 0; }
.article-body blockquote p { color: inherit; font: inherit; line-height: inherit; margin: 0; }
.article-body blockquote em { color: var(--gold-soft); }
.further-reading { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.further-reading h2 { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--gold); font-weight: 400; margin: 0 0 1.2rem; }
.further-reading ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.further-reading li { color: var(--muted); font-size: 0.95rem; line-height: 1.5; padding-left: 1.3rem; position: relative; }
.further-reading li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.article-foot { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 2.2rem; border-top: 1px solid var(--line); display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
