/* =========================================
   CS 159 Distance Education — style.css
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:       #C8A84B;
  --gold-light: #F0D98A;
  --gold-pale:  #FDF8EC;
  --dark:       #161412;
  --dark-2:     #2A2520;
  --mid:        #5C5248;
  --muted:      #9A8E83;
  --bg:         #F7F4EF;
  --bg-alt:     #EDEAE4;
  --white:      #FFFFFF;
  --red:        #C0392B;
  --green:      #2D6A4F;
  --blue:       #1A4A7A;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.12);
  --transition: 0.22s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--bg);
  color: var(--dark);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Tahoma', sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { padding-left: 1.2em; }
li { margin-bottom: 0.35em; }

/* --- Container --- */
.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  border-bottom: 2px solid var(--dark-2);
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 0.9rem;
  background: var(--gold);
  color: var(--dark);
  padding: 3px 10px;
  border-radius: 4px;
}
.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
  display: none;
}
@media (min-width: 700px) { .brand-sub { display: block; } }

.top-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: nowrap;
}
.top-nav a {
  font-size: 0.78rem;
  font-weight: 500;
  color: #B5AFA8;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.02em;
}
.top-nav a:hover {
  color: var(--gold);
  background: rgba(200,168,75,0.1);
  text-decoration: none;
}
@media (max-width: 860px) { .top-nav { display: none; } }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid #444;
  color: var(--gold);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
}
@media (max-width: 860px) { .nav-toggle { display: block; } }

/* Mobile drawer */
.mobile-drawer {
  display: none;
  flex-direction: column;
  background: var(--dark-2);
  padding: 12px 24px 20px;
  gap: 4px;
  border-bottom: 2px solid #333;
}
.mobile-drawer.open { display: flex; }
.mobile-drawer a {
  color: #C8C2BA;
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid #333;
}
.mobile-drawer a:last-child { border-bottom: none; }
.mobile-drawer a:hover { color: var(--gold); text-decoration: none; }

/* =========================================
   HERO
   ========================================= */
