:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --panel: #ffffff;
  --text: #202124;
  --muted: #646970;
  --line: #d8dee4;
  --accent: #116466;
  --accent-soft: #e2f0ef;
  --link: #0b5cad;
}

* {
  box-sizing: border-box;
}

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

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 14px;
}

nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-head {
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.32;
}

h1 {
  margin: 0;
  font-size: 3rem;
  letter-spacing: 0;
}

.article-list {
  display: grid;
  gap: 18px;
}

.article-item,
.empty,
.tag-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-item {
  padding: 24px;
}

.article-item time,
.article-header time {
  color: var(--muted);
  font-size: 0.9rem;
}

.article-item h2 {
  margin: 6px 0 8px;
  font-size: 1.35rem;
}

.article-item h2 a {
  color: var(--text);
  text-decoration: none;
}

.article-item p,
.article-header p,
.muted {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tags a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  background: var(--accent-soft);
  border: 1px solid #c5dfdd;
  border-radius: 999px;
  color: #0f5557;
  font-size: 0.85rem;
  text-decoration: none;
}

.article {
  max-width: 760px;
}

.article-header {
  margin-bottom: 36px;
}

.article-header h1 {
  margin-top: 8px;
}

.markdown {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.markdown h2 {
  margin-top: 2.1em;
  padding-top: 0.5em;
  border-top: 1px solid var(--line);
}

.markdown h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.markdown pre {
  overflow: auto;
  padding: 16px;
  background: #202124;
  border-radius: 6px;
  color: #f7f7f4;
}

.markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.markdown blockquote {
  margin: 1.5em 0;
  padding-left: 1em;
  border-left: 4px solid var(--accent);
  color: var(--muted);
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.tag-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
}

.tag-card strong {
  color: var(--accent);
  font-size: 1.3rem;
}

.empty {
  padding: 28px;
}

.empty h2 {
  margin: 0 0 6px;
}

.empty p {
  margin: 0;
  color: var(--muted);
}

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

  main {
    padding-top: 32px;
  }

  .markdown,
  .article-item {
    padding: 20px;
  }

  h1 {
    font-size: 2rem;
  }
}
