:root {
  --bg: #0b0e19;
  --surface: #121729;
  --line: #232b45;
  --text: #e9e6dc;
  --muted: #8d94ab;
  --accent: #e3b458;
  --serif: "Iowan Old Style", "Palatino", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  font-size: 17px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.masthead {
  max-width: 680px;
  margin: 0 auto;
  padding: 72px 24px 40px;
  border-bottom: 1px solid var(--line);
}
.masthead h1 {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
}
.masthead .tagline { color: var(--muted); margin: 8px 0 0; font-style: italic; }
.masthead.small { padding: 32px 24px 16px; border-bottom: none; }
.masthead .back { color: var(--muted); font-size: 15px; }
.masthead .back:hover { color: var(--accent); }
.masthead .admin-link { margin: 0 0 12px; font-size: 14px; }
.masthead .admin-link a { color: var(--muted); }
.masthead .admin-link a:hover { color: var(--accent); text-decoration: none; }
.nav-row { display: flex; gap: 18px; align-items: baseline; }
.nav-row .admin-inline { color: var(--muted); font-size: 14px; }
.nav-row .admin-inline:hover { color: var(--accent); text-decoration: none; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

.feed, .post {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

.post-card {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 30px 0;
  padding: 24px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
}
.post-card:hover { border-color: var(--accent); text-decoration: none; }
.post-card time {
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--bg);
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.post-card:hover time { color: var(--accent); }
.card-body { flex: 1; min-width: 0; }
.post-card h2 { font-family: var(--serif); font-size: 28px; font-weight: 500; margin: 0 0 8px; color: var(--text); }
.post-card:hover h2 { color: var(--accent); }
.post-card p { color: var(--muted); margin: 0; }
.card-thumb {
  width: 104px;
  height: 104px;
  flex: none;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

@media (max-width: 600px) {
  .post-card { flex-direction: column-reverse; align-items: stretch; }
  .card-thumb { width: 100%; height: 140px; }
}

.empty { color: var(--muted); font-style: italic; }

.post time { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; }
.post h1 { font-family: var(--serif); font-size: 42px; font-weight: 500; line-height: 1.15; margin: 8px 0 32px; }

.blocks h2, .blocks h3 { font-family: var(--serif); font-weight: 500; margin: 40px 0 8px; }
.blocks blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
}
.blocks code { background: var(--surface); padding: 2px 6px; border-radius: 4px; font-size: 15px; }
.blocks pre { background: var(--surface); padding: 16px; border-radius: 8px; overflow-x: auto; }

.block-image { margin: 36px 0; }
.block-image img { max-width: 100%; border-radius: 6px; display: block; }
.block-image figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; text-align: center; font-style: italic; }

.block-music { margin: 36px 0; }
.block-music iframe { width: 100%; border: 0; display: block; }
.block-youtube iframe { aspect-ratio: 16 / 9; height: auto; border-radius: 8px; }
.block-music-fallback a { word-break: break-all; }

.music-hud {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.top-right-row { display: flex; align-items: center; gap: 10px; }
.portal-link {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 10px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.portal-link:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
#hud-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
#hud-toggle:hover { color: var(--accent); border-color: var(--accent); }
#hud-toggle.on { color: #17130a; background: var(--accent); border-color: var(--accent); }
.hud-panel {
  width: min(340px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.hud-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.hud-panel iframe { width: 100%; border: 0; display: block; border-radius: 8px; }
.hud-panel iframe.yt { aspect-ratio: 16 / 9; height: auto; }

.site-footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 600px) {
  .masthead h1 { font-size: 38px; }
  .post h1 { font-size: 32px; }
}
