@import url('https://fonts.googleapis.com/css2?family=Gruppo&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg:           #0f0f0f;
  --surface:      #191919;
  --border:       #2c2c2c;
  --text:         #ddd6c8;
  --text-muted:   #6e6456;
  --accent:       #f0b166;
  --accent-dim:   #a07040;
  --max:          700px;
  --radius:       6px;
  --font-display: 'Gruppo', system-ui, sans-serif;
  --font-body:    'Lora', Georgia, serif;
  --font-ui:      system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:         #faf8f3;
    --surface:    #f0ebe0;
    --border:     #d8cbb8;
    --text:       #1e1810;
    --text-muted: #80664a;
    --accent:     #b86820;
    --accent-dim: #8a4e18;
  }
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── Header / Nav ───────────────────────────────────────────── */
.site-header {
  background: #000;
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}
.site-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-title:hover { color: #fdd203; }

.lang-switch {
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
}
.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.15s;
}
.lang-switch a:hover,
.lang-switch a.active {
  color: var(--accent);
  border-color: var(--accent-dim);
}

/* ─── Hamburger ──────────────────────────────────────────────── */
.menu-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: all 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.menu-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}
.menu-panel.open { display: block; }
.menu-panel a {
  display: block;
  padding: 0.85rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}
.menu-panel a:last-child { border-bottom: none; }
.menu-panel a:hover { background: var(--surface); color: var(--accent); }

/* ─── Hero (post cover) ──────────────────────────────────────── */
.post-hero {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: top center;
}

/* ─── Main ───────────────────────────────────────────────────── */
main { flex: 1; padding: 2.5rem 0 4rem; }

/* ─── Post header ────────────────────────────────────────────── */
.post-header { margin-bottom: 2.5rem; }
.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.post-meta {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: center;
}
.post-meta a { color: var(--text-muted); text-decoration: none; }
.post-meta a:hover { color: var(--accent); }

/* ─── Post content ───────────────────────────────────────────── */
.post-body { max-width: 100%; }

.post-body h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: 0.01em;
}
.post-body p { margin-bottom: 1.25rem; }
.post-body em { font-style: italic; }
.post-body strong { font-weight: 600; color: var(--text); }

/* Dialogue blocks */
.dialogue {
  border-left: 3px solid var(--border);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.dialogue.human { border-color: var(--text-muted); }
.dialogue.cat   { border-color: var(--accent); }
.dialogue .speaker {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.dialogue.cat .speaker { color: var(--accent); }

/* ─── Post list (index) ──────────────────────────────────────── */
.post-list { list-style: none; display: flex; flex-direction: column; gap: 2rem; }
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.post-card:hover { border-color: var(--accent-dim); }
.post-card img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  display: block;
}
.post-card-body { padding: 1.25rem; }
.post-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent);
  text-decoration: none;
  display: block;
  margin-bottom: 0.4rem;
}
.post-card-title:hover { color: #fdd203; }
.post-card-meta {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.post-card-excerpt { font-size: 0.95rem; color: var(--text); }
.read-more {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 1px;
}
.read-more:hover { color: #fdd203; border-color: #fdd203; }

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 1.25rem; }

/* ─── Divider ────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  html { font-size: 16px; }
  .site-title { font-size: 1.1rem; }
}
