/* Shared styles for the main page, the blog, projects and the private blog.
   Deep space, one dark theme: content floats on dark glass over the sky (see sky.css / sky.js). */
:root {
  /* Deep space, one dark theme. Layout: a tall opening over the sky, then sections of
     cards that float on dark glass, with a slim section bar that stays at the top. */
  --ink: #e9edf5;
  --ink-dim: #a3adc2;
  --ink-faint: #6f7a91;
  --accent: #a9c0ff;
  --panel: rgba(7, 10, 19, 0.74);
  --line: rgba(160, 180, 225, 0.16);
  --warm: #ffcf96;
  --font-display: "Ted Sky", "Avenir Next", "Century Gothic", "Futura", sans-serif;   /* /fonts/tedsky.woff (see sky.css) */
  --track: 0.14em;   /* the titles' letter spacing */
  --font-body: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
body { margin: 0; color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
/* Placeholders you still need to fill in show a dashed outline (search for REPLACE-ME) */
a[href*="REPLACE-ME"] { outline: 1px dashed var(--warm); outline-offset: 3px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

main { display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px); }

/* Section bar */
.bar {
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(rgba(4, 6, 12, 0.92), rgba(4, 6, 12, 0.6) 70%, rgba(4, 6, 12, 0));
}
.bar .wrap { display: flex; align-items: center; gap: 24px; min-height: 56px; }
.bar-name { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.bar nav { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; margin-left: auto; padding: 6px 2px; }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a {
  color: var(--ink-dim); text-decoration: none; white-space: nowrap;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.bar nav a:hover { color: var(--ink); }
/* Phones: the name gets its own line and the five links spread across the one below, so none are cut off */
@media (max-width: 600px) {
  .bar .wrap { flex-wrap: wrap; row-gap: 2px; min-height: 0; padding-top: 10px; padding-bottom: 4px; }
  .bar nav { flex: 1 0 100%; margin-left: 0; justify-content: space-between; gap: 10px; padding: 4px 0; }
  .bar nav a { letter-spacing: 0.1em; }
}

/* Opening */
.hero {
  min-height: 82vh; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text photo";
  align-items: center; column-gap: clamp(32px, 6vw, 80px); padding-top: 24px; padding-bottom: 48px;
}
.hero__text { grid-area: text; display: grid; align-content: center; gap: 18px; min-width: 0; }
/* Your photos, beside your name (above it on phones): the main one in front, with two smaller ones
   tucked behind it like prints on a table. Each one's place and tilt is set below. */
.hero__photos { grid-area: photo; position: relative; width: clamp(290px, 30vw, 420px); aspect-ratio: 1 / 1.05; }
.hero__photo { position: absolute; margin: 0; }
.hero__photo img {
  display: block; width: 100%; height: auto; object-fit: cover; border-radius: 16px;
  border: 1px solid var(--line); box-shadow: 0 0 0 5px rgba(7, 10, 19, 0.5), 0 18px 50px rgba(0, 0, 0, 0.55);
}
.hero__photo--main { width: 62%; left: 0; top: 6%; z-index: 2; transform: rotate(-2deg); }
.hero__photo--main img { aspect-ratio: 3 / 4; border-radius: 20px; box-shadow: 0 0 0 6px rgba(7, 10, 19, 0.45), 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 80px rgba(169, 192, 255, 0.12); }
.hero__photo--hobbiton { width: 44%; right: 0; top: 0; z-index: 1; transform: rotate(4deg); }
.hero__photo--hobbiton img { aspect-ratio: 3 / 4; }
.hero__photo.hero__photo--main figcaption { bottom: auto; top: 8px; }   /* top corner: the shuttle photo covers its bottom one */
.hero__photo.hero__photo--hobbiton figcaption { left: auto; right: 8px; max-width: 68%; text-align: right; border-radius: 10px; }   /* its left edge is behind the main photo */
.hero__photo--shuttle { width: 56%; right: 2%; bottom: 0; z-index: 3; transform: rotate(-3deg); }
.hero__photo--shuttle img { aspect-ratio: 4 / 3; }
.hero__photo figcaption {
  position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 9px; border-radius: 999px;
  background: rgba(4, 6, 12, 0.78); color: var(--ink-dim); font-size: 0.64rem; line-height: 1.5; letter-spacing: 0.03em;
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "photo" "text"; row-gap: 28px; align-content: center; }
  .hero__photos { width: min(330px, 88vw); }
}
.eyebrow { margin: 0; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
h1 {
  margin: 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.6rem, 7.5vw, 6rem); line-height: 1;
}
/* Titles: capitals, spaced out, in Ted Sky (an A without a crossbar, like the No Man's Sky logo) */
.bar-name, h1, h2, h3, .prose h5, .post-full__title { text-transform: uppercase; letter-spacing: var(--track); }
.contact .email { text-transform: none; letter-spacing: 0.02em; }
.lede { margin: 0; max-width: 52ch; font-size: 1.07rem; line-height: 1.7; color: var(--ink-dim); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.pill {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink); text-decoration: none; font-size: 0.84rem;
}
.pill:hover { border-color: var(--accent); }
.star-hint { display: flex; align-items: center; gap: 10px; margin: 2px 0 0; color: var(--ink); font-size: 0.92rem; line-height: 1.5; }   /* "Click on stars...": says Tap on touch screens */
.star-hint__icon { flex: none; fill: #fff; filter: drop-shadow(0 0 3px rgba(190, 210, 255, 0.95)) drop-shadow(0 0 9px rgba(140, 170, 255, 0.7)); }
.star-hint__tap { display: none; }
@media (hover: none) { .star-hint__click { display: none; } .star-hint__tap { display: inline; } }
@media (max-width: 760px) { .hero__text .pills, .hero__text .scroll-cue { order: 1; } }   /* phones: the hint right under the intro, so it shows on the first screen */
.scroll-cue { margin-top: 28px; color: var(--ink-faint); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }

/* Sections */
section.part { padding: 72px 0 24px; scroll-margin-top: 48px; }
.part-head { display: grid; gap: 10px; margin-bottom: 28px; }
h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 4.2vw, 2.8rem); line-height: 1.15; text-wrap: balance; }
.part-head p { margin: 0; max-width: 60ch; color: var(--ink-dim); line-height: 1.7; font-size: 0.99rem; }
.part-head .resume-name { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); text-transform: uppercase; letter-spacing: var(--track); }   /* your full name, like the top of a resume */

/* Projects: each box has a star beside it, and the star is the box's button (the sky draws
   it on .star-button__target; see /js/sky.js). They're scattered like a star field: each
   .item's style sets where it sits. Leave the style off and you get the defaults below.
     --x     0 = far left, 1 = far right          --w     width of box + star
     --s     star size                            --sa    star height: start, center or end
     --sy    nudges the star up (-) or down (+)   --drop  space above the box
     --pull  on wide screens, rises up beside the box before it (only if the two fit side by side)
   Add class "flip" to put the star on the right. */
.cards { display: flow-root; padding-bottom: 8px; }
.item {
  --x: 0; --w: 540px; --s: 115px; --sa: center; --sy: 0px; --drop: 24px; --pull: 0px; --k: 1;
  display: grid; grid-template-columns: calc(var(--s) * var(--k)) minmax(0, 1fr); gap: 20px; align-items: center;
  width: min(100%, var(--w));
  margin-left: calc((100% - min(100%, var(--w))) * var(--x));
  margin-top: var(--drop);
}
.item.flip { grid-template-columns: minmax(0, 1fr) calc(var(--s) * var(--k)); }
.item.flip > .star-button { order: 2; }
.item > .star-button { align-self: var(--sa); position: relative; top: calc(var(--sy) * var(--k)); }   /* (not translate: that would lift the star picture above the box beside it) */
.item .star-button__target { width: calc(var(--s) * var(--k)); height: calc(var(--s) * var(--k)); }
.item .card { transition: border-color 0.3s; }
.item:has(.star-button:hover, .star-button:focus-visible, .star-button.is-snapped) .card { border-color: rgba(169, 192, 255, 0.45); }
@media (min-width: 1100px) { .item { margin-top: calc(var(--drop) - var(--pull)); } }
/* Narrower: everything stacks, so leave room for stars that sit above or below their box */
@media (max-width: 1099px) { .item { margin-top: calc(var(--drop) * 0.7 + 24px); } }
@media (max-width: 640px) {
  .item {
    --k: 0.62; gap: 12px;
    width: calc(100% - var(--x) * 28px); margin-left: calc(var(--x) * 28px);
    margin-top: calc(var(--drop) * 0.6 + 18px);
  }
  .item .card { padding: 16px 16px 14px; }
  .item .card--photo { padding-top: 0; }
  .item .card-photo { width: calc(100% + 32px); margin: 0 -16px 2px; }
}
.card {
  display: grid; grid-template-rows: auto 1fr auto; gap: 12px;
  padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
}
/* A photo across the top of a box (main page) */
.card--photo { grid-template-rows: auto auto 1fr auto; padding-top: 0; overflow: hidden; }
.card-photo { display: block; width: calc(100% + 40px); max-width: none; height: auto; margin: 0 -20px 2px; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.card-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }   /* the label drops under the title when the box is narrow */
h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; line-height: 1.2; }
.card p { margin: 0; color: var(--ink-dim); line-height: 1.65; font-size: 0.93rem; }
.card p strong { color: var(--ink); font-weight: 500; white-space: nowrap; }   /* short bold bits like "2x All-American" stay on one line */
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 0.76rem; color: var(--ink-faint); letter-spacing: 0.06em; }
.meta a { font-size: 0.83rem; letter-spacing: 0; }
.chip {
  flex: none; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor;
  font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
}
.chip.live { color: #9fe3b8; }
.chip.wip { color: var(--warm); }
.chip.proto { color: var(--accent); }

/* Resume lists */
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li { color: var(--ink-dim); font-size: 0.93rem; line-height: 1.6; padding-left: 18px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 8px var(--warm); }
.facts strong { color: var(--ink); font-weight: 500; }

/* Contact and footer */
.contact { display: grid; gap: 16px; justify-items: start; }
.contact .email { font-family: var(--font-display); font-size: clamp(1.6rem, 5vw, 2.6rem); text-decoration: none; color: var(--ink); }
.contact .email:hover { color: var(--accent); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Private: a screen-tall section past Contact. The sky draws a giant black hole on
   .private__hole as the section scrolls into view (it sets --hole from 0 to 1 as it grows,
   and the class "hole-forming" until it's 60% grown); the lock sits inside it. */
section.part.private {
  position: relative; box-sizing: border-box; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; padding: 48px 0;
  margin-top: 100vh;   /* a full screen of empty sky after Contact: the hole only starts growing once Contact has scrolled away */
}
/* Once unlocked, the gap and the black hole's space close up: Private sits right under Contact like any other part */
section.part.private.is-open { display: block; margin-top: 0; min-height: 0; padding: 72px 0 24px; }
.private__hole { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
html.no-sky .private__hole {   /* no sky drawing: a plain dark disc */
  width: min(78vmin, 560px); height: min(78vmin, 560px); translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, #000 0 60%, rgba(169, 192, 255, 0.22) 62.5%, rgba(169, 192, 255, 0.05) 66%, transparent 70%);
}
.vault {
  position: relative; display: grid; justify-items: center; gap: 14px; width: min(300px, 100%); text-align: center;
  opacity: clamp(0, calc((var(--hole, 1) - 0.6) * 4), 1);   /* appears as the hole finishes growing */
}
.private.hole-forming .vault { visibility: hidden; }
.vault__title { margin: 0; font-family: var(--font-body); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-dim); }
.lock { width: 92px; height: auto; overflow: visible; filter: drop-shadow(0 0 14px rgba(169, 192, 255, 0.32)); transition: filter 0.4s; }
.lock__shackle { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; transform-box: view-box; transform-origin: 69px 56px; transition: transform 0.55s cubic-bezier(0.3, 1.5, 0.5, 1), stroke 0.3s; }
.lock__body { fill: #0b0e18; stroke: var(--ink); stroke-width: 3; transition: stroke 0.3s; }
.lock__keyhole { fill: var(--ink); transition: fill 0.3s; }
.vault.is-wrong .lock { animation: vault-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
.vault.is-wrong .lock__shackle, .vault.is-wrong .lock__body { stroke: #ff9d9d; }
.vault.is-wrong .lock__keyhole { fill: #ff9d9d; }
@keyframes vault-shake {
  10%, 90% { transform: translateX(-2px) rotate(-1deg); }
  20%, 80% { transform: translateX(5px) rotate(2deg); }
  30%, 50%, 70% { transform: translateX(-10px) rotate(-4deg); }
  40%, 60% { transform: translateX(10px) rotate(4deg); }
}
.vault.is-unlocked .lock__shackle { transform: translateY(-15px) rotate(16deg); stroke: #c9f7dc; }
.vault.is-unlocked .lock__body { stroke: #c9f7dc; }
.vault.is-unlocked .lock__keyhole { fill: #c9f7dc; }
.vault.is-unlocked .lock { filter: drop-shadow(0 0 20px rgba(150, 255, 200, 0.5)); }
.vault.is-locked-out .lock { opacity: 0.55; filter: none; }
.vault.is-locked-out .lock__shackle, .vault.is-locked-out .lock__body { stroke: #b48a8a; }
.vault.is-locked-out .lock__keyhole { fill: #b48a8a; }
.vault__form {
  box-sizing: border-box; display: flex; align-items: center; width: 100%; padding: 4px 4px 4px 18px;
  border: 1px solid rgba(169, 192, 255, 0.32); border-radius: 999px; background: rgba(6, 8, 15, 0.82);
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.3s;
}
.vault__form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(169, 192, 255, 0.14); }
.vault__form input {
  flex: 1; min-width: 0; padding: 9px 0; border: 0; outline: none; background: none; color: var(--ink);
  font: inherit; font-size: 1rem; letter-spacing: 0.06em;   /* 16px stops phones zooming in on focus */
}
.vault__form input::placeholder { color: var(--ink-faint); letter-spacing: 0.1em; }
.vault__form button {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(169, 192, 255, 0.16); color: var(--ink); cursor: pointer; transition: background 0.2s;
}
.vault__form button:hover, .vault__form button:focus-visible { background: rgba(169, 192, 255, 0.32); outline: none; }
.vault__form button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vault.is-locked-out .vault__form { opacity: 0.4; }
.vault__tries { display: flex; gap: 9px; margin: 2px 0 0; }
.vault__tries span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(169, 192, 255, 0.7); transition: background 0.3s, box-shadow 0.3s; }
.vault__tries span.is-used { background: transparent; box-shadow: inset 0 0 0 1px rgba(169, 192, 255, 0.35); }
.vault__msg { min-height: 1.3em; margin: 0; font-size: 0.82rem; color: var(--ink-dim); }
.vault.is-wrong .vault__msg, .vault.is-locked-out .vault__msg { color: #ffb3b3; }
.vault__escape { margin: 10px 0 0; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.vault.is-leaving { opacity: 0; transition: opacity 0.6s ease; }
/* Once unlocked: the private text, where the hole was */
.private-open { justify-self: stretch; animation: private-in 0.9s ease both; }
@keyframes private-in { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  .lock__shackle, .vault.is-leaving { transition: none; }
  .vault.is-wrong .lock, .private-open { animation: none; }
}

footer { padding: 96px 0 40px; color: var(--ink-faint); font-size: 0.72rem; letter-spacing: 0.1em; }

/* ---- Resume ---- */
.resume-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.resume-block { display: grid; gap: 18px; }
.resume-block__title { margin: 0; font-family: var(--font-body); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--warm); }
.resume-block .facts + .resume-block__title { margin-top: 6px; }
.entry { display: grid; gap: 4px; }
.entry__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.entry__top h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; line-height: 1.3; color: var(--ink); }
.entry__when { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-faint); white-space: nowrap; }
.entry__where { margin: 0; font-size: 0.86rem; color: var(--accent); }
.entry__points { margin: 4px 0 0; padding-left: 18px; color: var(--ink-dim); font-size: 0.91rem; line-height: 1.6; }
.entry__points li + li { margin-top: 2px; }
.entry__list { margin: 2px 0 0; color: var(--ink-dim); font-size: 0.91rem; line-height: 1.7; }
.resume-block__sub { margin: 4px 0 0; font-family: var(--font-body); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.resume-note { margin: 4px 0 0; color: var(--ink-faint); font-size: 0.83rem; font-style: italic; }
.facts a { color: var(--accent); }
@media (max-width: 760px) { .resume-grid { grid-template-columns: 1fr; } }

/* ---- Blog cards (main page, /blog/, /private/) ---- */
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post-card { min-width: 0; overflow-wrap: break-word; }
.post-card { position: relative; display: grid; align-content: start; gap: 8px; transition: border-color 0.25s, transform 0.25s; }
.post-card:hover, .post-card:focus-within { border-color: rgba(169, 192, 255, 0.45); transform: translateY(-2px); }
.post-card h2, .post-card h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; line-height: 1.25; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a::after, .post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* the whole card is the link */
.post-card p { margin: 0; color: var(--ink-dim); font-size: 0.93rem; line-height: 1.65; }
.post-card__date { font-size: 0.72rem !important; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint) !important; }
.post-card__read { margin-top: 4px; font-size: 0.83rem; color: var(--accent); }
.post-empty { color: var(--ink-dim); font-size: 0.97rem; }
.see-more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink); text-decoration: none; font-size: 0.86rem; letter-spacing: 0.04em; transition: border-color 0.2s;
}
.see-more:hover, .see-more:focus-visible { border-color: var(--accent); }
@media (max-width: 760px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }

/* The newest posts in full, on the main page */
.post-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 780px; }
.post-full { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; padding: 26px 28px 28px; }
.post-full__title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.2; }
.post-full__title a { color: var(--ink); text-decoration: none; }
.post-full__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.post-full .prose { max-width: none; padding: 0; border: 0; background: none; }
.post-full .prose h4 { font-size: 1.2rem; }
.post-full .prose h5 { font-size: 1.05rem; margin: 1.4em 0 0.4em; font-family: var(--font-display); font-weight: 400; color: var(--ink); }
.post-full .prose h6 { font-size: 1rem; margin: 1.2em 0 0.4em; color: var(--ink); }
@media (max-width: 560px) { .post-full { padding: 20px 18px 22px; } }

/* Private section, once unlocked: the two newest private posts */
.private-posts { display: grid; justify-items: start; }
.private-posts .post-grid, .private-posts .post-stack { width: 100%; }

/* ---- Pages: /blog/, /projects/, /private/ and each post ---- */
section.part.page-head { padding-top: 56px; display: grid; gap: 14px; }
.page-title, .post-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 6vw, 4rem); line-height: 1.1; text-wrap: balance; }
.post-title { font-size: clamp(1.6rem, 4.5vw, 3rem); max-width: 24ch; }
section.part.post-list { padding-top: 16px; }
article.part.post { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 56px; }
.page-end { padding: 72px 0 8px; }
.page-back { padding: 48px 0 8px; }
.page-end .star-button__target { width: 140px; height: 140px; }

/* Post text */
.prose {
  min-width: 0; overflow-wrap: break-word;
  max-width: 68ch; padding: 26px 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
  color: var(--ink-dim); font-size: 1rem; line-height: 1.8;
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 1.1em; }
.prose h2, .prose h3, .prose h4 { margin: 1.6em 0 0.5em; font-family: var(--font-display); font-weight: 400; color: var(--ink); line-height: 1.2; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.2rem; }
.prose h4 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: var(--track); }
.prose strong { color: var(--ink); font-weight: 500; }
.prose li + li { margin-top: 0.3em; }
.prose blockquote { padding: 2px 0 2px 18px; border-left: 2px solid var(--warm); color: var(--ink); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose :not(pre) > code { overflow-wrap: anywhere; }   /* long file names and links wrap instead of running off a phone screen */
.prose code { padding: 1px 6px; border-radius: 5px; background: rgba(169, 192, 255, 0.1); color: var(--ink); font-size: 0.88em; }
.prose pre { overflow-x: auto; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: rgba(3, 5, 10, 0.7); line-height: 1.6; }
.prose pre code { padding: 0; background: none; font-size: 0.84rem; }
.prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--line); }
.prose img, .prose video { display: block; max-width: 100%; height: auto; margin: 0 auto 1.1em; border-radius: 10px; }
.prose p img { display: inline-block; vertical-align: middle; margin: 0; }   /* an image inside a sentence */
.prose figure { margin: 1.6em 0; }
.prose figure img { max-height: 80vh; width: auto; margin: 0 auto; border: 1px solid var(--line); }
.prose figure video { margin: 0 auto; border: 1px solid var(--line); }
.prose figure img[style] { width: min(100%, var(--w), 80vh * var(--r)); height: auto; max-height: none; }   /* size known: its space is kept while it loads */
.prose figcaption { margin-top: 10px; color: var(--ink-dim); font-size: 0.9rem; text-align: center; }
.prose .photo-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; margin: 1.6em 0; }   /* two or three photos side by side, in matching frames */
.prose .photo-row figure { margin: 0; min-width: 0; }
.prose .photo-row img { width: 100%; max-height: none; aspect-ratio: 4 / 5; object-fit: cover; margin: 0; border: 1px solid var(--line); }
.prose .photo-row figcaption { margin-top: 8px; font-size: 0.84rem; line-height: 1.45; }
@media (max-width: 520px) { .prose .photo-row { gap: 10px; } .prose .photo-row figcaption { font-size: 0.78rem; } }
.prose iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; margin: 0 0 1.1em; border: 0; border-radius: 10px; }
@media (max-width: 560px) { .prose { padding: 20px 18px; } }

