/* The Next Page · landing page. The look comes from the film: cream paper, sepia ink, one gold line, the Middle School's green door,
   a wooden table for the things laid on it. No outside fonts or scripts: everything is served from this folder. */
@font-face { font-family: "Caveat"; src: url("fonts/Caveat-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
:root {
  --paper: #f4ecd9; --sheet: #fbf7ec; --ink: #34261c; --ink-soft: #5a4b3f; --muted: #7d7064;
  --gold: #dda727; --gold-deep: #b5821a; --green: #3da644; --green-deep: #24782c; --blue-deep: #2f4f7f;
  --wood: #9e8870; --wood-deep: #7f6b56; --hair: rgba(52, 38, 28, .16);
  --serif: "Baskerville", "Libre Baskerville", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Avenir Next", "Avenir", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Script", cursive;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .25 0 0 0 0 .17 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --pad: clamp(20px, 5vw, 72px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper) var(--grain); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.65; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sheet); padding: 8px 14px; border-radius: 6px; z-index: 99; }
.skip:focus { left: 8px; }

/* the line that keeps going: a gold stroke across the top that grows as the page is read */
.progress { position: fixed; top: 0; left: 0; height: 5px; width: 0; background: var(--gold); border-radius: 0 4px 4px 0; z-index: 60; box-shadow: 0 1px 0 rgba(120, 80, 10, .25); }

.nav { position: fixed; top: 16px; right: 16px; z-index: 50; display: flex; gap: 2px; padding: 5px; background: rgba(251, 247, 236, .94); border: 1px solid var(--hair); border-radius: 999px; box-shadow: 0 6px 20px rgba(40, 28, 18, .16); transform: translateY(-90px); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.nav.on { transform: none; }
.nav a { font-size: 14px; font-weight: 600; text-decoration: none; padding: 7px 13px; border-radius: 999px; color: var(--ink-soft); }
.nav a:hover, .nav a.here { background: var(--ink); color: var(--sheet); }

/* ───────── the first page: the title, and the door ───────── */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: var(--pad); overflow: hidden; }
.hero-art { position: absolute; top: 0; right: 0; bottom: 0; width: min(60vw, 1040px); background: url("img/door.jpg") 58% center / cover no-repeat; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26%); mask-image: linear-gradient(to right, transparent 0, #000 26%); transform: translateY(var(--py, 0)) scale(1.04); will-change: transform; }
.hero-text { position: relative; z-index: 2; max-width: min(640px, 52vw); }
.kicker { margin: 0 0 clamp(14px, 3vh, 34px); font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--blue-deep); line-height: 1.5; }
.title { margin: 0; font-family: var(--hand); font-weight: 700; font-size: clamp(76px, 12.5vw, 196px); line-height: .86; letter-spacing: -.01em; color: var(--ink); }
.title span { display: inline-block; padding: .08em .12em .12em 0; }
.write { clip-path: inset(-10% 100% -20% 0); transition: clip-path 1.25s cubic-bezier(.45, .05, .35, 1); }
.write.in { clip-path: inset(-10% -6% -20% 0); }
.write.d2 { transition-delay: .7s; }
.strokes { margin: clamp(2px, 1vh, 10px) 0 clamp(18px, 4vh, 40px); }
.stroke { display: block; height: clamp(11px, 1.5vw, 20px); border-radius: 10px 16px 9px 13px / 9px 7px 12px 6px; transform: rotate(-.7deg) scaleX(0); transform-origin: left center; transition: transform .7s cubic-bezier(.3, .8, .3, 1) 1.5s; }
.stroke.gold { width: min(72%, 440px); background: var(--gold); opacity: .92; }
.stroke.green { width: min(52%, 320px); margin: clamp(8px, 1.2vw, 14px) 0 0 clamp(22px, 3vw, 46px); background: var(--green); opacity: .9; transform: rotate(.5deg) scaleX(0); transition-delay: 1.8s; }
.stroke.in { transform: rotate(-.7deg) scaleX(1); }
.stroke.green.in { transform: rotate(.5deg) scaleX(1); }
.who { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -.01em; }
.role { margin: 8px 0 0; font-size: clamp(16px, 1.5vw, 21px); color: var(--ink-soft); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 4vh, 40px); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; border: 1.5px solid var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; color: var(--ink); background: transparent; cursor: pointer; font-family: inherit; transition: transform .2s, background .2s, color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(40, 28, 18, .18); }
.btn.primary { background: var(--ink); color: var(--sheet); }
.btn.light { border-color: rgba(255, 255, 255, .8); color: #fff; }
.btn.light[aria-pressed="true"] { background: #fff; color: var(--ink); }
.btn svg { width: 16px; height: 16px; flex: none; }
.walk { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(18px, 4vh, 44px); z-index: 2; display: flex; align-items: center; gap: 14px; font-family: var(--hand); font-size: 24px; color: var(--ink-soft); }
.walk svg { width: min(240px, 34vw); height: 12px; overflow: visible; }
.walk path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 14 13; animation: walk 2.6s linear infinite; }
@keyframes walk { to { stroke-dashoffset: -54; } }

/* ───────── shared pieces ───────── */
section { position: relative; }
.wrap { width: min(1120px, 100% - 2 * var(--pad)); margin: 0 auto; }
.band { padding: clamp(64px, 10vw, 128px) 0; }
.head { margin: 0 0 clamp(26px, 4vw, 44px); }
.head h2 { margin: 0; font-family: var(--hand); font-weight: 700; font-size: clamp(54px, 7vw, 96px); line-height: .95; }
.head p { margin: 14px 0 0; max-width: 46em; color: var(--ink-soft); }
/* under each heading: the ground, and a door, drawn in one line as it comes into view */
.ground { display: block; width: min(520px, 100%); height: auto; margin-top: 6px; overflow: visible; }
.ground path { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.9s cubic-bezier(.4, .1, .3, 1) .15s; }
.head.in .ground path { stroke-dashoffset: 0; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.sheet { background: var(--sheet) var(--grain); border-radius: 3px; box-shadow: 0 22px 48px rgba(40, 28, 18, .34), 0 2px 5px rgba(40, 28, 18, .2); }

/* ───────── the table: wood, and what is laid on it ───────── */
.desk { background-color: var(--wood); background-image: var(--grain), repeating-linear-gradient(2deg, rgba(60, 40, 22, .10) 0 2px, rgba(255, 240, 220, .05) 2px 5px, transparent 5px 13px), linear-gradient(180deg, rgba(255, 245, 230, .10), rgba(40, 26, 14, .16)); color: #fff; }
.desk .head h2 { color: #fff; text-shadow: 0 2px 0 rgba(40, 28, 18, .25); }
.desk .head p { color: rgba(255, 250, 240, .9); }
.player { position: relative; background: var(--sheet); border: clamp(6px, 1vw, 12px) solid var(--sheet); border-radius: 4px; box-shadow: 0 30px 60px rgba(30, 20, 12, .5), 0 3px 6px rgba(30, 20, 12, .3); transform: rotate(-.35deg); }
.player video { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; background: #1b1511; }
.play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; background: rgba(30, 20, 12, .08); transition: background .3s; }
.play:hover { background: rgba(30, 20, 12, .0); }
.play span { display: grid; place-items: center; width: clamp(72px, 9vw, 116px); aspect-ratio: 1; border-radius: 50%; background: var(--gold); box-shadow: 0 10px 30px rgba(30, 20, 12, .45); transition: transform .25s; }
.play:hover span { transform: scale(1.08); }
.play svg { width: 38%; margin-left: 8%; fill: var(--ink); }
.play.off { display: none; }
.film-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.film-bar .note { margin-left: auto; font-family: var(--hand); font-size: 25px; color: rgba(255, 250, 240, .95); }
.quality { display: inline-flex; border: 1.5px solid rgba(255, 255, 255, .8); border-radius: 999px; overflow: hidden; }
.quality button { border: 0; background: transparent; color: #fff; font: inherit; font-size: 15px; font-weight: 700; padding: 11px 16px; cursor: pointer; }
.quality button[aria-pressed="true"] { background: #fff; color: var(--ink); }

/* ───────── the letter ───────── */
.letter { width: min(720px, 100% - 2 * var(--pad)); margin: 0 auto; font-size: clamp(17px, .5vw + 15.5px, 20px); }
.letter p { margin: 0 0 1.1em; }
.letter .dear { font-weight: 700; }
.letter blockquote { margin: 1.5em 0; padding: .2em 0 .2em 1em; border-left: 4px solid var(--green); font-family: var(--serif); font-style: italic; font-size: 1.32em; line-height: 1.35; }
.letter blockquote cite { display: block; margin-top: .4em; font-family: var(--sans); font-style: normal; font-size: .58em; color: var(--muted); }
.letter q { font-family: var(--serif); font-style: italic; font-size: 1.1em; quotes: "“" "”"; }
.letter .turn { margin: 1.4em 0; font-family: var(--hand); font-weight: 700; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.08; color: var(--ink); }
.letter .sign { margin-top: 2em; font-family: var(--serif); font-weight: 600; font-size: 1.35em; }
.letter .sign small { display: block; font-family: var(--sans); font-weight: 400; font-size: .62em; color: var(--muted); }
.fig { width: min(1180px, 100% - 2 * var(--pad)); margin: clamp(40px, 7vw, 84px) auto; }
.fig .frame { overflow: hidden; border-radius: 4px; box-shadow: 0 22px 50px rgba(40, 28, 18, .3); }
.fig img { width: 100%; transform: translateY(var(--py, 0)) scale(1.06); will-change: transform; }
.fig figcaption { margin-top: 14px; font-family: var(--hand); font-size: clamp(22px, 2.2vw, 28px); color: var(--ink-soft); text-align: center; }

/* ───────── the résumé ───────── */
#cv { display: block; width: 100%; border: 0; min-height: 600px; }
.cv-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ───────── the documents: three sheets on the table ───────── */
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 30px); }
.doc { display: flex; flex-direction: column; padding: 26px 24px 22px; color: var(--ink); text-decoration: none; position: relative; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.doc:nth-child(1) { transform: rotate(-1.1deg); } .doc:nth-child(2) { transform: rotate(.6deg); } .doc:nth-child(3) { transform: rotate(-.4deg); }
.doc:hover { transform: translateY(-8px) rotate(0); box-shadow: 0 34px 60px rgba(30, 20, 12, .45); }
.doc .bar { height: 5px; border-radius: 3px; margin-bottom: 18px; background: linear-gradient(to right, var(--gold) 0 28%, var(--green) 28% 72%, #7d60b6 72% 100%); }
.doc h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.1; }
.doc p { margin: 10px 0 20px; font-size: 16px; line-height: 1.5; color: var(--ink-soft); flex: 1; }
.doc .get { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; }
.doc .get svg { width: 18px; height: 18px; }
.doc small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ───────── the last page ───────── */
.open { padding: clamp(64px, 10vw, 128px) 0 0; text-align: center; }
.open .last { margin: 0 auto; max-width: 15em; font-family: var(--hand); font-weight: 700; font-size: clamp(44px, 6.4vw, 92px); line-height: 1; }
.open .reach { margin: clamp(22px, 4vw, 40px) auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.open .fig { margin-bottom: 0; }
footer { padding: 30px var(--pad) 44px; text-align: center; font-size: 14px; color: var(--muted); }
footer p { margin: 4px 0; }
footer .credit { font-family: var(--serif); font-style: italic; }

@media (max-width: 860px) {
  body { font-size: 17px; }
  .hero { flex-direction: column; align-items: stretch; justify-content: flex-end; padding-top: 0; min-height: 100vh; min-height: 100svh; }
  .hero-art { position: relative; width: auto; margin: 0 calc(-1 * var(--pad)); height: 44vh; height: 44svh; flex: none; background-position: 62% 40%; -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); }
  .hero-text { max-width: none; margin-top: -6vh; padding-bottom: 70px; }
  .title { font-size: clamp(72px, 23vw, 132px); }
  .nav { left: 12px; right: 12px; justify-content: space-between; top: 10px; }
  .nav a { padding: 7px 9px; font-size: 13.5px; }
  .docs { grid-template-columns: 1fr; }
  .doc { transform: none !important; }
  .film-bar .note { margin-left: 0; flex-basis: 100%; }
  .walk { font-size: 20px; gap: 10px; } .walk svg { width: 64px; flex: none; }
  .player { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .write, .stroke, .ground path { transition: none !important; }
  .reveal { opacity: 1; transform: none; } .write { clip-path: none; } .stroke { transform: none !important; } .ground path { stroke-dashoffset: 0; }
  .walk path { animation: none; }
  .hero-art, .fig img { transform: none; }
}
@media print { .nav, .progress, .play, .walk { display: none; } .reveal { opacity: 1; transform: none; } }
