/* Tim Freeberg — Myst-style personal site */
:root {
  --bg: #16120e;
  --bg-2: #1c160e;
  --ink: #2a2118;
  --ink-soft: #4a3c2e;
  --cream: #f3ead7;
  --parchment: #efe4cc;
  --parchment-edge: #d9c9a4;
  --gold: #d4af55;
  --gold-dim: #b8943d;
  --orange: #c45c26;
  --orange-hot: #e07a3d;
  --wood: #8b5a2b;
  --wood-light: #c4a574;
  --line: rgba(42, 33, 24, 0.18);
  --focus: 0 0 0 2px var(--bg), 0 0 0 5px var(--gold), 0 0 16px rgba(212, 175, 85, 0.7);
  --font-ui: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --font-serif: "Crimson Pro", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --fade: 400ms;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/crimson-pro-latin-400-normal.woff") format("woff");
}
@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/crimson-pro-latin-600-normal.woff") format("woff");
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-hot); }
a:hover { color: var(--gold); }
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus); border-radius: 2px; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  background: var(--gold);
  color: var(--bg);
  padding: 0.5rem 0.85rem;
  z-index: 100;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 0.5rem; box-shadow: var(--focus); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.25rem;
  padding: 0.65rem 1.1rem 0.7rem;
  background: var(--bg-2);
  border-bottom: 1px solid rgba(212, 175, 85, 0.22);
}
.wordmark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.wordmark:hover { color: var(--gold); }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0;
  font-size: 0.92rem;
}
.nav a {
  color: var(--wood-light);
  text-decoration: none;
  padding: 0.25rem 0.45rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] {
  color: var(--gold);
  font-weight: 600;
}
.nav .sep { color: rgba(196, 165, 116, 0.4); padding: 0 0.1rem; pointer-events: none; }
.skip-tour {
  margin-left: auto;
  color: var(--gold-dim);
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.35rem 0.2rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.skip-tour:hover { color: var(--gold); }

/* Stage */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.stage.is-fading { opacity: 0; }
.stage.is-ready { opacity: 1; transition: opacity var(--fade) linear; }
@media (prefers-reduced-motion: reduce) {
  .stage.is-ready { transition: none; }
  .desk-frame__slide { animation: none !important; opacity: 0 !important; }
  .desk-frame__slide:first-child { opacity: 1 !important; }
}

.layout {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.scene-wrap {
  position: relative;
  width: 100%;
  background: #0c0a08;
}
.scene {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #0c0a08;
}
.scene > picture,
.scene > img,
.scene > .scene-img {
  width: 100%;
  height: 100%;
  display: block;
}
.scene > picture > img,
.scene > .scene-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Close-up pages that use HTML instead of a photo */
.scene--board, .scene--doc, .scene--gallery, .scene--frame {
  aspect-ratio: auto;
  min-height: 16rem;
  background: #1a1510;
}

/* Scene back control: always visible, easy to tap on phones */
.scene-back {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 1.1rem;
  background: rgba(22, 18, 14, 0.96);
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(212, 175, 85, 0.28);
}
.scene-back:hover { color: var(--gold); }
.scene-back:focus-visible { box-shadow: var(--focus); }

/* Hotspots: invisible hit areas; only a name label on hover/focus */
.hotspot {
  position: absolute;
  display: block;
  min-width: 44px;
  min-height: 44px;
  z-index: 2;
  cursor: url("/img/cursor-hand.png") 6 2, pointer;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.hotspot:hover,
.hotspot:focus,
.hotspot:focus-visible {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}
.hotspot__label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: rgba(22, 18, 14, 0.94);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.hotspot:hover .hotspot__label,
.hotspot:focus-visible .hotspot__label,
.hotspot.is-touching .hotspot__label {
  opacity: 1;
}
.hotspot:focus-visible .hotspot__label {
  box-shadow: var(--focus);
}
/* If tooltip would clip at the top, drop it below */
.hotspot--low .hotspot__label {
  bottom: auto;
  top: calc(100% + 6px);
}
/* Myst-style turn-around strip along the bottom of a scene */
.hotspot--turn {
  min-width: 0;
  min-height: 0;
}
.hotspot--turn .hotspot__label {
  bottom: calc(100% + 6px);
  top: auto;
}

/* Journal */
.journal {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent 28%),
    repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(42,33,24,0.04) 28px),
    var(--parchment);
  color: var(--ink);
  border-top: 1px solid var(--parchment-edge);
  padding: 0;
}
.journal > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.85rem 1.25rem;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}
.journal > summary::-webkit-details-marker { display: none; }
.journal > summary::after {
  content: "Hide";
  float: right;
  letter-spacing: 0.06em;
  font-weight: 400;
  color: var(--wood);
}
.journal:not([open]) > summary::after { content: "Show"; }
.journal__body {
  padding: 1.15rem 1.35rem 2rem;
  max-width: 42rem;
}
.journal__body > :first-child { margin-top: 0; }
.journal h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.85rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.journal h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.28rem;
  margin: 1.6rem 0 0.5rem;
}
.journal h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.08rem;
  margin: 1.15rem 0 0.35rem;
}
.journal p, .journal li { font-family: var(--font-serif); font-size: 1.08rem; }
.journal p { margin: 0 0 0.85rem; }
.journal .lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
}
.journal ul, .journal ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.journal li { margin: 0 0 0.35rem; }
.journal a { color: var(--orange); }
.journal a:hover { color: var(--wood); }
.journal .meta {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.when { font-family: var(--font-ui); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wood); margin: 0 0 0.15rem; }
.org { font-style: italic; color: var(--ink-soft); margin: 0 0 0.4rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--orange);
}
.back-link:hover { color: var(--wood); }

