/* ---------- tokens ---------- */
:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --muted: #8a8a8a;
  --faint: #c2c2c2;
  --rule: #ececec;
  --paper: #ffffff;

  --stone: #fafafa;
  --stone-edge: #cfcfcf;
  --stone-shadow: #e0e0e0;
  --brass: #9a9a9a;

  --col-narrow: 640px;
  --col-wide: 900px;
  --col-photos: 1200px;

  --pad-x: 28px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-y: scroll; background: var(--paper); scroll-behavior: smooth; }
body {
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  /* leave room on the right for the pillar scrollbar in modern Firefox */
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }

/* ---------- font tokens ---------- */
.font-iceland   { font-family: "Iceland", system-ui, sans-serif; letter-spacing: 0.02em; }
.font-jersey    { font-family: "Jersey 10", system-ui, sans-serif; letter-spacing: 0.02em; }
.font-cormorant { font-family: "Cormorant Garamond", "Garamond", "Times New Roman", serif; }
.font-monoton   { font-family: "Monoton", "Impact", sans-serif; letter-spacing: 0.04em; }

/* per-page body font */
.page-about       { font-family: "Iceland", system-ui, sans-serif; }
.page-writing     { font-family: "Cormorant Garamond", "Garamond", serif; }
.page-photography { font-family: "Monoton", "Impact", sans-serif; }

/* ---------- layout columns ---------- */
.col {
  max-width: var(--col-narrow);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.col-wide {
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.col-photos {
  max-width: var(--col-photos);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ---------- nav ---------- */
.site-header { position: relative; }

/* hidden by default; only revealed on mobile via the media query below */
.nav-hamburger { display: none; }

.nav {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 56px;
  padding: 40px 0 56px;
  border-bottom: none;
}
.nav-link {
  position: relative;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  padding-bottom: 14px;
}
/* Monoton has heavier visual presence than Iceland or Cormorant at the same
   font-size, so we scale it down to read at a similar visual weight. */
.nav-link.font-monoton { font-size: 17px; }
.nav-link.font-jersey { font-size: 28px; }
.nav-link.is-coming { opacity: 0.5; cursor: default; user-select: none; }
.nav-coming {
  display: block;
  margin-top: 6px;
  font-family: "Iceland", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--muted);
}
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 22px;
  height: 1px;
  background: var(--ink);
}
/* ---------- About page ---------- */
.about-head { text-align: center; margin-top: 8px; }
.portrait {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 28px;
  background: #ffffff;
}
.name {
  font-family: "Iceland", system-ui, sans-serif;
  font-size: 56px;
  line-height: 1;
  margin: 0 0 18px;
  letter-spacing: 0.02em;
}
.bio {
  font-size: 18px;
  line-height: 1.6;
  margin: 0 auto 24px;
  max-width: 520px;
  color: var(--ink-soft);
}
.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 0;
  margin: 0 0 72px;
  list-style: none;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.socials a {
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--faint);
  padding-bottom: 2px;
}
.socials a:hover { color: var(--ink); border-color: var(--ink); }
.socials .sep { color: var(--faint); }

/* button styled exactly like a socials link, for click-to-reveal items */
.socials .copyable {
  font: inherit;
  letter-spacing: inherit;
  background: transparent;
  border: none;
  padding: 0 0 2px;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 1px solid var(--faint);
}
.socials .copyable:hover { color: var(--ink); border-color: var(--ink); }
.socials .copyable .cp-copy {
  font-family: "Iceland", system-ui, sans-serif;
  font-size: 0.72em;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--muted);
  margin-left: 10px;
}
.socials .copyable .cp-copy.cp-ok { color: #3a7a4a; }

/* ---------- now playing (Last.fm) ---------- */
.now-playing {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  margin: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--rule);
  border-radius: 999px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.04);
  font-family: "Cormorant Garamond", "Garamond", serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.2;
  color: var(--ink-soft);
}

/* expanded pill */
.now-playing--expanded {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 16px;
  max-width: calc(100vw - 80px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.now-playing a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 1px;
}
.now-playing a:hover { color: var(--ink); border-color: var(--ink); }
.now-playing .np-glyph {
  margin-right: 6px;
  color: var(--ink-soft);
  font-style: normal;
}
.now-playing .np-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60vw;
}
.now-playing .np-dismiss {
  background: transparent;
  border: none;
  padding: 2px 6px;
  margin: 0;
  cursor: pointer;
  color: var(--faint);
  font-family: system-ui, sans-serif;
  font-style: normal;
  font-size: 16px;
  line-height: 1;
  border-radius: 999px;
}
.now-playing .np-dismiss:hover { color: var(--ink-soft); background: rgba(0, 0, 0, 0.04); }

