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

:root {
  --bg: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-light: #eef2ff;
  --border: #e5e7eb;
  --surface: #f9fafb;
  --max-width: 720px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", "Consolas", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f17;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #818cf8;
    --accent-light: #1e1b4b;
    --border: #2a2a3d;
    --surface: #1a1a2e;
  }
}

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

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

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-rss {
  display: flex;
  align-items: center;
}

.nav-rss:hover {
  color: var(--text);
  text-decoration: none;
}

main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}

footer a {
  color: var(--muted);
}

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

.version {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.intro {
  margin-bottom: 3rem;
}

.intro h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.intro p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 55ch;
}


section {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-header h2 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.section-header a {
  font-size: 0.82rem;
  color: var(--muted);
}

.section-header a:hover {
  color: var(--accent);
  text-decoration: none;
}


.featured {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
}

.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
}

.featured h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.featured h3 a {
  color: var(--text);
}

.featured h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.featured p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.featured-link {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.featured-link:hover {
  color: var(--accent);
}


.card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-date {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.card h3 {
  font-size: 0.975rem;
  font-weight: 600;
}

.card h3 a {
  color: var(--text);
}

.card h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.card > p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.tag {
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
}


.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 2rem;
}


.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.page-meta time {
  font-family: var(--font-mono);
}

.page-meta a {
  color: var(--muted);
  font-size: 0.82rem;
}

.page-meta a:hover {
  color: var(--accent);
}

.prose {
  line-height: 1.8;
  font-size: 1rem;
}

.prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 2.25rem 0 0.75rem;
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem 1.5rem;
}

.prose li {
  margin-bottom: 0.3rem;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
  margin: 1.5rem 0;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.prose pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.prose img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1.5rem 0;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.prose th,
.prose td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.prose th {
  background: var(--surface);
  font-weight: 600;
}

@media (max-width: 640px) {
  .intro h1 {
    font-size: 1.35rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .nav-links {
    gap: 1rem;
  }
}
