:root {
    --ink: #1A1813;
    --ink-soft: #3A362E;
    --paper: #F4EFE4;
    --paper-deep: #EAE3D2;
    --clay: #9A5B33;
    --clay-light: #B9794C;
    --stone: #6E695D;
    --hair: rgba(26,24,19,0.14);
    --hair-soft: rgba(26,24,19,0.08);

    --display: 'Fraunces', Georgia, serif;
    --read: 'Newsreader', Georgia, serif;
    --ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --measure: 38rem;
    --gutter: clamp(1.5rem, 5vw, 5rem);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
  body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--read);
    font-size: 1.18rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  img { display: block; max-width: 100%; height: auto; }
  a { color: inherit; text-decoration: none; }
  ::selection { background: var(--clay); color: var(--paper); }

  /* ---------- HEADER ---------- */
  .masthead {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.1rem var(--gutter);
    font-family: var(--ui);
    mix-blend-mode: difference; color: #fff;
  }
  .masthead .name { font-family: var(--display); font-weight: 500; font-size: 1.05rem; letter-spacing: 0.01em; }
  .masthead nav { display: flex; gap: 1.8rem; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em; }
  .masthead nav a { opacity: 0.85; transition: opacity .2s; }
  .masthead nav a:hover { opacity: 1; }
  @media (max-width: 720px) { .masthead nav { display: none; } .scroll-cue { display: none; } }

  /* ---------- HERO ---------- */
  .hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; color: #F4EFE4; overflow: hidden; }
  .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,18,14,0.45) 0%, rgba(20,18,14,0.1) 40%, rgba(20,18,14,0.78) 100%); }
  .hero-inner { position: relative; z-index: 2; padding: var(--gutter); padding-bottom: clamp(3rem, 8vh, 6rem); max-width: 60rem; }
  .hero-eyebrow { font-family: var(--ui); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.9; margin-bottom: 1.4rem; }
  .hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 6.5vw, 5.2rem); line-height: 1.04; letter-spacing: -0.02em; }
  .hero h1 em { font-style: italic; color: var(--clay-light); }
  .hero-sub { margin-top: 1.6rem; max-width: 34rem; font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.55; opacity: 0.92; }
  .scroll-cue { position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); z-index: 3; font-family: var(--ui); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: #F4EFE4; opacity: 0.6; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
  .scroll-cue span { display: block; width: 1px; height: 32px; background: currentColor; animation: cue 2.2s ease-in-out infinite; }
  @keyframes cue { 0%,100% { opacity: 0.2; transform: scaleY(0.4); transform-origin: top; } 50% { opacity: 0.8; transform: scaleY(1); } }

  /* ---------- SCAFFOLD ---------- */
  .band { padding: clamp(4.5rem, 11vh, 9rem) var(--gutter); }
  .band-deep { background: var(--paper-deep); }
  .center { max-width: var(--measure); margin-inline: auto; }
  .wide { max-width: 72rem; margin-inline: auto; }
  .kicker { font-family: var(--ui); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--clay); display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.4rem; }
  .kicker::before { content: ''; width: 1.8rem; height: 1px; background: currentColor; }
  h2.section-title { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -0.015em; max-width: 22ch; }

  /* ---------- THESIS ---------- */
  .thesis { background: var(--ink); color: var(--paper); }
  .thesis .lead { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 4vw, 2.9rem); line-height: 1.28; letter-spacing: -0.01em; max-width: 20ch; }
  .thesis .lead em { font-style: italic; color: var(--clay-light); }
  .thesis p.body { margin-top: 1.8rem; max-width: 40ch; color: rgba(244,239,228,0.74); font-size: 1.15rem; }

  /* ---------- ESSAY INDEX ---------- */
  .essay-list { margin-top: 3.5rem; display: flex; flex-direction: column; }
  .essay-row { display: grid; grid-template-columns: 3.5rem 1fr auto; gap: 1.5rem; align-items: baseline; padding: 1.9rem 0; border-top: 1px solid var(--hair); transition: padding-left .3s ease; }
  .essay-row:last-child { border-bottom: 1px solid var(--hair); }
  .essay-row:hover { padding-left: 0.8rem; }
  .essay-row .no { font-family: var(--ui); font-size: 0.8rem; font-weight: 600; color: var(--clay); letter-spacing: 0.05em; }
  .essay-row .ttl { font-family: var(--display); font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 400; line-height: 1.2; }
  .essay-row .arr { font-family: var(--ui); font-size: 1.1rem; color: var(--stone); transition: transform .25s, color .25s; }
  .essay-row:hover .arr { transform: translateX(5px); color: var(--clay); }
  @media (max-width: 600px) { .essay-row { grid-template-columns: 2.2rem 1fr; } .essay-row .arr { display: none; } }

  /* ---------- ESSAY ARTICLES ---------- */
  .essay { padding: clamp(4rem, 9vh, 7rem) 0 0; border-top: 1px solid var(--hair-soft); }
  .essay-figure { max-width: 84rem; margin-inline: auto; }
  .essay-figure img { width: 100%; border-radius: 2px; }
  .essay-figure figcaption { font-family: var(--ui); font-size: 0.78rem; color: var(--stone); letter-spacing: 0.02em; margin-top: 0.9rem; padding-inline: var(--gutter); }
  .essay-head { max-width: var(--measure); margin: clamp(2.5rem,6vh,4rem) auto 0; padding-inline: var(--gutter); }
  .essay-head .no { font-family: var(--ui); font-size: 0.76rem; font-weight: 600; color: var(--clay); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1rem; }
  .essay-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.08; letter-spacing: -0.02em; }
  .essay-body { max-width: var(--measure); margin: 2.6rem auto 0; padding-inline: var(--gutter); }
  .essay-body p { margin-bottom: 1.5rem; }
  .essay-body p.lede::first-letter { font-family: var(--display); float: left; font-size: 3.8rem; line-height: 0.78; padding: 0.35rem 0.7rem 0 0; color: var(--clay); font-weight: 500; }
  .essay-body strong { font-weight: 600; }
  .essay-body em { font-style: italic; }
  .essay-body .subhead { font-family: var(--display); font-weight: 500; font-style: italic; font-size: 1.4rem; line-height: 1.35; color: var(--ink); margin: 2.6rem 0 1.3rem; max-width: 34ch; }
  .pullquote { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.32; letter-spacing: -0.01em; color: var(--clay); margin: 2.8rem 0; padding-left: 1.4rem; border-left: 2px solid var(--clay); max-width: 28ch; }
  .rule { width: 4rem; height: 1px; background: var(--hair); margin: clamp(3.5rem,8vh,6rem) auto 0; }

  /* ---------- WORK ---------- */
  .work-intro { text-align: center; max-width: 40rem; margin: 0 auto; }
  .work { display: grid; grid-template-columns: 1fr 1fr; }
  @media (max-width: 860px) { .work { grid-template-columns: 1fr; } }
  .work-panel { position: relative; overflow: hidden; min-height: 78vh; display: flex; align-items: flex-end; color: var(--paper); }
  .work-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .work-panel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,18,14,0.15) 30%, rgba(20,18,14,0.85) 100%); }
  .work-panel .pad { position: relative; z-index: 2; padding: var(--gutter); }
  .work-panel .tag { font-family: var(--ui); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 0.9rem; opacity: 0.85; }
  .work-panel h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem,3vw,2.4rem); line-height: 1.12; }
  .work-panel p { margin-top: 0.9rem; max-width: 34ch; font-size: 1.08rem; opacity: 0.9; }
  .work-panel ul { list-style: none; margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .work-panel li { font-family: var(--ui); font-size: 0.76rem; letter-spacing: 0.02em; padding: 0.35rem 0.8rem; border: 1px solid rgba(244,239,228,0.4); border-radius: 100px; }
  .work-panel .more { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.6rem; font-family: var(--ui); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.03em; }
  .work-panel .more::after { content: '→'; transition: transform .2s; }
  .work-panel:hover .more::after { transform: translateX(4px); }

  /* ---------- CONTACT ---------- */
  .contact { background: var(--ink); color: var(--paper); }
  .contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(2rem,5vw,5rem); align-items: end; }
  @media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
  .contact .quote { font-family: var(--display); font-style: italic; font-size: clamp(1.6rem,3.5vw,2.6rem); line-height: 1.25; letter-spacing: -0.01em; max-width: 18ch; }
  .contact .quote .accent { color: var(--clay-light); }
  .contact-detail a, .contact-detail span { display: block; font-family: var(--ui); font-size: 1.02rem; padding: 0.4rem 0; color: rgba(244,239,228,0.85); transition: color .2s; }
  .contact-detail a:hover { color: var(--clay-light); }
  .contact-detail .label { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: #8C8678; padding-bottom: 0.2rem; }

  /* ---------- FOOTER ---------- */
  footer { padding: 2.2rem var(--gutter); background: var(--ink); color: rgba(244,239,228,0.5); border-top: 1px solid rgba(244,239,228,0.12); }
  footer .row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-family: var(--ui); font-size: 0.8rem; }

  /* ---------- MOTION / A11Y ---------- */
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
  .reveal.in { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }
  a:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
  .skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.7rem 1rem; z-index: 100; font-family: var(--ui); }
  .skip:focus { left: 0; }