/* ============================================================
   Camryn Rozario — portfolio
   Everything below uses ONE type scale and ONE spacing scale.
   Change a value here and it updates everywhere.
   ============================================================ */

:root {
  /* Colour (from your Framer styles) */
  --primary-brown: rgb(61, 52, 45);
  --secondary-brown: rgb(138, 129, 120);
  --background-cream: rgb(245, 240, 230);
  --red: rgb(217, 4, 41);
  --line: rgba(61, 52, 45, 0.16);
  --panel: rgba(255, 255, 255, 0.06);
  --tag: rgba(138, 129, 120, 0.3);

  /* Fonts */
  --serif: "Caladea", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale — 6 sizes, used everywhere */
  /* Sizes are in rem so they follow the reader's browser text size and zoom.
     1rem = 16px by default. Nothing on the site is smaller than 1rem. */
  --t-display: clamp(2.75rem, 2rem + 3vw, 4.5rem);    /* page titles, 44–72px */
  --t-h2: clamp(1.625rem, 1.25rem + 1vw, 2rem);       /* section headings, 26–32px */
  --t-h3: 1.5rem;                        /* card titles, 24px */
  --t-lead: 1.25rem;                     /* intro paragraphs, 20px */
  --t-body: 1.0625rem;                   /* body text, 17px */
  --t-label: 1rem;                       /* uppercase labels, 16px */
  --t-small: 1rem;                       /* smallest text anywhere, 16px */

  --lh-tight: 1.15;
  --lh-body: 1.55;
  --track: 0;

  /* Spacing scale — multiples of 8 */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;

  --radius: 16px;
  --measure: 68ch;  /* max line length for reading */

  --nav-width: clamp(200px, 16vw, 260px);
  --gutter: var(--s5);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

html, body {
  margin: 0;
  background: var(--background-cream);
  color: var(--primary-brown);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
:focus-visible { outline: 2px dashed var(--primary-brown); outline-offset: 3px; }
p, h1, h2, h3, h4, figure { margin: 0; }

/* ---------- Shared text styles ---------- */
.xl-header, .display {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--t-display); line-height: var(--lh-tight);
}
.subheader {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--t-h2); line-height: var(--lh-tight);
}
.body, .big-body { font-size: var(--t-lead); line-height: 1.5; max-width: var(--measure); }
.label, .eyebrow, .nav-label, .cv-col > h2 {
  font-family: var(--sans); font-weight: 400;
  font-size: var(--t-label); letter-spacing: var(--track);
  text-transform: uppercase; color: var(--secondary-brown); line-height: 1.4;
}
.muted { color: var(--secondary-brown); }

/* ---------- Page shell ---------- */
.shell {
  display: flex;
  gap: var(--gutter);
  align-items: flex-start;
  max-width: 1920px;
  margin: 0 auto;
}

main {
  flex: 1 1 auto;
  min-width: 0;
  /* top padding matches the nav so the first line of content lines up with the logo */
  padding: var(--s4) var(--gutter) var(--s7) 0;
}
.page { max-width: 1200px; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0;
  flex: 0 0 var(--nav-width); width: var(--nav-width);
  max-height: 100vh; overflow-y: auto; z-index: 2;
}
.nav-panel { min-height: 100vh; border-right: 1px solid var(--line); background: var(--panel); }

.nav-section {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--s4);
  padding: var(--s4) var(--s3);
}
.nav-section + .nav-section { border-top: 1px solid var(--line); }

.nav-top { gap: var(--s1); }
.nav-top .logo { margin-bottom: var(--s2); }
.nav-top a, .nav-top span { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.3; }
.nav-group { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); font-size: var(--t-small); line-height: 1.4; }

/* Section labels: normal letter spacing, same size as the links under them */
.site-nav .nav-label { font-size: var(--t-label); letter-spacing: 0; margin: 0 0 2px; line-height: 1.4; }
.site-nav a.active { font-weight: 600; }
.site-nav a:hover, .mobile-bar a:hover { text-decoration: none; }
.site-nav a { overflow-wrap: anywhere; }
.site-nav .muted { color: var(--secondary-brown); }

