/* georgemain.com — page styles
   All styles scoped under .site-page so they don't leak into
   the design-canvas chrome around the artboards.

   Vibe: late-90s/early-blogspot personal site. Flat bg, narrow column,
   serif body for reading, mono for chrome + metadata.
*/

.site-page,
.site-page * { box-sizing: border-box; }
.site-page *::selection { background: var(--selection); color: var(--ink); }

.site-page {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "kern", "liga";
  position: relative;
}

/* ── typography ────────────────────────────────────────── */
.site-page h1, .site-page h2, .site-page h3, .site-page h4, .site-page h5 {
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: var(--lh-tight);
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.site-page h1 { font-size: var(--fs-3xl); letter-spacing: -0.02em; }
.site-page h2 { font-size: var(--fs-xl); }
.site-page h3 { font-size: var(--fs-lg); }
.site-page h4 { font-size: var(--fs-body); }

.site-page p { margin: 0 0 var(--sp-4) 0; }
.site-page p:last-child { margin-bottom: 0; }

.site-page a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.site-page a:hover { color: var(--accent-2); text-decoration-thickness: 2px; }

.site-page code, .site-page .mono { font-family: var(--font-mono); font-size: 0.92em; }
.site-page kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  border: 1px solid var(--rule);
  padding: 1px 5px;
  background: var(--bg-2);
}

.site-page hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--sp-7) 0;
}

/* ── layout ────────────────────────────────────────────── */
.site-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  position: relative;
  z-index: 1;
}
.site-reading { max-width: var(--reading-width); margin: 0 auto; }

/* ── top bar — single thin underline, mono, no chrome ───── */
.sp-top { border-bottom: 1px solid var(--rule); background: var(--bg); }
.sp-top-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--sp-4) var(--page-gutter);
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
}
.sp-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--fs-body);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.sp-logo:hover { text-decoration: none; }
.sp-logo .tilde { color: var(--accent); }

.sp-nav { display: flex; gap: var(--sp-4); margin-left: var(--sp-4); }
.sp-nav a { color: var(--ink-2); text-decoration: none; }
.sp-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.sp-nav a.active { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.sp-status { margin-left: auto; }
.sp-theme-toggle {
  background: transparent;
  border: 0;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.sp-theme-toggle:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

/* ── footer ────────────────────────────────────────────── */
.sp-footer {
  margin-top: var(--sp-9);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--ink-2);
}
.sp-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--sp-6) var(--page-gutter) var(--sp-7);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--sp-6);
}
.sp-footer h5 {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--sp-3);
  font-weight: 500;
}
.sp-footer ul { list-style: none; padding: 0; margin: 0; }
.sp-footer li { line-height: 1.9; }
.sp-footer a { color: var(--ink); text-decoration: none; }
.sp-footer a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.sp-footer-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--fs-body);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-3);
}
.sp-footer-mark .tilde { color: var(--accent); }
.sp-footer .creed {
  color: var(--ink-3);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  line-height: 1.55;
  max-width: 30em;
}

/* ── section markers — a single hr + small mono caption ── */
.sp-section { margin-top: var(--sp-8); }
.sp-section::before {
  content: "";
  display: block;
  border-top: 1px solid var(--rule);
  margin-bottom: var(--sp-5);
}
.sp-section-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.sp-section-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.sp-section-tag::before { content: "// "; color: var(--ink-3); }
.sp-section h2 { flex: 1; font-size: var(--fs-xl); }
.sp-section-aside {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-3);
}

/* ── tag chips — no border, just colored #tag ──────────── */
.sp-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-3);
  text-decoration: none;
  letter-spacing: 0;
  display: inline;
  margin-right: var(--sp-3);
}
.sp-tag::before { content: "#"; color: var(--ink-3); }
.sp-tag:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── buttons — minimal, but still a little physical on hover ─ */
.sp-btn {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink-2);
  padding: 4px 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0;
  transition: transform .12s var(--ease), background .12s, color .12s, border-color .12s;
}
.sp-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  text-decoration: none;
}
.sp-btn:active { transform: translateY(1px); }
.sp-btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.sp-btn.primary:hover { background: transparent; color: var(--accent); }
.sp-btn .key { margin-left: 6px; color: var(--ink-3); font-size: 0.85em; }
.sp-btn:hover .key { color: var(--bg); opacity: 0.7; }
.sp-btn.primary:hover .key { color: var(--accent); opacity: 0.7; }

