:root {
  --bg: #080b10;
  --panel: #10151d;
  --panel-2: #151c26;

  --text: #edf2f7;
  --muted: #9aa7b6;

  --accent: #ff8a3d;
  --accent-light: #ffb26b;

  --line: #25303d;

  --green: #69d69a;

  --light-bg: #f7f8fa;
  --light-panel: #ffffff;
  --light-text: #18202a;
  --light-muted: #687583;

  --max-width: 1180px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--light-bg);
  color: var(--light-text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  font-size: 16px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.container {
  width: min(
    var(--max-width),
    calc(100% - 40px)
  );

  margin-left: auto;
  margin-right: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(8, 11, 16, 0.92);

  backdrop-filter: blur(16px);

  border-bottom: 1px solid #1e2732;

  color: var(--text);
}

.nav {
  min-height: 72px;

  display: flex;

  align-items: center;
  justify-content: space-between;
}


/* Brand */

.brand {
  display: flex;

  align-items: center;

  gap: 10px;

  font-size: 15px;
  font-weight: 800;

  letter-spacing: 0.05em;
}

.brand-mark {
  font-size: 26px;

  line-height: 1;
}

.brand b {
  color: var(--accent);
}


/* Navigation */

.nav-links {
  display: flex;

  align-items: center;

  gap: 28px;

  color: #c9d1db;

  font-size: 14px;
  font-weight: 600;
}

.nav-links a {
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-links a:hover {
  color: white;

  transform: translateY(-1px);
}


/* Mobile menu button */

.menu-btn {
  display: none;

  border: 0;

  background: transparent;

  color: white;

  font-size: 24px;

  cursor: pointer;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 78% 30%,
      #25303d 0,
      #111820 30%,
      #080b10 66%
    );

  color: var(--text);

  padding: 96px 0 88px;
}

.hero-grid {
  display: grid;

  grid-template-columns:
    1.05fr
    0.95fr;

  gap: 60px;

  align-items: center;
}


/* Eyebrow */

.eyebrow {
  display: inline-block;

  color: var(--accent);

  font-size: 12px;

  font-weight: 800;

  letter-spacing: 0.18em;

  line-height: 1.4;
}


/* Hero heading */

.hero h1 {
  margin: 15px 0 24px;

  font-size:
    clamp(
      48px,
      6vw,
      78px
    );

  line-height: 1.02;

  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--accent);
}


/* Hero paragraph */

.hero-copy {
  max-width: 650px;

  margin: 0;

  color: #b9c4cf;

  font-size: 19px;

  line-height: 1.7;
}


/* Hero buttons */

.actions {
  display: flex;

  gap: 12px;

  margin-top: 30px;
  margin-bottom: 38px;
}

.btn {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 46px;

  padding:
    12px
    18px;

  border-radius: 10px;

  border: 1px solid var(--line);

  font-weight: 750;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--accent);

  color: #16100b;

  border-color: var(--accent);

  box-shadow:
    0 8px 25px
    rgba(255, 138, 61, 0.2);
}

.btn.primary:hover {
  box-shadow:
    0 12px 30px
    rgba(255, 138, 61, 0.3);
}

.btn.secondary {
  background: #121923;

  color: white;
}

.btn.secondary:hover {
  background: #192330;
}


/* Hero statistics */

.stats {
  display: flex;

  gap: 30px;
}

.stats div {
  display: flex;

  flex-direction: column;
}

.stats strong {
  color: white;

  font-size: 25px;

  line-height: 1.2;
}

.stats span {
  color: #82909e;

  font-size: 12px;
}


/* =========================================================
   TERMINAL / CODE CARD
   ========================================================= */

.hero-card {
  overflow: hidden;

  background: #0d1219;

  border:
    1px solid
    #2a3542;

  border-radius: 16px;

  box-shadow:
    0 30px 80px
    rgba(0, 0, 0, 0.55);

  transform: rotate(1deg);

  transition:
    transform 0.25s ease;
}

.hero-card:hover {
  transform:
    rotate(0deg)
    translateY(-3px);
}