.logo { display: block; width: 53px; height: 47px; }
.logo svg { width: 100%; height: 100%; fill: var(--primary-brown); }

.mobile-bar { display: none; }

/* ---------- Page header (title + intro), same on every page ---------- */
.intro { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s6); }

/* Vertical rhythm between big blocks */
.block { margin-top: var(--s7); }

/* ---------- Home ---------- */
.hero-embed { width: 100%; height: 80vh; min-height: 480px; border: 0; display: block; }
.featured-link { display: inline-flex; align-items: center; gap: var(--s1); margin-top: var(--s2); }
.featured-link svg { width: 24px; height: 24px; transition: transform .25s ease; }
.featured-link:hover svg { transform: translateY(3px); }
.center { display: flex; justify-content: center; }

.projects {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s5); margin-top: var(--s6); scroll-margin-top: var(--s4);
}
.project { display: flex; flex-direction: column; gap: var(--s2); }
.project:hover { text-decoration: none; }
.project .thumb { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: rgb(133, 147, 161); margin-bottom: var(--s1); }
.project .thumb img, .project .thumb video { width: 100%; height: 100%; object-fit: cover; }
.project h2 { font-family: var(--serif); font-weight: 400; font-size: var(--t-h3); line-height: 1.25; }
.project p { font-size: var(--t-body); }
.project.soon { pointer-events: none; }
.project.soon .thumb { display: grid; place-items: center; color: #fff; font-size: var(--t-label); letter-spacing: var(--track); text-transform: uppercase; }

/* ---------- About ---------- */
.about-top { display: grid; grid-template-columns: minmax(260px, 0.42fr) 1fr; gap: var(--s5); align-items: center; }
.polaroid-embed { width: 100%; aspect-ratio: 4 / 5; height: auto; max-height: 640px; border: 0; display: block; }
.about-intro { display: flex; flex-direction: column; gap: var(--s2); }
.about-intro .xl-header { margin-bottom: 0; }
.about-intro .big-body { margin-top: calc(var(--s1) * -1); }
.about-intro a { text-decoration: underline; text-underline-offset: 3px; color: var(--primary-brown); }
.bio { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s1); color: var(--secondary-brown); font-size: var(--t-lead); line-height: 1.45; max-width: var(--measure); }

