:root {
  --text: #292929;
  --text-light: #6B6B6B;
  --border: #E8E8E8;
  --bg: #FFFFFF;
  --bg-light: #F8F8F8;
  --heading-font: 'Playfair Display', Georgia, serif;
  --body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --article-font: Georgia, 'Times New Roman', serif;
  --max-width: 1160px;
}

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

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

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

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

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

.site-title {
  font-family: var(--heading-font);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-title:hover {
  color: var(--text-light);
}

.site-nav a {
  font-size: 0.88rem;
  color: var(--text-light);
  text-decoration: none;
  margin-left: 2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}

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

/* ── Main ── */
.main-content {
  padding: 52px 0 100px;
}

/* ── Card Grid ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 920px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Card ── */
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.10);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-light);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.35s ease;
}

.card:hover .card-image img {
  transform: scale(1.04);
}

.card-no-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f0f0f0 0%, #e2e2e2 100%);
}

.card-body {
  padding: 1.2rem 1.4rem 1.5rem;
}

.card-meta {
  font-size: 0.76rem;
  color: var(--text-light);
  margin-bottom: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-title {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  padding: 3.5rem 0 0;
  font-size: 0.88rem;
}

.pagination a {
  color: var(--text);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pagination a:hover {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.pagination .current {
  color: var(--text-light);
}

/* ── Post ── */
.post {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.15s;
}

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

.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-family: var(--heading-font);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.post-hero {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

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

/* ── Article body ── */
.post-content {
  font-family: var(--article-font);
  font-size: 1.13rem;
  line-height: 1.85;
  color: var(--text);
}

.post-content h2 {
  font-family: var(--heading-font);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.post-content h3 {
  font-family: var(--heading-font);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s;
}

.post-content a:hover {
  border-color: var(--text);
}

.post-content img {
  max-width: 100%;
  border-radius: 4px;
  margin: 1.5rem 0;
  display: block;
}

.post-content blockquote {
  border-left: 3px solid var(--text);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-light);
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.5rem 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content code {
  background: var(--bg-light);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
  border: 1px solid var(--border);
}

.post-content pre {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid var(--border);
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  border: none;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── About page ── */
.page-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.page-content h1 {
  font-family: var(--heading-font);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.page-content p {
  font-family: var(--article-font);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
}
