:root {
  --bg: #ece6d8;      /* cream */
  --ink: #1b1c19;     /* olive black */
  --muted: #6d6f63;
  --accent: #97a185;  /* sage: the disc behind the portrait */
  --sage: #6f7b5f;    /* small sage details */
  --outline: #ece6d8; /* name outline over the photo: always light so it shows on dark hair */
  --hover: #3a3d35;
  --on-accent: #fff;
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --pad: clamp(16px, 3vw, 44px);
  color-scheme: light;
}

/* dark theme: follows the device unless the visitor picked one */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1c19; --ink: #ece3d0; --muted: #9c9a8a; --accent: #66715a; --sage: #9aa685; --hover: #c9c1ae; --outline: #ece3d0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1c19; --ink: #ece3d0; --muted: #9c9a8a; --accent: #66715a; --sage: #9aa685; --hover: #c9c1ae; --outline: #ece3d0;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
/* always keep room for the scrollbar, so the header doesn't shift sideways between pages that scroll and pages that don't */
html { scrollbar-gutter: stable; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.5; overflow-x: hidden; transition: background .3s, color .3s; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header / nav ---------- */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px);
  padding: 20px var(--pad);
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.brand { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: 0; }
.brand span { color: var(--sage); }
.nav { display: flex; gap: clamp(14px, 2vw, 28px); margin-left: auto; }
.nav a { color: var(--muted); position: relative; transition: color .2s; }
.nav a:hover, .nav a.on { color: var(--ink); }
.nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; background: var(--ink); }
.menu-btn { display: none; }

.tools { display: flex; align-items: center; gap: 10px; }
.theme-btn {
  display: grid; place-items: center; width: 36px; height: 36px; cursor: pointer;
  background: none; border: 1.5px solid var(--ink); border-radius: 50%; color: var(--ink);
  transition: background .2s, color .2s;
}
.theme-btn svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-btn .moon { stroke: none; }
.theme-btn:hover { background: var(--ink); color: var(--bg); }
/* show the moon in light mode, the sun in dark mode */
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}

/* ---------- home poster ---------- */
/* sizes below use cqw/cqh (the poster's own width/height), so the name and
   the info block always fit together, on wide-short and tall screens alike */
.poster {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  container-type: size;
  /* first name sits under the header; the surname starts under it. On short
     windows the surname also shrinks so the info block below still fits */
  --first-size: clamp(16px, min(2.4cqw, 4.4cqh), 38px);
  --name-top: max(calc(13cqh + 30px), calc(96px + var(--first-size)));
  --info-h: calc(290px + clamp(0px, (1150px - 100cqw) * .25, 45px));   /* rough height of .info; taller when its buttons wrap */
  --name-size: min(23cqw, 34cqh, (100cqh - var(--name-top) - var(--info-h) - 7cqh) / .8);
  --name-bottom: calc(var(--name-top) + var(--name-size) * .8);
  /* portrait box: height, top edge, horizontal center (used to find the face) */
  --ph: 92cqh;
  --pt: 8cqh;
  --pcx: 66%;
}

/* giant surname: solid copy behind the portrait, outline copy in front */
.name {
  position: absolute; left: 0; right: 0; top: var(--name-top); text-align: center; white-space: nowrap;
  font-family: var(--display); font-weight: 900; font-stretch: 62%;
  font-size: var(--name-size); line-height: .8; letter-spacing: -.01em; text-transform: uppercase;
}
.name.back { z-index: 1; }
.name.front {
  z-index: 3; color: transparent; -webkit-text-stroke: 1.5px var(--outline); pointer-events: none;
  /* cut a soft hole where the face is, so the outline never crosses it.
     The hole covers eyes to chin and leaves the letters' top bar on the forehead. */
  --face: radial-gradient(
    ellipse calc(var(--ph) * .11) calc(var(--ph) * .115)
    at calc(var(--pcx) + var(--ph) * .035) calc(var(--pt) + var(--ph) * .245 - var(--name-top)),
    transparent 72%, #000 100%);
  -webkit-mask-image: var(--face);
  mask-image: var(--face);
}
.first {
  position: absolute; z-index: 4; left: var(--pad); bottom: calc(100cqh - var(--name-top) + 10px);
  font-family: var(--display); font-weight: 800; font-size: var(--first-size); line-height: 1; text-transform: uppercase;
}

/* portrait sits right of center so the info block on the left gets the space */
.portrait { position: absolute; z-index: 2; left: 66%; bottom: 0; height: 92%; transform: translateX(-50%); }
.disc {
  position: absolute; z-index: 0; left: 66%; bottom: -30vh; width: 84vh; height: 84vh; border-radius: 50%;
  transform: translateX(-50%); background: var(--accent);
}

/* info block, left, always starting just under the giant name */
.info { position: absolute; z-index: 4; left: var(--pad); top: calc(var(--name-bottom) + 4cqh); width: min(460px, 36cqw); }
.info::before { content: ""; display: block; width: 48px; height: 4px; background: var(--sage); margin-bottom: clamp(10px, 2.2cqh, 18px); }
.role { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 2.5cqw, 40px); text-transform: uppercase; line-height: 1.02; }
.school { color: var(--muted); font-size: 15px; margin-top: clamp(4px, 1cqh, 8px); }
.tagline { font-size: 16px; margin-top: clamp(8px, 1.8cqh, 16px); max-width: 36ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(12px, 2.8cqh, 24px); }
.info .btn { padding-block: clamp(10px, 1.8cqh, 15px); }