.cv { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin-top: var(--s7); }
.cv-col { display: flex; flex-direction: column; gap: var(--s3); }
.cv-col > h2 { padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
.cv-entry { display: flex; flex-direction: column; gap: var(--s3); }
.cv-entry.job { display: grid; grid-template-columns: max-content 1fr; gap: var(--s4); }
.cv-when { white-space: nowrap; }
.cv-body { display: flex; flex-direction: column; gap: var(--s1); }
.cv-entry h3 { font-size: var(--t-body); font-weight: 600; line-height: var(--lh-body); }
.cv-entry strong { font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: var(--s1); padding-top: var(--s1); }
.tag { background: var(--tag); color: var(--secondary-brown); border-radius: 12px; padding: 8px 12px; font-size: var(--t-small); line-height: 1.3; }

.marquee { overflow: hidden; margin-top: var(--s7); }
.marquee-track { display: flex; gap: var(--s3); width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee img { height: 300px; width: auto; border-radius: var(--radius); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } .marquee { overflow-x: auto; } }

/* ---------- Galleries (Paintings / Sketches) ---------- */
.mg-grid { column-count: 3; column-gap: var(--s3); }
.mg-item { position: relative; margin: 0 0 var(--s3); border-radius: var(--radius); overflow: hidden; break-inside: avoid; }
.mg-item img { width: 100%; height: auto; }
.mg-item figcaption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: var(--s3); text-align: center; color: #fff; background: rgba(0, 0, 0, .6);
  font-size: var(--t-body); line-height: 1.35; opacity: 0; transition: opacity .25s ease;
}
.mg-title { font-family: var(--serif); font-size: var(--t-lead); }
.mg-medium { opacity: .8; }
.mg-item:hover figcaption, .mg-item:focus-within figcaption { opacity: 1; }
@media (hover: none) {
  .mg-item { border-radius: 0; overflow: visible; }
  .mg-item img { border-radius: var(--radius); }
  .mg-item figcaption { position: static; opacity: 1; background: none; color: var(--primary-brown); padding: var(--s1) 0 0; align-items: flex-start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .mg-item figcaption { transition: none; } }

/* ---------- Case study (Nook) ---------- */
.case-hero {
  height: 530px; border-radius: var(--radius); overflow: hidden;
  background: var(--secondary-brown) center / cover no-repeat;
  display: flex; align-items: center; justify-content: center; padding: var(--s4);
}
.short-frame { width: 254px; height: 450px; border: 0; border-radius: var(--radius); background: #000; }
.case-head { display: flex; flex-direction: column; gap: var(--s1); margin-top: var(--s6); }

.case section { margin-top: var(--s7); scroll-margin-top: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.case section > .eyebrow { margin-bottom: calc(var(--s1) * -1); }
.case section h3.subheader { margin-top: var(--s4); }
.case p { max-width: var(--measure); }
.case .problem-q { font-family: var(--serif); font-size: var(--t-h2); line-height: 1.3; max-width: 28ch; }

.solution { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: var(--s5); align-items: start; margin-top: var(--s5); }
.solution > div { display: flex; flex-direction: column; gap: var(--s3); }
.solution img.demo { width: 100%; border-radius: var(--radius); }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.point { display: flex; flex-direction: column; gap: var(--s1); }
.point img { width: 24px; height: 24px; }
.point h4 { font-size: var(--t-body); font-weight: 600; }

.compare { width: 100%; max-width: 760px; border-collapse: collapse; }
.compare th, .compare td { text-align: left; padding: var(--s2) var(--s1); border-bottom: 1px solid var(--line); }
.compare th { font-weight: 600; }
.compare td.no { color: var(--secondary-brown); }

.wide-img { width: 100%; border-radius: var(--radius); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --gutter: var(--s4); }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-grid { column-count: 2; }
  .about-top { grid-template-columns: 1fr; }
  .polaroid-embed { max-width: 420px; }
}

@media (max-width: 860px) {
  :root { --s7: 72px; --s6: 48px; }
  .shell { display: block; }
  .site-nav {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); max-height: none; height: 100%;
    background: var(--background-cream); transform: translateX(-102%); transition: transform .3s ease;
    box-shadow: 0 0 40px rgba(61, 52, 45, .15); z-index: 20;
  }
  body.nav-open .site-nav { transform: none; }
  .nav-panel { min-height: 100%; }
  .scrim { position: fixed; inset: 0; background: rgba(61, 52, 45, .25); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 19; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }

  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 10; padding: var(--s1) var(--s2);
    background: var(--background-cream); border-bottom: 1px solid var(--line);
  }
  .mobile-bar .logo { width: 40px; height: 36px; }
  .menu-btn {
    width: 44px; height: 44px; padding: 0; display: grid; place-items: center;
    color: inherit; background: none; border: 0; border-radius: 50%; cursor: pointer;
    position: relative; z-index: 21;
  }
  .menu-btn .bars { position: relative; width: 22px; height: 12px; display: block; }
  .menu-btn .bars span {
    position: absolute; left: 0; width: 100%; height: 1.5px; border-radius: 2px;
    background: var(--primary-brown); transition: transform .3s ease, top .3s ease;
  }
  .menu-btn .bars span:first-child { top: 0; }
  .menu-btn .bars span:last-child { top: 10.5px; }
  body.nav-open .menu-btn .bars span:first-child { top: 5.25px; transform: rotate(45deg); }
  body.nav-open .menu-btn .bars span:last-child { top: 5.25px; transform: rotate(-45deg); }

  main { padding: var(--s3) var(--s2) var(--s7); }
  .projects { grid-template-columns: 1fr; }
  .hero-embed { height: 120vw; max-height: 820px; min-height: 0; }
  .cv { grid-template-columns: 1fr; }
  .marquee img { height: 200px; }
  .solution { grid-template-columns: 1fr; }
  .solution img.demo { max-width: 280px; }
  .points { grid-template-columns: 1fr; }
  .case-hero { height: auto; padding: var(--s4) var(--s2); }
  .compare { display: block; overflow-x: auto; font-size: var(--t-small); }
}