/* a quieter inline button: just text + bracket */
.sp-link-btn {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--accent);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sp-link-btn:hover { color: var(--accent-2); }
.sp-link-btn::before { content: "["; color: var(--ink-3); margin-right: 2px; }
.sp-link-btn::after  { content: "]"; color: var(--ink-3); margin-left: 2px; }

/* ── image placeholder ─────────────────────────────────── */
.sp-img {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
}
.sp-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 10px,
    var(--rule) 10px 11px
  );
  opacity: 0.5;
}
.sp-img .sp-img-label {
  position: absolute;
  bottom: 6px; left: 8px;
  z-index: 2;
  background: var(--bg);
  padding: 1px 6px;
  border: 1px solid var(--rule);
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.sp-img.tinted::before {
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, var(--rule) 10px 11px),
    linear-gradient(135deg, var(--accent-3), var(--bg-2));
  opacity: 1;
}

/* ── card / list-item preview (musing entries) ────────── */
.sp-card {
  border-top: 1px solid var(--rule);
  padding: var(--sp-5) 0;
}
.sp-card:last-child { border-bottom: 1px solid var(--rule); }
.sp-card .sp-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-3);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.02em;
}
.sp-card .sp-meta .sep { color: var(--rule-2); margin: 0 6px; }
.sp-card .sp-meta .cat { color: var(--accent); }
.sp-card h3 { font-size: var(--fs-xl); margin-bottom: 4px; }
.sp-card h3 a { color: var(--ink); text-decoration: none; }
.sp-card h3 a:hover { color: var(--accent); }
.sp-card .sp-sub {
  color: var(--ink-2);
  font-style: italic;
  font-size: var(--fs-body);
  margin-bottom: var(--sp-3);
}
.sp-card .sp-preview { color: var(--ink-2); font-size: var(--fs-body); }
.sp-card .sp-tags { margin-top: var(--sp-3); }

/* ── folder tree ───────────────────────────────────────── */
.sp-tree {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  line-height: 1.95;
  color: var(--ink-2);
  white-space: pre;
}
.sp-tree a { color: var(--ink); text-decoration: none; }
.sp-tree a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.sp-tree .count { color: var(--ink-3); }
.sp-tree .glyph { color: var(--ink-3); }

/* ── post body ─────────────────────────────────────────── */
.sp-post-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--sp-5);
  margin-bottom: var(--sp-7);
}
.sp-post-header .crumbs {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-4);
}
.sp-post-header .crumbs a { color: var(--ink-3); text-decoration: none; }
.sp-post-header .crumbs a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.sp-post-header h1 {
  font-size: var(--fs-mega);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.sp-post-header .subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-xl);
  color: var(--ink-2);
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-4);
  font-weight: 400;
  line-height: 1.35;
}
.sp-post-header .meta {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--ink-3);
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: center;
}
.sp-post-header .meta .sep { color: var(--rule-2); }

.sp-prose { font-size: var(--fs-body); line-height: 1.7; }
.sp-prose p, .sp-prose ul, .sp-prose ol { margin: 0 0 var(--sp-4) 0; }
.sp-prose h2 { margin: var(--sp-7) 0 var(--sp-3); font-size: var(--fs-xl); }
.sp-prose h3 { margin: var(--sp-6) 0 var(--sp-3); }
.sp-prose ul, .sp-prose ol { padding-left: var(--sp-5); }
.sp-prose li { margin-bottom: 6px; }
.sp-prose blockquote {
  margin: var(--sp-5) 0;
  padding: 0 0 0 var(--sp-5);
  border-left: 3px solid var(--accent);
  color: var(--ink-2);
  font-style: italic;
}

