:root {
  --bg: #0E1013;
  --panel: #1C2027;
  --line: #2A2F37;
  --ring: #3A404A;
  --text: #E9E4D8;
  --soft: #D3D7DC;
  --body: #C3C8CF;
  --muted: #A2AAB5;
  --accent: #D8B878;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
}
main { flex: 1; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--bg); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

.wrap, .wrap-narrow { width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header */
.site-header { padding-top: 36px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between; }
.brand { font-family: var(--serif); font-size: 40px; font-weight: 400; letter-spacing: 0.01em; line-height: 1.2; }
.brand span { font-style: italic; color: var(--accent); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0 32px; font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase; }
.site-header nav a { padding: 10px 0; }
.site-header nav a[aria-current="page"] { color: var(--accent); }

/* Shared */
.caption { margin: 0; font-size: 14px; color: var(--muted); }
.eyebrow { margin: 0 0 20px; font-size: 14px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.eyebrow-lg { font-size: 20px; margin-bottom: 28px; }
.section { padding-top: 96px; }
.back { display: inline-block; padding: 10px 0; font-size: 14px; letter-spacing: 0.06em; color: var(--muted); }
h1 { margin: 8px 0 0; font-family: var(--serif); font-size: 64px; font-weight: 300; line-height: 1.1; }

/* Home */
.hero { padding-top: 8px; }
.hero-frame { height: clamp(300px, 66vw, 853px); background: var(--panel); border-radius: 4px; overflow: hidden; }
.hero-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero .caption { padding-top: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px 24px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card-frame { aspect-ratio: 16.375 / 10.5; background: var(--panel); border-radius: 4px; overflow: hidden; }
.card-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-frame img { transform: scale(1.025); }
.card .caption { margin-top: -6px; font-size: 13px; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-title span:first-child { font-family: var(--serif); font-size: 28px; font-weight: 300; }
.count { font-size: 13px; color: var(--muted); white-space: nowrap; }

.about { padding-top: 72px; }
.about > h2 { border-top: 1px solid var(--line); padding-top: 32px; }
.about-row { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-start; }
.portrait { flex: 0 0 120px; width: 120px; height: 160px; object-fit: cover; border-radius: 4px; }
.about-text { flex: 1 1 320px; min-width: 0; max-width: 820px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; color: var(--body); }
.about-text p { margin: 0; }
.about-lead { font-size: 15px; color: var(--text); }
.about-name { font-family: var(--serif); font-size: 20px; }
.about-text .label { font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Gallery */
.page-head { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; justify-content: space-between; }
.meta { margin: 0; font-size: 14px; color: var(--muted); }
.masonry { column-width: 520px; column-gap: 24px; }
.masonry-small { column-width: 340px; }
.masonry figure { margin: 0 0 28px; break-inside: avoid; }
.masonry button { display: block; width: 100%; padding: 0; border: 0; background: var(--panel); border-radius: 4px; overflow: hidden; cursor: zoom-in; }
.masonry img { display: block; width: 100%; height: auto; }
.masonry figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }

.viewer { position: fixed; inset: 0; z-index: 10; background: rgba(8, 9, 11, 0.97); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 16px 24px; }
.viewer[hidden] { display: none; }
.viewer-stage { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.viewer-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; transition: opacity .2s; }
.viewer-stage img.loading { opacity: .35; }
.viewer-bar { margin-top: 20px; display: flex; align-items: center; gap: 24px; max-width: 100%; }
.viewer-caption { margin: 0; min-width: 0; text-align: center; font-family: var(--serif); font-size: 20px; font-weight: 300; }
.viewer-pos { font-family: var(--sans); font-size: 13px; color: var(--muted); white-space: nowrap; }
.round { flex: 0 0 48px; width: 48px; height: 48px; border: 1px solid var(--ring); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.round:hover { border-color: var(--accent); color: var(--accent); }
.viewer-close { position: absolute; top: 16px; right: 16px; }

/* Journal */
.journal { padding-top: 72px; }
.latest { margin-top: 56px; }
.latest a { display: block; }
.latest .eyebrow { font-size: 12px; letter-spacing: 0.12em; margin-bottom: 12px; }
.latest h2 { margin: 0 0 18px; font-family: var(--serif); font-size: 40px; font-weight: 300; line-height: 1.15; }
.opening { margin: 0 0 20px; font-family: var(--serif); font-size: 21px; font-weight: 300; line-height: 1.6; color: var(--soft); }
.more { font-size: 14px; letter-spacing: 0.06em; }
.latest a:hover h2, .latest a:hover .opening { color: inherit; }
.latest a:hover .more { color: var(--accent); }
.empty { margin-top: 40px; font-family: var(--serif); font-size: 21px; font-weight: 300; color: var(--soft); }
.empty a { color: var(--accent); }
.earlier { margin-top: 80px; border-top: 1px solid var(--line); }
.earlier a { display: flex; flex-wrap: wrap; gap: 6px 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.earlier .date { flex: 0 0 120px; font-size: 13px; color: var(--muted); padding-top: 6px; }
.entry { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.entry-title { font-family: var(--serif); font-size: 26px; font-weight: 300; line-height: 1.25; }
.entry-summary { font-size: 15px; color: var(--body); }
.earlier a:hover .entry-summary { color: var(--body); }

.post { padding-top: 40px; }
.post .eyebrow { margin: 32px 0 0; font-size: 12px; letter-spacing: 0.12em; }
.post h1 { font-size: 52px; margin-top: 12px; }
.prose { margin-top: 40px; font-family: var(--serif); font-size: 21px; font-weight: 300; line-height: 1.7; color: var(--soft); }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose pre { margin: 0 0 1.1em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--serif); font-weight: 400; color: var(--text); line-height: 1.25; margin: 1.6em 0 .6em; }
.prose h2 { font-size: 30px; } .prose h3 { font-size: 25px; } .prose h4 { font-size: 21px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { font-weight: 400; color: var(--text); }
.prose blockquote { padding-left: 20px; border-left: 2px solid var(--accent); font-style: italic; }
.prose img { display: block; width: 100%; height: auto; border-radius: 4px; }
.prose figure img, .prose p img { margin: 1.4em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose code { font-size: .85em; background: var(--panel); padding: 2px 5px; border-radius: 3px; }
.prose pre { background: var(--panel); padding: 16px; border-radius: 4px; overflow-x: auto; font-size: 15px; }
.prose pre code { background: none; padding: 0; }
.post-nav { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; font-family: var(--serif); font-size: 20px; font-weight: 300; max-width: 48%; }
.post-nav .newer { text-align: right; margin-left: auto; }
.post-nav .label { font-family: var(--sans); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* Footer */
.site-footer { padding-top: 96px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }

/* Phones */
@media (max-width: 700px) {
  .wrap, .wrap-narrow { padding-left: 16px; padding-right: 16px; }
  .site-header { padding-top: 24px; padding-bottom: 16px; }
  .brand { font-size: 32px; }
  .site-header nav { gap: 0 20px; font-size: 14px; }
  h1 { font-size: 46px; }
  .post h1 { font-size: 38px; }
  .section { padding-top: 64px; }
  .eyebrow-lg { font-size: 16px; }
  .latest h2 { font-size: 32px; }
  .prose, .opening { font-size: 19px; }
  .viewer { padding: 64px 8px 16px; }
  .viewer-bar { gap: 12px; }
  .viewer-caption { font-size: 17px; }
  .site-footer { padding-top: 64px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
