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

:root {
  --accent:       #5c0000;
  --accent-hover: #7a0000;
  --bg:           #f5f0e8;
  --ink:          #1a1a18;
  --muted:        #5a5a56;
  --faint:        #8a8a84;
  --rule:         #ddd8cc;
  --hairline:     #222;
}

body {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2.5rem;
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

time, .oldstyle { font-variant-numeric: oldstyle-nums; }

/* ── SECTIONS ────────────────────────────────────────────── */

.section { margin-top: 2.5rem; }

.section-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  margin-bottom: 0.5rem;
}

/* hairline running from the label to the right edge */
.section-label::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule);
  transform: translateY(-0.3em);
}

.about p { margin-bottom: 0.9rem; }
.about p:last-child { margin-bottom: 0; }

.more {
  display: inline-block;
  margin-top: 0.6rem;
  font-style: italic;
  text-decoration: none;
}

.more:hover { text-decoration: underline; }

/* ── POST ROWS ───────────────────────────────────────────── */

.post-list { list-style: none; }

.post-row {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem;
  padding: 0.2rem 0;
}

.post-row-date {
  color: var(--faint);
  white-space: nowrap;
}

.post-row-text a {
  color: var(--ink);
  text-decoration: none;
}

.post-row-text a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.post-row-sub {
  color: var(--faint);
  font-style: italic;
}

.year { margin-top: 2rem; }
.year:first-child { margin-top: 0; }

/* ── FRIENDS ─────────────────────────────────────────────── */

.friend-lines { list-style: none; }
.friend-lines li { padding: 0.15rem 0; }
.friend-lines .blurb { color: var(--muted); }

.friend-list {
  list-style: none;
}

.friend-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.friend-list li:last-child { border-bottom: none; }
.friend-list .blurb { color: var(--muted); }

/* ── CONTACT ─────────────────────────────────────────────── */

.contact {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

.email-copy {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── POST PAGE ───────────────────────────────────────────── */

.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-style: italic;
  text-decoration: none;
  color: var(--faint);
}

.back:hover { color: var(--accent); }

.post-header { margin-bottom: 1.5rem; }

.post-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.post-date { color: var(--faint); }

.post-description {
  color: var(--muted);
  font-style: italic;
  margin-top: 0.4rem;
  font-size: 1rem;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 1.5rem 0;
}

.post-content p          { margin-bottom: 1rem; }
.post-content h2         { font-size: 1.3rem; font-weight: 600; margin: 2rem 0 0.5rem; }
.post-content h3         { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.4rem; }
.post-content ul,
.post-content ol         { padding-left: 1.4rem; margin-bottom: 1rem; }
.post-content li         { margin-bottom: 0.25rem; }
.post-content blockquote {
  border-left: 3px solid var(--rule);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
  margin: 1.25rem 0;
}
.post-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  background: var(--rule);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.post-content pre {
  background: var(--rule);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.post-content pre code { background: none; padding: 0; }
.post-content hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}
.post-content img {
  max-width: 100%;
  border-radius: 4px;
  margin: 1.25rem 0;
  display: block;
}

/* ── SUBSCRIBE ───────────────────────────────────────────── */

.subscribe { margin-bottom: 0.6rem; }
.subscribe summary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  width: fit-content;
}
.subscribe summary::-webkit-details-marker { display: none; }
.subscribe summary:hover { color: var(--accent-hover); }
.subscribe[open] summary { color: var(--faint); }

.blog-subscribe { margin-top: 2.5rem; }

/* ── SNAKE ───────────────────────────────────────────────── */

.snake { max-width: 400px; }

.snake button {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  color: var(--faint);
  cursor: pointer;
}
.snake button:hover { color: var(--accent); }

.snake-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.2rem;
}
.snake-modes { display: flex; gap: 1rem; }
.snake-modes button.active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.snake-sound { font-style: italic; font-size: 0.95rem; }

.snake-hud {
  min-height: 1.65em;
  font-variant-numeric: oldstyle-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#snake-board {
  display: block;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  border: 1px solid var(--rule);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.snake-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.9rem;
  padding-top: 0.45rem;
}
.snake-chip {
  position: relative;
  overflow: hidden;
  font-size: 0.85rem;
  line-height: 1.3;
  padding: 0.1rem 0.5rem 0.15rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}
.snake-chip.power { border-color: #d9c27a; color: var(--ink); }
.snake-chip.curse { border-color: #b9a3dc; color: #4b2d80; }
.snake-chip i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.5;
  transition: width 0.3s linear;
}

.snake-ticker {
  min-height: 1.6em;
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
}
.snake-ticker.fresh { animation: snake-fade 0.4s ease-out; }
@keyframes snake-fade { from { opacity: 0; transform: translateY(3px); } }

.snake-help { color: var(--faint); font-size: 0.9rem; margin-top: 0.2rem; }

.snake-guide { margin-top: 2rem; }
.snake-guide summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 500;
  width: fit-content;
}
.snake-guide summary span { color: var(--faint); font-weight: 400; font-style: italic; margin-left: 0.4rem; }
.snake-guide-note { color: var(--muted); font-size: 0.95rem; margin: 0.5rem 0 0.75rem; }
.snake-guide h3 { font-size: 1rem; font-weight: 500; margin: 1rem 0 0.3rem; color: var(--muted); }
.snake-guide ul { list-style: none; }
.snake-guide li {
  display: grid;
  grid-template-columns: 11.5rem 1fr auto;
  gap: 0.75rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
.snake-guide li.undiscovered { display: block; color: var(--faint); letter-spacing: 0.1em; }
.snake-guide-desc { color: var(--muted); }
.snake-try {
  font: inherit;
  font-style: italic;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
}
.snake-try:hover { text-decoration: underline; }

/* ── PHONE ───────────────────────────────────────────────── */

@media (max-width: 520px) {
  .wrap { padding: 1.75rem 16px 4rem; }
  .post-row { grid-template-columns: 3.4rem 1fr; gap: 0.6rem; }
  .friend-list li { grid-template-columns: 1fr; gap: 0.1rem; }
  .snake-guide li { grid-template-columns: 1fr auto; }
  .snake-guide-desc { grid-column: 1; }
  .snake-hud { font-size: 0.95rem; }
}
