:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --paper: #fffdf9;
  --ink: #181716;
  --muted: #6b625a;
  --line: #ded6cb;
  --accent: #2f6f73;
  --accent-2: #9d4f36;
  --code-bg: #1f2326;
  --code-ink: #f3efe7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration-thickness: 0.08em; text-underline-offset: 0.16em; }
a:hover { color: var(--accent-2); }

.home, .post {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
}

.home {
  width: min(100% - 24px, 1080px);
}

.site-intro {
  padding: 72px 0 24px;
}

.site-intro h1, .post-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: 5rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.site-intro p, .post-hero p {
  max-width: 700px;
  font-size: 1.12rem;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-list { padding: 18px 0 72px; }

.post-card {
  position: relative;
  min-height: 620px;
  margin: 0 0 32px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line), transparent 48%);
  border-radius: 8px;
  background: #171717;
  box-shadow: 0 18px 42px rgb(24 23 22 / 14%);
}

.post-card-link {
  position: absolute;
  inset: 0;
  display: block;
  color: #fffdf9;
  text-decoration: none;
}

.post-card-link img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 260ms ease;
}

.post-card:hover .post-card-link img {
  transform: scale(1.025);
}

.post-card-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 0%) 26%, rgb(0 0 0 / 58%) 68%, rgb(0 0 0 / 82%) 100%),
    linear-gradient(90deg, rgb(0 0 0 / 56%) 0%, rgb(0 0 0 / 10%) 62%);
}

.post-card-body {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 42px;
  max-width: 890px;
}

.post-card h2 {
  margin: 0 0 12px;
  color: #fffdf9;
  font-size: 3.05rem;
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

.post-card p {
  max-width: 880px;
  margin: 0 0 20px;
  color: rgb(255 253 249 / 78%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.1rem;
  line-height: 1.55;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: rgb(255 253 249 / 70%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.post-cover img, .hero-cover img, .prose img, .prose video {
  display: block;
  width: 100%;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--line), transparent 30%);
  background: var(--paper);
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  border: 1px solid rgb(255 253 249 / 22%);
  border-radius: 999px;
  padding: 4px 12px;
  background: rgb(255 253 249 / 14%);
  color: rgb(255 253 249 / 88%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.post-card .tags { margin: 0 0 18px; }

.top-nav { padding: 32px 0 0; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.top-nav a { color: var(--muted); text-decoration: none; }

.post-hero { padding: 56px 0 34px; }
.hero-cover { margin: 34px 0 0; }
.hero-cover img { max-height: 540px; object-fit: cover; }

.prose {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 20px 0 84px;
  font-size: 1.08rem;
}

.prose h2, .prose h3, .prose h4 {
  margin: 2.2em 0 0.55em;
  line-height: 1.1;
  letter-spacing: 0;
}
.prose h2 { font-size: 2rem; }
.prose h3 { font-size: 1.45rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose figure { margin: 1.05em 0; }
.prose li + li { margin-top: 0.35em; }
.prose blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.2em 0 0.2em 1em;
  color: var(--muted);
}
.prose code {
  border-radius: 5px;
  padding: 0.1em 0.28em;
  background: #ebe5dc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}
.prose pre {
  overflow-x: auto;
  border-radius: 8px;
  padding: 18px;
  background: var(--code-bg);
  color: var(--code-ink);
}
.prose pre code { padding: 0; background: transparent; color: inherit; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figure img { margin: 0 auto; max-width: min(100%, 720px); }
.prose video { aspect-ratio: 16 / 9; background: #111; }

.site-footer {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .site-intro { padding-top: 46px; }
  .site-intro h1, .post-hero h1 { font-size: 3rem; }
  .post-card { min-height: 560px; }
  .post-card-body {
    left: 20px;
    right: 20px;
    bottom: 24px;
  }
  .post-card h2 { font-size: 2.15rem; }
  .post-card p { font-size: 1rem; }
  .post-hero { padding-top: 38px; }
  .prose { font-size: 1rem; }
}
