:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111f35;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(99, 102, 241, 0.15);
  --line: rgba(255, 255, 255, 0.1);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 36px;

  --container: 1200px;
}

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

@keyframes easterHue {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(360deg);
  }
}

@keyframes easterLogoSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  35% {
    transform: rotate(180deg) scale(1.15);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes easterGlitch {
  0% {
    transform: translate(0);
  }
  25% {
    transform: translate(-2px, 1px);
  }
  50% {
    transform: translate(2px, -1px);
  }
  75% {
    transform: translate(-1px, -1px);
  }
  100% {
    transform: translate(0);
  }
}

@keyframes easterBounce {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-12px) rotate(-4deg);
  }
  50% {
    transform: translateY(-4px) rotate(3deg);
  }
  75% {
    transform: translateY(-10px) rotate(-2deg);
  }
}

@keyframes easterRainbowText {
  0% {
    color: #f59e0b;
  }
  33% {
    color: #22d3ee;
  }
  66% {
    color: #f472b6;
  }
  100% {
    color: #a78bfa;
  }
}

@keyframes easterWobble {
  0% {
    transform: rotate(0deg) translateY(0);
  }
  20% {
    transform: rotate(-2deg) translateY(-4px);
  }
  40% {
    transform: rotate(2deg) translateY(2px);
  }
  60% {
    transform: rotate(-1.5deg) translateY(-3px);
  }
  80% {
    transform: rotate(1.5deg) translateY(1px);
  }
  100% {
    transform: rotate(0deg) translateY(0);
  }
}

@keyframes easterStarsDrift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-20px);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at top, #111827, #020617 70%);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}

body.easter-party {
  animation: easterHue 10s linear infinite;
}

body.easter-party .hero-character {
  filter: drop-shadow(0 0 30px rgba(56, 189, 248, 0.55));
}

body.easter-retro {
  image-rendering: pixelated;
}

body.easter-retro .course-card,
body.easter-retro .team-member,
body.easter-retro .stat {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.4);
}

body.easter-invert {
  filter: invert(1) hue-rotate(180deg);
}

body.easter-invert img {
  filter: invert(1) hue-rotate(180deg);
}

body.easter-stars::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1500;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(250, 204, 21, 0.85) 0 1.5px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.8) 0 1.4px, transparent 2px),
    radial-gradient(circle at 35% 55%, rgba(196, 181, 253, 0.9) 0 1.6px, transparent 2px),
    radial-gradient(circle at 60% 30%, rgba(244, 114, 182, 0.8) 0 1.4px, transparent 2px);
  background-size: 280px 280px;
  opacity: 0.55;
  animation: easterStarsDrift 2.8s ease-in-out infinite alternate;
}

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

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  transition: background 0.25s ease;
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
}

.brand-logo.easter-spin {
  animation: easterLogoSpin 0.55s linear 4;
}

.brand-text {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link {
  margin: 0 0.45rem;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  padding: 0.35rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-link:hover,
.dropdown-toggle:hover {
  color: var(--text);
}

.nav-link:hover::after,
.dropdown-toggle:hover::after {
  width: 100%;
}

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 250px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 12, 20, 0.98));
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.9rem;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  z-index: 1001;
}

.nav-dropdown.open .dropdown-menu {
  display: grid;
  gap: 0.8rem;
}

.dropdown-section {
  display: grid;
  gap: 0.35rem;
}

.dropdown-title {
  font-size: 0.82rem;
  color: #cbd5e1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dropdown-link {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
  font-size: 0.95rem;
}

.dropdown-link:hover {
  color: #c7d2fe;
}

.nav-right {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* LANGUAGE */
.language-selector {
  display: none;
}

body[data-page="index"] .language-selector,
body[data-page="learn"] .language-selector {
  display: flex;
  position: relative;
  align-items: center;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  min-width: 140px;
  z-index: 1003;
}

.lang-dropdown.show {
  display: flex;
}

.lang-dropdown a {
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-dropdown a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

/* BUTTONS */
.btn {
  padding: 0.68rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  background: rgba(255, 255, 255, 0.02);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  background: rgba(255, 255, 255, 0.02);
}

.btn-lg {
  padding: 0.78rem 1.6rem;
}

.hamburger {
  display: none;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  padding: 0.2rem;
}

/* HERO */
.hero {
  padding-top: 140px;
  min-height: 92vh;
  display: flex;
  align-items: center;
}

.hero-gradient {
  background: radial-gradient(900px 500px at 12% 10%, rgba(99, 102, 241, 0.12), transparent 60%);
}

.hero-inner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.2rem;
  align-items: center;
  text-align: center;
}

.hero-copy {
  max-width: 820px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.05;
  margin-bottom: 1.1rem;
  animation: fadeUp 0.9s ease forwards;
}

.hero-title.easter-glitch {
  text-shadow: -2px 0 #22d3ee, 2px 0 #f472b6;
  animation: easterGlitch 0.18s steps(2, end) 12;
}

.highlight{
  color: #93c5fd;
  background: linear-gradient(90deg, rgba(99,102,241,0.14), rgba(139,92,246,0.08));
  padding:0.05rem 0.18rem;
  border-radius:6px;
}

.hero-sub {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 2.2rem;
  animation: fadeUp 1s ease forwards;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}

.hero-supported {
  animation: fadeUp 1.1s ease forwards;
}

.supported-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.supported-label a {
  color: #c7d2fe;
}

.sponserd-img {
  width: 0;
  height: 0;
}

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

.hero-character {
  width: min(420px, 82vw);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
}

.hero-character.easter-bounce {
  animation: easterBounce 0.6s ease 3;
}

/* SECTIONS */
.section {
  padding: 5.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  text-align: center;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 0.8rem;
}

.section-sub,
.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.small {
  font-size: 0.9rem;
}

/* COURSES */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.course-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(8, 12, 20, 0.92));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

