@import url('../../assets/fonts.css');

:root {
  color-scheme: dark;
  --paper: #141513;
  --ink: #e5dfd3;
  --body: #c4c1b6;
  --muted: #95968a;
  --gold: #c6ab74;
  --line: #34362e;
  --display: 'Cormorant Garamond', Georgia, serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 50px; }
body { margin: 0; background: var(--paper); color: var(--body); font-family: var(--serif); -webkit-font-smoothing: antialiased; }
body::before { content: ''; pointer-events: none; position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 0, #30312638, transparent 65%); }
::selection { background: #c6ab743d; color: #fff9ea; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.skip-link { position: fixed; top: 15px; left: 20px; z-index: 20; padding: 12px 20px; background: var(--ink); color: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.progress { position: fixed; z-index: 15; inset: 0 0 auto; height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--gold); }
.masthead { max-width: 1160px; margin: 0 auto; padding: 33px 32px 30px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.identity { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.identity svg { width: 27px; height: 27px; color: var(--gold); flex-shrink: 0; }
.eyebrow, .masthead, .art-caption, .contents, .page-footer, .chapter-label, .reading-meta, .mobile-contents, .dialog-caption { font-family: var(--sans); font-size: 10px; font-weight: 400; letter-spacing: .16em; }
.identity span { text-transform: uppercase; color: #b7b6a9; }
.read-link { text-transform: uppercase; text-decoration: none; color: var(--muted); display: flex; align-items: center; gap: 18px; padding-block: 12px; }
.read-link span { font-size: 17px; line-height: 1; color: var(--gold); }
.cover { padding: 5px 32px 0; }
.artwork { max-width: min(840px, calc((100svh - 365px) * 1.5667)); margin: 0 auto; }
.art-link { position: relative; display: block; outline-offset: 8px; cursor: zoom-in; }
.art-link img { display: block; width: 100%; height: auto; box-shadow: 0 18px 70px #0003; }
.art-zoom { position: absolute; bottom: 13px; right: 13px; width: 31px; height: 31px; background: #141513c9; border: 1px solid #f3e8ce40; border-radius: 50%; color: #f0e8da; display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.art-link:hover .art-zoom, .art-link:focus-visible .art-zoom { opacity: 1; }
.art-caption { display: flex; justify-content: space-between; gap: 15px; padding-top: 17px; font-size: 9px; letter-spacing: .08em; color: var(--muted); line-height: 1.7; }
.art-caption a { text-decoration: none; }
.art-caption em { color: #b7b4a5; font-style: normal; }
.hero-copy { text-align: center; margin: 44px auto 0; }
.eyebrow { margin: 0; color: var(--gold); text-transform: uppercase; font-size: 10px; letter-spacing: .23em; }
h1 { margin: 24px 0 21px; font-family: var(--display); font-size: clamp(70px, 8.6vw, 112px); font-weight: 400; line-height: .91; letter-spacing: -.04em; color: var(--ink); }
h1 span, h1 em { display: inline-block; }
h1 span { margin-right: .15em; }
h1 em { font-weight: 400; color: var(--gold); }
.hero-subtitle { font-size: 17px; line-height: 1.7; color: #aaa99a; margin: 28px 0 20px; }
.reading-meta { display: flex; align-items: center; justify-content: center; gap: 15px; font-size: 9px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.reading-meta i { width: 3px; height: 3px; background: var(--gold); border-radius: 50%; }
.hero-divider { width: 1px; height: 62px; margin: 39px auto 0; background: linear-gradient(var(--gold), transparent); opacity: .5; }
.essay-layout { max-width: 1100px; margin: 0 auto; padding: 61px 32px 0; display: grid; grid-template-columns: 156px minmax(0, 660px); column-gap: 78px; align-items: start; }
.contents { position: sticky; top: 70px; margin-top: 11px; }
.contents-title { margin: 0 0 26px; font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .19em; }
.contents ol { list-style: none; padding: 0; margin: 0; }
.contents a { display: flex; gap: 13px; align-items: baseline; text-decoration: none; color: var(--muted); padding: 11px 0; font-size: 10px; letter-spacing: .05em; transition: color .2s; }
.contents .number { color: #858778; font-size: 9px; font-variant-numeric: tabular-nums; width: 16px; }
.contents a:hover, .contents a[aria-current='location'], .contents a[aria-current='location'] .number { color: var(--gold); }
.contents a[aria-current='location']::after { content: ''; width: 4px; height: 4px; background: var(--gold); border-radius: 50%; margin-left: auto; align-self: center; }
.contents-bottom { display: block; width: 26px; height: 1px; background: var(--line); margin: 30px 0; }
.contents-note { font-family: var(--display); color: #aaa898; font-style: italic; font-size: 19px; letter-spacing: 0; line-height: 1.4; max-width: 120px; }
.mobile-contents { display: none; }
.article { min-width: 0; font-size: 19px; line-height: 1.9; }
.article p { margin: 0 0 25px; }
.intro { padding-bottom: 20px; }
.intro p:first-child { font-size: 21px; line-height: 1.85; color: #d2cdbf; }
.intro p:first-child::first-letter { float: left; font-family: var(--display); font-size: 89px; line-height: .8; padding: 11px 12px 0 0; color: var(--gold); }
.intro .bridge { margin-top: 32px; font-size: 18px; font-style: italic; color: #aaa99a; }
.chapter { padding: 60px 0 54px; border-top: 1px solid var(--line); }
.chapter-label { display: flex; align-items: center; gap: 15px; text-transform: uppercase; color: var(--gold); letter-spacing: .19em; margin-bottom: 16px; }
.chapter-label .number { font-family: var(--display); font-size: 18px; font-style: italic; letter-spacing: 0; min-width: 24px; color: var(--gold); }
.chapter-label .dash { width: 24px; height: 1px; background: #6c6046; }
h2 { font-family: var(--display); color: var(--ink); font-weight: 400; font-size: clamp(36px, 3.8vw, 48px); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 28px; text-wrap: balance; }
.chapter .section-intro { color: #c6c4b8; }
.principles { list-style: none; padding: 0; margin: 30px 0 0; }
.principles li { position: relative; margin: 0 0 23px; padding-left: 24px; }
.principles li::before { content: ''; position: absolute; left: 0; top: 18px; width: 5px; height: 5px; border: 1px solid #877955; border-radius: 50%; }
.principles li:last-child { margin-bottom: 0; }
strong { font-weight: 500; color: #e0dbcd; }
.chapter:nth-of-type(3n) .chapter-label { color: #a2adbd; }
.chapter:nth-of-type(3n + 1) .chapter-label { color: #bb8b79; }
.closing { padding: 29px 0 0; }
.closing-mark { display: block; color: var(--gold); width: 64px; height: 70px; margin: 0 auto 40px; opacity: .85; }
.closing .final-thought { font-family: var(--display); font-size: 36px; line-height: 1.43; font-weight: 400; color: var(--ink); letter-spacing: -.012em; margin-bottom: 45px; }
.closing .final-thought em { color: var(--gold); font-style: italic; }
.closing .lens { padding-top: 29px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.85; color: #aaa99c; }
.page-footer { max-width: 1100px; margin: 105px auto 0; padding: 27px 32px 35px; display: flex; justify-content: space-between; gap: 25px; color: var(--muted); line-height: 1.9; font-size: 9px; letter-spacing: .05em; }
.page-footer a { text-decoration: none; }
.back-top { white-space: nowrap; text-transform: uppercase; letter-spacing: .14em; }
.back-top span { margin-left: 12px; color: var(--gold); font-size: 14px; }
.art-dialog { max-width: min(1280px, 96vw); max-height: 96vh; padding: 50px 20px 18px; background: #171815; color: var(--ink); border: 1px solid #48493e; overflow: auto; }
.art-dialog::backdrop { background: #090a09ed; backdrop-filter: blur(6px); }
.art-dialog img { display: block; width: auto; max-width: 100%; height: auto; max-height: 76vh; margin: auto; object-fit: contain; }
.dialog-close { position: absolute; top: 4px; right: 6px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-family: var(--sans); font-size: 26px; }
.dialog-caption { margin: 16px 0 0; color: var(--body); letter-spacing: .04em; text-align: center; line-height: 1.7; }
html:has(dialog[open]) { overflow: hidden; }

@media (max-width: 1050px) {
  .essay-layout { display: block; max-width: 724px; padding-top: 42px; }
  .contents { display: none; }
  .mobile-contents { display: block; border-block: 1px solid var(--line); margin-bottom: 42px; }
  .mobile-contents summary { cursor: pointer; color: var(--gold); text-transform: uppercase; padding: 19px 0; list-style: none; display: flex; justify-content: space-between; }
  .mobile-contents summary::-webkit-details-marker { display: none; }
  .mobile-contents summary::after { content: '+'; font-size: 16px; line-height: 12px; }
  .mobile-contents[open] summary::after { content: '−'; }
  .mobile-contents nav { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 16px; padding: 0 0 18px; }
  .mobile-contents nav a { padding: 12px 0; text-decoration: none; letter-spacing: .03em; font-size: 11px; }
  .mobile-contents nav span { color: var(--gold); margin-right: 10px; font-size: 9px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 25px; }
  .masthead { padding: 23px 23px 27px; gap: 12px; font-size: 8px; }
  .identity { gap: 9px; }
  .identity svg { width: 22px; height: 22px; }
  .identity span { letter-spacing: .13em; }
  .read-link { gap: 9px; letter-spacing: .09em; }
  .cover { padding-inline: 20px; }
  .artwork { max-width: 100%; }
  .art-caption { padding-top: 12px; font-size: 8px; letter-spacing: .035em; gap: 12px; }
  .art-caption .location { display: none; }
  .hero-copy { margin-top: 47px; }
  .eyebrow { font-size: 8px; letter-spacing: .21em; }
  h1 { font-size: clamp(68px, 15vw, 90px); margin-top: 22px; }
  h1 span, h1 em { display: block; }
  h1 span { margin-right: 0; }
  .hero-subtitle { max-width: 260px; margin: 23px auto 19px; font-size: 16px; line-height: 1.65; }
  .reading-meta { font-size: 8px; }
  .hero-divider { height: 47px; margin-top: 31px; }
  .essay-layout { padding: 30px 25px 0; }
  .article { font-size: 17px; line-height: 1.85; }
  .intro { padding-bottom: 14px; }
  .intro p:first-child { font-size: 19px; line-height: 1.85; }
  .intro p:first-child::first-letter { font-size: 77px; padding-top: 10px; padding-right: 10px; }
  .intro .bridge { font-size: 16px; }
  .chapter { padding: 42px 0; }
  .chapter-label { font-size: 8px; gap: 12px; margin-bottom: 16px; }
  h2 { font-size: 38px; margin-bottom: 24px; }
  .principles { margin-top: 25px; }
  .principles li { padding-left: 19px; margin-bottom: 22px; }
  .principles li::before { top: 14px; width: 4px; height: 4px; }
  .closing { padding-top: 20px; }
  .closing-mark { margin-bottom: 30px; width: 50px; height: 60px; }
  .closing .final-thought { font-size: 29px; line-height: 1.45; }
  .closing .lens { font-size: 16px; }
  .page-footer { margin-top: 65px; padding: 20px 25px 30px; font-size: 8px; }
  .page-footer .credit { max-width: 220px; }
  .art-dialog { padding: 49px 10px 15px; }
  .dialog-caption { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  :root { color-scheme: light; --paper: #fff; --body: #222; --ink: #111; --gold: #695635; --line: #ccc; }
  body { background: #fff; }
  .masthead, .contents, .mobile-contents, .progress, .hero-divider, .art-zoom, .back-top { display: none; }
  .cover { padding: 0; }
  .artwork { max-width: 460px; }
  .artwork img { box-shadow: none; }
  .hero-copy { margin-top: 30px; }
  h1 { font-size: 65px; }
  .essay-layout { display: block; max-width: 100%; padding: 30px 0 0; }
  .article { font-size: 11pt; line-height: 1.6; }
  .article p, .article strong, .closing .final-thought, .closing .lens { color: #222; }
  .intro p:first-child { font-size: 12pt; }
  .chapter { padding: 25px 0; }
  h2 { font-size: 26pt; break-after: avoid; }
  .principles li { break-inside: avoid; }
  .closing .final-thought { font-size: 21pt; }
  .page-footer { padding: 20px 0; margin-top: 30px; }
}
