@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
  --ink: #17282e;
  --muted: #5d696f;
  --teal: #004653;
  --teal-dark: #00343d;
  --powder: #c8d5de;
  --mist: #e9f0f2;
  --ivory: #f8f6ea;
  --paper: #fbfcfb;
  --white: #ffffff;
  --line: #d7e1e4;
  --line-strong: rgba(0, 70, 83, 0.24);
  --shadow: 0 18px 46px rgba(23, 40, 46, 0.09);
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

a:hover {
  color: var(--teal-dark);
}

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

main {
  flex: 1 0 auto;
}

p,
ul,
ol,
dl {
  margin-bottom: 1.2rem;
}

strong,
b {
  font-weight: 600;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--teal);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.018em;
}

h2 {
  font-size: clamp(2.15rem, 4vw, 3.25rem);
}

h3 {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
}

.container {
  max-width: 1120px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.65rem 0.9rem;
  border-radius: 0.35rem;
  background: var(--teal-dark);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(-160%);
}

.skip-link:focus {
  color: var(--white);
  transform: translateY(0);
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: 4.5rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(0, 70, 83, 0.11);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 22px rgba(23, 40, 46, 0.05);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.course-home {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--ink);
  text-decoration: none;
}

.course-home:hover {
  color: var(--teal);
  text-decoration: none;
}