/* collapsed icon-only state */
.now-playing--collapsed {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.now-playing .np-expand {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  cursor: pointer;
  font-style: normal;
  font-family: system-ui, sans-serif;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-soft);
}
.now-playing .np-expand:hover { color: var(--ink); }

/* ---------- language toggle (bottom-left, very small) ---------- */
.lang-toggle {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: calc(20px + env(safe-area-inset-left, 0px));
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
/* note sits OUTSIDE the pill so the pill stays compact regardless of
   how long the disclaimer is */
.lang-note {
  margin: 0;
  max-width: 280px;
  font-family: "Cormorant Garamond", "Garamond", serif;
  font-style: italic;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}
.lang-note a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 1px;
}
.lang-note a:hover { color: var(--ink); border-color: var(--ink); }
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.04);
}
.lang-link {
  text-decoration: none;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  padding: 1px 0;
}
.lang-link:hover { color: var(--ink); }
.lang-link.lang-current {
  color: var(--ink);
  font-weight: 600;
}
.lang-sep { color: var(--faint); font-size: 10px; font-family: system-ui, sans-serif; }

/* mobile-only layouts: hidden on desktop */
.nav-lang, .lang-page-note { display: none; }

@media (max-width: 720px) {
  /* hide the floating bottom-left toggle */
  .lang-toggle { display: none; }

  /* language pill inside the hamburger nav */
  .nav-lang {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding: 8px 12px;
    border: 1px solid var(--rule);
    border-radius: 12px;
  }

  /* in-page disclaimer above portrait (non-EN pages) */
  .lang-page-note {
    display: block;
    max-width: 480px;
    margin: 0 auto 24px;
    padding: 0 var(--pad-x);
    text-align: center;
    font-family: "Cormorant Garamond", "Garamond", serif;
    font-style: italic;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
  }
  .lang-page-note a {
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px solid var(--faint);
    padding-bottom: 1px;
  }
  .lang-page-note a:hover { color: var(--ink); border-color: var(--ink); }
}

/* ---------- timeline ---------- */
.timeline {
  margin: 24px auto 48px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  column-gap: 40px;
  row-gap: 36px;
  align-items: start;
}
.timeline-trace {
  font-family: "Cormorant Garamond", "Garamond", serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
  padding-top: 2px;
}
.timeline-event {
  font-size: 17px;
  line-height: 1.5;
}
.timeline-event .when {
  display: block;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.timeline-event .what { display: block; color: var(--ink); }
.timeline-event .where {
  display: block;
  color: var(--ink-soft);
  margin-top: 2px;
}
.timeline-event .blurb {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 15px;
}

/* ---------- photo row ---------- */
.photo-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin: 16px auto 96px;
}
.photo-row .ph {
  position: relative;
  width: 140px;
  height: 140px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #ffffff;
  overflow: hidden;
  margin: 0;
  flex: 0 0 auto;
}
.photo-row img { width: 100%; height: 100%; object-fit: cover; }

/* hover caption: kanji on top, romaji underneath */
.ph-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.photo-row .ph:hover .ph-caption,
.photo-row .ph:focus-within .ph-caption { opacity: 1; }

.ph-kanji {
  font-family: "Yuji Boku", "Hiragino Mincho ProN", "Yu Mincho",
               "MS Mincho", "Noto Serif JP", serif;
  font-size: 56px;
  line-height: 1;
  font-weight: 400; /* Yuji Boku is intrinsically thick */
}
.ph-romaji {
  font-family: "Cormorant Garamond", "Garamond", serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.14em;
  opacity: 0.92;
  margin-top: 6px;
}

/* ---------- writing / photography placeholders ---------- */
.page-title {
  text-align: center;
  font-size: 64px;
  line-height: 1;
  margin: 8px 0 48px;
}
.page-writing .page-title { letter-spacing: 0.01em; }
.page-photography .page-title { letter-spacing: 0.08em; font-size: 14px; margin: 8px 0 32px; }

.placeholder {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 auto 96px;
}
.placeholder p + p { margin-top: 1em; }

.page-photography .placeholder {
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.7;
}

/* ---------- photography gallery ---------- */
.ph-note {
  text-align: center;
  font-family: "Cormorant Garamond", "Garamond", serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 640px;
  margin: 8px auto 88px;
  padding: 0 var(--pad-x);
}

.country {
  max-width: 1200px;
  margin: 0 auto 112px;
  padding: 0 var(--pad-x);
  scroll-margin-top: 72px;
}
.album-divider {
  width: min(240px, calc(100% - 2 * var(--pad-x)));
  height: 1px;
  margin: -8px auto 48px;
  background: linear-gradient(to right, transparent, var(--rule), transparent);
}