/* Buttons / downloads */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 2px;
  border: 1px solid var(--ink);
}
.btn:hover { background: var(--wood); color: var(--cream); border-color: var(--wood); }
.btn--gold {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold-dim);
}
.btn--gold:hover { background: var(--gold-dim); color: var(--bg); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }

/* Placeholders */
.slot {
  background: #ebe1c9;
  border: 1px dashed #8b5a2b;
  color: var(--ink-soft);
  padding: 1.25rem 1rem;
  text-align: center;
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}
.slot__mark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0;
}
.slot__hint { margin: 0; font-family: var(--font-ui); font-size: 0.95rem; }
.slot__file { margin: 0; font-family: var(--font-ui); font-size: 0.75rem; color: #7a6a55; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1rem 1rem 1.5rem;
  align-items: start;
}
.gallery__heading {
  grid-column: 1 / -1;
  margin: 0.75rem 0 0;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--wood-light);
}
.gallery__heading:first-child {
  margin-top: 0;
}
.gallery figure {
  margin: 0;
  background: #1a1510;
  display: flex;
  flex-direction: column;
}
.gallery figcaption {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--wood-light);
  padding: 0.5rem 0.15rem 0.25rem;
}
.gallery img, .thesis-photos img, .thesis-book img, .diploma-frame img, .digital-frame img {
  width: 100%;
  height: auto;
  max-height: 58vh;
  object-fit: contain;
  background: #0c0a08;
}

/* Diploma pair / photo frame close-up */
.diploma-board, .frame-board {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem 1.25rem;
  background:
    linear-gradient(180deg, #2a2218, #1a1510);
}
.diploma-card, .frame-card {
  background: #f6eed8;
  color: var(--ink);
  border: 10px solid #2a2118;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 1.5rem 1.25rem;
  text-align: center;
  min-height: 14rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.diploma-card h2, .frame-card h2 {
  font-family: var(--font-serif);
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}
.diploma-card p, .frame-card p { margin: 0.2rem 0; font-family: var(--font-serif); }

/* Timeline calendar board */
.cal-board {
  background: #2a2a2a;
  padding: 1rem 0.75rem 1.25rem;
}
.cal-board__inner {
  background: #f6f1e6;
  color: var(--ink);
  border: 8px solid #d8d2c6;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  padding: 0.75rem 0.75rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.cal-board__title {
  font-family: var(--font-serif);
  text-align: center;
  margin: 0.2rem 0 0.8rem;
  font-size: 1.45rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.cal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}
.cal-cell {
  background: #fffdf7;
  border: 1px solid #ddd3c0;
  padding: 0.55rem 0.65rem 0.7rem;
  min-height: 4.5rem;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
}
.cal-cell:hover { border-color: var(--orange); }
a.cal-cell:focus-visible { box-shadow: var(--focus); }
.cal-cell__year {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 0.2rem;
}
.cal-cell__year::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--orange);
  margin-right: 0.4rem;
  vertical-align: 0.05rem;
}
.cal-cell h3 {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  margin: 0 0 0.2rem;
  color: var(--ink);
}
.cal-cell p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); font-family: var(--font-serif); }

