:root {
  --cornell-red: #b31b1b;
  --ink: #202124;
  --muted: #667085;
  --line: #e2e5e9;
  --surface: #ffffff;
  --page: #fbfbfa;
  --deadline: #9c6a1b;
  --holiday: #327451;
  --lecture: #687386;
  --focus: #1d4ed8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  padding-top: 58px;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: var(--cornell-red);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(179, 27, 27, 0.28);
}

a:hover,
a:focus {
  border-bottom-color: currentColor;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  transform: translateY(-150%);
  padding: 7px 9px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

.container {
  max-width: 1060px;
}

.navbar {
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
}

.nav-container {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.navbar .course-brand {
  height: auto;
  padding: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  border: 0;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border: 0;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--cornell-red);
}

.hero {
  display: flex;
  align-items: center;
  min-height: 240px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.98) 52%, rgba(255,255,255,0.76) 100%),
    url("../imgs/banner.png");
  background-position: center;
  background-size: cover;
}

.hero-content {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 54px;
  font-weight: 760;
  line-height: 1;
}

.course-code {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 19px;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.button-primary {
  border-color: var(--cornell-red);
  color: var(--cornell-red);
}

.button:hover,
.button:focus {
  border-color: var(--cornell-red);
  color: var(--cornell-red);
}

main.container {
  margin-top: 26px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.info-card {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.schedule-card {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

h2,
h3,
h4 {
  color: var(--ink);
}

h2 {
  margin: 0 0 15px;
  font-size: 23px;
  font-weight: 780;
}

h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.35;
}

.course-details {
  display: grid;
  gap: 8px;
  margin: 0;
}

.course-details div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}

.course-details dt {
  color: var(--muted);
  font-weight: 760;
}

.course-details dd {
  margin: 0;
}

ul {
  padding-left: 20px;
}

li + li {
  margin-top: 3px;
}

.textbook-list {
  margin: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.legend-item::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--lecture);
}

.legend-item.deadline::before {
  background: var(--deadline);
}

.legend-item.holiday::before {
  background: var(--holiday);
}

.legend-item.reading-required::before {
  content: "\25B6";
  width: 10px;
  height: auto;
  border: 0;
  background: transparent;
  color: var(--cornell-red);
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.legend-item.reading-optional::before {
  content: "\25B7";
  width: 10px;
  height: auto;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  transform: none;
  -webkit-text-stroke: 0.8px var(--ink);
  text-shadow: 0 0 0 var(--ink);
}

.legend-divider {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.week-box {
  position: sticky;
  top: 58px;
  z-index: 3;
  margin: 22px 0 0;
  padding: 9px 0;
  border-top: 2px solid var(--ink);
  background: rgba(251, 251, 250, 0.96);
}

.schedule-card {
  position: relative;
  margin: 0;
  padding: 14px 0 13px 18px;
}

.schedule-card::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--lecture);
}

.deadline-box::before {
  background: var(--deadline);
}

.deadline-box h4 {
  color: var(--deadline);
}

.holiday-box::before {
  background: var(--holiday);
}

.holiday-box h4 {
  color: var(--holiday);
}

.schedule-card ul {
  margin-bottom: 0;
}

.reading-list {
  margin-top: 4px;
  padding-left: 0;
  list-style: none;
}

.reading-list li {
  position: relative;
  padding-left: 17px;
}

.reading-list li::before {
  content: "\25B6";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 10px;
  height: auto;
  border: 0;
  color: var(--lecture);
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.reading-list .required-reading::before {
  content: "\25B6";
  color: var(--cornell-red);
}

.reading-list .optional-reading::before {
  content: "\25B7";
  color: var(--ink);
  font-weight: 900;
  -webkit-text-stroke: 0.8px var(--ink);
  text-shadow: 0 0 0 var(--ink);
}

.site-footer {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.site-footer .container {
  padding-top: 22px;
  padding-bottom: 22px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  body {
    padding-top: 92px;
  }

  .navbar,
  .nav-container {
    min-height: 92px;
  }

  .nav-container {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
  }

  .hero {
    min-height: 245px;
    background-position: 66% center;
  }

  .hero-content {
    width: min(100% - 32px, 1060px);
    padding: 36px 0;
  }

  .hero h1 {
    font-size: 40px;
  }

  .course-code {
    font-size: 18px;
  }

  .course-details div {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .week-box {
    top: 92px;
  }
}
