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

:root {
  --bg: #ffffff;
  --text: #1a1814;
  --muted: #8a8070;
  --dim: #6a6258;
  --faint: #9a9088;
  --line: #e8e4de;
  --tag-bg: #f5f2ec;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── SITE HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--line);
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.05em;
}

.site-logo span {
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  color: var(--faint);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-left: 10px;
  font-weight: 300;
}

.site-nav { display: flex; gap: 36px; align-items: center; }

.site-nav a {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.3s;
}

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

/* ── PAGE WRAPPER ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── BLOG INDEX ── */
.blog-header {
  padding: 80px 0 64px;
  border-bottom: 0.5px solid var(--line);
  margin-bottom: 72px;
}

.blog-header-label {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 20px;
}

.blog-header h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
}

.blog-header h1 em {
  font-style: italic;
  color: var(--muted);
}

.blog-header-desc {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--faint);
  letter-spacing: 0.03em;
  max-width: 480px;
}

/* ── POST GRID ── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.post-card {
  padding: 48px 0;
  border-bottom: 0.5px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 40px;
  align-items: start;
  transition: opacity 0.3s;
}

.post-card:nth-child(odd) { padding-right: 48px; border-right: 0.5px solid var(--line); }
.post-card:nth-child(even) { padding-left: 48px; }

/* last row — no bottom border if pair is complete */
.post-card:nth-last-child(1):nth-child(odd),
.post-card:nth-last-child(2):nth-child(odd),
.post-card:nth-last-child(1):nth-child(even),
.post-card:nth-last-child(2):nth-child(even) {
  border-bottom: none;
}

.post-card:hover { opacity: 0.75; }

.post-card-content { order: 1; }
.post-card-image  { order: 2; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.post-date {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--faint);
  text-transform: uppercase;
}

.post-tag {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--tag-bg);
  padding: 3px 10px;
  border-radius: 2px;
}

.post-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 12px;
}

.post-summary {
  font-size: 13px;
  line-height: 1.85;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.post-read-more {
  display: inline-block;
  margin-top: 20px;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}

.post-card:hover .post-read-more { color: var(--text); }

.post-card-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  filter: grayscale(15%);
  transition: filter 0.4s;
}

.post-card:hover .post-card-image img { filter: grayscale(0%); }

.post-card-image.no-image {
  aspect-ratio: 4/3;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-image.no-image::after {
  content: '✦';
  font-size: 24px;
  color: var(--line);
}

/* ── SINGLE POST ── */
.post-hero {
  padding: 72px 0 56px;
  border-bottom: 0.5px solid var(--line);
  margin-bottom: 64px;
}

.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.post-hero-back {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.3s;
}

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

.post-hero-sep { color: var(--line); }

.post-hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  max-width: 780px;
  margin-bottom: 24px;
}

.post-hero-info {
  display: flex;
  gap: 24px;
  align-items: center;
}

.post-hero-date {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

.post-hero-reading {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--faint);
}

/* ── FEATURED IMAGE ── */
.post-featured-image {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  margin-bottom: 64px;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── POST BODY ── */
.post-body {
  display: grid;
  grid-template-columns: 1fr 640px 1fr;
  margin-bottom: 96px;
}

.post-content { grid-column: 2; }

.post-content p {
  font-size: 16px;
  line-height: 2;
  color: var(--dim);
  margin-bottom: 28px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.post-content h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  margin: 56px 0 24px;
}

.post-content h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
  margin: 40px 0 16px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 28px 20px;
  font-size: 16px;
  line-height: 2;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.post-content li { margin-bottom: 6px; }

.post-content blockquote {
  border-left: 2px solid var(--line);
  padding: 4px 0 4px 28px;
  margin: 40px 0;
}

.post-content blockquote p {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 20px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.post-content code {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  background: var(--tag-bg);
  padding: 2px 7px;
  border-radius: 2px;
  color: var(--dim);
}

.post-content pre {
  background: #f8f6f2;
  border: 0.5px solid var(--line);
  padding: 24px 28px;
  margin: 32px 0;
  overflow-x: auto;
  border-radius: 2px;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.8;
}

.post-content a {
  color: var(--text);
  border-bottom: 0.5px solid var(--line);
  transition: border-color 0.3s;
}

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

.post-content hr {
  border: none;
  border-top: 0.5px solid var(--line);
  margin: 48px 0;
}

/* ── POST FOOTER ── */
.post-footer {
  border-top: 0.5px solid var(--line);
  padding: 48px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-footer-back {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.3s;
}

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

.post-footer-tags { display: flex; gap: 8px; }

/* ── SITE FOOTER ── */
.site-footer {
  border-top: 0.5px solid var(--line);
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 80px;
}

.site-footer-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 14px;
  color: #c8c2b8;
  letter-spacing: 0.05em;
}

.site-footer-copy {
  font-size: 10px;
  color: #c8c2b8;
  letter-spacing: 0.1em;
}

/* ── EMPTY STATE ── */
.no-posts {
  padding: 96px 0;
  text-align: center;
  color: var(--faint);
  font-size: 14px;
  letter-spacing: 0.05em;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-header { padding: 18px 24px; }
  .page-wrap { padding: 0 24px; }
  .site-footer { padding: 28px 24px; }

  .blog-header { padding: 56px 0 48px; margin-bottom: 48px; }
  .blog-header h1 { font-size: 34px; }

  .post-grid { grid-template-columns: 1fr; }
  .post-card { grid-template-columns: 1fr; padding: 40px 0 !important; border-right: none !important; border-left: none !important; border-bottom: 0.5px solid var(--line) !important; }
  .post-card-image { order: -1; }
  .post-card-image img { aspect-ratio: 16/9; }

  .post-hero h1 { font-size: 30px; }

  .post-body { grid-template-columns: 1fr; }
  .post-content { grid-column: 1; }
  .post-content p, .post-content ul, .post-content ol { font-size: 15px; }
}