/* Thesis photos */
.thesis-photos {
  display: grid;
  gap: 1rem;
  padding: 1rem 1rem 1.5rem;
  background: #1a1510;
  align-items: start;
}
.thesis-photos figure { margin: 0; }
.thesis-photos figcaption {
  color: var(--wood-light);
  font-size: 0.88rem;
  padding-top: 0.4rem;
}
.quote {
  border-left: 3px solid var(--gold-dim);
  padding: 0.1rem 0 0.1rem 1rem;
  margin: 0 0 1rem;
  color: var(--ink);
}
.cite { font-family: var(--font-ui); font-size: 0.85rem; color: var(--ink-soft); }

/* About (plain text) */
.about-page {
  background: var(--parchment);
  color: var(--ink);
  flex: 1;
}
.about-page a { color: var(--orange); }
.about-inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.about-inner h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: 0 0 0.6rem;
}
.about-inner h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 2rem 0 0.5rem;
}

/* Footer */
.site-footer {
  padding: 0.85rem 1.1rem 1.1rem;
  font-size: 0.8rem;
  color: var(--wood-light);
  border-top: 1px solid rgba(212, 175, 85, 0.18);
  background: var(--bg-2);
}
.site-footer p { margin: 0; }

/* 404 */
.plain-main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.plain-main h1 { font-family: var(--font-serif); }

@media (min-width: 900px) {
  .layout--split {
    flex-direction: row;
    align-items: stretch;
    min-height: calc(100vh - 8.5rem);
  }
  .layout--split .scene-wrap {
    flex: 1 1 62%;
    display: flex;
    align-items: center;
    background: #0c0a08;
  }
  .layout--split .journal {
    flex: 0 0 min(28rem, 38%);
    width: min(28rem, 38%);
    border-top: 0;
    border-left: 1px solid var(--parchment-edge);
    overflow: auto;
    max-height: calc(100vh - 8.5rem);
  }
  .gallery:not(.gallery--stack), .diploma-board, .digital-board, .thesis-photos {
    grid-template-columns: 1fr 1fr;
  }
  .cal-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .cal-grid { grid-template-columns: 1fr 1fr; }
  .gallery:not(.gallery--stack), .diploma-board, .digital-board, .thesis-photos { grid-template-columns: 1fr 1fr; }
}

/* No mobile tap-highlight boxes */
html, a, .hotspot { -webkit-tap-highlight-color: transparent; }


/* Digital photo frame overlay in the office scene */
.desk-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.desk-frame picture,
.desk-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  display: block;
}
.desk-frame__slide {
  opacity: 0;
  animation: desk-frame-cycle 48s linear infinite;
}
.desk-frame__slide:nth-child(1) { animation-delay: -1s; }
.desk-frame__slide:nth-child(2) { animation-delay: 5s; }
.desk-frame__slide:nth-child(3) { animation-delay: 11s; }
.desk-frame__slide:nth-child(4) { animation-delay: 17s; }
.desk-frame__slide:nth-child(5) { animation-delay: 23s; }
.desk-frame__slide:nth-child(6) { animation-delay: 29s; }
.desk-frame__slide:nth-child(7) { animation-delay: 35s; }
.desk-frame__slide:nth-child(8) { animation-delay: 41s; }
@keyframes desk-frame-cycle {
  /* 8 photos, 48 s loop, ~6 s each, 1 s crossfade — same per-photo timing as before */
  0% { opacity: 0; }
  2.083% { opacity: 1; }
  12.5% { opacity: 1; }
  14.583% { opacity: 0; }
  100% { opacity: 0; }
}

