/* ============================================================
   Bella Duong — Portfolio
   Design system + motion system
   ============================================================ */

:root {
  --bg: #eee7d9;
  --bg-alt: #e5dcc9;
  --paper: #faf6ee;
  --ink: #2a2928;
  --ink-soft: #57534b;
  --muted: #8a8272;
  --jade: #3a7a5e;
  --jade-deep: #24543f;
  --jade-light: #8cc3a6;
  --terracotta: #b85c3c;
  --placeholder: #6b665b;
  --line: rgba(42, 41, 40, 0.2);

  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-hand: "Caveat", "Segoe Print", cursive;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.45, 0, 0.15, 1);
  --ease-wipe: cubic-bezier(0.65, 0, 0.35, 1);

  --pad-section: clamp(5rem, 11vw, 9.5rem);
  --pad-x: clamp(1.25rem, 5vw, 4.5rem);
  --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.35vw + 0.92rem, 1.1rem);
  line-height: 1.8;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain: fine speckle + soft mottling, generated with SVG noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1400;
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .26 0 0 0 0 .2 0 0 0 1.5 -.68'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.005' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .46 0 0 0 0 .39 0 0 0 0 .27 0 0 0 .9 -.36'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
}

::selection { background: var(--jade); color: #fff; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------
   Page enter / exit transition
   ------------------------------------------------------------ */
.page-veil {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 2000;
  transform-origin: top;
  transform: scaleY(0);
  pointer-events: none;
}
body.is-entering .page-veil {
  animation: veil-out 0.9s var(--ease-soft) forwards;
}
body.is-exiting .page-veil {
  transform-origin: bottom;
  animation: veil-in 0.45s var(--ease-soft) forwards;
  pointer-events: all;
}
@keyframes veil-out { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes veil-in  { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ------------------------------------------------------------
   Custom cursor (fine pointers only)
   ------------------------------------------------------------ */
.cursor-dot, .cursor-ring { display: none; }
@media (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor input,
  body.has-custom-cursor textarea,
  body.has-custom-cursor .polaroid,
  body.has-custom-cursor .g-item,
  body.has-custom-cursor .video-ph,
  body.has-custom-cursor .cw-item .cw-title {
    cursor: none;
  }
  .cursor-dot, .cursor-ring {
    display: block;
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3000;
    transform: translate(-50%, -50%);
  }
  .cursor-dot {
    width: 8px; height: 8px;
    background: var(--jade);
  }
  .cursor-ring {
    width: 38px; height: 38px;
    border: 1.5px solid rgba(58, 122, 94, 0.55);
    transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
                background-color 0.25s, border-color 0.25s;
  }
  body.cursor-hover .cursor-ring {
    width: 64px; height: 64px;
    background: rgba(58, 122, 94, 0.08);
    border-color: rgba(58, 122, 94, 0.9);
  }
}

/* ------------------------------------------------------------
   Reveal system
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
  will-change: auto;
}
.reveal-left  { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal-left.in-view, .reveal-right.in-view { transform: none; }
.reveal-scale { transform: scale(0.92); }
.reveal-scale.in-view { transform: scale(1); }

/* Masked line reveal (hero titles) */
.line-mask { display: block; overflow: hidden; padding-bottom: 0.08em; }
.line-mask > span {
  display: block;
  transform: translateY(115%);
  transition: transform 1.1s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.in-view .line-mask > span,
.line-mask.in-view > span { transform: translateY(0); }

/* ------------------------------------------------------------
   Header / nav
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad-x);
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}
.site-header.scrolled {
  background: rgba(238, 231, 217, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding: 0.7rem var(--pad-x);
}
.nav-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1102;
  transition: transform 0.35s var(--ease-out);
}
.nav-logo:hover { transform: scale(1.04); }
.nav-logo em {
  font-style: italic;
  color: var(--jade);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.1vw, 2.1rem);
  list-style: none;
}
.nav-links a {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.35rem 0;
  color: var(--ink-soft);
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--jade);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-links a.active { color: var(--ink); }
/* Résumé becomes a dark pill, like the reference's ENTRY button */
.nav-links li:last-child a {
  background: var(--ink);
  color: var(--bg);
  padding: 0.55rem 1.5rem;
  border-radius: 100px;
  transition: background 0.35s, color 0.35s;
}
.nav-links li:last-child a::after { display: none; }
.nav-links li:last-child a:hover,
.nav-links li:last-child a.active { background: var(--jade); color: #fff; }

/* Light header while it floats over the home hero photo */
.site-header.on-dark:not(.scrolled) .nav-logo,
.site-header.on-dark:not(.scrolled) .nav-logo em,
.site-header.on-dark:not(.scrolled) .nav-links a { color: #fff; }
.site-header.on-dark:not(.scrolled) .nav-links li:last-child a { background: var(--bg); color: var(--ink); }
.site-header.on-dark:not(.scrolled) .nav-links li:last-child a:hover { background: var(--jade); color: #fff; }
.site-header.on-dark:not(.scrolled) .nav-toggle span { background: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  position: relative;
  z-index: 1102;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 1.5px;
  background: var(--ink);
  margin: 6px auto;
  transition: transform 0.4s var(--ease-out), opacity 0.3s, background 0.3s;
}

/* Mobile overlay menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--ink);
  color: var(--bg);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--pad-x);
  clip-path: circle(0% at calc(100% - 3rem) 2.4rem);
  transition: clip-path 0.7s var(--ease-soft);
  visibility: hidden;
}
.nav-overlay ul { list-style: none; }
.nav-overlay a {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.2rem, 9vw, 4rem);
  line-height: 1.4;
  display: inline-block;
  color: var(--bg);
  transition: color 0.3s, transform 0.3s var(--ease-out);
}
.nav-overlay a:hover { color: var(--jade-light); transform: translateX(12px); }
.nav-overlay li {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
body.nav-open .nav-overlay {
  clip-path: circle(150% at calc(100% - 3rem) 2.4rem);
  visibility: visible;
}
body.nav-open .nav-overlay li {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.15s + var(--i) * 0.06s);
}
body.nav-open .nav-toggle span { background: var(--bg); }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
body.nav-open { overflow: hidden; }
body.nav-open .nav-logo { color: var(--bg); }

/* ------------------------------------------------------------
   Layout primitives + type
   ------------------------------------------------------------ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
section { padding-top: var(--pad-section); padding-bottom: var(--pad-section); }
section.tight { padding-top: calc(var(--pad-section) * 0.55); padding-bottom: calc(var(--pad-section) * 0.55); }
.bg-alt { background: var(--bg-alt); }
.bg-ink { background: var(--ink); color: var(--bg); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--jade);
  margin-bottom: 1.2rem;
}
.eyebrow::before {
  content: "";
  width: 2.6rem; height: 1px;
  background: var(--jade);
}
.bg-ink .eyebrow { color: var(--jade-light); }
.bg-ink .eyebrow::before { background: var(--jade-light); }

h1, h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.005em;
}
h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin-bottom: 1.6rem; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); margin-bottom: 1rem; }
.lede {
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 44ch;
}
p + p { margin-top: 1.1em; }

/* Libre Baskerville has no Vietnamese glyphs; words like "Huế" set in the
   display face need a serif that does. */
.vi,
.story-card .st-name .big.vi,
.cw-title.vi { font-family: "Noto Serif", Georgia, serif; }

/* Reference-style section title: huge italic word, hairline rule, italic sub on the right */
.sec-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  position: relative;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.sec-title::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: rgba(42, 41, 40, 0.35);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.4s var(--ease-out) 0.2s;
}
.sec-title.in-view::after { transform: scaleX(1); }
.sec-title .st-main {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3rem, 8.5vw, 7.2rem);
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: -0.14em;
}
.sec-title .st-sub {
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding-bottom: 0.55rem;
}

.grid-2 {
  display: grid;
  /* minmax(0, …): a zoomed PDF page or wide image must not stretch its column */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.grid-2 .push-down { transform: translateY(clamp(0px, 4vw, 56px)); }

/* Image frames w/ hover zoom */
.frame {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out), filter 0.6s;
}
.frame:hover img { transform: scale(1.06); }
.frame.tall { aspect-ratio: 3 / 4; }
.frame.wide { aspect-ratio: 16 / 10; }
.frame.square { aspect-ratio: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  padding: 0.95rem 1.9rem;
  border-radius: 100px;
  border: 1px solid var(--ink);
  position: relative;
  overflow: hidden;
  transition: color 0.35s var(--ease-out), border-color 0.35s;
  isolation: isolate;
  cursor: pointer;
  background: none;
  color: var(--ink);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  z-index: -1;
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
  border-radius: inherit;
}
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: translateY(0); }
.btn.jade { border-color: var(--jade); color: var(--jade-deep); }
.btn.jade::before { background: var(--jade); }
.btn.jade:hover { color: #fff; }
.btn.solid { background: var(--ink); color: var(--bg); }
.btn.solid::before { background: var(--jade); }
.btn.solid:hover { color: #fff; border-color: var(--jade); }
.btn .arr { transition: transform 0.35s var(--ease-out); font-style: normal; }
.btn:hover .arr { transform: translateX(5px); }
.bg-ink .btn { border-color: var(--bg); color: var(--bg); }
.bg-ink .btn::before { background: var(--bg); }
.bg-ink .btn:hover { color: var(--ink); }

/* Link w/ sweep underline */
.link-sweep {
  position: relative;
  font-weight: 600;
  color: var(--jade-deep);
  background-image: linear-gradient(var(--jade), var(--jade));
  background-size: 0% 1.5px;
  background-position: left calc(100% - 1px);
  background-repeat: no-repeat;
  transition: background-size 0.4s var(--ease-out);
  padding-bottom: 3px;
}
.link-sweep:hover { background-size: 100% 1.5px; }

/* ------------------------------------------------------------
   Home hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0 0 clamp(3rem, 8vh, 6rem);
  overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
}
.hero-slide.active { opacity: 1; }
.hero-slide.active img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 26, 20, 0.74) 0%, rgba(30, 26, 20, 0.12) 55%, rgba(30, 26, 20, 0.28) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  width: 100%;
}
.hero-kicker {
  font-weight: 500;
  font-size: clamp(0.78rem, 1.3vw, 0.9rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
}
.hero-title {
  font-size: clamp(3.4rem, 11.5vw, 9.8rem);
  line-height: 1;
  letter-spacing: 0.01em;
}
.hero-title .indent { padding-left: 0.9em; }
.hero-tag {
  margin-top: 1.6rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
}
.hero-meta {
  display: flex;
  gap: 2rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.hero-dots { display: flex; gap: 0.6rem; }
.hero-dots button {
  width: 34px; height: 2px;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.4s;
  padding: 0;
}
.hero-dots button.active { background: #fff; }
.hero-scroll {
  position: absolute;
  right: var(--pad-x);
  bottom: clamp(3rem, 8vh, 6rem);
  z-index: 2;
  color: #fff;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-scroll::after {
  content: "";
  width: 1px;
  height: 60px;
  background: rgba(255, 255, 255, 0.6);
  animation: scroll-pulse 2s var(--ease-soft) infinite;
  transform-origin: top;
}
@keyframes scroll-pulse {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Inner-page hero */
.hero-inner {
  padding-top: clamp(8rem, 18vh, 12rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
}
.hero-inner h1 {
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  line-height: 1.05;
}
.hero-inner .lede { margin-top: 1.6rem; }
.hero-inner .hero-index {
  position: absolute;
  top: clamp(7rem, 16vh, 10rem);
  right: var(--pad-x);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(4.5rem, 12vw, 9.5rem);
  line-height: 1;
  color: rgba(42, 41, 40, 0.09);
  pointer-events: none;
}
.hero-banner {
  margin-top: clamp(2rem, 5vw, 4rem);
}
.hero-banner .frame { border-radius: 0; aspect-ratio: 21 / 9; }

/* Split hero: title left, snapshot card right */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero-grid h1,
.hero-grid .contact-title {
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  overflow-wrap: break-word;
}
.hero-card {
  --hr: 2.5deg;
  position: relative;
  background: var(--paper);
  padding: 14px 14px 3.4rem;
  border-radius: 3px;
  box-shadow: 0 24px 48px rgba(42, 34, 22, 0.2);
  transform: rotate(var(--hr));
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
  max-width: 520px;
  justify-self: end;
  margin: 0;
}
.hero-card:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 34px 64px rgba(42, 34, 22, 0.26);
}
.hero-card::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 96px; height: 28px;
  background: rgba(196, 174, 132, 0.62);
  transform: translateX(-50%) rotate(calc(var(--hr) * -0.7));
  box-shadow: 0 1px 3px rgba(42, 34, 22, 0.12);
  z-index: 2;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 22px -20px -20px 22px;
  border: 1.5px solid var(--jade);
  border-radius: 4px;
  z-index: -1;
  opacity: 0.6;
}
.hero-card .ph {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
}
.hero-card .ph img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}
.hero-card:hover .ph img { transform: scale(1.05); }
.hero-card figcaption {
  position: absolute;
  left: 0; right: 0;
  bottom: 0.65rem;
  text-align: center;
  font-family: var(--font-hand);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  color: var(--ink-soft);
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { justify-self: center; margin-top: 1.5rem; max-width: 420px; width: 100%; }
}

/* ------------------------------------------------------------
   Marquee
   ------------------------------------------------------------ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 3rem;
  padding-right: 3rem;
  animation: marquee 30s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 3rem;
  color: var(--ink);
}
.marquee-track span::after {
  content: "✳";
  font-style: normal;
  color: var(--terracotta);
  font-size: 0.7em;
}
.marquee-track span:nth-child(even) { color: var(--jade); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------
   My Stories (home)
   ------------------------------------------------------------ */
.stories-body {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  align-items: start;
}
.stories-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.story-card {
  --d: 0s;
  position: relative;
  aspect-ratio: 460 / 585;
  overflow: hidden;
  background: var(--placeholder);
}
/* A flat placeholder curtain that peels away to the left to reveal the photo. */
.story-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: var(--placeholder);
  clip-path: inset(0 0 0 0);
}
.story-card.is-loaded::before {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.8s var(--ease-wipe) var(--d);
}
.story-card a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  padding: clamp(1.3rem, 2.4vw, 2.4rem) clamp(1.1rem, 2vw, 2rem);
  color: #fff;
}
.story-card .img {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  filter: grayscale(1);
  transition: filter 0.6s ease-out;
}
.story-card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.story-card .tint,
.story-card .shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.story-card .tint {
  background: rgba(30, 31, 33, 0.22);
  transition: opacity 0.6s ease-out;
}
.story-card .shade {
  background: linear-gradient(to top, rgba(22, 20, 16, 0.78) 0%, rgba(22, 20, 16, 0.25) 48%, transparent 70%);
}
@media (hover: hover) {
  .story-card a:hover .img { filter: grayscale(0); }
  .story-card a:hover .img img { transform: scale(1.1); }
  .story-card a:hover .tint { opacity: 0; }
}
.story-card .st-num {
  position: relative;
  z-index: 2;
  width: fit-content;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  line-height: 1;
  white-space: nowrap;
  transform-origin: left top;
  transform: rotate(90deg) translateY(-100%);
  mix-blend-mode: exclusion;
}
.story-card .st-text { position: relative; z-index: 2; }
.story-card .st-role {
  font-size: clamp(0.78rem, 0.95vw, 0.88rem);
  letter-spacing: 0.06em;
  margin-bottom: 0.8em;
  opacity: 0.92;
}
.story-card .st-name {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem;
  font-size: clamp(0.78rem, 0.95vw, 0.88rem);
  margin-bottom: 1em;
}
.story-card .st-name .big {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.7em;
  line-height: 1;
}
.story-card .st-head {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(0.98rem, 1.3vw, 1.18rem);
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin-bottom: 0.9em;
}
.story-card .st-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 0.8em;
  list-style: none;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.8rem, 0.95vw, 0.9rem);
  opacity: 0.9;
}
.stories-text {
  position: sticky;
  top: 5.5rem;
  padding: clamp(3rem, 9vw, 9rem) var(--pad-x) 2rem clamp(2.5rem, 6vw, 7rem);
}
.stories-lead {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 2.05vw, 1.85rem);
  line-height: 1.95;
  letter-spacing: 0.06em;
  margin-bottom: 2.2rem;
}
.stories-copy {
  line-height: 2.1;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.stories-btns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
.stories-btns .btn { width: 100%; }

/* ------------------------------------------------------------
   Chapters (home) — sticky counter + wipe sliders
   ------------------------------------------------------------ */
.chapters-wrap {
  --i: 0;
  display: flex;
  justify-content: space-between;
  gap: clamp(2rem, 4vw, 4rem);
  position: relative;
}
.ch-head {
  flex: 0 0 clamp(13rem, 21vw, 19rem);
  position: sticky;
  top: 7rem;
  height: calc(100svh - 9rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ch-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.8rem, 2.9vw, 2.9rem);
  line-height: 1.08;
  height: 2.3em;
  overflow: hidden;
}
.ch-title-track {
  display: block;
  transform: translateY(calc(var(--i) * -2.3em));
  transition: transform 0.8s var(--ease-out);
}
.ch-title-track > span { display: block; height: 2.3em; }
.ch-num {
  display: flex;
  align-items: flex-start;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(6rem, 12.5vw, 11.25rem);
  line-height: 1.1;
}
.ch-num .win {
  display: block;
  height: 1.1em;
  overflow: hidden;
  padding-right: 0.1em;
}
.ch-num .col {
  display: block;
  transform: translateY(calc(var(--i) * -1.1em));
  transition: transform 0.8s var(--ease-out);
}
.ch-num .col > span { display: block; height: 1.1em; }
.ch-body { flex: 1; min-width: 0; }
.chapter + .chapter { margin-top: clamp(6rem, 14vw, 14rem); }
.ch-head-sp { display: none; }
.ch-slider {
  position: relative;
  aspect-ratio: 1375 / 820;
  overflow: hidden;
  background: var(--placeholder);
  margin-bottom: clamp(2rem, 4vw, 3.4rem);
}
.ch-slider .slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}
.ch-slider .slide.is-under { z-index: 2; }
.ch-slider .slide.is-top { z-index: 3; }
.ch-slider .slide.is-leaving {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.6s var(--ease-wipe);
}
.ch-slider .slide img {
  position: absolute;
  top: 0; left: 0;
  width: 118%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  animation: ch-pan 16s linear infinite alternate;
  animation-play-state: paused;
}
.ch-slider .slide.is-top img,
.ch-slider .slide.is-under img { animation-play-state: running; }
@keyframes ch-pan {
  from { transform: translateX(0); }
  to { transform: translateX(-15.25%); }
}
.ch-label {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
}
.ch-text {
  display: flex;
  justify-content: space-between;
  gap: 2.25rem;
}
.ch-text h4 {
  flex: 0 0 38%;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  line-height: 1.55;
  letter-spacing: 0.02em;
}
.ch-text p {
  max-width: 54%;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.ch-cta {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(1.8rem, 3.5vw, 3rem);
}

/* ------------------------------------------------------------
   Scrapbook
   ------------------------------------------------------------ */
.scrapbook {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(58, 122, 94, 0.07), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(184, 92, 60, 0.07), transparent 40%),
    var(--bg-alt);
}
.scrapbook-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.2rem, 3.5vw, 3rem);
  margin-top: clamp(2rem, 5vw, 4rem);
}
.polaroid {
  --rot: 0deg;
  background: var(--paper);
  padding: 12px 12px 0;
  box-shadow: 0 8px 22px rgba(42, 34, 22, 0.16);
  transform: rotate(var(--rot));
  transition: transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease-out);
  width: clamp(180px, 24vw, 265px);
  position: relative;
  border-radius: 2px;
}
.polaroid::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 84px; height: 26px;
  background: rgba(196, 174, 132, 0.6);
  transform: translateX(-50%) rotate(calc(var(--rot) * -0.6));
  box-shadow: 0 1px 3px rgba(42, 34, 22, 0.12);
}
.polaroid:hover {
  transform: rotate(0deg) scale(1.07) translateY(-10px);
  box-shadow: 0 26px 48px rgba(42, 34, 22, 0.28);
  z-index: 3;
}
.polaroid .ph {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-alt);
}
.polaroid .ph img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.polaroid figcaption {
  font-family: var(--font-hand);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  text-align: center;
  padding: 0.55rem 0.3rem 0.8rem;
  color: var(--ink-soft);
  transform: rotate(-1deg);
}

