/* ── Manrope variable font (self-hosted) ─────────────────────────────────── */
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 200 800;
  font-display: fallback;
  src: url('/assets/fonts/Manrope-VariableFont_wght.woff2') format('woff2');
}

/* ── Design tokens (from Twenty Twenty-Five theme.json) ──────────────────── */
:root {
  --color-base:       #FFFFFF;
  --color-contrast:   #111111;
  --color-accent-1:   #FFEE58;   /* yellow */
  --color-accent-4:   #686868;   /* gray */
  --color-accent-5:   #FBFAF3;   /* off-white */

  --font-small:    0.875rem;
  --font-medium:   clamp(1rem,    1rem    + ((1vw - 0.2rem) * 0.196), 1.125rem);
  --font-large:    clamp(1.125rem,1.125rem + ((1vw - 0.2rem) * 0.392), 1.375rem);
  --font-x-large:  clamp(1.75rem, 1.75rem  + ((1vw - 0.2rem) * 0.392), 2rem);
  --font-xx-large: clamp(2.15rem, 2.15rem  + ((1vw - 0.2rem) * 1.333), 3rem);

  --sp-20: 10px;
  --sp-30: 20px;
  --sp-40: 30px;
  --sp-50: clamp(30px, 5vw, 50px);
  --sp-60: clamp(30px, 7vw, 70px);
  --sp-70: clamp(50px, 7vw, 90px);

  --content-width: 645px;
  --wide-width:    1340px;
  --gutter:        var(--sp-50);
  --gap:           1.2rem;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Base ────────────────────────────────────────────────────────────────── */
body {
  background: var(--color-base);
  color: var(--color-contrast);
  font-family: Manrope, sans-serif;
  font-size: var(--font-large);
  font-weight: 300;
  letter-spacing: -0.1px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a { color: currentColor; text-decoration: underline; }
a:hover { text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  letter-spacing: -0.1px;
  line-height: 1.125;
}
h1 { font-size: var(--font-xx-large); }
h2 { font-size: var(--font-x-large); }
h3 { font-size: var(--font-large); }
h4 { font-size: var(--font-medium); }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--color-base);
  border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}

.header-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: var(--sp-30) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* Large editorial site title */
.site-title a {
  font-size: clamp(32px, 3.136rem + ((1vw - 3.2px) * 4.885), 100px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: inherit;
  text-decoration: none;
  display: block;
}
.site-title a:hover { text-decoration: none; }

/* ── Navigation ──────────────────────────────────────────────────────────── */
.site-nav ul { display: flex; gap: var(--sp-40); list-style: none; flex-wrap: wrap; }

.site-nav a {
  font-size: var(--font-medium);
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.active { text-decoration: underline; }

/* ── Main wrapper ────────────────────────────────────────────────────────── */
.site-main {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: var(--sp-50) var(--gutter) var(--sp-70);
}

/* ── Category label (used in cards + post headers) ───────────────────────── */
.cat-label {
  display: inline-block;
  font-size: var(--font-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  text-decoration: none;
  color: inherit;
}
.cat-label:hover { text-decoration: underline; }

/* ── Article card ────────────────────────────────────────────────────────── */
.article-card { display: flex; flex-direction: column; gap: var(--sp-20); }

.card-image {
  overflow: hidden;
  aspect-ratio: 3/2;
  background: var(--color-accent-5);
}
.card-image.ratio-4-3 { aspect-ratio: 4/3; }

.card-image img { width: 100%; height: 100%; object-fit: cover; }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--color-accent-4);
  background: var(--color-accent-5);
}

.card-title {
  font-size: var(--font-large);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.1px;
}
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }

/* Featured card (center 50% column) */
.card-featured .card-title {
  font-size: var(--font-xx-large);
  font-weight: 400;
}
.card-excerpt {
  font-size: var(--font-medium);
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-contrast);
}

/* ── Homepage sections ───────────────────────────────────────────────────── */
.home-section { padding: var(--sp-50) 0; }
.home-section + .home-section {
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}

/* Row 1: 25% | 50% | 25% editorial */
.home-row-editorial {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: var(--sp-50);
  align-items: start;
}
.home-col-side { display: flex; flex-direction: column; gap: var(--sp-50); }

/* Row 2: 2-col */
.home-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-50);
}

/* Row 3: 3-col */
.home-row-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-50);
}

/* ── Category / archive listing ──────────────────────────────────────────── */
.archive-header { margin-bottom: var(--sp-50); }

.archive-header h1 {
  font-size: var(--font-xx-large);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.archive-header p {
  font-size: var(--font-medium);
  color: var(--color-accent-4);
  margin-top: var(--sp-20);
}

.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-50);
}

/* ── Single post ─────────────────────────────────────────────────────────── */
.post-layout {
  max-width: var(--content-width);
  margin: 0 auto;
}

.post-header { margin-bottom: var(--sp-50); }

.post-title {
  font-size: var(--font-xx-large);
  font-weight: 400;
  line-height: 1.125;
  letter-spacing: -0.1px;
  margin: var(--sp-30) 0 var(--sp-20);
}


