/* Bench Diaries — shared styles for the hub and every post.
   Deliberately self-contained: tokens and chrome are copied from index.html
   rather than shared, because extracting index.html's 850 lines of inline CSS
   on a live site is a bigger risk than the drift this duplication costs.
   If you change the nav or footer in index.html, mirror it here. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #181818;
  --nav-bg: #111111;
  --surface: #222222;
  --surface-2: #2a2a2a;
  --accent: #c8922a;
  --accent-hover: #e0a832;
  --text-primary: #f0ede8;
  --text-secondary: #9a9490;
  --border: #333333;
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* === CHROME (mirrors index.html) === */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}
nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 68px; width: auto; filter: invert(1); mix-blend-mode: screen; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a {
  color: var(--text-primary);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 10;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  transition: 0.25s;
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--accent); color: #111; }
.btn-primary:hover { background: var(--accent-hover); color: #111; }

footer {
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  padding: 3.5rem 2rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}
.footer-logo { height: 110px; width: auto; filter: invert(1); mix-blend-mode: screen; }
.social-links { display: flex; gap: 1.75rem; align-items: center; }
.social-links a { color: var(--text-secondary); display: flex; align-items: center; transition: color 0.2s; }
.social-links a:hover { color: var(--accent); }
.social-links svg { width: 22px; height: 22px; }
.footer-copy { color: var(--text-secondary); font-size: 0.8rem; letter-spacing: 0.03em; }

/* === BENCH DIARIES === */
/* 64px fixed header + breathing room. */
.bd-wrap { max-width: 900px; margin: 0 auto; padding: 8rem 2rem 5rem; }

.bd-intro { margin-bottom: 3rem; }
.bd-intro h1 { font-size: 2.6rem; margin-bottom: 1.25rem; }
.bd-intro p { color: var(--text-secondary); max-width: 62ch; margin-bottom: 1rem; }

.bd-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.bd-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.bd-chip:hover { border-color: var(--accent); color: var(--accent); }
.bd-chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--surface-2); }

.bd-cards { display: flex; flex-direction: column; gap: 2.5rem; }
.bd-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.bd-card:hover { border-color: var(--accent); }
/* Text-only fallback when a post has no usable photo: never render an empty
   image column or a stock placeholder. */
.bd-card.bd-card-textonly { grid-template-columns: 1fr; }
/* Portrait phone shots would otherwise drive the whole row height and make
   the archive scroll forever. Fixed aspect, cropped. */
.bd-card img { width: 100%; height: 100%; aspect-ratio: 4 / 3; max-height: 260px; object-fit: cover; }
.bd-card-body { padding: 1.75rem 1.75rem 1.75rem 0; }
.bd-card.bd-card-textonly .bd-card-body { padding: 1.75rem; }
.bd-card h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.bd-card h2 a { color: var(--text-primary); }
.bd-card h2 a:hover { color: var(--accent); }
.bd-card p { color: var(--text-secondary); font-size: 0.95rem; }
.bd-card[hidden] { display: none; }

.bd-date {
  color: var(--text-secondary);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bd-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.85rem 0; }
.bd-tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 2px;
}

.bd-article h1 { font-size: 2.4rem; margin-bottom: 1rem; }
.bd-article p { margin-bottom: 1.4rem; max-width: 68ch; }
.bd-article h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
.bd-article ul { margin: 0 0 1.4rem 0; max-width: 68ch; }
.bd-article li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}
.bd-article li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.65em;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.bd-figure { margin: 2.5rem 0; }
/* Bench photos are mostly portrait phone shots. Full-width they would run
   1200px tall and push the prose off screen, so cap the height and centre. */
.bd-figure img {
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 3px;
  border: 1px solid var(--border);
}
.bd-figure figcaption {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  font-style: italic;
}

.bd-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2.5rem;
  text-align: center;
  margin: 3.5rem 0;
}
.bd-cta p { color: var(--text-secondary); margin-bottom: 1.5rem; max-width: none; }

.bd-postnav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}
.bd-back { display: inline-block; margin-bottom: 2rem; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }

@media (min-width: 769px) and (max-width: 900px) {
  .nav-links { gap: 0.8rem; }
  .nav-links a { font-size: 0.68rem; letter-spacing: 0.05em; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
  }
  .bd-wrap { padding: 6.5rem 1.25rem 3.5rem; }
  .bd-intro h1 { font-size: 1.9rem; }
  .bd-article h1 { font-size: 1.8rem; }
  .bd-card, .bd-card.bd-card-textonly { grid-template-columns: 1fr; }
  .bd-card img { height: 220px; }
  .bd-card-body { padding: 1.5rem; }
  .bd-postnav { flex-direction: column; gap: 1rem; }
  .bd-cta { padding: 1.75rem; }
  .btn { width: 100%; text-align: center; }
}