.course-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.14), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.course-card:hover {
  transform: translateY(-10px) scale(1.015);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.course-card:hover::after {
  opacity: 1;
}

.course-card.easter-wobble {
  animation: easterWobble 0.65s ease;
}

.course-media {
  padding: 1.25rem;
  min-height: 132px;
  display: grid;
  place-items: center;
}

.course-img {
  max-height: 95px;
  object-fit: contain;
}

.course-body {
  padding: 0.2rem 1.35rem 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: #c7d2fe;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.course-type {
  color: var(--muted);
  font-size: 0.86rem;
}

.course-title {
  font-size: 1.22rem;
}

.course-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.course-link,
.more-link {
  color: #a5b4fc;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.more-courses {
  text-align: center;
  margin-top: 2rem;
}

/* FEATURES + COMMUNITY */
.features-grid,
.community-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.features,
.community,
.team,
.stats,
.cta {
  position: relative;
}

.features-left h2,
.community-right h2,
.cta-copy h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin-bottom: 0.8rem;
}

.features-right,
.community-left,
.cta-visual {
  display: flex;
  justify-content: center;
}

.courses {
  position: relative;
}

.feature-img-large,
.student_with_itlearn,
.cta-img {
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.feature-img-large {
  max-width: 220px;
  margin-inline: auto;
}

.student_with_itlearn {
  max-width: 420px;
  width: 100%;
}

#discord-button {
  display: flex;
  justify-content: center;
  grid-column: 1 / -1;
  margin-top: 1.5rem;
}

/* TEAM */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.team-member {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(8, 12, 20, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}

.team-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
}

.stat {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.1;
}

.stat-num.easter-rainbow {
  animation: easterRainbowText 0.45s linear infinite;
}

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

/* CTA */
.cta-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.cta-copy .muted {
  margin-bottom: 1rem;
}

.cta-img {
  width: min(320px, 80vw);
  margin-inline: auto;
}

/* FOOTER */
.footer {
  margin-top: 6rem;
  padding: 3.2rem 0 1.2rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(8, 12, 20, 0.97));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  backdrop-filter: blur(10px);
}

.footer-grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.brand-footer {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.footer-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
}

.footer-name {
  font-weight: 700;
}

.footer-col h4 {
  color: #e2e8f0;
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
  letter-spacing: 0.03em;
}

.footer-list {
  list-style: none;
}

.footer-list li {
  margin: 0.38rem 0;
}

.footer-list a {
  text-decoration: none;
  color: var(--muted);
}

.footer-list a:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: var(--container);
  margin: 1.4rem auto 0;
  padding: 1rem 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p,
.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a:hover {
  color: var(--text);
}

.easter-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  max-width: 320px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  background: rgba(2, 6, 23, 0.9);
  color: #e2e8f0;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.easter-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* GLOBALS */
a {
  color: inherit;
}

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

a:focus,
button:focus {
  outline: 2px solid rgba(147, 197, 253, 0.2);
  outline-offset: 3px;
  border-radius: 8px;
}

/* RESPONSIVE */
@media (min-width: 900px) {
  .brand-text {
    display: inline;
  }

  .hero-inner,
  .features-grid,
  .community-grid,
  .cta-inner {
    grid-template-columns: 1.1fr 0.9fr;
    text-align: left;
  }

  .hero-copy {
    margin: 0;
  }

  .hero-sub {
    margin-left: 0;
  }

  .hero-ctas {
    justify-content: flex-start;
  }

  .feature-img-large,
  .cta-img {
    margin-inline: 0;
  }

  #discord-button {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-right .btn-secondary {
    display: none;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.97), rgba(8, 12, 20, 0.97));
    padding: 1rem 1.5rem 1.4rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link,
  .dropdown-toggle {
    margin: 0;
    padding: 0.75rem 0.2rem;
    justify-content: space-between;
  }

  .nav-link::after,
  .dropdown-toggle::after {
    bottom: 4px;
  }

  .dropdown-menu {
    position: static;
    min-width: 0;
    box-shadow: none;
    padding: 0.55rem 0.8rem;
    margin-top: 0.25rem;
    background: rgba(255, 255, 255, 0.02);
  }

  .hero {
    padding-top: 122px;
    min-height: auto;
  }

  .section {
    padding: 4.3rem 0;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 540px) {
  .container {
    padding: 0 1rem;
  }

  .nav-right .btn {
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
  }

  .btn-lg {
    width: 100%;
  }

  .hero-character {
    width: min(300px, 76vw);
  }

  .easter-toast {
    right: 0.7rem;
    left: 0.7rem;
    max-width: none;
  }
}

/* Role Filter Styles */
.role-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0 3rem;
  flex-wrap: wrap;
}

.role-filter-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

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

.role-filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Fade in animation */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-in 0.4s ease;
}

@media (max-width: 900px) {
  .role-filter {
    gap: 0.5rem;
  }

  .role-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}
