:root {
  --bg: #171819;
  --surface: #222426;
  --text: #ece9e3;
  --muted: #b5b0a8;
  --border: #3a3d40;
  --accent: #b79dff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Helvetica, Arial, sans-serif;
  font-size: 12pt;
  line-height: 1.6;
}

header {
  border-bottom: 1px solid var(--border);
}

.nav {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

.title {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.title:hover,
.title:focus-visible {
  color: var(--accent);
}

main {
  width: min(760px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
}

.post-list {
  display: grid;
  gap: 0.35rem;
}

.landing-banner {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.1rem;
  margin-bottom: 1rem;
}

.banner-kicker {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-banner h1 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.25;
}

.banner-subtitle {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.home-intro {
  margin: 0.7rem 0 1rem;
  color: var(--muted);
}

.post-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.3rem 0.35rem;
  border-radius: 8px;
}

.post-row:link,
.post-row:visited {
  color: var(--text);
  text-decoration: none;
}

.post-row-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.post-row-date {
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: right;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.post-row:hover .post-row-title,
.post-row:focus-visible .post-row-title {
  color: var(--accent);
  text-decoration: underline;
}

.post-row:hover,
.post-row:focus-visible {
  background: rgba(181, 140, 255, 0.08);
}

.date {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.post-header {
  width: min(760px, calc(100% - 2rem));
  margin: 1rem auto 0;
}

.back-link {
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
}

.post-content {
  width: min(760px, calc(100% - 2rem));
  margin: 1rem auto 3rem;
}

.post-content h1 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.post-content img,
.post-content video {
  display: block;
  width: 100%;
  height: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.references {
  margin-top: 2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.references h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.references ol {
  margin: 0;
  padding-left: 1.2rem;
}

@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }
}