.course-logo {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.course-brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.course-code {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.course-term {
  margin-top: 0.2rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.site-nav .navbar-toggler {
  margin-left: auto;
  border: 1px solid var(--line);
}

.site-nav .navbar-collapse {
  justify-content: flex-end;
}

.site-nav .navbar-nav {
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.site-nav .nav-link {
  position: relative;
  padding: 0.62rem 0.78rem !important;
  color: #34444a !important;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav .nav-link::after {
  position: absolute;
  right: 0.78rem;
  bottom: 0.3rem;
  left: 0.78rem;
  height: 1px;
  background: var(--teal);
  content: '';
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 160ms ease, transform 160ms ease;
}

.site-nav .nav-link:hover,
.site-nav .nav-link[aria-current='page'] {
  color: var(--teal) !important;
}

.site-nav .nav-link:hover::after,
.site-nav .nav-link[aria-current='page']::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Home hero */
.course-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 8vw, 6.75rem) 0;
  border-bottom: 1px solid rgba(0, 70, 83, 0.12);
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.48), transparent 28rem),
    linear-gradient(135deg, var(--mist) 0%, var(--powder) 72%, #bfced8 100%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 19rem);
  gap: clamp(3rem, 7vw, 6.5rem);
  align-items: center;
}

.eyebrow,
.section-kicker,
.role-label,
.status-label {
  margin-bottom: 0.9rem;
  color: var(--teal);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.course-title {
  max-width: 14ch;
  margin-bottom: 1.25rem;
  color: var(--ink);
  font-size: clamp(3rem, 6.8vw, 5.55rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.047em;
}

.course-title .course-number {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--teal);
  font-family: var(--sans);
  font-size: 0.2em;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-summary {
  max-width: 43rem;
  margin-bottom: 2rem;
  color: #31454c;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.38rem);
  line-height: 1.48;
}

.course-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.course-facts li {
  min-width: 9rem;
  padding-top: 0.62rem;
  border-top: 1px solid rgba(0, 70, 83, 0.34);
}

.fact-label {
  display: block;
  margin-bottom: 0.08rem;
  color: var(--teal-dark);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fact-value {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.13rem;
  font-weight: 600;
}

.instructor-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.8rem 1.5rem 1.55rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 15px 44px rgba(23, 40, 46, 0.09);
}

.headshot-instructor {
  width: 10rem;
  height: 10rem;
  margin-bottom: 1.2rem;
  border: 4px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 70, 83, 0.18);
}

.instructor-profile .role-label {
  margin-bottom: 0.28rem;
}

.instructor-name {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.48rem;
  font-weight: 600;
  text-decoration: none;
}

.instructor-name:hover {
  color: var(--teal);
  text-decoration: none;
}

.instructor-email {
  margin-top: 0.2rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
}

/* Editorial sections */
.section {
  padding: clamp(4rem, 7vw, 6rem) 0;
}

.section-white {
  background: var(--white);
}

.section-tint {
  border-top: 1px solid rgba(0, 70, 83, 0.08);
  border-bottom: 1px solid rgba(0, 70, 83, 0.08);
  background: var(--ivory);
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 2.8rem;
}

.section-heading .section-kicker {
  margin-bottom: 0.65rem;
}

.section-title {
  margin-bottom: 1rem;
}

.lead-copy {
  max-width: 50rem;
  color: #314249;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.42rem);
  line-height: 1.55;
}

.subsection-title {
  margin-bottom: 1.15rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.8rem;
  margin: 0 0 3.6rem;
  padding: 0;
  border-bottom: 1px solid var(--line);
  counter-reset: topic;
  list-style: none;
}

.topic-grid li {
  position: relative;
  min-height: 5.25rem;
  padding: 1.2rem 0 1.2rem 2.55rem;
  border-top: 1px solid var(--line);
  color: #2a3b41;
  counter-increment: topic;
}

.topic-grid li::before {
  position: absolute;
  top: 1.26rem;
  left: 0;
  color: var(--teal);
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  content: counter(topic, decimal-leading-zero);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.insight-panel {
  padding: 1.7rem 1.8rem;
  border-top: 3px solid var(--teal);
  background: var(--mist);
}

.insight-panel h3 {
  margin-bottom: 0.75rem;
  font-size: 1.42rem;
}

.insight-panel p:last-child {
  margin-bottom: 0;
}

/* Logistics and teaching team */
.details-grid {
  margin: 0 0 3.5rem;
  border-top: 1px solid var(--line-strong);
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(9.5rem, 12rem) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.detail-row dt,
.detail-row dd {
  margin: 0;
}

.detail-row dt {
  color: var(--teal);
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
}

.detail-row dd {
  color: #33434a;
}

.staff-heading {
  margin-bottom: 1.4rem;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-bottom: 3.5rem;
}

.staff-card {
  min-width: 0;
  text-align: center;
}

.staff-card a {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  padding: 1.45rem 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  text-decoration: none;
}

.staff-card a:hover {
  border-color: var(--line-strong);
  color: var(--teal);
  box-shadow: 0 11px 28px rgba(23, 40, 46, 0.07);
  transform: translateY(-2px);
}

.headshot,
.headshot-crop {
  width: 8.25rem;
  height: 8.25rem;
  margin: 0 0 1rem;
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 70, 83, 0.18);
}

.headshot {
  display: block;
  object-fit: cover;
}

.headshot-crop {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--powder);
}

.headshot-crop .headshot-stephen {
  position: absolute;
  top: -3px;
  left: -88px;
  width: 220px;
  height: auto;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: initial;
}

.staff-name {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.15;
}

.staff-role {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.split-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 0.75fr);
  gap: 1.25rem;
}

.content-panel {
  padding: 1.65rem 1.8rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.content-panel h3 {
  margin-bottom: 0.8rem;
  font-size: 1.45rem;
}

.content-panel p:last-child,
.content-panel ul:last-child {
  margin-bottom: 0;
}

.content-panel li + li {
  margin-top: 0.38rem;
}

/* Assignments and policy reading sections */
.reading-column {
  max-width: 54rem;
}

.compact-section {
  padding: clamp(3.25rem, 6vw, 4.75rem) 0;
}

.coursework-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.7rem;
}

.coursework-card {
  padding: 1.8rem;
  border-top: 3px solid var(--teal);
  background: var(--mist);
}

.coursework-card h3 {
  margin-bottom: 0.9rem;
  font-size: 1.55rem;
}

.coursework-card p:last-child {
  margin-bottom: 0;
}

.grading-panel {
  display: grid;
  grid-template-columns: minmax(9rem, 0.7fr) minmax(0, 2.3fr);
  gap: 2rem;
  align-items: center;
  margin-top: 1.25rem;
  padding: 1.55rem 1.8rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.grading-intro .section-kicker {
  margin-bottom: 0.2rem;
}

.grading-intro h3 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.grading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
}

.grading-item {
  padding-left: 1rem;
  border-left: 1px solid var(--line-strong);
}

.grading-item dt {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.77rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.grading-item dd {
  margin: 0.2rem 0 0;
  color: var(--teal);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 600;
  line-height: 1;
}

.policy-section {
  padding: 2.6rem 0 0;
  margin-top: 2.6rem;
  border-top: 1px solid var(--line-strong);
}

.policy-section:first-of-type {
  margin-top: 0;
}

.policy-section h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
}

.policy-title {
  margin-bottom: 1.35rem;
  color: var(--teal);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.policy-section h4 {
  margin: 2rem 0 0.75rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.34rem;
  font-weight: 600;
}

.policy-section li + li {
  margin-top: 0.65rem;
}

.policy-note {
  margin: 1.2rem 0;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--teal);
  background: var(--mist);
}

.policy-note p:last-child {
  margin-bottom: 0;
}

.contact-block {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* Schedule and calendar */
.page-hero {
  padding: clamp(3.5rem, 7vw, 5rem) 0 clamp(2.75rem, 5vw, 3.8rem);
  border-bottom: 1px solid rgba(0, 70, 83, 0.12);
  background: linear-gradient(135deg, var(--mist), var(--powder));
}

.page-hero .section-title {
  max-width: 16ch;
  color: var(--ink);
  font-size: clamp(2.7rem, 5vw, 4.4rem);
}

.page-intro {
  max-width: 46rem;
  margin-bottom: 1.5rem;
  color: #31454c;
  font-family: var(--serif);
  font-size: 1.22rem;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.75rem;
  margin: 0 0 1.35rem;
  padding: 0;
  color: #32444b;
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
}

.page-meta li {
  position: relative;
  padding-left: 0.95rem;
}

.page-meta li::before {
  position: absolute;
  top: 0.67em;
  left: 0;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--teal);
  content: '';
}

.quiet-action {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.62rem 0.88rem;
  border: 1px solid rgba(0, 70, 83, 0.32);
  border-radius: 0.35rem;
  color: var(--teal);
  font-size: 0.89rem;
  font-weight: 600;
  text-decoration: none;
}

.quiet-action:hover {
  border-color: var(--teal);
  background: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

.schedule-section {
  padding: 2rem 0 3rem;
  background: var(--paper);
}

.schedule-frame-wrap {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--white);
  box-shadow: var(--shadow);
}

.schedule-frame {
  display: block;
  width: 100%;
  height: clamp(40rem, 76vh, 56rem);
  border: 0;
  border-radius: 0.55rem;
  background: var(--white);
}

.calendar-section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
  min-height: 42vh;
}

