@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --navy: #14233b;
  --blue: #2c6ee8;
  --paper: #f6f5f1;
  --white: #ffffff;
  --ink: #172130;
  --muted: #667387;
  --line: #dce1e6;
  --yellow: #e9bd4f;
  --hover-bg: #f0f5fe;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid #2b405e;
  background: var(--navy);
}

.nav-wrap {
  display: flex;
  max-width: 1240px;
  min-height: 76px;
  margin: auto;
  padding: 0 38px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: white;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 7px;
  background: var(--yellow);
  color: var(--navy);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 2px;
  color: #aebdd1;
  font-size: 10px;
}

.main-nav {
  display: flex;
  height: 76px;
  align-items: center;
}

.main-nav a {
  display: flex;
  height: 100%;
  padding: 0 17px;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: #c9d3e1;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s ease;
}

.main-nav a:hover {
  border-bottom-color: var(--yellow);
  color: white;
}

.intro {
  max-width: 1240px;
  margin: auto;
  padding: 84px 38px 70px;
}

.label {
  margin: 0 0 11px;
  color: var(--blue);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 1.4px;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 61px);
  letter-spacing: -2.6px;
  line-height: 1.12;
}

.intro-text {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.topic-section {
  max-width: 1240px;
  margin: 0 auto 36px;
  padding: 38px;
  scroll-margin-top: 95px;
  border: 1px solid var(--line);
  background: var(--white);
}

.section-title {
  display: flex;
  gap: 17px;
  align-items: center;
  margin-bottom: 32px;
}

.section-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: var(--navy);
  color: white;
  font-family: "DM Mono", monospace;
  font-size: 13px;
}

.section-title .label {
  margin-bottom: 5px;
}

h2 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -1px;
}

.topic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  border-top: 1px solid var(--line);
}

.subtopic-area {
  padding: 30px 42px 12px 0;
  border-right: 1px solid var(--line);
}

.reference-area {
  padding: 30px 0 12px 32px;
}

h3 {
  margin: 0 0 18px;
  font-size: 14px;
}

.subtopic-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subtopic-list li {
  margin: 0;
  padding: 0;
}

.topic-card {
  position: relative;
  display: block;
  padding: 12px 16px 14px 28px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.topic-card::before {
  position: absolute;
  top: 18px;
  left: 12px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--blue);
  content: "";
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.topic-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--ink);
  transition: color 0.2s ease;
}

.topic-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

/* Card Hover Logic */
.topic-card:hover {
  background: var(--hover-bg);
  border-color: #d0e0fd;
  transform: translateX(6px);
}

.topic-card:hover::before {
  background-color: var(--blue);
  transform: scale(1.15);
}

.topic-card:hover strong {
  color: var(--blue);
}

.reference-link {
  display: flex;
  margin-bottom: 8px;
  padding: 12px 0;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e4e8ed;
  color: #274d89;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s ease;
}

.reference-link span {
  color: var(--blue);
  font-size: 16px;
}

.reference-link:hover {
  padding-left: 8px;
  color: var(--blue);
}

footer {
  margin-top: 65px;
  padding: 28px;
  background: var(--navy);
  color: #aab9cc;
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 12px;
}

@media (max-width: 760px) {
  .nav-wrap {
    min-height: auto;
    padding: 14px 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .main-nav {
    width: 100%;
    height: auto;
    justify-content: space-between;
  }

  .main-nav a {
    height: auto;
    padding: 8px 3px;
    font-size: 11px;
  }

  .intro {
    padding: 55px 22px 45px;
  }

  .topic-section {
    margin-bottom: 18px;
    padding: 25px 22px;
  }

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

  .subtopic-area {
    padding: 24px 0 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reference-area {
    padding: 25px 0 8px;
  }

  h2 {
    font-size: 25px;
  }
}