/* Scrapbook page (photography portfolio) variants */
.scrapbook-page .polaroid { width: clamp(210px, 27vw, 310px); cursor: zoom-in; }
.polaroid.ph-wide .ph { aspect-ratio: 4 / 3; }
.polaroid.ph-tall .ph { aspect-ratio: 3 / 4; }
.polaroid.ph-lg { width: clamp(250px, 32vw, 380px); }
.scrapbook-grid .polaroid:nth-child(even) { margin-top: clamp(1rem, 4vw, 3.5rem); }
.scrapbook-grid .polaroid:nth-child(5n+3) { margin-top: clamp(0.5rem, 2vw, 1.75rem); }
.polaroid .ph-num {
  position: absolute;
  top: 18px;
  left: 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #fff;
  background: rgba(42, 41, 40, 0.6);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  opacity: 0;
  transition: opacity 0.4s;
}
.polaroid:hover .ph-num { opacity: 1; }

/* ------------------------------------------------------------
   Video placeholder
   ------------------------------------------------------------ */
.video-ph {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 45%, rgba(58, 122, 94, 0.28), transparent 55%),
    linear-gradient(135deg, #2a2723, #3a352d);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  cursor: pointer;
}
.video-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 22px, rgba(255, 255, 255, 0.025) 22px 44px);
}
.video-ph .play {
  width: clamp(64px, 8vw, 86px);
  height: clamp(64px, 8vw, 86px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  transition: transform 0.45s var(--ease-out), background 0.45s;
  position: relative;
  z-index: 1;
}
.video-ph .play::before {
  content: "";
  border-style: solid;
  border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
  margin-left: 5px;
}
.video-ph:hover .play { transform: scale(1.12); background: var(--jade); border-color: var(--jade); }
.video-ph .vp-label {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  z-index: 1;
}
.video-ph .vp-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  z-index: 1;
}

