@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

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

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --text-light: #9b9b9b;
  --border: #e8e8e4;
  --accent: #2a5c8a;
  --accent-light: #eef3f8;
  --tag-bg: #f0f0ec;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --max-width: 720px;
  --wide-width: 960px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */

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

.container--wide {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navigation ── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* ── Hero ── */

.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

.hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #c8d8e8, #a0b8d0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--accent);
  font-weight: 500;
}

.hero-avatar img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}

.hero-content {
  flex: 1;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-bio {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.hero-links a:hover {
  color: var(--accent);
}

.hero-links a svg {
  width: 16px;
  height: 16px;
}

/* ── Section headings ── */

.section {
  padding: 3.5rem 0;
}

.section:not(:last-of-type) {
  border-bottom: 1px solid var(--border);
}

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

.section-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.section-more {
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

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

/* ── Post list ── */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

.post-item:hover .post-title {
  color: var(--accent);
}

.post-date {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
  min-width: 80px;
  font-variant-numeric: tabular-nums;
}

.post-title {
  font-size: 0.975rem;
  font-weight: 400;
  line-height: 1.5;
  transition: color 0.15s;
  flex: 1;
}

.post-tags {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Featured post (first article, larger) ── */

.post-featured {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: block;
}

.post-featured:first-child {
  border-top: 1px solid var(--border);
}

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

.post-featured-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.post-featured-date {
  font-size: 0.8rem;
  color: var(--text-light);
}

.post-featured-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
  letter-spacing: -0.01em;
}

.post-featured-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── About section ── */

.about-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 600px;
}

.about-text p + p {
  margin-top: 1rem;
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 0;
}

.footer-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--text-light);
}

.footer-inner a {
  color: var(--text-light);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--text-muted);
}

/* ── Articles page ── */

.page-hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.filter-bar {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.articles-list {
  padding: 1rem 0;
}

/* ── Article/Post page ── */

.article-hero {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.article-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  max-width: 640px;
}

.article-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  font-family: var(--font-serif);
  font-style: italic;
}

.article-body {
  padding: 2.5rem 0;
  max-width: 640px;
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 2rem 0 0.75rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  font-size: 1.0125rem;
  line-height: 1.8;
  color: #2a2a2a;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.article-body code {
  font-size: 0.875em;
  background: var(--tag-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.article-body pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-body pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  color: inherit;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-body li {
  margin-bottom: 0.4rem;
  line-height: 1.8;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.15s;
}

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

/* ── Responsive ── */

@media (max-width: 600px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero-inner {
    flex-direction: column;
    gap: 1.25rem;
  }

  .hero-name {
    font-size: 1.75rem;
  }

  .post-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .post-tags {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

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