/* ── inline & full-width images in posts ────────────────── */
.sp-figure { margin: var(--sp-5) 0; }
.sp-figure figcaption {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin-top: var(--sp-2);
  padding-left: var(--sp-3);
  border-left: 2px solid var(--rule);
}
.sp-figure.inline-r {
  float: right;
  width: 44%;
  margin: 6px 0 var(--sp-3) var(--sp-5);
}
.sp-figure.inline-l {
  float: left;
  width: 44%;
  margin: 6px var(--sp-5) var(--sp-3) 0;
}
.sp-figure.full { margin: var(--sp-6) 0; }

/* ── post nav ──────────────────────────────────────────── */
.sp-postnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
}
.sp-postnav a { color: var(--ink); text-decoration: none; }
.sp-postnav a:hover { color: var(--accent); }
.sp-postnav .label {
  display: block;
  font-size: var(--fs-tiny);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.sp-postnav .next { text-align: right; }

/* ── feature blocks (formerly heavy panels) ─────────────── */
/* now: just a top rule + slim mono caption + body. no chrome. */
.sp-block { padding-top: var(--sp-2); }
.sp-block-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-2);
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex-wrap: wrap;
}
.sp-block-meta .path { color: var(--ink-3); }
.sp-block-meta .count { color: var(--ink-3); margin-left: auto; }
.sp-block-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  align-items: center;
  flex-wrap: wrap;
}
.sp-block-actions .hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-3);
}

/* ── media grids (album cards) ──────────────────────────── */
.sp-album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}
.sp-album { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: var(--sp-2); }
.sp-album:hover { text-decoration: none; }
.sp-album .sp-img { aspect-ratio: 4/3; }
.sp-album:hover .sp-img { border-color: var(--accent); }
.sp-album .meta-row {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  letter-spacing: 0.02em;
}
.sp-album h4 { font-size: var(--fs-lg); color: var(--ink); margin-top: 2px; }
.sp-album:hover h4 { color: var(--accent); }
.sp-album .sub { color: var(--ink-2); font-style: italic; font-size: var(--fs-small); }

/* ── tight VSCO grid — only place where things get dense ── */
.sp-vsco {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  overflow: visible;
}
/* cell stays its own aspect-ratio; image inside crops; caption pops out BELOW */
.sp-vsco .cell { position: relative; aspect-ratio: 1/1; }
.sp-vsco .cell.tall { aspect-ratio: 1/1.4; grid-row: span 2; }
.sp-vsco .cell.wide { grid-column: span 2; aspect-ratio: 2/1; }
.sp-vsco .cell .sp-img {
  width: 100%; height: 100%; border: 0;
  overflow: hidden;
  transition: transform .15s var(--ease);
}
.sp-vsco .cell:hover { z-index: 5; }
.sp-vsco .cell:hover .sp-img { transform: scale(1.04); }

/* Caption appears below the image cell on hover, not overlaid on the photo. */
.sp-vsco .cell .caption {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 8px 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s var(--ease);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-2);
  line-height: 1.4;
  z-index: 6;
}
.sp-vsco .cell:hover .caption { opacity: 1; visibility: visible; }
.sp-vsco .cell .caption .title { color: var(--ink); font-size: var(--fs-small); margin-bottom: 2px; font-weight: 500; }
.sp-vsco .cell .caption .where { color: var(--accent); }


/* ── empty state ─────────────────────────────────────────── */
.sp-empty {
  border: 1px dashed var(--rule);
  padding: var(--sp-6);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--ink-3);
  margin: var(--sp-5) 0;
}
.sp-empty .glyph { font-size: 28px; display: block; margin-bottom: var(--sp-2); color: var(--accent); }

