﻿:root {
  --bg: #f5efe6;
  --ink: #161513;
  --muted: #6b6257;
  --accent: #d24c2f;
  --accent-dark: #9c2f1a;
  --card: #fffaf3;
  --border: #e2d8cc;
  --shadow: 0 16px 40px rgba(22, 21, 19, 0.12);
  --radius: 18px;
  --max-width: 1120px;
  --font-display: "Palatino Linotype", "Book Antiqua", "Georgia", serif;
  --font-body: "Trebuchet MS", "Verdana", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(210, 76, 47, 0.08), transparent 45%),
    radial-gradient(circle at 90% 0%, rgba(22, 21, 19, 0.12), transparent 40%),
    linear-gradient(140deg, #f7f0e6 0%, #efe6d9 55%, #e9dfd1 100%);
  font-family: var(--font-body);
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(245, 239, 230, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(22, 21, 19, 0.08);
}

.brand {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.site-nav a.active {
  border-color: var(--accent);
  background: rgba(210, 76, 47, 0.12);
}

.site-nav a:hover {
  border-color: var(--accent);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.toggle {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.toggle.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.route-tabs,
.lang-tabs {
  display: flex;
  gap: 8px;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 32px 90px;
}

.hero {
  padding: 44px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(210, 76, 47, 0.18);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 44px;
  margin: 0 0 12px;
}

.hero-actions {
  margin-top: 24px;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 18px rgba(210, 76, 47, 0.28);
}

.button:hover {
  background: var(--accent-dark);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.card {
  background: var(--card);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.lead {
  color: var(--muted);
  margin-bottom: 28px;
}

.module-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.module-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(22, 21, 19, 0.16);
}

.module-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
}

.module-meta {
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--muted);
}

.concept-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.module-section h2 {
  font-family: var(--font-display);
  margin-bottom: 16px;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.concept-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
}

.concept-meta {
  margin-top: 10px;
  color: var(--muted);
}

.term-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.term {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(210, 76, 47, 0.12);
  color: var(--accent-dark);
  font-size: 12px;
}

.practice-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.practice-section h2 {
  font-family: var(--font-display);
  margin-bottom: 12px;
}

.practice-block {
  margin: 16px 0 24px;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.exercise-card,
.project-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px;
  box-shadow: var(--shadow);
}

.project-card ul {
  padding-left: 18px;
  margin: 8px 0 0;
  color: var(--muted);
}

.module-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

a.module-card {
  text-decoration: none;
  color: inherit;
}

.exercise-details {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.75);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.exercise-details summary {
  cursor: pointer;
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.exercise-details pre {
  background: #f7f3ee;
  padding: 8px;
  border-radius: 10px;
  overflow-x: auto;
}

.quiz-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-question {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px;
  box-shadow: var(--shadow);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.quiz-option {
  display: flex;
  gap: 10px;
  align-items: center;
}

.quiz-actions {
  margin-top: 16px;
}

.module-actions {
  margin: 12px 0 20px;
}

.badge {
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(210, 76, 47, 0.12);
  color: var(--accent-dark);
  font-weight: 600;
  display: inline-block;
}

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

.hero,
.card,
.module-card {
  animation: fadeUp 0.5s ease both;
}

@media (max-width: 760px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero {
    padding: 28px;
  }
}
