*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #faf9f7;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-accent: #c45d3e;
  --color-accent-hover: #a34d32;
  --color-border: #e8e4df;
  --font-serif: "DM Serif Display", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --max-width: 1100px;
  --max-width-narrow: 720px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-text);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent);
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Sections */
.posts-section {
  padding: 2rem 0 4rem;
}

.about-section {
  padding: 3rem 0 4rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 2rem;
}

.about-section p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
}

/* Post grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
}

.post-card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.3;
}

.post-card .excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  flex: 1;
}

.post-card .meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: auto;
}

/* Single post */
.post-article {
  padding: 3rem 0 4rem;
  flex: 1;
}

.back-link {
  display: inline-block;
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--color-accent-hover);
}

.post-header {
  margin-bottom: 2.5rem;
}

.post-header .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.post-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-header .meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-body p {
  margin-bottom: 1.25rem;
}

.post-body h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 2rem 0 1rem;
}

.post-body blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  font-style: italic;
}

.post-not-found {
  text-align: center;
  padding: 4rem 0;
}

.post-not-found h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.post-not-found p {
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-footer p {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
  .hero {
    padding: 2.5rem 0 2rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  nav {
    gap: 1rem;
  }
}