.terminal-bar {
  height: 42px;

  display: flex;

  align-items: center;

  gap: 7px;

  padding:
    0 14px;

  border-bottom:
    1px solid
    #202a36;

  color: #74808d;

  font-size: 12px;
}

.terminal-bar i {
  display: block;

  width: 9px;
  height: 9px;

  border-radius: 50%;

  background: #3a4653;
}

.terminal-bar span {
  margin-left: 8px;
}

.hero-card pre {
  margin: 0;

  padding: 25px;

  overflow-x: auto;

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;

  font-size: 14px;

  line-height: 1.8;
}

.kw {
  color: #c792ea;
}

.type {
  color: #82aaff;
}

.fn {
  color: #89ddff;
}

.num {
  color: #f78c6c;
}

.str {
  color: #c3e88d;
}

.terminal-status {
  padding:
    10px
    15px;

  border-top:
    1px solid
    #202a36;

  color: #84909d;

  font-size: 11px;
}

.terminal-status span {
  margin-right: 6px;

  color: var(--green);
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  padding:
    88px
    0;
}

.dark-section {
  background: var(--bg);

  color: var(--text);
}

.challenge-section {
  background: #eef1f5;
}


/* Section headings */

.section-heading {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 50px;

  margin-bottom: 35px;
}

.section-heading h2 {
  margin:
    7px
    0
    0;

  font-size:
    clamp(
      30px,
      4vw,
      46px
    );

  line-height: 1.1;

  letter-spacing: -0.035em;
}

.section-heading p {
  max-width: 490px;

  margin: 0;

  color: var(--light-muted);
}

.dark-section .section-heading p {
  color: #9ba8b6;
}


/* =========================================================
   FEATURE CARDS
   ========================================================= */

.card-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 18px;
}

