:root {
  color-scheme: light dark;
  --bg-color: #f9fafb;
  --text-color: #1f2933;
  --link-color: #2563eb;
  --muted-text: #55637a;
  --border-color: rgba(31, 41, 51, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-border: rgba(31, 41, 51, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0b101b;
    --text-color: #e5ecff;
    --link-color: #93c5fd;
    --muted-text: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.24);
    --nav-bg: rgba(11, 16, 27, 0.85);
    --nav-border: rgba(148, 163, 184, 0.18);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    "Inter",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

header {
  backdrop-filter: blur(12px);
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

header h1 {
  font-size: 1.25rem;
  margin: 0;
}

header h1 a {
  color: inherit;
  text-decoration: none;
}

nav a {
  margin-left: 1rem;
  color: var(--muted-text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

nav a:hover,
nav a:focus {
  color: var(--link-color);
}

nav a.active {
  color: var(--link-color);
}

main {
  padding-top: 1rem;
  padding-bottom: 4rem;
}

article h1,
article h2,
article h3,
article h4 {
  color: var(--text-color);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

article h1:first-of-type {
  margin-top: 0;
}

article p {
  margin-bottom: 1rem;
}

article ul,
article ol {
  padding-left: 1.5rem;
}

article pre {
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

@media (prefers-color-scheme: dark) {
  article pre {
    background: rgba(148, 163, 184, 0.12);
  }
}

article code {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-family: "JetBrains Mono", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-size: 0.95rem;
}

@media (prefers-color-scheme: dark) {
  article code {
    background: rgba(148, 163, 184, 0.12);
  }
}

a {
  color: var(--link-color);
}

a:hover,
a:focus {
  text-decoration: underline;
}

footer {
  border-top: 1px solid var(--border-color);
  background: rgba(148, 163, 184, 0.08);
}

footer p {
  color: var(--muted-text);
  margin: 0;
}

.release {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: rgba(148, 163, 184, 0.08);
}

.release h2 {
  margin-top: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.release h2 a {
  color: inherit;
  text-decoration: none;
}

.release h2 a:hover {
  text-decoration: underline;
}

.release-date {
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Blog Posts */
.posts {
  margin-bottom: 3rem;
}

.post {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: rgba(148, 163, 184, 0.04);
}

.post h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.post h2 a {
  color: inherit;
  text-decoration: none;
}

.post h2 a:hover {
  color: var(--link-color);
}

.post-meta {
  color: var(--muted-text);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.post-meta time {
  margin-right: 1rem;
}

.post-meta .categories,
.post-meta .tags {
  margin-left: 1rem;
}

.post-meta a {
  color: var(--muted-text);
  text-decoration: none;
}

.post-meta a:hover {
  color: var(--link-color);
}

.post-excerpt {
  margin-bottom: 1rem;
}

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

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

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

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

.pagination a:hover {
  text-decoration: underline;
}

.page-number {
  color: var(--muted-text);
}

/* Archive */
.archive-list {
  margin-top: 2rem;
}

.archive-item {
  margin-bottom: 1rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.archive-item time {
  color: var(--muted-text);
  font-size: 0.9rem;
  min-width: 120px;
}

.archive-item a {
  color: inherit;
  text-decoration: none;
}

.archive-item a:hover {
  color: var(--link-color);
}

@media (max-width: 720px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav a {
    margin-left: 0;
    margin-right: 1rem;
  }

  .archive-item {
    flex-direction: column;
    gap: 0.25rem;
  }
}
