/* PAVE — one stylesheet for every page.
   Design tokens first: change a value here and the whole site follows. */
:root {
  --cream: #fbf7f0;
  --paper: #fffdf9;
  --navy: #16213e;
  --navy-soft: #4a5370;
  --on-navy-soft: #b9c1d9;
  --blue: #dce8f5;
  --blush: #f7dfdb;
  --green: #dfecdf;
  --yellow: #fbf0c8;
  --lilac: #e7e0f3;
  --line: #e4ddd0;
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --hand: "Caveat", cursive;
  --radius: 18px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* hidden always wins, even over classes like .btn */
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--navy); font: 17px/1.65 var(--sans); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: 62ch; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.eyebrow { font: 700 .78rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--navy-soft); margin-bottom: 1rem; }
.hand { font: 500 1.7rem/1.2 var(--hand); color: var(--navy-soft); }
.lead { font-size: 1.15rem; }
.muted { color: var(--navy-soft); font-size: .95rem; }
.quote { font: 400 clamp(1.3rem, 2.5vw, 1.6rem)/1.4 var(--serif); }

/* ---------- Page sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 1rem; }
.hero { padding-top: clamp(2rem, 5vw, 4rem); }
.wrap { max-width: 1120px; margin: 0 auto; }
.narrow { max-width: 760px; margin: 0 auto; }
.center { text-align: center; }
.center p, p.center { margin-inline: auto; }
.navy { background: var(--navy); color: var(--cream); }
.navy .eyebrow, .navy .hand, .navy .muted { color: var(--on-navy-soft); }
.bg-blue { background: var(--blue); }
.bg-blush { background: var(--blush); }
.bg-green { background: var(--green); }
.bg-yellow { background: var(--yellow); }
.bg-lilac { background: var(--lilac); }
.tile { border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem); color: var(--navy); }

/* Two columns that stack on small screens. */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
/* Auto grid: as many columns as fit. Set --min on the element to change column width. */
.grid { display: grid; gap: 2rem; margin-top: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 220px)), 1fr)); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* ---------- Header and footer ---------- */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding: 1.25rem clamp(1rem, 4vw, 3rem); }
.logo { font: 600 1.6rem/1 var(--serif); letter-spacing: .04em; text-decoration: none; }
.logo span { font: 500 1.2rem var(--hand); letter-spacing: 0; color: var(--navy-soft); margin-left: .3rem; }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
nav a { text-decoration: none; font-size: .95rem; text-underline-offset: 6px; }
nav a:hover { text-decoration: underline; }
nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; font-weight: 500; }
@media (max-width: 860px) { .site-header { flex-direction: column; } .site-header nav { justify-content: center; } }

