/* ========== Tokens ========== */
:root {
  --bg: #F9F6F0;
  --bg-tint: #F1EBE1;
  --surface: #FFFCF7;
  --text: #2C2622;
  --text-muted: #6B6158;
  --accent: #E8A87C;
  --accent-hover: #D99566;
  --teal: #41B3A3;
  --teal-hover: #35998B;
  --border: rgba(44, 38, 34, 0.12);
  --shadow: 0 12px 40px rgba(44, 38, 34, 0.08);
  --radius: 14px;
  --font-sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --container: min(1120px, calc(100% - 2rem));
  --header-h: 4rem;
  --focus: 0 0 0 3px rgba(65, 179, 163, 0.45);
}

/* ========== Base ========== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(232, 168, 124, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(65, 179, 163, 0.14), transparent 50%),
    var(--bg);
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

a {
  color: var(--teal);
  text-underline-offset: 0.18em;
}

a:hover { color: var(--teal-hover); }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.65rem 1rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
  color: var(--bg);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* ========== Header / burger ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 246, 240, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
}

.burger {
  display: grid;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  place-content: center;
  cursor: pointer;
  border-radius: 8px;
}

.burger-line {
  display: block;
  width: 1.35rem;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  display: none;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.nav-list a {
  display: block;
  padding: 0.7rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 500;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  background: rgba(65, 179, 163, 0.12);
  color: var(--teal-hover);
}

.nav-toggle:checked ~ .site-nav { display: block; }

.nav-toggle:checked + .burger .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle:checked + .burger .burger-line:nth-child(2) { opacity: 0; }
.nav-toggle:checked + .burger .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(44, 38, 34, 0.2) 0%, rgba(44, 38, 34, 0.78) 100%),
    radial-gradient(ellipse 90% 70% at 70% 20%, rgba(232, 168, 124, 0.55), transparent 55%),
    radial-gradient(ellipse 70% 60% at 15% 80%, rgba(65, 179, 163, 0.45), transparent 50%),
    linear-gradient(145deg, #5a4638 0%, #2c2622 45%, #1a1714 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 3rem;
  max-width: 38rem;
  animation: rise 0.7s ease both;
}

.brand-wordmark {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4.5vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  max-width: 22ch;
}

.hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 36ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Sections / cards ========== */
.section { padding: 3.5rem 0; }

.section-tint { background: rgba(65, 179, 163, 0.08); }

.section-header {
  margin-bottom: 2rem;
  max-width: 36rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

.article-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.article-card {
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(44, 38, 34, 0.12);
}

.article-card-link {
  display: grid;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.article-card-media {
  aspect-ratio: 16 / 10;
  background-color: #e8dfd4;
  background-image:
    linear-gradient(180deg, transparent 40%, rgba(44, 38, 34, 0.12)),
    var(--img, linear-gradient(145deg, #e8dfd4 0%, #d4c4b0 45%, #c4b09a 100%));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.article-card-body { padding: 1.15rem 1.2rem 1.35rem; }

.meta {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-card h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
}

.article-card p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.topic-list a {
  display: inline-flex;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.topic-list a:hover {
  border-color: var(--teal);
  color: var(--teal-hover);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner { text-align: center; }

.footer-brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.footer-inner p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== Article page ========== */
.post-hero {
  position: relative;
  min-height: min(62vh, 520px);
  display: grid;
  align-items: end;
  color: #fff;
}

.post-hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(44, 38, 34, 0.25), rgba(44, 38, 34, 0.8)),
    radial-gradient(ellipse 80% 60% at 60% 30%, rgba(232, 168, 124, 0.4), transparent 55%),
    linear-gradient(160deg, #4a3b30 0%, #2c2622 50%, #1a1714 100%);
}

.post-hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 0 2.5rem;
  max-width: 42rem;
  animation: rise 0.65s ease both;
}

.post-hero .meta,
.post-hero .meta a { color: rgba(255, 255, 255, 0.85); }

.post-hero h1 {
  margin: 0.5rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.15;
}

.post-lead {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 40ch;
}

.post-layout {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.post-content {
  max-width: 65ch;
  font-size: 1.0625rem;
}

.post-content > * + * { margin-top: 1.15rem; }

.post-content h2,
.post-content h3 {
  margin-top: 2rem;
  font-family: var(--font-display);
  line-height: 1.25;
}

.post-content h2 { font-size: 1.55rem; }
.post-content h3 { font-size: 1.25rem; }

.post-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: rgba(232, 168, 124, 0.12);
  border-radius: 0 12px 12px 0;
}

.post-content blockquote p { margin: 0; }

.post-content ol,
.post-content ul { padding-left: 1.2rem; }

.post-content img {
  border-radius: var(--radius);
  margin: 1.25rem 0;
}

.post-figure { margin: 1.75rem 0; }

.post-figure-media {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 70% 60% at 40% 40%, rgba(65, 179, 163, 0.35), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(232, 168, 124, 0.4), transparent 55%),
    linear-gradient(135deg, #6b5344 0%, #3a322c 55%, #2c2622 100%);
}

.post-figure figcaption {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.text-link {
  font-weight: 600;
  text-decoration: none;
}

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

.post-aside {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-self: start;
}

.aside-label {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.aside-name {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.post-aside p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== Breakpoints ========== */
@media (min-width: 640px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .burger { display: none; }

  .site-nav {
    position: static;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .nav-list a { padding: 0.45rem 0.75rem; }

  .article-grid { grid-template-columns: repeat(3, 1fr); }

  .post-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 3rem;
    align-items: start;
  }

  .hero-content { padding-bottom: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