.hero {
  background: var(--dark);
  color: var(--white);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,168,75,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: 'CS159';
  position: absolute;
  bottom: -20px; right: 24px;
  font-family: 'Tahoma', sans-serif;
  font-size: 10rem;
  font-weight: 800;
  color: rgba(255,255,255,0.03);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 16px;
}
.hero-title span {
  color: var(--gold);
  display: block;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: -0.01em;
}
.hero-subtitle {
  font-size: 1rem;
  color: #9A8E83;
  margin-bottom: 32px;
}
.hero-dates {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.date-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pill-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.pill-val {
  font-family: 'Tahoma', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}
.date-divider {
  color: var(--gold);
  font-size: 1.2rem;
  margin-top: 12px;
}
.hero-note {
  font-size: 0.78rem;
  color: #6B6058;
}

/* =========================================
   WARNING BANNER
   ========================================= */
.warning-banner {
  background: #3D1A0E;
  border-top: 3px solid #C0392B;
  border-bottom: 3px solid #C0392B;
  padding: 16px 0;
}
.warning-banner .container {
  display: flex;
  align-items: center;
  gap: 14px;
}
.warning-icon { font-size: 1.4rem; flex-shrink: 0; }
.warning-text {
  color: #F5C2B6;
  font-size: 0.9rem;
  line-height: 1.5;
}
.warning-text strong { color: #F07060; }

/* =========================================
   SECTIONS
   ========================================= */
.section {
  padding: 72px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-dark {
  background: var(--dark-2);
  color: var(--white);
}
.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 32px;
  color: inherit;
}
.section-intro {
  color: var(--mid);
  margin-top: -20px;
  margin-bottom: 28px;
  font-size: 0.95rem;
}
.info-block {
  background: var(--white);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin-top: 32px;
  font-size: 0.95rem;
  color: var(--mid);
  box-shadow: var(--shadow);
}

/* =========================================
   STATS GRID
   ========================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--white);
  border: 1px solid #E0DAD2;
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat-number {
  font-family: 'Tahoma', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-desc {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =========================================
   FIT CARDS
   ========================================= */
.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 640px) { .fit-grid { grid-template-columns: 1fr; } }

.fit-card {
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.fit-good {
  background: #EBF5EF;
  border: 2px solid #27AE60;
}
.fit-bad {
  background: #FDF0EE;
  border: 2px solid var(--red);
}
.fit-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.fit-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.fit-good .fit-icon { background: #27AE60; color: white; }
.fit-bad  .fit-icon { background: var(--red); color: white; }
.fit-card h3 {
  font-size: 1rem;
  font-weight: 700;
}
.fit-good h3 { color: #1A6A3A; }
.fit-bad  h3 { color: #8B1A0E; }
.fit-card li { font-size: 0.9rem; }

/* Callouts */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
}
.callout-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.callout-repeat {
  background: #FDF0EE;
  border-left: 4px solid var(--red);
  color: #5A1A10;
}
.callout-repeat strong { color: var(--red); }
.callout-tip {
  background: var(--gold-pale);
  border-left: 4px solid var(--gold);
  color: #4A3A10;
}
.callout-tip strong { color: #8A6800; }
.callout-drc {
  background: #EEF3FA;
  border-left: 4px solid var(--blue);
  color: #1A2A4A;
  margin-top: 24px;
}
.callout-drc strong { color: var(--blue); }

/* =========================================
   MATERIALS
   ========================================= */
.materials-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.material-item {
  display: flex;
  gap: 24px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  border: 1px solid #E8E2DA;
  transition: box-shadow var(--transition);
}
.material-item:hover { box-shadow: var(--shadow-md); }
.material-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
  letter-spacing: 0.05em;
}
.material-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.material-body p { font-size: 0.9rem; color: var(--mid); margin-bottom: 6px; }
.material-note {
  font-size: 0.82rem !important;
  color: var(--muted) !important;
  font-style: italic;
}
.material-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--blue);
  display: inline-block;
  margin-top: 4px;
  margin-right: 12px;
}
.resource-links { display: flex; flex-wrap: wrap; gap: 0; }

/* =========================================
   PACE COMPARISON
   ========================================= */
.pace-compare {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.pace-card {
  flex: 1;
  min-width: 200px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 2px solid #DDD8CF;
}
.pace-card-summer {
  border-color: var(--gold);
  background: var(--gold-pale);
}
.pace-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.pace-stat {
  font-family: 'Tahoma', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}
.pace-card-summer .pace-stat { color: #8A6800; }
.pace-list { font-size: 0.85rem; color: var(--mid); }
.pace-vs {
  font-family: 'Tahoma', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--muted);
  flex-shrink: 0;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--white);
  border: 1px solid #DDD8CF;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.faq-item summary {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--dark);
  transition: background var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--gold);
  font-weight: 300;
  transition: transform var(--transition);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { background: var(--bg-alt); }
.faq-item p {
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--mid);
  border-top: 1px solid #EEE;
  padding-top: 12px;
}

/* =========================================
   ONLINE REQUIREMENTS GRID
   ========================================= */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.req-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid #E0DAD2;
  transition: transform var(--transition), box-shadow var(--transition);
}
.req-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.req-icon { font-size: 1.8rem; margin-bottom: 12px; }
.req-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.req-card p, .req-card ul { font-size: 0.88rem; color: var(--mid); }
.req-card ul { margin-top: 6px; }
.req-warning {
  margin-top: 12px;
  background: #FDF0EE;
  border-left: 3px solid var(--red);
  padding: 8px 12px;
  font-size: 0.82rem;
  border-radius: 0 6px 6px 0;
  color: #6A2018;
}