.site-footer { background: var(--navy); color: var(--cream); text-align: center; padding: 4rem 1rem 3rem; border-top: 1px solid #2f3a5c; }
.site-footer nav { justify-content: center; margin: 1.5rem 0; }
.site-footer p { margin-inline: auto; color: var(--on-navy-soft); }
.site-footer .logo span { color: var(--on-navy-soft); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--navy); color: var(--cream); font: 500 1rem var(--sans); padding: .85rem 1.6rem; border: 1.5px solid transparent; border-radius: 999px; text-decoration: none; cursor: pointer; }
.btn:hover { background: #26345c; }
.navy .btn { background: var(--cream); color: var(--navy); }
.btn-ghost, .btn-ghost:hover { background: transparent; color: inherit; border-color: currentColor; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.center .actions { justify-content: center; }

/* ---------- Images (grey box with its number until the real file is added) ---------- */
.photo { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--blue); }
.photo.wide { aspect-ratio: 16 / 7; }
.photo::before { content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; font: 700 .8rem var(--sans); letter-spacing: .14em; color: var(--navy-soft); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 800px) { .photo { aspect-ratio: 4 / 3; } }

/* ---------- Icons and doodles ---------- */
.icon { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.doodle { fill: none; stroke: var(--navy-soft); stroke-width: 2; stroke-linecap: round; opacity: .6; }

/* ---------- Reusable pieces ---------- */
.num { display: block; font: 400 2.6rem/1 var(--serif); color: var(--navy-soft); margin-bottom: .75rem; }
.navy .num { color: var(--on-navy-soft); }
.label { display: block; font: 700 .8rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35rem; }

.tags { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .8rem; font-size: .88rem; }
.navy .tags li { background: transparent; border-color: #3b4668; }

/* Horizontal process that turns vertical on mobile. */
.flow { list-style: none; padding: 0; margin: 2.5rem 0 0; display: flex; gap: 2.75rem; }
.flow > li { flex: 1; position: relative; }
.flow > li:not(:last-child)::after { content: "→"; position: absolute; right: -2rem; top: -.2rem; font-size: 1.3rem; opacity: .5; }
.flow a { display: block; text-decoration: none; }
.flow a:hover .label { text-decoration: underline; }
@media (max-width: 800px) {
  .flow { flex-direction: column; gap: 2.5rem; }
  .flow > li:not(:last-child)::after { content: "↓"; right: auto; left: 0; top: auto; bottom: -2.3rem; }
}

/* Short word chain: LEARN → OBSERVE → TRY. Wraps instead of scrolling. */
.arrows { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem .9rem; font: 700 .9rem var(--sans); letter-spacing: .12em; }
.arrows li:not(:last-child)::after { content: "→"; margin-left: .9rem; opacity: .5; }
.arrows .here { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Vertical chain with dots. */
.chain { list-style: none; padding: 0; margin: 2rem 0 0; }
.chain > li { position: relative; padding: 0 0 2rem 2.5rem; }
.chain > li::before { content: ""; position: absolute; left: 0; top: .45rem; width: .8rem; height: .8rem; border-radius: 50%; background: currentColor; }
.chain > li:not(:last-child)::after { content: ""; position: absolute; left: calc(.4rem - 1px); top: 1.5rem; bottom: .3rem; border-left: 2px solid currentColor; opacity: .25; }
.chain h3 { margin-bottom: .25rem; }
.chain p { margin: 0; }

/* Label / text rows. */
.rows { margin: 2rem 0 0; }
.rows > div { display: grid; grid-template-columns: 14rem 1fr; gap: .5rem 2rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.navy .rows > div { border-color: #2f3a5c; }
.rows dt { font: 400 1.25rem/1.3 var(--serif); }
.rows dd { margin: 0; }
@media (max-width: 640px) { .rows > div { grid-template-columns: 1fr; } }

/* Key takeaway + lesson navigation. */
.takeaway { background: var(--yellow); border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.5rem); }
.takeaway p { font: 400 clamp(1.2rem, 2.4vw, 1.55rem)/1.45 var(--serif); margin: 0; max-width: none; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.pager a { font-weight: 500; text-decoration: none; }
.pager a:hover { text-decoration: underline; }

/* ---------- Form fields (nothing is saved anywhere) ---------- */
label { display: block; font-weight: 500; margin: 1.25rem 0 .4rem; }
input[type="text"], input[type="number"], textarea { width: 100%; font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; }
textarea { min-height: 5.5rem; resize: vertical; }
.check { display: flex; gap: .8rem; align-items: flex-start; margin: 0; padding: .9rem 0; border-bottom: 1px solid var(--line); font-weight: 400; cursor: pointer; }
.check input { flex: none; width: 1.2rem; height: 1.2rem; margin-top: .25rem; accent-color: var(--navy); }
input[type="range"] { width: 100%; accent-color: var(--navy); }

/* ================= Page-specific ================= */

/* Home: "Not sure where to begin?" */
.choices { display: grid; gap: 1.25rem; margin-top: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.choices a { display: block; padding: 2rem 1.75rem; border-radius: var(--radius); text-decoration: none; transition: transform .2s; }
.choices a:hover { transform: translateY(-4px); }
.choices h3 { margin: 1rem 0 .4rem; }
.choices p { font-size: .95rem; }
.choices .go { font-weight: 500; margin: 0; }

/* Learn: lesson list (each row is one link). */
.lessons { list-style: none; padding: 0; margin: 3rem 0 0; }
.lessons a { display: grid; grid-template-columns: 5rem 1fr auto; gap: 1.5rem; align-items: center; padding: 2rem 0; border-top: 1px solid var(--line); text-decoration: none; transition: padding .2s; }
.lessons a:hover { padding-left: .75rem; }
.lessons .num { margin: 0; }
.lessons h3 { margin: 0 0 .3rem; }
.lessons p { margin: 0; }
.lessons .go { font-weight: 500; white-space: nowrap; }
@media (max-width: 640px) { .lessons a { grid-template-columns: 1fr; gap: .4rem; } }

/* Money: equation, receipt, budget sheet. */
.equation { display: flex; flex-wrap: wrap; justify-content: center; gap: .1em .4em; margin: 2.5rem 0 1rem; font: 400 clamp(2rem, 6vw, 4.4rem)/1.1 var(--serif); }
.equation .op { opacity: .45; }
.sum { font: 400 clamp(1.4rem, 3.5vw, 2.2rem)/1.4 var(--serif); }
.receipt { background: var(--paper); max-width: 430px; padding: 2.5rem 2rem; font: .95rem/1.6 ui-monospace, Menlo, monospace; box-shadow: 0 12px 30px rgb(22 33 62 / .08); border-top: 6px dotted var(--line); border-bottom: 6px dotted var(--line); }
.receipt h3 { font: 700 1rem ui-monospace, Menlo, monospace; text-align: center; letter-spacing: .1em; }
.receipt div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.receipt .total { border-top: 1px dashed var(--navy); margin-top: .75rem; padding-top: .75rem; font-weight: 700; }
.sheet { background: var(--paper); color: var(--navy); border-radius: var(--radius); padding: clamp(1.5rem, 5vw, 3rem); max-width: 640px; margin: 2.5rem auto 0; }
.sheet .line { display: flex; align-items: center; gap: .75rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.sheet .line label { flex: 1; margin: 0; font-weight: 400; }
.sheet .line input { width: 8.5rem; padding: .4rem .6rem; }
.sheet .result { margin-top: 1.5rem; font-weight: 700; }

/* Success & Failure: split screen and domino cascade. */
.two-sides { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; margin-top: 2.5rem; }
.two-sides > div { padding: clamp(1.75rem, 5vw, 3.5rem); }
.two-sides ul { padding-left: 1.2rem; margin: 0; }
.two-sides li { margin-bottom: .9rem; }
@media (max-width: 800px) { .two-sides { grid-template-columns: 1fr; } }
.cascade > li:nth-child(2) { margin-left: 2rem; }
.cascade > li:nth-child(3) { margin-left: 4rem; }
.cascade > li:nth-child(4) { margin-left: 6rem; }
.cascade > li:nth-child(5) { margin-left: 8rem; }
@media (max-width: 640px) { .cascade > li { margin-left: 0 !important; } }

/* Explore: branches from BUSINESS. */
.branches { text-align: center; margin-top: 3rem; }
.trunk { position: relative; display: inline-block; background: var(--navy); color: var(--cream); padding: .9rem 2rem; border-radius: 999px; font: 700 .9rem var(--sans); letter-spacing: .16em; }
.trunk::after { content: ""; position: absolute; left: 50%; top: 100%; height: 2rem; border-left: 1.5px solid var(--navy); }
.branches ul { list-style: none; margin: 2rem 0 0; padding: 2rem 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.25rem; border-top: 1.5px solid var(--navy); }
.branches li { position: relative; }
.branches li::before { content: ""; position: absolute; left: 50%; top: -2rem; height: 1.5rem; border-left: 1.5px solid var(--navy); }
.branches h3 { font-size: 1.1rem; }
.branches p { font-size: .9rem; }
@media (max-width: 900px) {
  .branches { text-align: left; }
  .trunk::after { left: 2rem; }
  .branches ul { grid-template-columns: 1fr; border-top: 0; border-left: 1.5px solid var(--navy); margin: 0 0 0 2rem; padding: 2rem 0 0 1.75rem; }
  .branches li::before { left: -1.75rem; top: .7rem; width: 1.25rem; height: 0; border-left: 0; border-top: 1.5px solid var(--navy); }
}

/* Explore: quiz. */
.quiz { max-width: 720px; margin: 2rem auto 0; border-radius: var(--radius); padding: clamp(1.5rem, 5vw, 3rem); }
.quiz fieldset { border: 0; padding: 0; margin: 0; }
.quiz legend { font: 400 clamp(1.3rem, 3vw, 1.8rem)/1.3 var(--serif); margin-bottom: 1rem; padding: 0; }
.quiz .check { border-color: rgb(22 33 62 / .12); }
.quiz .actions { justify-content: space-between; }

/* Experience: winding roadmap. */
.road { list-style: none; padding: 0; margin: 3rem 0 0; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3.5rem 2rem; text-align: center; }
.road::before { content: ""; position: absolute; top: 1.25rem; bottom: 1.25rem; left: 11%; right: 3%; border: 2px dashed var(--navy-soft); border-left: 0; border-radius: 0 5rem 5rem 0; opacity: .5; }
.road li { position: relative; display: flex; flex-direction: column; align-items: center; gap: .6rem; font-weight: 500; }
.road li:nth-child(n+5) { flex-direction: column-reverse; justify-content: flex-start; }
.road li:nth-child(5) { grid-area: 2 / 4; }
.road li:nth-child(6) { grid-area: 2 / 3; }
.road li:nth-child(7) { grid-area: 2 / 2; }
.road li:nth-child(8) { grid-area: 2 / 1; }
.road b { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--navy); color: var(--cream); font-size: .9rem; }
@media (max-width: 800px) {
  .road { grid-template-columns: 1fr; gap: 1.5rem; text-align: left; }
  .road::before { top: 1rem; bottom: 1rem; left: 1.2rem; right: auto; border: 0; border-left: 2px dashed var(--navy-soft); border-radius: 0; }
  .road li, .road li:nth-child(n+5) { flex-direction: row; grid-area: auto; }
}

/* Experience: noticeboard. */
.board { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.75rem; margin-top: 2.5rem; padding: clamp(2rem, 5vw, 3.5rem) 1rem; border-radius: var(--radius); background: #eadfc9; }
.note { position: relative; width: 190px; min-height: 120px; padding: 1.75rem 1.25rem 1.25rem; font: 500 1.6rem/1.15 var(--hand); box-shadow: 0 8px 16px rgb(22 33 62 / .1); transform: rotate(-2deg); }
.note:nth-child(even) { transform: rotate(2deg); }
.note::before { content: ""; position: absolute; top: .6rem; left: 50%; width: .7rem; height: .7rem; margin-left: -.35rem; border-radius: 50%; background: var(--navy); }

/* Experience: email template. */
.email { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 30px rgb(22 33 62 / .06); }
.email-bar { display: flex; gap: .4rem; padding: .9rem 1.25rem; background: var(--blue); }
.email-bar i { width: .7rem; height: .7rem; border-radius: 50%; background: var(--paper); }
.email-body { padding: clamp(1.25rem, 4vw, 2rem); }
.email-body .subject { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }

/* Experience: notebook reflection. */
.notebook { max-width: 760px; margin: 2.5rem auto 0; padding: 2.5rem clamp(1.25rem, 5vw, 3.5rem); border-radius: var(--radius); border-left: 6px solid var(--blush); background: var(--paper); box-shadow: 0 12px 30px rgb(22 33 62 / .06); }
.notebook label { font: 500 1.55rem/1.2 var(--hand); margin-top: 1.5rem; }
.notebook textarea, .notebook input[type="text"] { background: repeating-linear-gradient(transparent 0 31px, #e3e7f0 31px 32px); border: 0; border-radius: 0; line-height: 32px; padding: 0 .25rem; min-height: 64px; }

/* Build Skills: scattered words, skill hub, sliders. */
.scatter { list-style: none; padding: 0; margin: 2rem 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2rem; font: 500 2rem var(--hand); color: var(--navy-soft); }
.scatter li:nth-child(odd) { transform: rotate(-4deg); }
.scatter li:nth-child(3n) { transform: rotate(3deg) translateY(.5rem); }
.hub { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; gap: 1rem 2.5rem; align-items: center; margin-top: 2.5rem; }
.hub .you { grid-row: 1 / 4; display: grid; place-items: center; width: 160px; height: 160px; border-radius: 50%; background: var(--navy); color: var(--cream); font: 400 2rem var(--serif); letter-spacing: .08em; }
.skill { font: 500 1rem var(--sans); color: var(--navy); background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: .9rem 1.25rem; cursor: pointer; }
.skill:hover { border-color: var(--navy); }
.skill[aria-pressed="true"] { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.skill-panel { max-width: 640px; min-height: 7rem; margin: 2rem auto 0; padding: 1.5rem 2rem; border-radius: var(--radius); background: var(--lilac); }
.skill-panel h3 { margin-bottom: .3rem; }
.skill-panel p { margin: 0; }
@media (max-width: 700px) {
  .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-flow: row; gap: .75rem; }
  .skill { padding: .8rem .5rem; font-size: .95rem; }
  .hub .you { grid-row: auto; grid-column: 1 / -1; order: -1; margin: 0 auto 1rem; width: 120px; height: 120px; }
}
.slider { display: grid; grid-template-columns: 11rem auto 1fr auto; gap: .5rem 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.slider label { margin: 0; }
.slider span { font-size: .85rem; color: var(--navy-soft); }
@media (max-width: 700px) {
  .slider { grid-template-columns: 1fr 1fr; }
  .slider label, .slider input { grid-column: 1 / -1; }
  .slider span { grid-row: 3; }
  .slider span:last-of-type { text-align: right; }
}

/* Resources: final reflection (the emotional ending). */
.farewell { background: var(--blush); }
.farewell .big { font: 400 clamp(2.2rem, 5vw, 3.8rem)/1.15 var(--serif); max-width: 18ch; margin: 3.5rem auto 1rem; }