.status-card {
  max-width: 46rem;
  padding: clamp(2rem, 5vw, 3.2rem);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--white);
  box-shadow: 0 14px 38px rgba(23, 40, 46, 0.07);
}

.status-card h2 {
  margin-bottom: 0.9rem;
  color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.3rem);
}

.status-card p {
  max-width: 38rem;
}

.status-card p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  background: var(--teal-dark);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.84rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer strong {
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.08rem;
}

.site-footer a {
  color: var(--white);
}

@media (max-width: 991px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 17rem);
    gap: 3rem;
  }

  .split-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 5rem;
  }

  .site-nav {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .site-nav .navbar-collapse {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--line);
  }

  .site-nav .navbar-nav {
    align-items: stretch;
  }

  .site-nav .nav-link {
    padding: 0.7rem 0.2rem !important;
  }

  .site-nav .nav-link::after {
    right: auto;
    bottom: 0.4rem;
    left: 0.2rem;
    width: 2rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .course-title {
    max-width: 12ch;
  }

  .instructor-profile {
    max-width: 21rem;
    align-items: flex-start;
    padding: 1.4rem;
    text-align: left;
  }

  .headshot-instructor {
    width: 8rem;
    height: 8rem;
  }

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

  .grading-panel {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 430px) {
  body {
    font-size: 1rem;
  }

  .course-term {
    display: none;
  }

  .course-hero {
    padding: 3.5rem 0;
  }

  .course-facts {
    flex-direction: column;
    gap: 1rem;
  }

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

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

  .grading-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .grading-item dd {
    margin: 0;
    font-size: 2rem;
  }

  .schedule-frame-wrap {
    width: calc(100% - 1rem);
    padding: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