/* Projects reached by a link to them (/projects/#name) clear the top bar */
.item[id] { scroll-margin-top: 90px; }

/* Project titles link to the project's own page */
.card-top h3 a { color: inherit; text-decoration: none; }
.card-top h3 a:hover, .card-top h3 a:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* A project's own page */
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 0.82rem; color: var(--ink-faint); }
.project .pills { margin-top: 2px; }

/* Feature pages (/running, /scouts): a photo beside the intro, two boxes side by side, a grid of photos.
   Running only: the PR table and the Moon bar. */
.feat-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 32px; align-items: center; }
.feat-hero--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }   /* for a landscape photo */
.feat-hero__text { display: grid; gap: 16px; }
.feat-photo { margin: 0; }
.feat-photo figcaption { margin-top: 8px; color: var(--ink-faint); font-size: 0.82rem; line-height: 1.5; }
.feat-photo img, .photo-grid img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; }
.feat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.prs { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.prs th, .prs td { padding: 11px 0; border-bottom: 1px solid var(--line); }
.prs th { text-align: left; font-weight: 400; color: var(--ink-dim); }
.prs td { padding-left: 16px; text-align: right; white-space: nowrap; color: var(--ink-faint); }
.prs .prs__time { color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.06em; }
.prs tr:last-child th, .prs tr:last-child td { border-bottom: 0; }
.moon { display: grid; gap: 14px; }
.moon p { font-size: 0.94rem; }
.moon-count strong { color: var(--ink); font-weight: 500; }
.moon-track { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.moon-earth, .moon-moon { flex: none; border-radius: 50%; }
.moon-earth { width: 22px; height: 22px; background: radial-gradient(circle at 35% 35%, #9fd6ff, #2f74bd 55%, #12386a); box-shadow: 0 0 12px rgba(120, 190, 255, 0.5); }
.moon-moon { width: 15px; height: 15px; background: radial-gradient(circle at 35% 35%, #f4f1e8, #b9b4a6 60%, #77736a); box-shadow: 0 0 10px rgba(240, 235, 220, 0.35); }
.moon-path { position: relative; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, rgba(169, 192, 255, 0.35) 0 6px, transparent 6px 12px); }
.moon-fill { position: absolute; left: 0; top: -1px; height: 4px; width: calc(var(--done, 0.02) * 100%); min-width: 4px; border-radius: 2px; background: var(--warm); box-shadow: 0 0 8px var(--warm); }
.moon-me { position: absolute; top: 50%; left: calc(var(--done, 0.02) * 100%); width: 8px; height: 8px; margin: -4px 0 0 -2px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; padding-top: 8px; }
.photo-grid figure { margin: 0; min-width: 0; }
.photo-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 716px; }
.eagle-project { display: grid; gap: 18px; padding-top: 16px; scroll-margin-top: 72px; }   /* the Eagle project on the Scouting page */
.photo-grid img { aspect-ratio: 4 / 5; object-fit: cover; }   /* every photo in the same frame; a photo's style can move its focus (object-position) */
.photo-grid figcaption { margin-top: 8px; color: var(--ink-faint); font-size: 0.82rem; line-height: 1.5; }
@media (max-width: 760px) {
  .feat-hero, .feat-hero--wide { grid-template-columns: 1fr; gap: 24px; }
  .feat-photo { max-width: 340px; }
  .feat-hero--wide .feat-photo { max-width: 520px; }
  .feat-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
}
/* The running box in the main page's resume section */
.resume .cards { margin-top: 8px; }
/* Resume: Education is the tall box on the left, with two boxes stacked beside it */
@media (min-width: 761px) { .resume-grid > .resume-block--tall { grid-row: span 2; } }
.resume-grid > .resume-block--wide { grid-column: 1 / -1; }   /* Experience: across the whole width, under the rest */
.entry__list a { color: var(--accent); }