/* social icons, under the buttons */
.socials { display: flex; gap: 10px; margin-top: clamp(10px, 2.3cqh, 20px); }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid var(--ink); border-radius: 50%; transition: background .2s, border-color .2s; }
.socials svg { width: 18px; height: 18px; fill: var(--ink); transition: fill .2s; }
.socials a:hover { background: var(--ink); }
.socials a:hover svg { fill: var(--bg); }

.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px;
  font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  padding: 15px 22px; border: 1.5px solid var(--ink); background: var(--bg); transition: background .2s, color .2s, border-color .2s;
}
.btn.primary { background: var(--ink); color: var(--bg); }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--hover); border-color: var(--hover); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* entrance */
.name { animation: up .6s cubic-bezier(.2, .8, .2, 1) both; }
.portrait { animation: stand .7s cubic-bezier(.2, .8, .2, 1) both .05s; }
.disc { animation: pop .6s cubic-bezier(.2, .8, .2, 1) both .15s; }
.fade { animation: fade .5s ease both .3s; }
@keyframes up { from { opacity: 0; transform: translateY(12%); } }
@keyframes stand { from { opacity: 0; transform: translate(-50%, 8%); } }
@keyframes stand-m { from { opacity: 0; transform: translateY(8%); } }
@keyframes pop { from { transform: translateX(-50%) scale(0); } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } }

/* ---------- inner pages ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 120px var(--pad) 96px; }
.page-title {
  font-family: var(--display); font-weight: 900; font-stretch: 62%; text-transform: uppercase;
  font-size: clamp(72px, 13vw, 200px); line-height: .82; letter-spacing: -.01em; margin-bottom: clamp(32px, 5vw, 64px);
}
.page-title .outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* about: one screen, no scroll. The same portrait as home stands on the left
   (it glides over from home, see "page transition"), the text fills the right.
   cqw/cqh are the page's own width/height, so text scales down on short screens. */
.about-page {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  container-type: size;
  --ph: min(88cqh, 54cqw);                 /* portrait height */
  --pw: calc(var(--ph) * .703);            /* portrait width (image is 1054x1500) */
}
.about-portrait {
  position: absolute; z-index: 2; left: var(--pad); bottom: 0; height: var(--ph);
  animation: stand-m .6s cubic-bezier(.2, .8, .2, 1) both;
}
.arch {
  position: absolute; z-index: 1; left: var(--pad); bottom: 0; width: var(--pw); height: calc(var(--ph) * .78);
  background: var(--accent); border-radius: 999px 999px 0 0;
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both .1s;
}
@keyframes rise { from { transform: translateY(100%); } }

.about-text {
  position: absolute; left: calc(var(--pad) + var(--pw) + 4.5cqw); right: var(--pad); top: 80px; bottom: 2.5cqh;
  max-width: 700px; display: flex; flex-direction: column; justify-content: center;
}
.about-page .page-title { font-size: clamp(30px, min(max(7.5cqw, 44px), 11cqh), 130px); margin-bottom: 2.2cqh; }
.about-text p { color: var(--muted); font-size: clamp(11px, min(max(1.15cqw, 13px), 1.95cqh), 16px); line-height: 1.5; margin-bottom: 1.1cqh; }
.about-text .lead { color: var(--ink); font-size: clamp(12px, min(max(1.55cqw, 15px), 2.55cqh), 22px); line-height: 1.4; margin-bottom: 1.6cqh; }

.facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; margin-top: 1.6cqh; border-top: 1.5px solid var(--ink); }
.facts div { padding: 1.1cqh 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); min-width: 0; }
.facts dt { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { font-size: clamp(11px, min(max(1.15cqw, 13px), 1.95cqh), 16px); line-height: 1.35; overflow-wrap: anywhere; }
.facts .wide { grid-column: 1 / -1; }
.facts a { border-bottom: 1px solid var(--sage); }

.do { margin-top: 2.6cqh; }
.do-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2cqw, 28px); margin-top: 1cqh; }
.do-grid article { border-top: 3px solid var(--ink); padding-top: 1cqh; }
.do-grid h3 { font-family: var(--display); font-weight: 800; font-size: clamp(12px, min(max(1.5cqw, 14px), 2.3cqh), 21px); text-transform: uppercase; line-height: 1.05; }
.about-text .do-grid p { font-size: clamp(11px, min(max(1.05cqw, 12px), 1.8cqh), 14px); line-height: 1.4; margin: 4px 0 0; }
.about-text .actions { margin-top: 3cqh; }
.about-text .btn { padding-block: clamp(8px, 1.8cqh, 15px); }