.country-tags {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  max-width: 960px;
  margin: 0 auto 72px;
  padding: 14px var(--pad-x);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.country-tag {
  font-family: "Cormorant Garamond", "Garamond", serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  padding: 2px 4px;
  transition: color 0.15s ease;
}
.country-tag:hover { color: var(--ink); }
.country-title {
  font-family: "Cormorant Garamond", "Garamond", serif;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
  margin: 0 0 14px;
}
.country-rule {
  width: 48px;
  height: 1px;
  background: var(--rule);
  margin: 0 auto 36px;
}

.country-grid { display: grid; gap: 10px; }
/* class-based display overrides the UA stylesheet's [hidden]{display:none},
   so we need to restore it explicitly */
.country-grid[hidden] { display: none; }
.country-grid--preview { grid-template-columns: repeat(4, 1fr); }
.country-grid--extra   {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 10px;
}

.country-more {
  display: block;
  margin: 32px auto 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "Cormorant Garamond", "Garamond", serif;
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding: 4px 12px;
  transition: color 0.15s ease;
}
.country-more:hover { color: var(--ink); }

.ph-tile {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #efefef;
  cursor: pointer;
}
.ph-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.ph-tile:hover img { transform: scale(1.04); }

/* hover caption — full-tile dark overlay matching the About portraits */
.ph-name {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: "Cormorant Garamond", "Garamond", serif;
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  word-break: break-word;
}
.ph-tile:hover .ph-name { opacity: 1; }

.ph-empty {
  text-align: center;
  margin: 80px auto;
  color: var(--muted);
  font-style: italic;
}

/* ---------- photo viewer (lightbox) ---------- */
.pv {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.96);
  z-index: 200;
  display: grid;
  place-items: center;
}
.pv[hidden] { display: none; }
.pv-img {
  max-width: 95vw;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.pv-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
  color: rgba(255,255,255,0.85);
  z-index: 2;
  font-family: system-ui, sans-serif;
}
.pv-pos {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  min-width: 70px;
}
.pv-name {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-download, .pv-close {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
  letter-spacing: 0.04em;
}
.pv-download:hover, .pv-close:hover { background: rgba(255,255,255,0.18); color: #fff; }
.pv-close { font-size: 18px; padding: 4px 11px; }

.pv-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 36px;
  width: 52px;
  height: 80px;
  cursor: pointer;
  border-radius: 8px;
  z-index: 2;
  line-height: 1;
}
.pv-nav:hover { background: rgba(255,255,255,0.18); color: #fff; }
.pv-prev { left: 14px; }
.pv-next { right: 14px; }

@media (max-width: 720px) {
  .ph-note { font-size: 15px; margin: 0 auto 48px; }
  .country { margin-bottom: 72px; scroll-margin-top: 56px; }
  .album-divider { margin: -8px auto 28px; }
  .country-tags {
    gap: 4px 10px;
    margin-bottom: 48px;
    padding: 10px var(--pad-x);
  }
  .country-tag { font-size: 13px; }

  /* photography: hamburger stays fixed normally (like every other page),
     but releases the moment the tag bar pins to the top — the bar then
     takes over as the persistent top control ("baton pass"). The
     release switches the burger to `position: absolute` anchored to the
     page (not the header), so it stays where it last was relative to
     the document and scrolls away with it. */
  body.page-photography .site-header { position: static; }
  body.page-photography.tag-bar-stuck .nav-hamburger {
    position: absolute;
    top: 12px;
  }
  .country-title { font-size: 28px; }
  .country-rule { margin-bottom: 24px; }
  .country-grid--preview { grid-template-columns: repeat(2, 1fr); }
  .country-grid--extra   { grid-template-columns: repeat(2, 1fr); }
  .ph-name { font-size: 13px; padding: 10px; }
  .pv-nav { width: 40px; height: 60px; font-size: 28px; }
}

/* ---------- writing index (post list) ---------- */
.post-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 96px;
}
.post-list-item { margin: 0; }
.post-list-item a {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: opacity 0.15s ease;
}
.post-list-item a:hover { opacity: 0.6; }
.post-list-date {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}
.post-list-title {
  display: block;
  font-size: 22px;
  line-height: 1.3;
}
.post-list-standfirst {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-soft);
  font-style: italic;
}
.post-list-empty {
  color: var(--muted);
  font-style: italic;
  padding: 24px 0;
}