/* Framed diplomas */
.diploma-board {
  display: grid;
  gap: 2rem;
  padding: 2rem 1.25rem 2.25rem;
  background:
    radial-gradient(ellipse at 50% 0%, #2c241c, #1a1510 70%);
  justify-items: center;
}
.diploma-frame {
  margin: 0;
  width: 100%;
  max-width: 36rem;
}
.diploma-frame__wood {
  background:
    linear-gradient(145deg, #6a4a2a 0%, #4a3018 28%, #2e1c10 52%, #3d2814 78%, #5a3c22 100%);
  padding: 0.7rem;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 220, 160, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}
.diploma-frame__mat {
  background: #f3ead2;
  padding: 7.5%;
  box-shadow: inset 0 0 0 1px #d4c6a2;
}
.diploma-frame__mat img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  background: #f3ead2;
  box-shadow: 0 0 0 1px rgba(60, 40, 20, 0.18);
}
.diploma-frame figcaption {
  text-align: center;
  color: var(--wood-light);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  margin: 0.7rem 0 0;
}

/* Digital frames on /office/photo/ */
.digital-board {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem 1.25rem 2rem;
  background: #100e0c;
  justify-items: center;
}
.digital-frame {
  margin: 0;
  width: 100%;
  max-width: 34rem;
}
.digital-frame__bezel {
  background: #111;
  padding: 0.7rem 0.7rem 1rem;
  border-radius: 0.35rem;
  box-shadow:
    0 0 0 1px #000,
    0 0 24px rgba(255, 220, 160, 0.18),
    0 10px 28px rgba(0, 0, 0, 0.55);
}
.digital-frame__bezel img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 52vh;
  background: #000;
}
.digital-frame figcaption {
  text-align: center;
  color: var(--wood-light);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  margin: 0.65rem 0 0;
}

/* Document-style scenes: do not let .scene picture/img { height: 100% } cover captions */
.scene.scene--board picture,
.scene.scene--doc picture,
.scene.scene--gallery picture,
.scene.scene--frame picture,
.scene.scene--board img,
.scene.scene--doc img,
.scene.scene--gallery img,
.scene.scene--frame img {
  height: auto;
}

/* Open-book thesis figures */
.thesis-book {
  background:
    radial-gradient(ellipse at 50% 0%, #3a2e22, #1a1510 70%);
  padding: 1.25rem 0.85rem 1.75rem;
}
.thesis-book__spread {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  max-width: 70rem;
  margin: 0 auto;
  align-items: start;
}
.thesis-book__page {
  background:
    linear-gradient(180deg, #f7f1e4, #efe6d2);
  color: #2a2218;
  padding: 1rem 0.9rem 1.25rem;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(80, 60, 30, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.25rem;
  min-height: 0;
  overflow: visible;
}
.thesis-book__page figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}
.scene .thesis-book picture,
.scene .thesis-book img,
.thesis-book__page picture,
.thesis-book__page img {
  width: 100%;
  height: auto;
  max-height: 32vh;
  object-fit: contain;
  background: #fff;
  display: block;
  flex: 0 0 auto;
}
.thesis-book__page figcaption {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: #3a3228;
  margin: 0.45rem 0 0;
  line-height: 1.4;
  flex: 0 0 auto;
}
.thesis-book__cite {
  max-width: 70rem;
  margin: 0.9rem auto 0;
  text-align: center;
  color: var(--wood-light);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
@media (min-width: 800px) {
  .thesis-book__spread {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
  }
  .thesis-book__page:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow:
      6px 0 16px rgba(0, 0, 0, 0.18),
      0 10px 24px rgba(0, 0, 0, 0.35),
      inset 0 0 0 1px rgba(80, 60, 30, 0.12);
  }
  .thesis-book__page:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    box-shadow:
      -2px 0 16px rgba(0, 0, 0, 0.12),
      0 10px 24px rgba(0, 0, 0, 0.35),
      inset 0 0 0 1px rgba(80, 60, 30, 0.12);
  }
}

/* Oso construction-phase timeline */
.progression-head {
  padding: 1rem 1rem 0.25rem;
}
.progression-head .gallery__heading {
  margin: 0 0 0.65rem;
}
.progression {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}
.progression li {
  display: flex;
  align-items: center;
}
.progression li:not(:last-child)::after {
  content: "→";
  margin: 0 0.3rem;
  color: var(--gold-dim);
  font-size: 0.95rem;
}
.progression a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 0.4rem;
  border: 1px solid rgba(212, 175, 85, 0.55);
  border-radius: 999px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
}
.progression a:hover,
.progression a:focus-visible {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.phase-label {
  display: block;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 0 0 0.15rem;
}

/* Stanwood before / after: side by side on desktop, stacked on phones */
.stanwood {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem 2rem;
  padding: 0.25rem 0 1rem;
}
.stanwood__col .gallery__heading {
  padding-left: 1rem;
  margin: 0.5rem 0 0;
}
.gallery.gallery--stack {
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .stanwood {
    grid-template-columns: 1fr 1fr;
  }
}
