:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --text: #1c2430;
  --text-muted: #5b6472;
  --border: #e6e9ef;
  --accent: #2563eb;
  --accent-2: #16b8a6;
  --accent-soft: #eaf1ff;
  --shadow: 0 10px 30px rgba(24, 39, 75, 0.08);
  --shadow-hover: 0 16px 40px rgba(24, 39, 75, 0.14);
  --radius: 16px;
  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151f;
    --bg-alt: #161d29;
    --text: #eef1f6;
    --text-muted: #a3adba;
    --border: #262f3d;
    --accent: #5b8def;
    --accent-2: #35d6c1;
    --accent-soft: #1b2536;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(16, 21, 31, 0.75);
  }
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(24, 39, 75, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hero */
.hero {
  padding: 96px 0 80px;
  background: radial-gradient(circle at 85% 10%, var(--accent-soft), transparent 55%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.eyebrow, .section-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-block {
  width: 100%;
}

.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.avatar-placeholder {
  width: min(320px, 80vw);
  filter: drop-shadow(var(--shadow-hover));
}

/* Sections */
.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.section-lead {
  color: var(--text-muted);
  max-width: 68ch;
  margin-bottom: 40px;
}

/* Info grid (about) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.info-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.info-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.info-card h3 {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.info-card p {
  font-size: 1.05rem;
  font-weight: 700;
}

/* Cards grid (achievements, students, materials) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.section-alt .card {
  background: var(--bg);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.card-icon {
  font-size: 1.9rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-link {
  cursor: pointer;
}

/* Contact */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-list {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-list a:hover {
  color: var(--accent);
}

.contact-form {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  font: inherit;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group.invalid input,
.form-group.invalid textarea {
  border-color: #e5484d;
}

.form-error {
  min-height: 16px;
  font-size: 0.8rem;
  color: #e5484d;
}

.form-success {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
  min-height: 20px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav.open {
    max-height: 320px;
  }

  .nav-link {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 64px 0 56px;
  }

  .section {
    padding: 64px 0;
  }
}
