/* ── Variables ── */
:root {
  --bg: #f5f5f0;
  --surface: #ffffff;
  --border: #e0e0d8;
  --text: #1a1a1a;
  --text-muted: #666660;
  --accent: #1a4a6b;
  --accent-light: #e8f0f7;
  --tag-bg: #eef3f7;
  --tag-text: #1a4a6b;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 6px;
  --max-w: 860px;
}

[data-theme="dark"] {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2d3a;
  --text: #e8e8e0;
  --text-muted: #888890;
  --accent: #4a9fd4;
  --accent-light: #1a2535;
  --tag-bg: #1e2a38;
  --tag-text: #4a9fd4;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.2s, color 0.2s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

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

/* ── Header ── */
header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
nav { display: flex; align-items: center; gap: 1.5rem; }
nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s;
}
nav a:hover, nav a.active { color: var(--accent); text-decoration: none; }

/* ── Lang + Theme toggle ── */
.controls { display: flex; align-items: center; gap: 0.75rem; }
.lang-toggle, .theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  font-family: var(--font);
}
.lang-toggle:hover, .theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Hero ── */
.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.hero-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  max-width: 640px;
  margin-bottom: 1.25rem;
}
.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2rem;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn-outline {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  margin-left: 0.75rem;
}
.btn-outline:hover { background: var(--accent-light); }

/* ── Section ── */
.section { padding: 3rem 0; }
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── News cards ── */
.news-grid { display: grid; gap: 1.5rem; }
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.15s;
  cursor: pointer;
}
.news-card:hover { border-color: var(--accent); }
.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.news-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.tag {
  font-size: 0.72rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.news-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.news-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Themes pillars ── */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.pillar-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.pillar h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.pillar p { font-size: 0.88rem; color: var(--text-muted); }

/* ── Article page ── */
.article-header { padding: 3rem 0 2rem; border-bottom: 1px solid var(--border); }
.article-header h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.25; margin-bottom: 1rem; }
.article-body { padding: 2.5rem 0; max-width: 680px; }
.article-body p { margin-bottom: 1.25rem; font-size: 1rem; line-height: 1.75; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.back-link:hover { color: var(--accent); text-decoration: none; }

/* ── About page ── */
.about-content { max-width: 680px; padding: 3rem 0; }
.about-content h2 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.about-content p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.75; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}
.modal h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; line-height: 1.3; }
.modal p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 1rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  nav { display: none; }
  .pillars { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