/* =========================================
   SCHEDULE TABLE
   ========================================= */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid #DDD8CF;
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.9rem;
}
.schedule-table th {
  background: var(--dark);
  color: var(--gold);
  font-family: 'Tahoma', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 18px;
  text-align: left;
}
.schedule-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #EDE8E0;
  vertical-align: middle;
}
.schedule-table tbody tr:last-child td { border-bottom: none; }
.schedule-table tbody tr:hover { background: var(--gold-pale); }
.week-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--mid);
  white-space: nowrap;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-hw   { background: #EAF0FB; color: #1A3A7A; border: 1px solid #BFCFF5; }
.badge-lab  { background: #EBF5EF; color: #1A5A34; border: 1px solid #AADDC0; }
.badge-exam { background: #FDF0EE; color: #8B2018; border: 1px solid #F5B8B0; font-weight: 700; }
.badge-note { font-size: 0.7rem; color: inherit; }

.table-notes {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--mid);
  line-height: 1.7;
}
.table-notes p { margin-bottom: 4px; }
.legend {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* =========================================
   GRADING
   ========================================= */
.grade-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 700px) { .grade-layout { grid-template-columns: 1fr; } }

.grade-layout h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--dark);
}
.points-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #E0DAD2;
}
.points-table th {
  background: var(--dark);
  color: var(--gold);
  font-family: 'Tahoma', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
}
.points-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #EDE8E0;
  font-size: 0.88rem;
  color: var(--mid);
}
.points-table tbody tr:last-child td { border-bottom: none; }
.pt-total td {
  font-weight: 700;
  font-family: 'Tahoma', sans-serif;
  color: var(--dark) !important;
  background: var(--gold-pale);
}
.pt-num {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.pt-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pt-label { font-size: 0.88rem; }
.pt-bar {
  display: block;
  height: 5px;
  background: var(--gold);
  border-radius: 99px;
  width: var(--w);
  opacity: 0.7;
}

.grade-cutoffs { }
.grade-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.grade-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.grade-letter {
  font-family: 'Tahoma', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.grade-pts { font-size: 0.88rem; font-weight: 600; flex: 1; }
.grade-pct { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; color: var(--muted); }
.grade-a { background: #EBF8F0; border-left: 4px solid #27AE60; }
.grade-a .grade-letter { color: #1A7A40; }
.grade-b { background: #EDF3FB; border-left: 4px solid #2980B9; }
.grade-b .grade-letter { color: #1A5A8A; }
.grade-c { background: #FDF7E8; border-left: 4px solid #F39C12; }
.grade-c .grade-letter { color: #8A6800; }
.grade-d { background: #FDF0EE; border-left: 4px solid var(--red); }
.grade-d .grade-letter { color: var(--red); }
.grade-note { font-size: 0.8rem; color: var(--muted); font-style: italic; line-height: 1.5; }

/* =========================================
   EXAMS
   ========================================= */
.exam-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.exam-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border: 2px solid #DDD8CF;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.exam-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 28px rgba(200,168,75,0.2);
}
.exam-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.exam-date {
  font-family: 'Tahoma', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}
.exam-window {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

.exam-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.exam-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  color: var(--mid);
  border: 1px solid #E0DAD2;
}
.exam-detail-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.exam-detail-item strong { color: var(--dark); }

/* =========================================
   RESOURCES
   ========================================= */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.resource-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid #E0DAD2;
  transition: transform var(--transition), box-shadow var(--transition);
}
.resource-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.resource-icon { font-size: 1.8rem; margin-bottom: 10px; }
.resource-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.resource-card p { font-size: 0.87rem; color: var(--mid); }

/* =========================================
   INTEGRITY (Dark Section)
   ========================================= */
.section-dark .section-title { color: var(--white); }
.section-dark .section-label  { color: var(--gold); }

.integrity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.integrity-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: background var(--transition);
}
.integrity-card:hover { background: rgba(255,255,255,0.08); }
.integrity-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 14px;
}
.integrity-card p, .integrity-card li {
  font-size: 0.88rem;
  color: #C8C2BA;
  line-height: 1.65;
}
.integrity-card ul { margin-top: 8px; }
.integrity-card strong { color: #F0E8D0; }
.integrity-ai {
  border-color: rgba(200,168,75,0.3);
  background: rgba(200,168,75,0.06);
}
.integrity-ai h3 { color: var(--gold-light); }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--dark);
  padding: 36px 0;
  text-align: center;
}
.site-footer p {
  font-size: 0.82rem;
  color: #6B6058;
}
.footer-sub { margin-top: 4px; color: #4A4440; }

/* =========================================
   SCROLL ANIMATIONS
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .hero { padding: 48px 0; }
  .grade-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .exam-cards { grid-template-columns: 1fr; }
  .material-item { flex-direction: column; gap: 8px; }
  .material-num { font-size: 1rem; }
}