@media (max-width: 520px) {
  :root { --t-lead: 1.125rem; --t-body: 1rem; --t-h3: 1.375rem; }
  .mg-grid { column-count: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav, .scrim, .featured-link svg, .menu-btn .bars span { transition: none; }
}

/* headings inside a solution card don't need the extra top gap */
.case .solution h3.subheader { margin-top: 0; }

/* ---------- Nook case study blocks ---------- */
.case section .sub { display: flex; flex-direction: column; gap: var(--s1); margin-top: var(--s3); }
.case section.ruled { border-top: 1px solid var(--line); padding-top: var(--s5); }
ul.plain { list-style: none; margin: var(--s1) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); }

.meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin-top: var(--s3); }
.stat { display: flex; flex-direction: column; gap: var(--s1); }
.stat h3, .survey h4 { font-size: var(--t-lead); font-weight: 600; line-height: 1.35; }
.stat .source { font-size: var(--t-small); color: var(--secondary-brown); }

.embed-frame { width: 100%; height: 420px; border: 0; display: block; margin-top: var(--s3); background: transparent; }

.callout { background: rgba(138, 129, 120, .08); border-radius: var(--radius); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s1); margin-top: var(--s3); }
.callout-q { font-family: var(--serif); font-size: var(--t-h3); line-height: 1.35; max-width: 40ch; }

.sol { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s5); }
.sol-video { width: 100%; border-radius: var(--radius); background: var(--tag); }

.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s1); }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s1); }
.feature-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s3);
  padding: var(--s4); border-radius: var(--radius); min-height: 300px;
  background: rgb(138, 129, 120) url('https://framerusercontent.com/images/CcIl0Ioy8wmfE36Sn08RTvx1o.png') center / cover;
}
.feature-card img { max-height: 196px; width: auto; max-width: 100%; }
.feature-card h3 { font-family: var(--serif); font-weight: 400; font-size: var(--t-h3); line-height: 1.2; }
.feature-card p { font-size: var(--t-body); }
.feature-card.tall { padding: var(--s5); }
.placeholder-block { height: 124px; border-radius: 8px; background: rgb(94, 56, 56); }

.shot-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3);
  padding: var(--s4); border-radius: var(--radius); margin-top: var(--s1);
  background: rgb(138, 129, 120) url('https://framerusercontent.com/images/CcIl0Ioy8wmfE36Sn08RTvx1o.png') center / cover;
}
.shot-row img { width: 100%; height: auto; }

.research-block { display: flex; flex-direction: column; gap: var(--s1); margin-top: var(--s6); }
.minor { font-size: var(--t-lead); font-weight: 600; }

.survey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s2); }
.survey > div { display: flex; flex-direction: column; gap: var(--s2); }
.survey img { width: 100%; border-radius: var(--radius); margin-top: auto; }

.quotes { display: grid; gap: var(--s2); margin-top: var(--s2); }
.quotes blockquote { margin: 0; padding: var(--s3); border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: var(--s1); }
.quotes blockquote p { font-size: var(--t-lead); }
.quotes cite { font-style: normal; font-weight: 500; color: var(--secondary-brown); }

@media (max-width: 860px) {
  .meta-grid, .stats, .card-grid, .two-up, .survey { grid-template-columns: 1fr; }
  .shot-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--s2); }
  .feature-card, .feature-card.tall { padding: var(--s3); min-height: 0; }
}

@media (max-width: 520px) {
  .cv-entry.job { grid-template-columns: 1fr; gap: var(--s1); }
}

/* ---------- Case study margins: content centred with roomy side space ---------- */
@media (min-width: 861px) {
  main.case.page {
    max-width: none;
    padding-left: clamp(48px, 7vw, 200px);
    padding-right: clamp(48px, 7vw, 200px);
  }
  main.case > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
}