/* Placeholder card (missing content) */
.ph-card {
  border: 1px dashed rgba(42, 41, 40, 0.35);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: rgba(250, 246, 238, 0.55);
  transition: border-color 0.35s, transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.ph-card:hover {
  border-color: var(--jade);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(42, 34, 22, 0.08);
}
.ph-card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  border: 1px solid currentColor;
  border-radius: 100px;
  padding: 0.2rem 0.7rem;
  margin-bottom: 0.9rem;
}
.ph-card h4 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.ph-card p { font-size: 0.92rem; color: var(--ink-soft); }

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-top: 2.5rem;
}
@media (max-width: 900px) {
  .values-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Writing page
   ------------------------------------------------------------ */
.subnav {
  position: sticky;
  top: 4.2rem;
  z-index: 500;
  background: rgba(238, 231, 217, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem var(--pad-x);
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.3s;
}
.subnav a:hover, .subnav a.active { color: var(--jade-deep); }

.piece {
  border-top: 1px solid var(--line);
  padding: clamp(2rem, 4.5vw, 3.4rem) 0;
}
.piece-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.piece-head h3 { margin: 0; }
.piece-genre {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--jade);
}
.prose {
  max-width: 68ch;
  font-size: clamp(1.02rem, 1.4vw, 1.12rem);
  line-height: 1.95;
  color: #2f2c27;
}
.prose .drop::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.3em;
  float: left;
  line-height: 0.85;
  padding: 0.06em 0.12em 0 0;
  color: var(--jade-deep);
}
.prose .viet {
  font-style: italic;
  color: var(--jade-deep);
}
.expandable .more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.8s var(--ease-soft);
}
.expandable .more > div { overflow: hidden; }
.expandable.open .more { grid-template-rows: 1fr; }
.read-toggle {
  margin-top: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--jade-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0;
}
.read-toggle::after {
  content: "↓";
  font-style: normal;
  transition: transform 0.4s var(--ease-out);
}
.expandable.open .read-toggle::after { transform: rotate(180deg); }
.read-toggle:hover { color: var(--jade); }