/* ── mobile artboard layout ──────────────────────────────── */
.site-page.mobile { --page-gutter: 20px; }
.site-page.mobile .sp-top-inner { flex-wrap: wrap; gap: var(--sp-3); }
.site-page.mobile .sp-nav { margin-left: 0; width: 100%; gap: var(--sp-3); }
.site-page.mobile .sp-status { margin-left: 0; }
.site-page.mobile .sp-album-grid { grid-template-columns: 1fr; }
.site-page.mobile .sp-vsco { grid-template-columns: repeat(2, 1fr); }
.site-page.mobile .sp-footer-inner { grid-template-columns: 1fr; gap: var(--sp-5); }
.site-page.mobile .sp-post-header h1 { font-size: var(--fs-2xl); }
.site-page.mobile .sp-figure.inline-r,
.site-page.mobile .sp-figure.inline-l {
  float: none; width: 100%; margin: var(--sp-4) 0;
}

/* ── first section on a page: no top rule + no extra margin ── */
.site-shell > .sp-section:first-child { margin-top: 0; }
.site-shell > .sp-section:first-child::before { display: none; }

/* ── musings layout: sidebar tree + main content ──────────── */
.musings-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp-7);
  max-width: 1080px;
  margin: 0 auto;
}
.musings-main { min-width: 0; max-width: var(--reading-width); }
.musings-tree {
  position: sticky;
  top: var(--sp-5);
  align-self: flex-start;
  max-height: calc(100vh - var(--sp-7));
  overflow: auto;
  padding-right: var(--sp-3);
}
.musings-tree .tree-head {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--sp-3);
  cursor: default;
  user-select: none;
}
.musings-tree .tree-toggle { display: none; }

/* Nested <ul> tree: no list markers, padding-left for indent, no overflow */
.musings-tree .tree-list,
.musings-tree .tree-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
}
.musings-tree .tree-list ul { padding-left: 14px; border-left: 1px dashed var(--rule); margin-left: 4px; }
.musings-tree .tree-list li { padding-left: 2px; }
.musings-tree .tree-list a {
  color: var(--ink-2);
  text-decoration: none;
  word-break: break-word;
}
.musings-tree .tree-list a:hover { color: var(--accent); }
.musings-tree .tree-list a.active { color: var(--accent); font-weight: 500; }
.musings-tree .tree-list a.in-active { color: var(--ink); }
.musings-tree .tree-list a.in-active:hover { color: var(--accent); }

@media (max-width: 900px) {
  .musings-layout { grid-template-columns: 1fr; gap: var(--sp-4); }
  .musings-tree {
    position: static;
    max-height: none;
    padding-right: 0;
    border-bottom: 1px solid var(--rule);
    padding-bottom: var(--sp-4);
  }
  .musings-tree .tree-head { cursor: pointer; margin-bottom: 0; }
  .musings-tree .tree-head::after { content: ' ▾'; color: var(--ink-3); }
  .musings-tree .tree-toggle:checked + .tree-head { margin-bottom: var(--sp-3); }
  .musings-tree .tree-toggle:checked + .tree-head::after { content: ' ▴'; }
  .musings-tree .tree-toggle:not(:checked) ~ .tree-list { display: none; }
}

/* Override .site-shell max-width for pages that need to hold the sidebar. */
.musings-layout { width: 100%; }

/* Widen the site-shell on musing pages so the sidebar tree fits. */
.site-shell:has(.musings-layout) { max-width: 1080px; }

/* ── images inside post figures: constrain to figure width AND viewport ─── */
.sp-figure img { width: 100%; height: auto; display: block; max-height: 80vh; object-fit: contain; }
.sp-figure.full img { max-height: 75vh; }
/* inline-floated images don't need height clamping — they're already small */
.sp-figure.inline-l img, .sp-figure.inline-r img { max-height: none; object-fit: initial; }

/* ── post images: hover-enlarge like the media grid ──────── */
.sp-figure { position: relative; z-index: 1; }
.sp-figure img { transition: transform .2s var(--ease); transform-origin: center center; }
.sp-figure img:hover { transform: scale(1.12); }
.sp-figure:has(img:hover) { z-index: 5; }

/* hide the stripe pattern when the cell is showing a real photo */
.sp-img.has-photo::before { display: none; }

