/* ==========================================================================
   US College Scholarship — Academic editorial theme
   Palette: deep academic navy, antique gold, restrained academic red
   ========================================================================== */

:root {
  --navy: #1e3a8a;
  --navy-dark: #152a66;
  --navy-deep: #0f1f4d;
  --navy-light: #e9eef8;
  --navy-tint: #f3f6fc;
  --gold: #b8860b;
  --gold-dark: #8a6607;
  --gold-light: #f7edd7;
  --red: #9b1c1c;
  --ink: #1f2937;
  --muted: #5a6472;
  --bg: #f6f7fa;
  --white: #ffffff;
  --border: #e4e7ec;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(15, 31, 77, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 31, 77, 0.10);
  --shadow-lg: 0 16px 40px rgba(15, 31, 77, 0.14);
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold-dark); }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy-deep); }
.brand:hover { color: var(--navy-deep); }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--navy);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  border-radius: 8px;
  position: relative;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}
.brand-mark::after {
  content: '';
  position: absolute;
  left: 6px; right: 6px; bottom: 5px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.15;
  color: var(--navy-deep);
}
.brand-text small {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover { color: var(--navy); }
.site-nav a.active { color: var(--navy); border-bottom-color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  margin: 0 auto;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(184, 134, 11, 0.16), transparent 60%),
    linear-gradient(150deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-dark) 100%);
  color: #fff;
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 820px; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: var(--gold-light);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow-light { color: #f3e3bd; background: rgba(255, 255, 255, 0.10); }

.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 6px 18px rgba(184, 134, 11, 0.35); }
.btn-primary:hover { background: #c7950e; color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy-deep);
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-sub { color: var(--muted); font-size: 1.02rem; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.2s;
  overflow: hidden;
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  opacity: 0;
  transition: opacity 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card:hover::before { opacity: 1; }
.card-body { padding: 26px 26px 28px; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.card-cat.scholarship { color: var(--gold-dark); background: var(--gold-light); }
.card-cat.jobs { color: var(--navy); background: var(--navy-light); }
.card-date { font-size: 0.82rem; color: var(--muted); }

.card-title { font-family: var(--serif); font-size: 1.32rem; font-weight: 700; line-height: 1.28; margin-bottom: 12px; }
.card-title a { color: var(--navy-deep); }
.card-title a:hover { color: var(--navy); }

.card-excerpt { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }

.card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link span { transition: transform 0.18s; }
.card-link:hover span { transform: translateX(4px); }

/* ---------- About ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-text p { color: var(--muted); margin-top: 14px; }
.about-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.fact-num {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
}
.fact-label { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* ---------- Article hero ---------- */
.article-hero {
  background: linear-gradient(150deg, var(--navy-deep) 0%, var(--navy) 60%, var(--navy-dark) 100%);
  color: #fff;
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}
.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
.article-hero .container { position: relative; z-index: 1; max-width: 840px; }
.article-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.92rem; color: rgba(255, 255, 255, 0.78); }
.meta-author { font-weight: 600; color: #fff; }
.meta-sep { color: var(--gold); }

/* ---------- Article body ---------- */
.article-layout { max-width: 820px; padding-top: 56px; padding-bottom: 80px; }
.article-body {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 48px 52px;
  font-size: 1.04rem;
  color: #2a3340;
}
.article-body > * + * { margin-top: 1.15em; }

.article-body h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.65rem;
  line-height: 1.25;
  color: var(--navy-deep);
  margin-top: 1.8em;
  padding-bottom: 0.45em;
  border-bottom: 2px solid var(--gold-light);
  position: relative;
}
.article-body h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 56px;
  height: 2px;
  background: var(--gold);
}

.article-body h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.32rem;
  color: var(--navy);
  margin-top: 1.6em;
}
.article-body h4 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--navy-deep);
  letter-spacing: 0.01em;
  margin-top: 1.4em;
}

.article-body p { color: #2a3340; }
.article-body a { color: var(--navy); text-decoration: underline; text-decoration-color: rgba(30, 58, 138, 0.35); text-underline-offset: 3px; }
.article-body a:hover { color: var(--gold-dark); text-decoration-color: var(--gold-dark); }

.article-body ul,
.article-body ol { padding-left: 1.4em; }
.article-body li { margin: 0.45em 0; }
.article-body li::marker { color: var(--gold); font-weight: 600; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body blockquote {
  background: var(--navy-tint);
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 20px 24px;
  font-style: italic;
  color: #33415c;
}
.article-body blockquote p { color: inherit; }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  margin: 1.4em 0;
}
.article-body th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
}
.article-body td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-body tbody tr:nth-child(even) { background: var(--navy-tint); }

.article-body figure {
  margin: 1.8em 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-tint);
}
.article-body figure img { width: 100%; }
.article-body figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 12px 16px;
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.brand-footer { color: #fff; }
.brand-footer:hover { color: #fff; }
.brand-footer .brand-text { color: #fff; }
.brand-footer .brand-text small { color: rgba(255, 255, 255, 0.55); }
.brand-footer .brand-mark { background: var(--gold); color: #fff; }

.footer-about p { margin-top: 16px; font-size: 0.94rem; max-width: 340px; }
.footer-col h3 {
  font-family: var(--serif);
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-links { list-style: none; }
.footer-links li { margin: 10px 0; }
.footer-links a { color: rgba(255, 255, 255, 0.72); font-size: 0.94rem; }
.footer-links a:hover { color: #f3e3bd; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.86rem;
}
.footer-note { color: rgba(255, 255, 255, 0.45); }
.footer-bottom a { color: rgba(255, 255, 255, 0.72); }
.footer-bottom a:hover { color: #f3e3bd; }

/* ---------- Reading progress ---------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gold);
  width: 0;
  z-index: 100;
  transition: width 0.1s linear;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .article-body { padding: 32px 24px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .site-nav.open { max-height: 320px; }
  .site-nav a { padding: 16px 24px; border-bottom: 1px solid var(--border); border-bottom-width: 1px; }
  .site-nav a:last-child { border-bottom: none; }
  .hero { padding: 60px 0 70px; }
  .section { padding: 56px 0; }
  .about-facts { grid-template-columns: 1fr; }
}
