:root {
  color-scheme: dark;
  --bg: #050507;
  --text: #f8f4ee;
  --muted: rgba(248, 244, 238, 0.6);
  --soft: rgba(248, 244, 238, 0.74);
  --line: rgba(248, 244, 238, 0.13);
  --link: #c4b5fd;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
}

canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

a {
  color: var(--link);
  text-underline-offset: 0.16em;
}

a:hover { color: #eee8ff; }

.home-shell,
.post-shell {
  position: relative;
  z-index: 1;
}

.home-shell {
  text-shadow: 0 0 34px rgba(5, 5, 7, 0.95), 0 0 10px rgba(5, 5, 7, 0.8);
}

.home-shell {
  width: min(760px, calc(100vw - clamp(56px, 12vw, 144px)));
  min-height: 100vh;
  margin: 0 auto;
  padding-top: calc(50vh - clamp(132px, 20vh, 190px));
}

.home-shell h1 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 450;
  line-height: 1.05;
}

.home-shell h1 a {
  color: rgba(248, 244, 238, 0.94);
  text-decoration: none;
}

.subtitle {
  margin: 0.42em 0 0;
  color: var(--soft);
  font-size: clamp(11px, 1.25vw, 14px);
  font-weight: 300;
  line-height: 1.2;
}

.section-tabs {
  margin: clamp(20px, 3vw, 34px) 0 0;
  display: flex;
  gap: clamp(14px, 2vw, 22px);
}

.section-tabs a,
.compact-nav a {
  color: rgba(248, 244, 238, 0.48);
  text-decoration: none;
  transition: color 0.25s ease;
}

.section-tabs a:hover,
.section-tabs a[aria-current="page"],
.compact-nav a:hover,
.compact-nav a[aria-current="page"],
.compact-nav .brand {
  color: rgba(248, 244, 238, 0.9);
}

.section-tabs a {
  font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 420;
  line-height: 1.2;
}

.post-list {
  margin: clamp(14px, 2.2vw, 22px) 0 0;
  display: grid;
  gap: clamp(9px, 1.55vw, 14px);
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: clamp(10px, 1.4vw, 16px);
  color: var(--text);
  text-decoration: none;
}

.post-card h2 {
  margin: 0;
  color: rgba(248, 244, 238, 0.88);
  font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 420;
  line-height: 1.2;
}

.post-card p {
  margin: 0.2em 0 0;
  color: var(--muted);
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 300;
  line-height: 1.25;
}

.post-card time {
  color: var(--muted);
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 300;
  white-space: nowrap;
}

.post-card:hover h2 { color: #fff; }

.post-shell {
  width: min(740px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 96px;
}

.compact-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(54px, 10vw, 108px);
  font-size: 14px;
  line-height: 1.2;
}

.compact-nav,
article header {
  text-shadow: 0 0 34px rgba(5, 5, 7, 0.95), 0 0 10px rgba(5, 5, 7, 0.8);
}

.compact-nav span {
  display: flex;
  gap: 18px;
}

article {
  color: rgba(248, 244, 238, 0.9);
}

article header {
  margin-bottom: 42px;
}

article h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 440;
  letter-spacing: 0;
  line-height: 1.08;
}

.date {
  color: var(--muted);
  font-size: 13px;
}

article p {
  margin: 0 0 1.45em;
}

article ol,
article ul {
  margin: -0.2em 0 1.8em;
  padding-left: 1.45em;
}

article li {
  margin: 0.9em 0;
  padding-left: 0.35em;
}

article li::marker {
  color: rgba(248, 244, 238, 0.9);
}

.reflections {
  padding-left: 1.65em;
}

.reflections > li {
  margin: 1.8em 0;
}

.reflections > li > p:first-child {
  margin-top: 0;
}

.reflections ol {
  margin-top: -0.6em;
  margin-bottom: 1.45em;
}

article em { color: #d6d0db; }

.comments {
  margin-top: 86px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.comment-status {
  color: var(--muted);
  font-size: 14px;
}

.cast-thread + .cast-thread { margin-top: 28px; }
.cast-source { margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.comment { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 0; color: inherit; text-decoration: none; }
.comment:hover .comment-text { color: var(--text); }
.comment + .comment { border-top: 1px solid var(--line); }
.comment img { width: 34px; height: 34px; border-radius: 50%; background: rgba(11, 11, 17, 0.55); object-fit: cover; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.comment-meta strong { color: var(--text); font-size: 13px; font-weight: 520; }
.comment-text { margin: 4px 0 0; color: #d8d4dc; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-replies { margin-left: 15px; padding-left: 18px; border-left: 1px solid var(--line); }
.empty { padding: 20px 0; color: var(--muted); font-size: 14px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .home-shell { width: min(100% - 30px, 740px); padding-top: calc(50vh - 145px); }
  .post-card { grid-template-columns: 1fr; gap: 5px; }
  .post-shell { width: min(100% - 30px, 740px); padding-top: 24px; }
  .compact-nav { margin-bottom: 58px; }
  .reflections { padding-left: 1.35em; }
  .comment-replies { margin-left: 8px; padding-left: 12px; }
}