/* Nook: text runs the full width of the centred column */
main.case p, main.case .body, main.case .callout-q, main.case .problem-q { max-width: none; }

/* ---------- Nook: Framer-style section labels and problem stats ---------- */
/* Every section label gets a full-width rule under it */
main.case section > .eyebrow,
main.case .sub > .eyebrow,
main.case .meta-grid .eyebrow {
  font-weight: 500;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s1);
}
main.case section > .eyebrow { margin-bottom: var(--s1); }
main.case section.ruled { border-top: 0; padding-top: 0; }

main.case .sub { gap: var(--s2); margin-top: var(--s4); }
main.case .meta-grid { border-top: 0; padding-top: 0; margin-top: var(--s5); column-gap: var(--s3); }
main.case .meta-grid ul.plain { margin-top: var(--s2); gap: 12px; font-size: var(--t-lead); }

/* Problem: big serif statement, then the two stats stacked */
main.case #problem > .subheader { margin-top: var(--s2); }
main.case .stats { grid-template-columns: 1fr; gap: var(--s5); margin-top: var(--s5); }
main.case .stat { gap: var(--s2); }
main.case .stat h3 { font-size: clamp(1.5rem, 1.2rem + .8vw, 1.875rem); font-weight: 500; line-height: 1.3; }
main.case .stat p { font-size: var(--t-lead); line-height: 1.5; }
main.case .stat .source { font-size: var(--t-small); font-style: italic; margin-top: calc(var(--s2) * -1 + 4px); }
.hl, .hl-link { color: var(--red); }
.hl-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Nook: equal space on both sides of the content (measured from the menu's edge to the window's edge) */
@media (min-width: 861px) {
  body:has(main.case) .shell { max-width: none; }
  main.case.page {
    padding-right: clamp(48px, 7vw, 200px);
    padding-left: max(0px, calc(clamp(48px, 7vw, 200px) - var(--gutter)));
  }
}

/* ============================================================
   Nook: one consistent type + spacing system
   Type:   intro 20px · body 18px · item heading 24px sans · section statement 32px serif
   Space:  label → content 24px · heading → text 12px · text → image 24px
           block → block 48px · item → item 64px · section → section 96px
   ============================================================ */
main.case section { margin-top: var(--s7); gap: var(--s3); }
main.case section > .eyebrow { margin-bottom: 0; }
main.case section > .eyebrow + * { margin-top: 0; }

/* Body text */
main.case p, main.case li { font-size: 1.125rem; line-height: 1.6; }
main.case .sub > .body { font-size: var(--t-lead); line-height: 1.55; }
main.case .meta-grid ul.plain { font-size: 1.125rem; gap: var(--s1); }
main.case .meta-grid ul.plain li { font-size: 1.125rem; }
main.case .stat .source, main.case .source { font-size: 1rem; font-style: italic; color: var(--secondary-brown); margin-top: calc(-1 * var(--s1)); }

/* Item headings: stats, solutions, research methods share one style */
main.case .stat h3,
main.case .sol > h2.subheader,
main.case .research-block > h3.minor {
  font-family: var(--sans); font-weight: 500;
  font-size: 1.5rem; line-height: 1.3;
}
main.case .survey h4 { font-size: 1.25rem; font-weight: 500; line-height: 1.35; }

/* Overview */
main.case .sub { margin-top: var(--s5); gap: var(--s3); }
main.case .meta-grid { margin-top: var(--s6); row-gap: var(--s3); }
main.case .meta-grid .eyebrow { margin-bottom: 0; }
main.case .meta-grid ul.plain { margin-top: var(--s3); }

/* Problem */
main.case .stats { margin-top: var(--s3); gap: var(--s6); }
main.case .stat { gap: 12px; }
main.case .embed-frame { margin-top: var(--s3); }
main.case .callout { margin-top: var(--s3); padding: var(--s4); gap: 12px; }
main.case .callout .eyebrow { border: 0; padding: 0; }