/* ---------- writing single post ---------- */
.post { margin: 8px 0 96px; }
.post-header { text-align: center; margin-bottom: 48px; }
.post-title {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: 0.005em;
}
.post-date {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}
.post-body {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.post-body > * + * { margin-top: 1em; }
.post-body h2 {
  font-size: 28px;
  line-height: 1.25;
  color: var(--ink);
  margin-top: 1.6em;
}
.post-body h3 {
  font-size: 22px;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 1.4em;
}
.post-body p { margin: 1em 0; }
.post-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--faint);
  text-decoration: none;
  padding-bottom: 1px;
}
.post-body a:hover { border-color: var(--ink); }
.post-body .footnote-ref {
  display: inline-block;
  margin-left: 0.12em;
  color: var(--ink);
  border-bottom: none;
  font-size: 0.9em;
  font-style: normal;
  line-height: 1;
  text-decoration: none;
  transform: translateY(-0.08em);
}
.post-body .footnote-ref:hover { color: var(--muted); }
.post-body .footnote {
  color: var(--muted);
  font-size: 0.92em;
}
.post-body .footnote:target {
  color: var(--ink-soft);
}
.post-body .footnote-num {
  color: var(--ink);
  border-bottom: none;
  font-style: normal;
  padding-bottom: 0;
  text-decoration: none;
}
.post-body .footnote-num:hover { color: var(--muted); }
.post-body .footnote-back {
  margin-left: 8px;
  font-size: 0.92em;
  font-style: italic;
  white-space: nowrap;
}
.post-body blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: #f5f3ee;
  padding: 1px 6px;
  border-radius: 3px;
}
.post-body pre {
  background: #f5f3ee;
  padding: 16px 20px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}
.post-body pre code { background: transparent; padding: 0; }
.post-body img { margin: 1.6em auto; max-width: 100%; }
.post-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.4em auto;
  width: 60%;
}
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li { margin: 0.3em 0; }

/* ---------- post navigation (prev/next at bottom) ---------- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-style: normal;
}
.post-nav-prev, .post-nav-next {
  display: grid;
  gap: 4px;
  text-decoration: none;
  color: var(--ink-soft);
}
.post-nav-prev { text-align: left; }
.post-nav-next { text-align: right; }
.post-nav-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-nav-arrow {
  font-size: 14px;
  color: var(--muted);
  margin: 0 4px;
}
.post-nav-title {
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  font-family: "Cormorant Garamond", "Garamond", serif;
}
.post-nav-prev:hover .post-nav-title,
.post-nav-next:hover .post-nav-title { opacity: 0.6; }
.post-nav-spacer {}

/* ===========================================================
   Doric pillar scrollbar
   Track = the full column (capital + fluted shaft + base),
   thumb = a small brass band that slides over it.
   =========================================================== */

/* Firefox fallback */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--brass) var(--stone);
}

/* WebKit / Chromium / Safari */
::-webkit-scrollbar {
  width: 28px;
}

/* The track gets THREE layered backgrounds:
   1. capital  - pinned to top, no-repeat
   2. base     - pinned to bottom, no-repeat
   3. shaft    - fills middle, tiled vertically
*/
::-webkit-scrollbar-track {
  background-color: var(--paper);
  background-image:
    url("pillar-capital.svg"),
    url("pillar-base.svg"),
    url("pillar-shaft.svg");
  background-position: top center, bottom center, center;
  background-repeat: no-repeat, no-repeat, repeat-y;
  background-size: 28px 42px, 28px 14px, 28px 40px;
}

/* The thumb: a brass ring wrapping the column */
::-webkit-scrollbar-thumb {
  background-color: transparent;
  background-image: url("pillar-thumb.svg");
  background-repeat: no-repeat;
  background-size: 28px 100%;
  background-position: center;
  min-height: 56px;
  border: none;
}
::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.05);
}

::-webkit-scrollbar-corner { background: var(--paper); }

/* ---------- small screens: hamburger nav + scaled type ---------- */
@media (max-width: 720px) {
  /* hamburger button, centered at top */
  .nav-hamburger {
    display: block;
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 110;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: "Hiragino Sans", "Yu Gothic", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
    font-size: 28px;
    line-height: 1;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .nav-hamburger .hb-open { display: none; }
  .nav-toggle:checked ~ .nav-hamburger .hb-closed { display: none; }
  .nav-toggle:checked ~ .nav-hamburger .hb-open { display: inline; }

  /* hide the desktop nav by default on mobile */
  .nav {
    display: none;
  }

  /* revealed when the checkbox is checked */
  .nav-toggle:checked ~ .nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #ffffff;
    padding: 72px 24px 36px;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  }

  /* reserve some space at the top so the floating hamburger doesn't overlap content */
  body { padding-top: 56px; }

  /* type scaling */
  .nav-link { font-size: 22px; }
  .nav-link.font-monoton { font-size: 15px; }
  .nav-link.font-jersey { font-size: 24px; }
  .name { font-size: 44px; }

  .timeline {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }
  .timeline-trace { text-align: left; padding-top: 0; padding-left: 14px; border-left: 1px solid var(--rule); }
  .timeline-event { padding-left: 14px; border-left: 1px solid var(--rule); margin-bottom: 24px; }
  .photo-row .ph { width: 110px; height: 110px; }
  .page-title { font-size: 44px; }
  .post-list-item a {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
