/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #273548;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --border: #334155;
  --green: #4ade80;
  --amber: #fbbf24;
  --purple: #a78bfa;
  --red: #f87171;
  --radius: 8px;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-dim);
}

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

/* ===== Navigation ===== */
.navbar {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}
.nav-links a {
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-card);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  border: none;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--accent);
  color: #0f172a;
}
.btn-primary:hover {
  background: var(--accent-dim);
  color: #0f172a;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* ===== Competition Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: background 0.2s, transform 0.15s;
}
.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-format { background: rgba(56, 189, 248, 0.15); color: var(--accent); }
.tag-level  { background: rgba(167, 139, 250, 0.15); color: var(--purple); }
.tag-prize  { background: rgba(251, 191, 36, 0.15); color: var(--amber); }

/* ===== Platforms Table ===== */
.platforms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.platforms-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.platforms-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.platforms-table tbody tr:hover {
  background: var(--bg-card);
}
.platform-link {
  font-weight: 600;
}
.frequency {
  color: var(--amber);
  font-size: 0.85rem;
}

/* ===== Features ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature {
  padding: 1.5rem;
  text-align: center;
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.feature p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Timeline (Schedule) ===== */
.timeline {
  list-style: none;
}
.timeline li {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2rem;
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 2.5rem;
  top: 3rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline li:last-child::before {
  display: none;
}

.timeline-date {
  min-width: 80px;
  height: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1.2;
  flex-shrink: 0;
}
.timeline-date .month {
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
}
.timeline-date .day {
  font-size: 1.6rem;
}

.timeline-body h3 {
  margin-bottom: 0.25rem;
}
.timeline-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Resources Grid ===== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.resource-card h3 {
  margin-bottom: 0.5rem;
}
.resource-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.resource-card ul {
  list-style: none;
  font-size: 0.9rem;
}
.resource-card ul li {
  padding: 0.3rem 0;
}
.resource-card ul li::before {
  content: "→ ";
  color: var(--accent);
}

/* ===== About ===== */
.about-content {
  max-width: 750px;
  margin: 0 auto;
}
.about-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
}
.about-content h2:first-child {
  margin-top: 0;
}
.about-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.about-content ul {
  color: var(--text-muted);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.about-content ul li {
  margin-bottom: 0.4rem;
}

/* ===== Footer ===== */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.footer-links a {
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--text);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem;
  }
  .nav-links.open {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    padding: 3rem 1rem 2.5rem;
  }

  section {
    padding: 2.5rem 0;
  }

  .cards,
  .features,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .timeline li {
    gap: 1rem;
  }
  .timeline-date {
    min-width: 64px;
    height: 64px;
  }
  .timeline-date .day {
    font-size: 1.3rem;
  }

  .footer .container {
    flex-direction: column;
  }
}
