@font-face {
  font-family: "SN Pro";
  src: url("../assets/fonts/SNPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "SN Pro";
  src: url("../assets/fonts/SNPro-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

body {
  font-family: "SN Pro", sans-serif;
}

:root {
  --science-blue: #43b2d8;
  --math-green: #93bd7c;
  --compsci-yellow: #f0d261;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 1.5em 1.5em 2em;
  font-family: "SN Pro", sans-serif;
  background: radial-gradient(circle at top, #fff8dc 0%, #fff3bf 42%, #ffe8a1 100%);
  color: #1f2328;
}

.roadmap-card {
  width: min(56.25em, 100%);
  margin: 0 auto;
  background: #fffef9;
  border: 0.0625em solid #e0cf8b;
  border-radius: 1em;
  padding: 1.5em;
  box-shadow: 0 1em 2.125em -1.5em rgba(0, 0, 0, 0.55);
}

h1 {
  margin: 0 0 1em;
  text-align: center;
}

.subtitle {
  margin: 0 0 1.125em;
  text-align: center;
}

.roadmap-sections {
  display: grid;
  gap: 0.9em;
}

.subject-dropdown {
  border: 0.0625em solid #d9d5ca;
  border-radius: 0.9em;
  background: #fffef9;
  overflow: hidden;
}

.subject-dropdown summary {
  list-style: none;
  cursor: pointer;
  padding: 0.8em 1em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subject-dropdown summary::after {
  content: "+";
  font-size: 1.25em;
}

.subject-dropdown[open] summary::after {
  content: "-";
}

.subject-dropdown.math summary {
  background: #e7f1e1;
}

.subject-dropdown.science summary {
  background: #dff2f8;
}

.subject-dropdown.compsci summary {
  background: #fbf2cd;
}

.path-wrap {
  position: relative;
  margin-top: 0;
  padding: 0.7em 0.9em 0.7em;
}

.path-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0.5em;
  border-radius: 62.44em;
  background: linear-gradient(180deg, #cfd4d8 0%, #cfd4d8 100%);
}

.path-row {
  position: relative;
  display: flex;
  margin: 0.75em 0;
}

.path-row.left {
  justify-content: flex-start;
}

.path-row.right {
  justify-content: flex-end;
}

.path-node {
  width: min(23.75em, calc(50% - 1.125em));
  background: #f7f8f9;
  border: 0.125em solid #d0d7de;
  border-radius: 0.875em;
  padding: 0.75em 0.875em;
  box-shadow: 0 0.625em 1.25em -1em rgba(0, 0, 0, 0.45);
}

.path-node.current {
  background: #f1f7f4;
}

.subject-dropdown.math .path-line {
  background: linear-gradient(180deg, var(--math-green) 0%, #c8dfb8 100%);
}

.subject-dropdown.science .path-line {
  background: linear-gradient(180deg, var(--science-blue) 0%, #9ad0e2 100%);
}

.subject-dropdown.compsci .path-line {
  background: linear-gradient(180deg, var(--compsci-yellow) 0%, #f5e4a5 100%);
}

.subject-dropdown.math .path-row:nth-child(3n + 1) .path-node {
  border-color: var(--math-green);
}

.subject-dropdown.math .path-row:nth-child(3n + 2) .path-node,
.subject-dropdown.math .path-row:nth-child(3n + 3) .path-node {
  border-color: #b6cda7;
}

.subject-dropdown.science .path-row:nth-child(3n + 1) .path-node {
  border-color: var(--science-blue);
}

.subject-dropdown.science .path-row:nth-child(3n + 2) .path-node,
.subject-dropdown.science .path-row:nth-child(3n + 3) .path-node {
  border-color: #96c4d3;
}

.subject-dropdown.compsci .path-row:nth-child(3n + 1) .path-node {
  border-color: var(--compsci-yellow);
}

.subject-dropdown.compsci .path-row:nth-child(3n + 2) .path-node,
.subject-dropdown.compsci .path-row:nth-child(3n + 3) .path-node {
  border-color: #e6cf78;
}

.empty-note {
  margin: 0.4em 0 0.2em;
  font-size: 0.95em;
}

.unit {
  display: inline-block;
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.path-node h3 {
  margin: 0.375em 0 0;
  font-size: 1.25em;
}

.back-link {
  display: inline-block;
  margin-top: 1.125em;
  text-decoration: none;
  color: #684f00;
  font-weight: 700;
}

.back-link:hover {
  text-decoration: underline;
}

@media (max-width: 47.5em) {
  .roadmap-card {
    padding: 1.125em;
  }

  .path-line {
    left: 1.25em;
    transform: none;
  }

  .path-row {
    justify-content: flex-start !important;
    padding-left: 2.125em;
  }

  .path-node {
    width: 100%;
  }
}
