:root {
  --bg: #0f1113;
  --panel: #171a1d;
  --border: #2a2f33;
  --text: #e6e0d4;
  --text-soft: #d8d2c7;
  --text-muted: #888;
  --caption: #a7a094;
  --meta: #8a8478;
  --accent: #c8a75a;
  --accent-hover: #e0c878;
  --active: #a88b52;
  --side-active-bg: #2a2f33;
  --button-bg: #2a2f33;
  --button-text: #e6e0d4;
}

body {
  margin: 0;
  font-family: Georgia, serif;
  background: var(--bg);
  color: var(--text);
}

/* =========================
   Header
   ========================= */

.site-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  min-height: 84px;
  padding: 0 16px;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.03),
    rgba(0,0,0,0.10)
  );
}

.header-left,
.header-right {
  width: 160px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.header-left { justify-content: flex-start; }
.header-right { justify-content: flex-end; }

.header-inner {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* =========================
   Navigation
   ========================= */

.back-home img {
  display: block;
  height: 60px;
  width: auto;
  opacity: 0.85;
}

.back-home img:hover {
  opacity: 1;
  transform: translateX(-2px);
}

.back-home {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.back-home,
.back-home:hover,
.back-home:focus,
.back-home:active,
.back-home:visited {
  text-decoration: none;
  border: none;
  box-shadow: none;
  outline: none;
  background: transparent;
}

.tagline {
  margin: 0;
  font-size: 0.9em;
  color: var(--text-muted);
}

.lang-switch button {
  margin-left: 5px;
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 5px 10px;
  cursor: pointer;
}

.lang-switch button.active {
  outline: 1px solid var(--accent);
  color: var(--accent);
}

.top-menu {
  display: flex;
  flex-wrap: wrap;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.top-menu div {
  padding: 10px 15px;
  cursor: pointer;
}

.top-menu div.active {
  color: var(--active);
}

.top-menu div:hover {
  color: var(--accent-hover);
}

/* =========================
   Layout
   ========================= */

.layout {
  display: flex;
}

aside {
  width: 220px;
  background: var(--panel);
  min-height: 100vh;
  border-right: 1px solid var(--border);
}

aside div {
  padding: 10px;
  cursor: pointer;
}

aside div.active {
  background: var(--side-active-bg);
}

aside div:hover {
  background: color-mix(in srgb, var(--side-active-bg) 70%, transparent);
}

main {
  flex: 1;
  padding: 20px;
}

/* =========================
   Content
   ========================= */

h1, h2 {
  margin: 0;
}

.content-area p,
.text-block {
  max-width: 900px;
  color: var(--text-soft);
  line-height: 1.6;
  white-space: pre-line;
}

.text-block {
  margin-bottom: 24px;
}

.meta-text {
  display: block;
  color: var(--meta);
  font-size: 0.8rem;
  margin-top: 4px;
}

/* =========================
   Images
   ========================= */

.image-gallery {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.image-gallery img {
  max-width: 300px;
  width: 100%;
  border: 1px solid var(--border);
}

.image-block {
  margin: 28px 0;
}

.image-block img {
  width: 100%;
  border: 1px solid var(--border);
}

.image-full { max-width: 900px; }
.image-medium { max-width: 600px; }
.image-small { max-width: 360px; }
.image-tiny { max-width: 200px; }

.image-block figcaption {
  margin-top: 8px;
  color: var(--caption);
  font-size: 0.95rem;
  font-style: italic;
}

/* =========================
   Placeholder
   ========================= */

.placeholder-box {
  max-width: 900px;
  padding: 14px 16px;
  margin-top: 24px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--text-muted);
  line-height: 1.6;
}

/* =========================
   Garden Theme
   ========================= */

body[data-theme="garden"] {
  --bg: #0e1410;
  --panel: #16201a;
  --border: #2d3a31;

  --text: #e4efe7;
  --text-soft: #d2e0d7;
  --text-muted: #8fa39a;

  --caption: #a9bdb3;
  --meta: #7f948b;

  --accent: #6fae7c;
  --accent-hover: #8fd39e;
  --active: #a7e0b5;

  --side-active-bg: #223229;

  --button-bg: #223229;
  --button-text: #e4efe7;

  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.02),
      rgba(0,0,0,0.08)
    ),
    var(--bg);
}

/* Header Garden */

.site-header.header-garden::before {
  background-image:
    radial-gradient(
      circle at center,
      rgba(120,180,140,0.18),
      transparent 60%
    ),
    linear-gradient(
      90deg,
      rgba(80,120,90,0.15),
      transparent 35%,
      transparent 65%,
      rgba(80,120,90,0.15)
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.015) 0 1px,
      transparent 1px 24px
    );

  opacity: 0.28;
}

/* =========================
   Facts box
   ========================= */

.facts-box {
  max-width: 600px;
  margin: 24px 0;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
}

.fact-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.fact-row:last-child {
  border-bottom: none;
}

.fact-label {
  width: 40%;
  padding: 8px 10px;
  color: var(--text-muted);
}

.fact-value {
  width: 60%;
  padding: 8px 10px;
  color: var(--text-soft);
}