.post-featured-image {
  max-width: var(--wide-width);
  margin: 0 auto var(--sp-50);
}
.post-featured-image img { width: 100%; }

/* ── Post content typography ─────────────────────────────────────────────── */
.post-content { font-size: var(--font-large); font-weight: 300; }

.post-content h2 { font-size: var(--font-x-large); margin: var(--sp-60) 0 var(--sp-30); }
.post-content h3 { font-size: var(--font-large); font-weight: 500; margin: var(--sp-50) 0 var(--sp-20); }
.post-content h4 { font-size: var(--font-medium); font-weight: 600; margin: var(--sp-40) 0 var(--sp-20); }

.post-content p { margin-bottom: var(--gap); }

.post-content a { color: inherit; text-decoration: underline; }
.post-content a:hover { text-decoration: none; }

.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: var(--gap); }
.post-content li { margin-bottom: 0.4rem; }

.post-content img {
  width: 100%;
  margin: var(--sp-40) 0;
}

.post-content blockquote {
  border-left: 2px solid var(--color-contrast);
  margin: var(--sp-40) 0;
  padding: var(--sp-20) var(--sp-40);
  font-style: italic;
  color: var(--color-accent-4);
}

.post-content figure { margin: var(--sp-40) 0; }
.post-content figcaption {
  font-size: var(--font-small);
  color: var(--color-accent-4);
  margin-top: var(--sp-20);
  text-align: center;
}

.post-content pre, .post-content code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  background: var(--color-accent-5);
}
.post-content code { padding: 0.1em 0.4em; }
.post-content pre { padding: var(--sp-30); overflow-x: auto; margin-bottom: var(--gap); }

.post-footer {
  margin-top: var(--sp-60);
  padding-top: var(--sp-40);
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  font-size: var(--font-small);
}

.back-link { text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* ── Static / contact page ───────────────────────────────────────────────── */
.page-content {
  max-width: var(--content-width);
  margin: 0 auto;
}
.page-content h1 {
  font-size: var(--font-xx-large);
  margin-bottom: var(--sp-40);
}
.page-content p { margin-bottom: var(--gap); }

.contact-intro p { margin-bottom: var(--sp-40); color: var(--color-accent-4); }
.contact-email-link {
  display: inline-block;
  background: var(--color-contrast);
  color: var(--color-base);
  text-decoration: none;
  padding: 1rem 2.25rem;
  border-radius: 9999px;
  font-size: var(--font-medium);
  font-weight: 500;
}
.contact-email-link:hover { opacity: 0.85; text-decoration: none; }

/* ── 404 ─────────────────────────────────────────────────────────────────── */
.not-found {
  text-align: center;
  padding: var(--sp-70) 0;
}
.not-found-num {
  font-size: clamp(80px, 15vw, 160px);
  font-weight: 700;
  color: var(--color-accent-5);
  line-height: 1;
  letter-spacing: -4px;
}
.not-found h2 { font-size: var(--font-xx-large); margin: var(--sp-30) 0 var(--sp-20); }
.not-found p { color: var(--color-accent-4); margin-bottom: var(--sp-50); }
.btn {
  display: inline-block;
  background: var(--color-contrast);
  color: var(--color-base);
  text-decoration: none;
  padding: 1rem 2.25rem;
  border-radius: 9999px;
  font-size: var(--font-medium);
}
.btn:hover { opacity: 0.85; text-decoration: none; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-accent-5);
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  padding: var(--sp-60) var(--gutter);
}

.footer-inner { max-width: var(--wide-width); margin: 0 auto; }

.footer-subscribe { margin-bottom: var(--sp-50); }

.footer-subscribe-text {
  font-size: var(--font-x-large);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: var(--sp-30);
}

.footer-subscribe-btn {
  display: inline-block;
  background: var(--color-contrast);
  color: var(--color-base);
  text-decoration: none;
  padding: 1rem 2.25rem;
  border-radius: 9999px;
  font-size: var(--font-medium);
  font-family: inherit;
}
.footer-subscribe-btn:hover { opacity: 0.85; text-decoration: none; color: var(--color-base); }

.footer-divider {
  border: none;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  margin: var(--sp-50) 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-40);
  flex-wrap: wrap;
  font-size: var(--font-small);
}

.footer-bottom a { color: inherit; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .home-row-editorial {
    grid-template-columns: 1fr 1fr;
  }
  .home-col-center { grid-column: 1 / -1; order: -1; }
  .archive-grid { grid-template-columns: 1fr 1fr; }
  .home-row-3col { grid-template-columns: 1fr 1fr; }
  .site-nav ul { gap: var(--sp-30); }
}

@media (max-width: 640px) {
  .home-row-editorial,
  .home-row-2col,
  .home-row-3col,
  .archive-grid { grid-template-columns: 1fr; }

  .site-title a { font-size: clamp(28px, 8vw, 60px); }
  .header-inner { gap: 12px; }
  .site-nav ul { gap: var(--sp-20); }
  .site-nav a { font-size: var(--font-small); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
