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

:root {
  --bg: #1a1915; --fg: #e8e4de; --fg-dim: #9b9286; --accent: #d4845a;
  --border: #2e2c27; --border-now: #3a372f; --code-bg: #24221d; --pre-bg: #201f1a;
  --tag-writing: #d4845a; --tag-teardown: #e0a84c; --tag-build-log: #6ba8cc;
  --tag-gap-map: #b08ad4; --tag-signal: #9b9286;
}
body.light {
  --bg: #f5f0e8; --fg: #2a2520; --fg-dim: #8a7e72; --accent: #b35c2a;
  --border: #e0d8cc; --border-now: #d5ccbe; --code-bg: #ece5d8; --pre-bg: #ece5d8;
  --tag-writing: #b35c2a; --tag-teardown: #c47a20; --tag-build-log: #3d7ea6;
  --tag-gap-map: #8a5dab; --tag-signal: #8a7e72;
}

html { font-size: 16px; }
body { background: var(--bg); color: var(--fg); font-family: 'JetBrains Mono', monospace; line-height: 1.6; -webkit-font-smoothing: antialiased; }
main { max-width: 720px; margin: 0 auto; padding: 80px 24px 60px; }

/* header */
header { margin-bottom: 32px; }
h1 { font-size: 2rem; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
.tagline { font-size: 0.875rem; color: var(--fg-dim); margin-top: 4px; }
.cursor { animation: blink 1s step-end infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

/* links */
.links { margin-bottom: 40px; font-size: 0.875rem; }
.links a { color: var(--fg); text-decoration: none; margin-right: 12px; }
.links a:hover { color: var(--accent); }

/* theme toggle */
.theme-toggle { position: fixed; top: 24px; right: 24px; background: none; border: 1px solid var(--border); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.theme-toggle::after { content: ''; display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--fg-dim); }
body.light .theme-toggle::after { background: var(--fg); }
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:hover::after { background: var(--accent); }

/* about */
.about { margin-bottom: 40px; font-size: 0.8125rem; color: var(--fg-dim); line-height: 1.7; }
.about p { margin-bottom: 8px; }

/* now */
.now { margin-bottom: 48px; font-size: 0.8125rem; border-left: 2px solid var(--border-now); padding-left: 16px; }
.now h2, .index h2 { font-size: 0.75rem; font-weight: 400; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.now h2 { margin-bottom: 12px; }
.now p { margin-bottom: 4px; color: var(--fg-dim); }
.prompt { color: var(--accent); margin-right: 4px; }

/* index / stream */
.index { margin-bottom: 80px; }
.index h2 { margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.stream-desc, .empty-state { font-size: 0.8125rem; color: var(--fg-dim); margin-bottom: 16px; }
.empty-state { font-style: italic; }
.index ul { list-style: none; }
.index li { font-size: 0.8125rem; margin-bottom: 8px; display: flex; align-items: baseline; gap: 12px; }
.date { color: var(--fg-dim); flex-shrink: 0; font-size: 0.75rem; }
.tag { flex-shrink: 0; font-size: 0.75rem; text-decoration: none; }
.tag-writing { color: var(--tag-writing); }
.tag-teardown { color: var(--tag-teardown); }
.tag-build-log { color: var(--tag-build-log); }
.tag-gap-map { color: var(--tag-gap-map); }
.tag-signal { color: var(--tag-signal); }
.index li a:last-child { color: var(--fg); text-decoration: none; }
.index li a:last-child:hover { color: var(--accent); }

/* footer */
footer { border-top: 1px solid var(--border); padding-top: 24px; font-size: 0.75rem; color: var(--fg-dim); }

/* content page */
.content-page header { margin-bottom: 48px; }
.content-page .meta { font-size: 0.8125rem; color: var(--fg-dim); margin-bottom: 8px; }
.content-page .meta .tag { margin-left: 8px; }
.content-page h1 { font-size: 1.25rem; color: var(--fg); font-weight: 700; line-height: 1.4; }
.content-nav { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.content-page .back { display: inline-block; font-size: 0.8125rem; color: var(--fg-dim); text-decoration: none; }
.content-page .back:hover { color: var(--accent); }

/* article */
article { font-size: 0.875rem; line-height: 1.75; }
article h2 { font-size: 1rem; font-weight: 700; color: var(--fg); margin: 40px 0 12px; }
article h3 { font-size: 0.875rem; font-weight: 700; color: var(--fg); margin: 32px 0 8px; }
article p { margin-bottom: 16px; }
article a { color: var(--accent); text-decoration: none; }
article a:hover { text-decoration: underline; }
article code { background: var(--code-bg); padding: 2px 6px; border-radius: 2px; font-size: 0.8125rem; }
article pre { background: var(--pre-bg); padding: 16px; overflow-x: auto; margin-bottom: 16px; border: 1px solid var(--border); }
article pre code { background: none; padding: 0; }
article blockquote { border-left: 2px solid var(--accent); padding-left: 16px; color: var(--fg-dim); margin-bottom: 16px; }
article ul, article ol { margin-bottom: 16px; padding-left: 24px; }
article li { margin-bottom: 4px; }
article hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
article img { max-width: 100%; }

/* responsive */
@media (max-width: 600px) {
  main { padding: 48px 16px 40px; }
  h1 { font-size: 1.5rem; }
  .tagline { font-size: 0.75rem; }
  .theme-toggle { top: 16px; right: 16px; width: 28px; height: 28px; }
  .theme-toggle::after { width: 12px; height: 12px; }
  .links { font-size: 0.8125rem; margin-bottom: 32px; }
  .links a { margin-right: 8px; }
  .about, .now, .stream-desc { font-size: 0.75rem; }
  .now { margin-bottom: 36px; }
  .index li { flex-direction: column; gap: 2px; margin-bottom: 14px; }
  .index li .date { font-size: 0.6875rem; }
  .content-page h1 { font-size: 1.1rem; }
  article { font-size: 0.8125rem; }
  article pre { padding: 12px; font-size: 0.75rem; }
}
