﻿:root {
  --brand-950: #05224d;
  --brand-900: #073473;
  --brand-800: #084b9b;
  --brand-700: #0d62c8;
  --brand-600: #1675e5;
  --brand-100: #eaf3ff;
  --brand-50: #f5f9ff;
  --ink-900: #172033;
  --ink-700: #465267;
  --ink-500: #68758a;
  --line: #dce5f2;
  --surface: #ffffff;
  --page: #f3f6fb;
  --accent: #f28c28;
  --success: #087f5b;
  --shadow-sm: 0 8px 24px rgba(7, 52, 115, 0.08);
  --shadow-md: 0 18px 50px rgba(7, 52, 115, 0.14);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --content: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink-900);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0 0 auto;
  z-index: -1;
  height: 50rem;
  content: "";
  background:
    radial-gradient(circle at 78% 16%, rgba(72, 154, 255, 0.24), transparent 32%),
    linear-gradient(135deg, var(--brand-950), var(--brand-700));
}

a {
  color: var(--brand-700);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-900);
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: var(--brand-950);
  border-radius: 0.5rem;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

.site-header {
  position: relative;
  z-index: 10;
  padding: 1rem clamp(1rem, 3vw, 2rem) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, var(--content));
  min-height: 5.5rem;
  margin: 0 auto;
  padding: 0.85rem 1rem 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

.brand img {
  display: block;
  width: min(16.25rem, 48vw);
  height: auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  color: var(--brand-900);
  background: var(--brand-50);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  cursor: pointer;
}

.nav-toggle svg {
  width: 1.4rem;
  height: 1.4rem;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  color: var(--ink-700);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.7rem;
  transition: color 160ms ease, background-color 160ms ease;
}

.site-nav a:hover, .site-nav a[aria-current=page] {
  color: var(--brand-900);
  background: var(--brand-100);
}

.page-shell {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: clamp(2.6rem, 6vw, 5.5rem) 0 4rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.7rem;
  color: #dcecff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.8rem;
  height: 0.2rem;
  content: "";
  background: var(--accent);
  border-radius: 999px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  min-height: 14rem;
  color: #fff;
}

.hero h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 43rem;
  margin: 1.15rem 0 0;
  color: #dcecff;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.search-card {
  padding: 1.1rem;
  color: var(--ink-900);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.search-card label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--ink-700);
  font-size: 0.85rem;
  font-weight: 800;
}

.search-row {
  display: flex;
  gap: 0.55rem;
}

.search-row input[type=search] {
  min-width: 0;
  flex: 1;
  height: 3rem;
  padding: 0 0.85rem;
  color: var(--ink-900);
  background: var(--brand-50);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  outline: none;
}

.search-row input[type=search]:focus {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(22, 117, 229, 0.14);
}

.search-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 1rem;
  color: #fff;
  font-weight: 800;
  background: var(--brand-700);
  border: 0;
  border-radius: 0.7rem;
  cursor: pointer;
}

.content-panel {
  margin-top: clamp(2.2rem, 5vw, 4.5rem);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: var(--surface);
  border: 1px solid rgba(220, 229, 242, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 0.35rem 0 0;
  color: var(--ink-500);
}

.section-link {
  flex: none;
  font-size: 0.92rem;
  font-weight: 800;
}

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

.course-card {
  position: relative;
  display: flex;
  min-height: 12.5rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  overflow: hidden;
  color: var(--ink-900);
  background: linear-gradient(145deg, #fff, var(--brand-50));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.course-card::after {
  position: absolute;
  right: -2.75rem;
  bottom: -3.75rem;
  width: 9rem;
  height: 9rem;
  content: "";
  background: radial-gradient(circle, rgba(22, 117, 229, 0.17), transparent 68%);
  border-radius: 50%;
}

a.course-card:hover {
  color: var(--ink-900);
  border-color: #a9c9ef;
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.course-card.is-muted {
  color: var(--ink-700);
  background: #f8fafc;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.course-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 0.85rem;
}

.course-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.65rem;
  color: var(--success);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #e6f7f1;
  border-radius: 999px;
}

.badge.is-neutral {
  color: var(--ink-700);
  background: #e9eef5;
}

.course-card h3 {
  position: relative;
  z-index: 1;
  max-width: 28ch;
  margin: 1.35rem 0 0.4rem;
  font-size: clamp(1.15rem, 2.25vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.course-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink-500);
  font-size: 0.92rem;
}

.card-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  color: var(--ink-700);
  font-size: 0.86rem;
  font-weight: 700;
  border-top: 1px solid var(--line);
}

.card-action {
  color: var(--brand-700);
  font-weight: 900;
}

.semester + .semester {
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.semester-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  color: var(--brand-900);
  font-size: 1.05rem;
}

.semester-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #fff;
  font-size: 0.8rem;
  background: var(--brand-700);
  border-radius: 0.65rem;
}

.site-footer {
  padding: 0 1rem 2rem;
}

.page-shell > aside {
  min-height: 0;
  margin-top: 1.5rem;
  overflow: hidden;
  text-align: center;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: 1.25rem 0;
  color: var(--ink-500);
  font-size: 0.88rem;
  border-top: 1px solid #d5deeb;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-nav a {
  color: var(--ink-700);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 54rem) {
  .nav-toggle {
    display: inline-flex;
  }

  .header-inner {
    position: relative;
    min-height: 4.75rem;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    left: 0;
    display: none;
    padding: 0.6rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav a {
    width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .search-card {
    max-width: 34rem;
  }

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

@media (max-width: 38rem) {
  .site-header {
    padding: 0.65rem 0.65rem 0;
  }

  .header-inner {
    padding: 0.65rem 0.65rem 0.65rem 0.85rem;
    border-radius: 0.9rem;
  }

  .page-shell {
    width: min(calc(100% - 1.25rem), var(--content));
    padding-top: 2.75rem;
  }

  .search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .search-row button {
    width: 100%;
  }

  .content-panel {
    padding: 1rem;
    border-radius: 1rem;
  }

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

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

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