/* narrow and short windows: the text column is thin, so tighten a bit more */
@container (max-width: 1100px) and (max-height: 700px) {
  .about-page .page-title { font-size: max(30px, 9.5cqh); }
  .about-text .lead { font-size: max(12px, 2.3cqh); }
  .about-text p:not(.lead), .facts dd { font-size: max(11px, 1.8cqh); }
  .do { margin-top: 2cqh; }
  .about-text .actions { margin-top: 2.2cqh; }
}

/* the text "pulls out" from behind the portrait, one piece after another */
.pull { animation: pull .4s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.15s + var(--i) * .04s); }
@keyframes pull { from { opacity: 0; transform: translateX(-48px); clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .about-page { height: auto; min-height: 0; overflow: visible; container-type: normal; padding: 96px var(--pad) 40px; --ph: min(58svh, 560px); }
  .arch, .about-portrait { left: 50%; margin-left: calc(var(--pw) / -2); top: 96px; bottom: auto; }
  .arch { top: calc(96px + var(--ph) * .22); }
  .about-text { position: relative; inset: auto; max-width: none; margin-top: calc(var(--ph) + 28px); display: block; }
  .about-page .page-title { font-size: clamp(48px, 15vw, 110px); }
  .about-text p, .facts dd { font-size: 16px; }
  .about-text .lead { font-size: 19px; }
  .facts, .do-grid { grid-template-columns: 1fr; }
  .do-grid h3 { font-size: 20px; }
  .about-text .do-grid p { font-size: 14px; }
}

/* ---------- page transition ----------
   main.js glides the portrait to its spot on the next page while the rest of
   the page fades out (the header stays, it is the same on every page).
   Arriving by a glide (html.vt): the portrait is already in place, so skip its
   entrance and start the rest right away. */
html.vt .portrait, html.vt .about-portrait { animation: none; }
html.vt .arch { animation-delay: 0s; animation-duration: .4s; }
html.vt .name { animation-duration: .4s; }
html.vt .disc { animation-delay: 0s; animation-duration: .4s; }
html.vt .fade { animation-delay: .1s; animation-duration: .35s; }
html.vt .pull { animation-duration: .35s; animation-delay: calc(var(--i) * .03s); }

/* ---------- tablet / phone ---------- */
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .tools { margin-left: auto; }
  .menu-btn {
    display: block; font: inherit; letter-spacing: inherit; text-transform: inherit;
    background: none; border: 1.5px solid var(--ink); padding: 8px 14px; cursor: pointer;
  }
  .nav {
    position: absolute; top: 100%; left: var(--pad); right: var(--pad);
    flex-direction: column; gap: 0; background: var(--bg); border: 1.5px solid var(--ink);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 16px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
  .nav a:last-child { border-bottom: 0; }
  .nav a.on::after { top: 0; bottom: 0; left: 0; right: auto; width: 3px; height: auto; }

  .poster {
    height: auto; min-height: 0; display: flex; flex-direction: column; container-type: normal;
    --name-top: calc(76px + 9vw); --ph: min(60svh, 640px); --pt: 96px; --pcx: 50%;
  }
  .name { font-size: 21vw; }
  .first { top: 76px; bottom: auto; font-size: min(5.5vw, 26px); }
  /* align-self keeps the flex column from stretching the photo sideways */
  .portrait {
    position: relative; display: block; align-self: center; width: auto; left: auto; transform: none;
    height: 60svh; max-height: 640px; margin-top: 96px; animation-name: stand-m;
  }
  .disc { bottom: auto; top: calc(96px + 60svh - 50vw); width: 100vw; height: 100vw; }

  .disc { left: 50%; }
  .info { position: relative; left: auto; top: auto; width: auto; background: var(--bg); padding: 28px var(--pad) 36px; }
  .actions { flex-direction: column; }
}

/* ---------- coming soon pages ---------- */
.soon {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; padding: 80px var(--pad) 6vh;
}
.soon > * { position: relative; z-index: 1; }
.soon .label { color: var(--sage); }
.soon .page-title { font-size: clamp(64px, min(17vw, 30vh), 280px); margin: 1.5vh 0 3vh; }
.soon-note { color: var(--muted); font-size: clamp(15px, 1.4vw, 19px); max-width: 40ch; }
.soon .actions { margin-top: 4vh; }
.soon-disc {
  position: absolute; z-index: 0; right: -14vh; bottom: -34vh; width: 80vh; height: 80vh; border-radius: 50%;
  background: var(--accent); animation: rise .5s cubic-bezier(.2, .8, .2, 1) both .1s;
}