/* ── category sub-folder list (used on /musings/<cat>) ────── */
.cat-list { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: var(--fs-small); }
.cat-list li { padding: 6px 0; border-bottom: 1px solid var(--rule); display: flex; align-items: baseline; gap: var(--sp-3); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list li a { color: var(--ink); text-decoration: none; }
.cat-list li a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cat-list li .count { color: var(--ink-3); }

/* ── homepage stats grid ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.stats-grid > div {
  background: var(--bg);
  padding: var(--sp-3) var(--sp-4);
}
.stats-grid dt {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.stats-grid dd {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

/* ── universal hover-grow on real photos ────────────────────── */
/* Album cards: cover image scales slightly inside its fixed-aspect frame. */
.sp-album .sp-img.has-photo {
  transition: transform .2s var(--ease), border-color .15s;
  transform-origin: center;
}
.sp-album:hover .sp-img.has-photo { transform: scale(1.04); }

/* Homepage random-photo image */
#photo-img { transition: transform .2s var(--ease); transform-origin: center; cursor: zoom-in; }
#photo-img:hover { transform: scale(1.03); }

/* Photo page main image */
.photo-figure img:hover, .sp-photo-frame img:hover { transform: scale(1.04); }
.photo-figure img, .sp-photo-frame img { transition: transform .2s var(--ease); transform-origin: center; }

/* ── gallery view toggle (folder / grid / feed) ─────────────── */
.gallery-view > input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.gv-toggle {
  display: flex;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  width: max-content;
  margin: var(--sp-5) 0 var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.04em;
}
.gv-toggle label {
  background: var(--bg);
  color: var(--ink-2);
  padding: 6px 12px;
  cursor: pointer;
  user-select: none;
}
.gv-toggle label:hover { color: var(--accent); }
/* Active state: highlight the label whose radio is :checked */
.gallery-view > input[value="folder"]:checked ~ .gv-toggle label[data-view="folder"],
.gallery-view > input[value="grid"]:checked   ~ .gv-toggle label[data-view="grid"],
.gallery-view > input[value="feed"]:checked   ~ .gv-toggle label[data-view="feed"] {
  background: var(--ink);
  color: var(--bg);
}

/* Show only the selected mode. Default: folder. */
.gv-folder, .gv-grid, .gv-feed { display: none; }
.gallery-view > input[value="folder"]:checked ~ .gv-folder,
.gallery-view > input[value="grid"]:checked   ~ .gv-grid,
.gallery-view > input[value="feed"]:checked   ~ .gv-feed { display: block; }

/* Feed mode: vertical stream, single column, generous spacing */
.gv-feed-item {
  margin: 0 auto var(--sp-7);
  max-width: 720px;
}
.gv-feed-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid var(--rule);
}
.gv-feed-item figcaption {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--ink-3);
  margin-top: var(--sp-3);
  padding-left: var(--sp-3);
  border-left: 2px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gv-feed-item figcaption .t { color: var(--ink); font-size: var(--fs-body); font-family: var(--font-body); }
.gv-feed-item figcaption .alt { color: var(--ink-2); font-family: var(--font-body); font-style: italic; }
.gv-feed-item figcaption .m a { color: var(--accent); }

/* ── accessibility: skip-to-content link ──────────────────── */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-110%);
  background: var(--ink);
  color: var(--bg);
  padding: var(--sp-3) var(--sp-4);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  z-index: 100;
  transition: transform .12s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ── focus-visible: clear accent outline for keyboard users ── */
.site-page :focus { outline: none; }
.site-page :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.site-page a:focus-visible { background: var(--accent-3); }

/* ── reduced motion: kill hover-grow + transitions ────────── */
@media (prefers-reduced-motion: reduce) {
  .site-page *,
  .site-page *::before,
  .site-page *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .sp-figure img:hover,
  .sp-vsco .cell:hover .sp-img,
  .sp-album:hover .sp-img.has-photo,
  #photo-img:hover,
  .photo-figure img:hover,
  .sp-photo-frame img:hover {
    transform: none !important;
  }
}