/* Key solutions */
main.case .sol { margin-top: 40px; gap: 12px; }            /* 40 + 24 section gap = 64 between items */
main.case section > .eyebrow + .sol { margin-top: 0; }
main.case .sol > .sol-video,
main.case .sol > .card-grid,
main.case .sol > .shot-row,
main.case .sol > .two-up { margin-top: 12px; }             /* 12 + 12 = 24 text → image */
main.case .card-grid + .shot-row { margin-top: 12px; }

/* User research */
main.case #research > p + p { margin-top: calc(-1 * var(--s1)); }
main.case .research-block { margin-top: 40px; gap: var(--s3); }
main.case .research-block > .embed-frame,
main.case .research-block > .survey,
main.case .research-block > .quotes { margin-top: 0; }
main.case .survey > div { gap: 12px; }
main.case .survey img { margin-top: 12px; }
main.case .quotes blockquote p { font-size: 1.25rem; }

/* Lo-fi → reflections */
main.case section.ruled > .embed-frame,
main.case section.ruled > .wide-img { margin-top: 0; }

/* Nook system: fixes (the page's 1rem = 17px) */
main.case p, main.case li, main.case .stat p, main.case .meta-grid ul.plain li { font-size: 1.0625rem; }   /* 18px body */
main.case .eyebrow { font-size: var(--t-label); line-height: 1.4; }                                        /* 17px labels */
main.case .callout-q { font-size: var(--t-h3); line-height: 1.35; }                                        /* 24px serif */
main.case .sub > .body { font-size: var(--t-lead); }                                                       /* 21px intro */
main.case .stat h3, main.case .sol > h2.subheader, main.case .research-block > h3.minor { font-size: 1.4rem; } /* 24px */
main.case .survey h4 { font-size: 1.1765rem; }                                                             /* 20px */
main.case .stat .source, main.case .source { font-size: 1rem; }
main.case .quotes blockquote p { font-size: 1.1765rem; }
main.case #problem > .subheader { margin-top: 0; }
main.case .sub { margin-top: var(--s3); }
main.case .sub > .eyebrow { margin-bottom: 0; }
main.case .meta-grid { margin-top: 40px; }

/* Nav: Home, About, Resume in Caladea */
.nav-top a:not(.logo), .nav-top span { font-family: var(--serif); font-size: 1.375rem; letter-spacing: 0; line-height: 1.25; }

/* Nook: key solution headings match the section statements (serif, same size) */
main.case .sol > h2.subheader {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--t-h2); line-height: var(--lh-tight);
}

/* ---------- Page-load animation: content flows up ---------- */
.js-reveal:not(.rv-ready) main { opacity: 0; }
.js-reveal .rv {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--rv-delay, 0ms);
}
.js-reveal .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-reveal .rv { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   Paintings + Sketches: same margins and spacing system as Nook
   Title → intro 24px · intro → gallery 64px · between pieces 24px
   Captions: title 21px serif · medium 17px
   ============================================================ */
@media (min-width: 861px) {
  body:has(main.gallery-page) .shell { max-width: none; }
  main.gallery-page {
    padding-right: clamp(48px, 7vw, 200px);
    padding-left: max(0px, calc(clamp(48px, 7vw, 200px) - var(--gutter)));
  }
  main.gallery-page > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
}
.gallery-page .intro { gap: var(--s3); margin-bottom: var(--s6); }
.gallery-page .intro .body { font-size: var(--t-lead); line-height: 1.55; max-width: 60ch; }
.gallery-page .mg-grid { column-gap: var(--s3); }
.gallery-page .mg-item { margin-bottom: var(--s3); }
.gallery-page .mg-item figcaption { gap: 6px; padding: var(--s4); }
.gallery-page .mg-title { font-size: var(--t-lead); line-height: 1.3; }
.gallery-page .mg-medium { font-size: 1rem; line-height: 1.4; }
@media (hover: none) {
  .gallery-page .mg-item { margin-bottom: var(--s5); }
  .gallery-page .mg-item figcaption { padding: 12px 0 0; gap: 4px; }
}
@media (max-width: 860px) {
  .gallery-page .intro { gap: var(--s2); margin-bottom: var(--s5); }
}