.fade-out {
  position: relative;
}
.expandable:not(.open) .fade-out::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6rem;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}
.bg-alt .expandable:not(.open) .fade-out::after {
  background: linear-gradient(transparent, var(--bg-alt));
}

/* Creative writing index + piece reader */
.cw-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.cw-head h2 { font-style: normal; font-size: clamp(2.4rem, 4.6vw, 3.6rem); margin: 0; }
.cw-head p { max-width: 30ch; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; padding-top: 0.4rem; }
.cw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2.5rem, 6vw, 6rem);
}
.cw-item { border-top: 1px solid var(--line); padding: 2rem 0 2.2rem; }
.cw-meta {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.cw-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 0.8rem;
}
.cw-desc { color: var(--ink-soft); max-width: 46ch; line-height: 1.75; }
.cw-open {
  margin-top: 1.3rem;
  display: inline-flex;
  gap: 0.4rem;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.92rem;
  color: var(--terracotta);
  cursor: pointer;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: left bottom;
  background-repeat: no-repeat;
  transition: background-size 0.35s var(--ease-out);
}
.cw-open:hover { background-size: 100% 1px; }
.cw-open { position: relative; }
.cw-open::after { content: ""; position: absolute; inset: -0.8rem -1rem; }
.cw-item .cw-title { cursor: pointer; transition: color 0.3s; }
.cw-item .cw-title:hover { color: var(--terracotta); }
.reader[hidden] { display: none; }
.reader .reader-title { text-align: left; min-width: 0; font-size: 1.05rem; color: var(--ink); }
.reader-page {
  max-width: 70ch;
  margin: 0 auto;
  background: #fff;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4.5rem);
  box-shadow: 0 6px 22px rgba(42, 34, 22, 0.14);
}
.reader-page .cw-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.6rem; }
.reader-page .prose { max-width: none; }
@media (max-width: 768px) {
  .cw-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Article figure */
.article-fig {
  margin: 2.2rem 0;
  max-width: 68ch;
}
.article-fig figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* Custom PDF reader */
.pdf-viewer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(42, 34, 22, 0.07);
}
.pdf-toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  flex-wrap: wrap;
}
.pv-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font-size: 1.05rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s var(--ease-out);
  padding: 0;
}
.pv-btn:hover {
  background: var(--jade);
  border-color: var(--jade);
  color: #fff;
  transform: scale(1.08);
}
.pv-info {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-width: 3.4rem;
  text-align: center;
}
.pv-flex { flex: 1; }
/* Zoom controls only make sense in the enlarged reader */
.pdf-viewer:not(.enlarged) [data-pv="zoom-in"],
.pdf-viewer:not(.enlarged) [data-pv="zoom-out"],
.pdf-viewer:not(.enlarged) [data-pv-zoom] {
  display: none;
}
.pdf-stage {
  overflow: auto;
  /* Reserve the scrollbar's width up front so the fit-to-width page doesn't overflow once it appears */
  scrollbar-gutter: stable;
  height: clamp(420px, 62vh, 620px);
  background: var(--bg-alt);
  padding: 1rem;
}
.pdf-viewer:not(.enlarged) .pdf-stage { overflow-x: hidden; }
.pdf-stage canvas {
  display: block;
  margin: 0 auto;
  box-shadow: 0 6px 22px rgba(42, 34, 22, 0.14);
  background: #fff;
}
/* Résumé page: wide and tall enough to read at fit-to-width without zooming */
.pdf-stage canvas + canvas { margin-top: 1rem; }
.pdf-viewer-lg:not(.enlarged) { max-width: 960px; margin: 0 auto; }
.pdf-viewer-lg .pdf-stage { height: clamp(480px, calc(100svh - 9rem), 1240px); }
.pdf-viewer.enlarged {
  position: fixed;
  inset: clamp(0.75rem, 3vw, 2.5rem);
  z-index: 1600;
  box-shadow: 0 40px 90px rgba(20, 16, 10, 0.5);
}
.pdf-viewer.enlarged .pdf-stage {
  height: auto;
  flex: 1;
}
body.pdf-enlarged::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 12, 0.8);
  z-index: 1590;
}

