/* THEME TOKENS */
:root {
  --bg: #fdfdfd;
  --ink: #0b0b0c;
}

body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  text-align: center;
}

body.dark {
  --bg: #0b0b0c;
  --ink: #fdfdfd;
  background: var(--bg);
  color: var(--ink);
}

/* HEADER (masthead) */
.site-header {
  position: relative;
  padding: 1.25rem 1rem 0.5rem;
  text-align: center;
}

/* MASTHEAD TITLE */
.site-title {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  letter-spacing: 0.25em;
  margin: 0.5rem 0 0.75rem;
  color: transparent;                          /* hollow fill */
  -webkit-text-stroke: 2px var(--ink);         /* visible outline */
  text-transform: uppercase;
}

/* tier accents */
.tier-2 .meta h3 { font-size: 1.2rem; letter-spacing: .01em; }
.tier-2 .card { border-color: rgba(0,0,0,0.12); }
.tier-1 .meta h3 { font-size: 1.35rem; }

/* HAMBURGER pinned top-right */
.hamburger-menu {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
}

.hamburger-menu ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: 2rem;
  background: var(--bg);
  border: 1px solid rgba(0,0,0,0.08);
}

.hamburger-menu ul.open {
  display: flex;
}

/* HERO (capped headshot) */
.hero {
  max-height: 60vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero img {
  width: auto;
  max-width: 100%;
  max-height: 60vh;
  display: block;
  object-fit: contain;
}

/* LINKS */
.links {
  margin: 1.75rem 0 2.25rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.links a {
  font-weight: bold;
  text-decoration: none;
  color: var(--ink);
}

/* Archive item base */
li.item { transition: box-shadow .15s ease, transform .05s ease; }
li.item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); transform: translateY(-1px); }

/* Tier-2 “enhanced” card look (no tier label shown) */
li.item.tier-2 { border-color: #e7e7ef; background: #fcfcff; }
li.item.tier-2 .row { display: grid; grid-template-columns: 96px 1fr; gap: .85rem; align-items: center; }
li.item.tier-2 .thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(0,0,0,.08); }
li.item .title a { color: var(--ink, #111); text-decoration: none; }
li.item .title a:hover { text-decoration: underline; }

/* Archive: link pills (scoped) */
.pills {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .4rem;
}
.pills a {
  display: inline-block;
  padding: .25rem .55rem;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  font-size: .85rem;
  text-decoration: none;
  color: var(--ink);
}
.pills a:hover {
  background: rgba(0,0,0,.04);
}

/* ===== Archive Accordion Polish (Phase 2) ===== */

/* Scoped variables for the archive only */
.archive{
  --muted-ink: color-mix(in oklab, var(--ink) 70%, white 30%);
  --accent: #1a7f64;
  --hair: color-mix(in oklab, var(--ink) 15%, white 85%);
  --radius: 14px;
  --shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Base container rhythm */
.archive { 
  max-width: 860px; margin: 1.25rem auto 3rem; padding: 0 1rem;
}

/* Details/summary reset */
.archive details {
  border-bottom: 1px dashed var(--hair);
  padding: .25rem 0 .75rem;
}
.archive summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1.25rem 1fr auto;
  align-items: center;
  gap: .6rem;
  padding: .5rem 0;
  font-weight: 620;
  color: var(--ink);
  outline: none;
}
.archive summary::-webkit-details-marker { display: none; }

/* Custom chevron */
.archive .chev {
  width: .6rem; height: .6rem;
  border-right: 2px solid var(--muted-ink);
  border-bottom: 2px solid var(--muted-ink);
  transform: rotate(-45deg) translateY(-1px);
  transition: transform .18s ease, border-color .18s ease;
}
.archive details[open] .chev {
  transform: rotate(45deg) translateY(0);
  border-color: var(--accent);
}

/* Title & meta */
.archive .title { line-height: 1.25; }
.archive .meta { justify-self: end; font-size: .9rem; color: var(--muted-ink); opacity: .9; }

/* Hover/active */
.archive summary:hover .title { text-decoration: underline; text-decoration-thickness: .08em; }
.archive summary:active .title { opacity: .85; }

/* Focus-visible */
.archive summary:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
  border-radius: var(--radius);
}

/* Panel reveal */
.archive .panel {
  margin-left: calc(1.25rem + .6rem);
  padding: .35rem 0 .25rem;
  display: grid;
  gap: .35rem;
}
@media (prefers-reduced-motion: no-preference){
  .archive details[open] .panel { animation: accord .18s ease; }
  @keyframes accord { from { opacity: 0; translate: 0 -4px; } to { opacity: 1; translate: 0 0; } }
}

/* Items */
.archive .item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  padding: .5rem .6rem;
  background: color-mix(in oklab, white 92%, var(--accent) 8%);
  border: 1px solid color-mix(in oklab, var(--accent) 20%, white 80%);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.archive .item a { color: var(--ink); text-decoration: none; font-weight: 600; }
.archive .tags { place-self: start end; font-size: .8rem; color: var(--muted-ink); opacity: .85; }

/* Optional count badge */
.archive .count {
  background: color-mix(in oklab, var(--accent) 12%, white 88%);
  border: 1px solid color-mix(in oklab, var(--accent) 25%, white 75%);
  font-size: .75rem; padding: .15rem .45rem; border-radius: 999px;
}

/* Dark mode tweaks */
@media (prefers-color-scheme: dark){
  .archive{
    --hair: color-mix(in oklab, black 60%, white 40%);
    --shadow: 0 6px 18px rgba(0,0,0,.25);
  }
  .archive .item {
    background: color-mix(in oklab, black 88%, var(--accent) 12%);
    border-color: color-mix(in oklab, var(--accent) 40%, black 60%);
  }
}

/* Special styling for folder items */
.folder-item .title {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-style: italic;
  color: var(--muted-ink, #666);
}

.folder-item .title a {
  font-style: italic;
  color: var(--muted-ink, #666);
  text-decoration: none;
}

.folder-item .title a:hover {
  text-decoration: underline;
}

/* Remove any lingering Firefox marker bullets more defensively */
.archive summary::-moz-list-bullet { list-style: none; }

/* Make summary taps feel nicer on mobile */
.archive summary { -webkit-tap-highlight-color: transparent; }

/* Feed/home toggle hover feel */
.toggle-btn svg {
  transition: transform .15s ease, opacity .15s ease;
}
.toggle-btn:hover svg {
  transform: scale(1.05);
  opacity: 0.85;
}