:root {
  --text: #1a1a1a;
  --muted: #666;
  --bg: #f4f3f1;
  --surface: #ffffff;
  --accent: #2458a0;
  --accent-soft: #dce8ff;
  --code-bg: #f5f5f5;
  --border: #d9d6d1;
  --max-width: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ececec;
    --muted: #a8a8a8;
    --bg: #111111;
    --surface: #171717;
    --accent: #6ba6e0;
    --accent-soft: rgba(107, 166, 224, 0.16);
    --code-bg: #1f1f1f;
    --border: #2a2a2a;
  }
}

* {
  box-sizing: border-box;
}

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

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(36, 88, 160, 0.08), transparent 25%), radial-gradient(circle at bottom right, rgba(36, 88, 160, 0.06), transparent 20%);
  pointer-events: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

main {
  padding-bottom: 64px;
}

.site-header {
  position: relative;
  z-index: 1;
  padding: 32px 0 14px;
  margin-bottom: 48px;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.site-title {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 15px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a:hover {
  color: var(--accent);
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.75rem, 3.2vw, 4.2rem);
}

h2 {
  font-size: clamp(1.4rem, 1.5vw, 2rem);
}

h3 {
  font-size: 1.1rem;
}

h4 {
  font-size: 1rem;
}

p {
  margin: 0 0 1.4em;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(36, 88, 160, 0.22);
  transition: color 180ms ease, border-color 180ms ease;
}

a:hover {
  color: #163f78;
  border-color: rgba(36, 88, 160, 0.42);
}

code {
  background: var(--code-bg);
  padding: 0.2em 0.45em;
  border-radius: 0.45em;
  font-size: 0.94em;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

pre {
  background: var(--code-bg);
  padding: 24px;
  border-radius: 18px;
  overflow-x: auto;
  font-size: 0.95em;
  line-height: 1.65;
  margin: 1.8em 0;
}

pre code {
  background: none;
  padding: 0;
}

blockquote {
  margin: 2.2em 0;
  padding: 1.3em 1.35em;
  background: rgba(36, 88, 160, 0.06);
  border-left: 4px solid var(--accent);
  color: var(--muted);
  font-style: normal;
}

ul,
ol {
  margin: 0 0 1.4em;
  padding-left: 1.8em;
}

li {
  margin-bottom: 0.55em;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3.2em 0;
}

img {
  max-width: 100%;
  display: block;
  margin: 1.8em 0;
  border-radius: 18px;
}

.home-intro {
  margin-bottom: 56px;
  padding: 44px 46px;
  background: var(--surface);
  border: 1px solid rgba(17, 17, 17, 0.05);
  border-radius: 28px;
  box-shadow: 0 18px 60px rgba(17, 17, 17, 0.04);
}

.home-intro h1 {
  margin-top: 0;
  font-size: clamp(2.4rem, 3vw, 3.5rem);
}

.home-intro p {
  color: var(--muted);
  max-width: 42em;
}

.section-label {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  margin-bottom: 32px;
  background: var(--surface);
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 26px;
  padding: 32px;
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.post-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 62px rgba(17, 17, 17, 0.08);
}

.post-list h2 {
  margin: 0 0 10px;
  font-size: 1.7rem;
}

.post-list h2 a {
  color: var(--text);
}

.post-list .post-meta {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 14px;
}

.post-list .post-excerpt {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.post {
  background: var(--surface);
  border: 1px solid rgba(17, 17, 17, 0.05);
  border-radius: 28px;
  padding: 40px 46px;
  box-shadow: 0 20px 70px rgba(17, 17, 17, 0.06);
}

.post-cover {
  margin: 0 0 34px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 54px rgba(17, 17, 17, 0.08);
}

.post-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.post-header {
  margin-bottom: 32px;
}

.post-title {
  margin: 0 0 12px;
  font-size: clamp(3rem, 4vw, 4.8rem);
  line-height: 1.05;
}

.post-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.95rem;
  line-height: 1;
}

.post-content {
  margin-bottom: 64px;
}

.post-content h2 {
  margin-top: 2.4em;
}

.post-footer {
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  padding-top: 28px;
  font-size: 0.99rem;
  color: var(--muted);
}

.site-footer {
  padding: 36px 0 20px;
  margin-top: 60px;
  font-size: 14px;
  color: var(--muted);
}

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

@media (max-width: 840px) {
  .container {
    padding: 0 20px;
  }

  .home-intro,
  .post-list li,
  .post {
    padding: 28px 26px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 17px;
  }

  .site-header {
    padding-top: 24px;
    margin-bottom: 34px;
  }

  .site-title {
    font-size: 20px;
  }

  .post-title {
    font-size: 2.4rem;
  }

  .home-intro,
  .post-list li,
  .post {
    border-radius: 22px;
    padding: 24px;
  }

  .section-label {
    margin-bottom: 22px;
  }
}
