:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #08125c;
  --primary-hover: #102080;
  --gold: #ebb23c;
  --gold-soft: #fef9ec;
  --accent: #800000;
  --accent-soft: #fdf2f2;
  --accent-border: #f3c6c6;
  --badge-internal-bg: #f1f5f9;
  --badge-internal-text: #475569;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(8, 18, 92, 0.05);
  --shadow-md: 0 6px 18px rgba(8, 18, 92, 0.09);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* Header */
.site-header {
  background: var(--primary);
  color: #ffffff;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.94;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-nav a {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 500;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] {
  color: #ffffff;
  border-bottom-color: var(--gold);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(235, 178, 60, 0.5);
  color: #ffffff;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.875rem;
  cursor: pointer;
}

/* Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* Hero (Landing Page) */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.2vw, 2.55rem);
  line-height: 1.18;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 68ch;
  margin: 0 0 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--surface-muted);
  border-color: var(--primary);
}

/* Course Card */
.section-heading {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--text);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.course-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.course-code {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.course-card h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0.3rem 0 0.5rem;
  line-height: 1.25;
}

.course-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.pill {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* Course Layout (Sidebar + Main) */
.course-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  position: sticky;
  top: 5.25rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav a,
.sidebar-nav .nav-locked {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--text);
  transition: background-color 0.15s ease;
}

.sidebar-nav a:hover {
  background: var(--surface-muted);
  text-decoration: none;
}

.sidebar-nav a[aria-current="page"] {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.sidebar-nav a[aria-current="page"] .nav-kicker {
  color: var(--gold);
}

.sidebar-nav .nav-locked {
  color: var(--text-subtle);
  background: var(--bg);
  border: 1px dashed var(--border);
  cursor: default;
}

.nav-kicker {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.badge-internal {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--badge-internal-bg);
  color: var(--badge-internal-text);
  border: 1px solid var(--border);
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
  margin-top: 0.15rem;
}

/* Main Content Area */
.main-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.page-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 2.8vw, 2.2rem);
  line-height: 1.2;
  margin: 0.35rem 0 0.6rem;
}

.page-header p {
  margin: 0;
  color: var(--text-muted);
}

/* Syllabus Module List */
.module-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.module-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.module-item:not(.is-locked):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.module-item.is-locked {
  background: var(--surface-muted);
  border-style: dashed;
}

.module-item-info h3 {
  font-family: var(--font-serif);
  margin: 0.2rem 0 0.35rem;
  font-size: 1.18rem;
}

.module-item-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Content Cards (Video, PDF, Written Notes) */
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.content-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.content-card-header h2 {
  font-family: var(--font-serif);
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Responsive 16:9 YouTube Embed */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--primary);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  background: var(--surface-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.video-placeholder p {
  margin: 0;
  font-size: 0.95rem;
}

/* PDF Viewer */
.pdf-wrapper {
  width: 100%;
  height: 680px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-muted);
}

.pdf-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.helper-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

/* Written Content Typography */
.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 1.35rem 0 0.45rem;
  color: var(--text);
}

.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 0.35rem;
}

.callout {
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  padding: 0.9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
  font-size: 0.92rem;
  color: var(--text);
}

/* Module Pager */
.module-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.75rem 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-subtle);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
}

.footer-links a {
  color: var(--primary);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
  .course-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: none;
  }

  .sidebar.is-open {
    display: block;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .pdf-wrapper {
    height: 480px;
  }
}

@media (max-width: 600px) {
  .module-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 1.5rem 1.25rem;
  }
}