/* ------------------------------------------------------------
   Magazine flip-book (Writing → The Governor's Review)
   Fixed pixel pages, scaled as a whole by js/magazine.js
   ------------------------------------------------------------ */
.mag { margin-top: clamp(2rem, 4vw, 3rem); outline: none; }
.mag-stage { position: relative; }
.mag-scale { top: 0; left: 0; transform-origin: top left; }
.mag-book {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 2400px;
  transition: transform 0.9s var(--ease-soft);
}
.mag-book.is-spread.at-start { transform: translateX(-25%); }
.mag-book.is-spread.at-end { transform: translateX(25%); }
.mag-book:not(.is-ready) .mag-page { margin: 0 auto 1rem; max-width: 460px; }
.leaf {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease-soft);
}
.mag-book:not(.is-spread) .leaf { left: 0; width: 100%; }
.leaf.flipped { transform: rotateY(-180deg); }
.mag-page {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 30px 32px;
  background: #fbfaf6;
  color: #1d1c1a;
  font-family: "Noto Serif", Georgia, serif;
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: 0;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow: 0 16px 36px rgba(42, 34, 22, 0.2);
}
.is-ready .mag-page { position: absolute; top: 0; left: 0; }
.mag-page.back { transform: rotateY(180deg); }
.is-spread .mag-page.front { background-image: linear-gradient(to right, rgba(0, 0, 0, 0.09), transparent 7%); }
.is-spread .mag-page.back { background-image: linear-gradient(to left, rgba(0, 0, 0, 0.09), transparent 7%); }
.mag-run {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10px;
  padding-bottom: 5px;
  margin-bottom: 12px;
  border-bottom: 0.75px solid #1d1c1a;
}
.mag-run em { font-style: normal; color: #b3261e; }
.mag-page.back .mag-run { flex-direction: row-reverse; }
.mag-cols {
  flex: 1;
  min-height: 0;
  column-count: 2;
  column-gap: 18px;
  column-fill: auto;
  overflow: hidden;
}
.mag-book:not(.is-spread) .mag-cols { column-count: 1; }
.mag-cols p, .mag-flow p {
  margin: 0;
  text-indent: 1.3em;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.mag-cols p + p, .mag-flow p + p { margin-top: 0; }
.mag-cols .cont, .mag-cols h4 + p, .mag-flow h4 + p, .mag-cols .mag-drop, .mag-flow .mag-drop { text-indent: 0; }
.mag-page h4 {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 1em;
  line-height: 1.5;
  margin: 0.9em 0 0.15em;
  break-after: avoid;
}
.mag-titleblock {
  column-span: all;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 0.75px solid #1d1c1a;
}
.mag-page .mag-kicker, .mag-flow .mag-kicker { color: #b3261e; font-size: 11px; margin: 0 0 3px; text-indent: 0; text-align: left; }
.mag-page h3, .mag-flow h3 {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 5px;
}
.mag-dek { font-weight: 700; font-size: 11.5px; line-height: 1.35; text-align: left !important; text-indent: 0 !important; margin: 0 0 4px !important; }
.mag-by { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; text-indent: 0 !important; text-align: left !important; }
.mag-drop::first-letter { float: left; font-size: 3.4em; line-height: 0.78; padding: 0.06em 0.07em 0 0; }
.mag-drop .sc { font-variant: small-caps; }
.mag-endmark { color: #b3261e; font-size: 0.8em; }
.mag-page a, .mag-flow a { color: #2457a6; text-decoration: underline; text-underline-offset: 2px; }
.mag-cover { background: #23201c radial-gradient(circle at 80% 15%, rgba(179, 38, 30, 0.25), transparent 55%); color: #f4efe6; padding: 0; }
.mag-mast {
  background: #b3261e;
  color: #fff;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  padding: 16px 22px 14px;
}
.mag-mast span { display: block; }
.mag-mast span:first-child { font-size: 18px; margin-bottom: 4px; }
.mag-mast span:last-child { font-size: 38px; }
.mag-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mag-end { justify-content: center; align-items: center; text-align: center; gap: 14px; padding: 40px 36px; }
.mag-end .mag-mast { padding: 12px 18px 10px; }
.mag-end .mag-mast span:first-child { font-size: 12px; }
.mag-end .mag-mast span:last-child { font-size: 24px; }
.mag-end p { margin: 0; max-width: 32ch; }
.mag-end .mag-kicker { font-size: 12px; text-align: center; }
.mag-orig { font-style: italic; color: #5a564f; font-size: 11.5px; }
.mag-page .mag-link { color: #b3261e; font-weight: 700; text-decoration: none; }
.mag-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.6rem;
}
.mag-controls .pv-info { min-width: 9rem; }
.pv-btn:disabled { opacity: 0.35; pointer-events: none; }

/* Back to top */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s, visibility 0.35s, transform 0.35s var(--ease-out), background 0.3s, color 0.3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ink); color: var(--bg); }

/* Honors / roles list (resume details) */
.honors-list { list-style: none; border-top: 1px solid var(--line); }
.honors-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.honors-list b { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 1.12rem; }
.honors-list span { color: var(--ink-soft); text-align: right; max-width: 52ch; }
@media (max-width: 700px) {
  .honors-list li { flex-direction: column; gap: 0.3rem; }
  .honors-list span { text-align: left; }
}

/* ------------------------------------------------------------
   Leadership / alternating blocks
   ------------------------------------------------------------ */
.stat-row {
  display: flex;
  gap: clamp(2rem, 5vw, 4.5rem);
  flex-wrap: wrap;
  margin-top: 2.2rem;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.2rem, 4.8vw, 3.4rem);
  line-height: 1.1;
  color: var(--jade-deep);
}
.stat span {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.8rem, 2vw, 1.4rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.photo-strip .frame:nth-child(2) { transform: translateY(clamp(0px, 2.5vw, 30px)); }

/* ------------------------------------------------------------
   Galleries
   ------------------------------------------------------------ */
.masonry {
  columns: 3;
  column-gap: clamp(0.9rem, 2vw, 1.4rem);
}
.masonry .frame {
  margin-bottom: clamp(0.9rem, 2vw, 1.4rem);
  break-inside: avoid;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: clamp(0.9rem, 2vw, 1.4rem);
}
.photo-grid .g-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}
.photo-grid .g-item.tall2 { grid-row: span 2; }
.photo-grid .g-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.photo-grid .g-item:hover img { transform: scale(1.06); }
.photo-grid .g-item .g-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.2rem 1rem 0.9rem;
  background: linear-gradient(transparent, rgba(22, 20, 16, 0.65));
  color: #fff;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.92rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s, transform 0.4s var(--ease-out);
}
.photo-grid .g-item:hover .g-cap { opacity: 1; transform: none; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(20, 17, 12, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(92vw, 1400px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
  transform: scale(0.96);
  transition: transform 0.45s var(--ease-out);
}
.lightbox.open img { transform: scale(1); }
.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.lightbox button:hover {
  background: var(--jade);
  border-color: var(--jade);
  box-shadow: 0 0 0 6px rgba(58, 122, 94, 0.35);
}
.lb-close { top: 1.4rem; right: 1.4rem; }
.lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
}

/* ------------------------------------------------------------
   Contact
   ------------------------------------------------------------ */
.resume-hero { padding-top: clamp(7.5rem, 15vh, 10rem); }
.resume-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  max-width: 960px;
  margin: 0 auto clamp(1.8rem, 3.5vw, 2.6rem);
}
.resume-head h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); line-height: 1.04; }
.contact-hero {
  min-height: 78svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(8rem, 16vh, 11rem);
}
.contact-title {
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 1.02;
}
.contact-title .accent { color: var(--jade); }
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3.6vw, 2.8rem);
  display: block;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.45s var(--ease-out), box-shadow 0.45s;
  background: rgba(250, 246, 238, 0.6);
}
.contact-card::after {
  content: "→";
  position: absolute;
  top: 1.6rem; right: 1.8rem;
  font-size: 1.5rem;
  color: var(--jade);
  transition: transform 0.4s var(--ease-out);
}
.contact-card:hover {
  border-color: var(--jade);
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(42, 34, 22, 0.1);
}
.contact-card:hover::after { transform: translate(6px, -6px) rotate(-45deg); }
.contact-card .cc-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.contact-card .cc-value {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.3vw, 1.65rem);
  word-break: break-word;
}
.contact-card .cc-note { font-size: 0.88rem; color: var(--muted); margin-top: 0.7rem; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(3.5rem, 7vw, 6rem) var(--pad-x) 2rem;
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.footer-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.1;
}
.footer-name em { color: var(--jade-light); }
.footer-tag { color: rgba(238, 231, 217, 0.6); margin-top: 0.9rem; max-width: 34ch; font-size: 0.95rem; }
.site-footer h5 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  color: rgba(238, 231, 217, 0.5);
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; }
.site-footer ul a {
  display: inline-block;
  padding: 0.28rem 0;
  color: rgba(238, 231, 217, 0.85);
  font-size: 0.95rem;
  transition: color 0.3s, transform 0.3s var(--ease-out);
}
.site-footer ul a:hover { color: var(--jade-light); transform: translateX(6px); }
.footer-base {
  max-width: 1280px;
  margin: 3rem auto 0;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(238, 231, 217, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: rgba(238, 231, 217, 0.5);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .stories-body { grid-template-columns: 1fr; }
  .stories-text {
    position: static;
    order: -1;
    padding: 0 var(--pad-x) clamp(2.5rem, 6vw, 4rem);
    max-width: 760px;
  }
}
@media (max-width: 900px) {
  .masonry { columns: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ch-head { display: none; }
  .ch-head-sp {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  .ch-head-sp .t {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    line-height: 1.1;
  }
  .ch-head-sp .n {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(2.6rem, 9vw, 3.6rem);
    line-height: 1;
  }
  .ch-text { flex-direction: column; gap: 1rem; }
  .ch-text h4 { flex: none; }
  .ch-text p { max-width: none; }
}
/* The long sitemap labels wrap below ~960px, so switch to the menu button there */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-2 .push-down { transform: none; }
  .contact-cards { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: 1fr 1fr; }
  .photo-strip .frame:nth-child(2) { transform: none; }
  .hero-scroll { display: none; }
  .subnav { top: 3.6rem; }
  .photo-grid { grid-auto-rows: 200px; }
  .stories-btns { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stories-cards { grid-template-columns: 1fr; }
  .story-card { aspect-ratio: 4 / 5; }
}
@media (max-width: 560px) {
  .masonry { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: 1fr; }
  .polaroid { width: min(74vw, 300px); }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .line-mask > span { opacity: 1; transform: none; }
  .cursor-dot, .cursor-ring { display: none; }
}