.feature-card,
.project-card {
  padding: 28px;

  background: white;

  border:
    1px solid
    #dfe4e9;

  border-radius: 16px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.feature-card:hover,
.project-card:hover {
  transform: translateY(-4px);

  border-color: #d3dbe3;

  box-shadow:
    0 18px 35px
    rgba(23, 33, 42, 0.07);
}


/* Number icon */

.icon {
  display: inline-grid;

  place-items: center;

  width: 40px;
  height: 40px;

  border-radius: 10px;

  background: #fff0e7;

  color: #d96118;

  font-weight: 800;
}

.feature-card h3,
.project-card h3 {
  margin:
    18px
    0
    7px;

  font-size: 22px;

  line-height: 1.25;
}

.feature-card p,
.project-card p {
  color: #667381;
}

.link {
  color: #c95815;

  font-size: 14px;

  font-weight: 750;
}

.link:hover {
  text-decoration: underline;
}


/* =========================================================
   ONECOMPILER
   ========================================================= */

.compiler-wrap {
  overflow: hidden;

  background: #0d1219;

  border:
    1px solid
    #27323f;

  border-radius: 16px;
}

.compiler-note {
  padding:
    11px
    15px;

  background: #121923;

  border-bottom:
    1px solid
    #27323f;

  color: #aab6c3;

  font-size: 13px;
}

.compiler-note span {
  display: inline-block;

  margin-right: 8px;

  padding:
    2px
    7px;

  background: var(--accent);

  border-radius: 5px;

  color: #111;

  font-size: 10px;

  font-weight: 900;
}

.compiler-wrap iframe {
  display: block;

  width: 100%;

  height: 650px;

  border: 0;
}


/* =========================================================
   FTC LESSON GRID
   ========================================================= */

.lesson-grid {
  display: grid;

  grid-template-columns:
    repeat(5, 1fr);

  gap: 14px;
}

.lesson-grid article {
  padding: 20px;

  background: white;

  border:
    1px solid
    #e0e5ea;

  border-radius: 14px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.lesson-grid article:hover {
  transform: translateY(-3px);

  box-shadow:
    0 12px 25px
    rgba(23, 33, 42, 0.06);
}

.lesson-grid span {
  color: #d96118;

  font-size: 12px;

  font-weight: 900;
}

.lesson-grid h3 {
  margin:
    9px
    0
    5px;

  font-size: 18px;
}

.lesson-grid p {
  margin: 0;

  color: #6c7885;

  font-size: 14px;
}


/* =========================================================
   CHALLENGE FILTERS
   ========================================================= */

.challenge-filters {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin-bottom: 20px;
}

.filter {
  padding:
    8px
    13px;

  background: white;

  border:
    1px solid
    #d3dae1;

  border-radius: 999px;

  color: #596572;

  cursor: pointer;

  font-weight: 700;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.filter:hover,
.filter.active {
  background: #17212b;

  border-color: #17212b;

  color: white;
}


/* =========================================================
   CHALLENGE CARDS
   ========================================================= */

.challenge-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 14px;
}

.challenge-card {
  display: flex;

  flex-direction: column;

  min-height: 210px;

  padding: 20px;

  background: white;

  border:
    1px solid
    #dce2e8;

  border-radius: 15px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.challenge-card:hover {
  transform: translateY(-3px);

  box-shadow:
    0 15px 30px
    rgba(23, 33, 42, 0.07);
}

.challenge-top {
  display: flex;

  align-items: center;
  justify-content: space-between;
}

.challenge-num {
  color: #c95815;

  font-size: 12px;

  font-weight: 900;
}

.difficulty {
  color: #65717e;

  font-size: 11px;
}

.challenge-card h3 {
  margin:
    12px
    0
    6px;

  font-size: 20px;

  line-height: 1.3;
}

.challenge-card p {
  margin:
    0
    0
    16px;

  color: #687583;

  font-size: 14px;
}

.challenge-card .link {
  margin-top: auto;
}


/* =========================================================
   PROJECTS
   ========================================================= */

.project-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 18px;
}

.project-tag {
  color: #c95815;

  font-size: 10px;

  font-weight: 900;

  letter-spacing: 0.12em;
}

.text-btn {
  padding: 0;

  border: 0;

  background: none;

  color: #c95815;

  cursor: pointer;

  font-weight: 750;

  font-size: 14px;
}

.text-btn:hover {
  text-decoration: underline;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
  padding:
    55px
    0
    25px;

  background: #080b10;

  color: #a6b1bc;
}

.footer-grid {
  display: grid;

  grid-template-columns:
    2fr
    1fr
    1fr;

  gap: 40px;
}

.footer-grid strong {
  display: block;

  margin-bottom: 10px;

  color: white;
}

.footer-grid a:not(.brand) {
  display: block;

  margin: 5px 0;

  color: #9ca8b5;

  font-size: 14px;
}

.footer-grid a:not(.brand):hover {
  color: white;
}

.footer-grid p {
  font-size: 14px;
}

.copyright {
  margin-top: 35px;

  padding-top: 18px;

  border-top:
    1px solid
    #202832;

  color: #697684;

  font-size: 12px;
}


/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

@media (max-width: 850px) {

  .nav-links {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .nav-links.open {
    position: absolute;

    top: 72px;

    left: 0;
    right: 0;

    display: flex;

    flex-direction: column;

    gap: 0;

    padding:
      10px
      30px
      20px;

    background: #080b10;

    border-bottom:
      1px solid
      #1e2732;
  }

  .nav-links.open a {
    padding:
      12px
      0;
  }


  .hero {
    padding:
      65px
      0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    transform: none;
  }


  .card-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .lesson-grid {
    grid-template-columns:
      repeat(2, 1fr);
  }

  .challenge-grid {
    grid-template-columns:
      repeat(2, 1fr);
  }


  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 18px;
  }


  .footer-grid {
    grid-template-columns:
      1fr
      1fr;
  }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 560px) {

  .container {
    width:
      min(
        var(--max-width),
        calc(100% - 28px)
      );
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-copy {
    font-size: 17px;
  }


  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }


  .stats {
    gap: 15px;
  }


  .lesson-grid,
  .challenge-grid {
    grid-template-columns: 1fr;
  }


  .compiler-wrap iframe {
    height: 620px;
  }


  .section {
    padding:
      65px
      0;
  }


  .footer-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

:focus-visible {
  outline:
    3px solid
    rgba(255, 138, 61, 0.5);

  outline-offset: 3px;
}


/* Reduce animation for users who request it */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

}