/* ============================================================
   Flourish-A-Thon 2026 — Shared Styles
   ============================================================ */

/* --- Cross-document view transitions (smooth nav, no white flash) --- */
@view-transition {
  navigation: auto;
}

/* --- Self-hosted fonts (eliminates Google Fonts network round-trip) --- */
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 100 900;
  font-display: optional;
  src: url('assets/fonts/roboto-slab-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('assets/fonts/dm-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('assets/fonts/dm-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens --- */
:root {
  --navy:        #002D72;   /* Heritage Blue */
  --navy-dark:   #001d4e;
  --orange:      #FF9E1B;   /* JHU Orange */
  --orange-dark: #e08810;
  --spirit:      #68ACE5;   /* Spirit Blue */
  --mint:        #86C8BC;   /* Mint Green */
  --green:       #008767;   /* Homewood Green */
  --white:       #FFFFFF;
  --off-white:   #F5F7FA;
  --text:        #1A1A18;
  --muted:       #555555;
  --rule:        #E0E0E0;

  --font-serif: 'Roboto Slab', Georgia, serif;
  --font-mono:  'DM Mono', monospace;

  --section-pad: 88px 40px;
  --max-w: 1080px;
  --nav-h: 88px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  padding: 0 40px;
  view-transition-name: site-nav;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-logo img {
  height: 68px;
  width: auto;
  object-fit: contain;
}
.nav-logo-text {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0 auto;
}
.nav-links a {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  padding: 8px 20px;
  border-radius: 4px;
  transition: color 0.15s;
  position: relative;
}
.nav-links a:hover { color: var(--navy); }
.nav-links a.active {
  color: var(--navy);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--spirit);
  border-radius: 1px;
}

.nav-apply {
  flex-shrink: 0;
  background: var(--green);
  color: var(--white) !important;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 10px 22px;
  border-radius: 4px;
  transition: background 0.15s;
}
.nav-apply:hover { background: var(--mint); }

/* ============================================================
   SHARED SECTION UTILITIES
   ============================================================ */
.section { padding: var(--section-pad); }
.section--off { background: var(--off-white); }
.section--navy { background: var(--navy); color: var(--white); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.overline {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--spirit);
  margin-bottom: 14px;
}
.overline--gold { color: var(--orange); }
.overline--light { color: rgba(255,255,255,0.55); }

h2.section-title {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--navy);
}
h2.section-title--light { color: var(--white); }

.section-lead {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 48px;
}
.section-lead--light { color: rgba(255,255,255,0.75); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 80px 40px 96px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-content { max-width: 760px; }

.hero-overline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--spirit);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--white);
}
/* dash inherits white from h1 */

.hero-tagline {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 300;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
  line-height: 1.45;
}

/* "AI for Good" featured subtitle */
.hero-catchphrase {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 600;
  color: var(--mint);
  line-height: 1.1;
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
a.hero-chip { text-decoration: none; }
a.hero-chip:hover { background: var(--mint); color: var(--navy); }

.hero-chip {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  padding: 8px 18px;
  background: var(--white);
  border-radius: 100px;
  color: var(--navy);
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 4px;
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--orange); color: var(--navy); }
.btn--gold:hover { background: var(--orange-dark); }
.btn--navy { background: var(--navy); color: var(--orange); }
.btn--navy:hover { opacity: 0.88; }
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.35);
}
.btn--outline:hover { border-color: var(--orange); color: var(--orange); }

.hero-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 680px;
  opacity: 0.18;
  pointer-events: none;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-body {
  max-width: 860px;
}
.about-body p {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.7;
}
.about-body p strong { color: var(--text); font-weight: 700; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
}
.timeline-card {
  background: var(--white);
  padding: 28px 24px 32px;
}
.timeline-card:nth-child(5) {
  grid-column: 1 / -1;
  background: var(--navy);
  text-align: center;
}
.timeline-card:nth-child(5) .timeline-title { color: var(--white); }
.timeline-card:nth-child(5) .timeline-day  { color: rgba(255,255,255,0.55); }
.timeline-card:nth-child(5) .timeline-time { color: var(--mint); }
.timeline-card:nth-child(5) .timeline-loc  { color: rgba(255,255,255,0.45); }
.timeline-card:nth-child(5) .timeline-desc { color: rgba(255,255,255,0.75); }

.timeline-day {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--navy);
  margin-bottom: 6px;
}
.timeline-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.2;
}
.timeline-time {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--spirit);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.timeline-loc {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}
.timeline-desc {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================================================
   TEAM COMPOSITION
   ============================================================ */
.team-intro {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 36px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.role-card {
  border-left: 3px solid var(--spirit);
  padding: 22px 22px 22px 20px;
  background: var(--off-white);
  border-radius: 0 6px 6px 0;
}
.role-title {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--spirit);
  margin-bottom: 8px;
  font-weight: 500;
}
.role-card p {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
}
.team-note {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  font-style: italic;
}

/* ============================================================
   PRIZES
   ============================================================ */
.prizes-intro {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 36px;
}
.prizes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.prize-card {
  text-align: center;
  padding: 36px 20px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--white);
}
.prize-place {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.prize-amount {
  font-size: 48px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
}
.prize-label {
  font-size: 22px;
  color: var(--muted);
  font-style: italic;
}
.prize-card.first { border-color: var(--orange); }
.prize-card.first .prize-amount { color: var(--orange-dark); }

/* ============================================================
   APPLY CTA
   ============================================================ */
.apply-cta { text-align: center; }
.apply-cta h2 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--white);
}
.apply-cta p {
  font-size: 22px;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.apply-cta .btn { font-size: 15px; padding: 16px 40px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  padding: 48px 40px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.footer-text {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.08em;
  line-height: 1.8;
}
.footer-text strong { color: rgba(255,255,255,0.8); font-weight: 500; }
.footer-sponsor {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}
.footer-sponsor strong { color: rgba(255,255,255,0.7); font-weight: 500; }

/* ============================================================
   INNER PAGE HERO (FAQ, Resources, People)
   ============================================================ */
.page-hero {
  background: var(--navy);
  padding: 60px 40px 56px;
}
.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-hero .overline {
  color: var(--spirit);
}
.page-hero h1 {
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 12px;
}
.page-hero p:not(.overline) {
  font-size: 22px;
  font-weight: 300;
  color: var(--orange);
  max-width: 560px;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 720px; }
.faq-section-label {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--spirit);
  padding: 36px 0 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}
.faq-section-label:first-child { padding-top: 0; }
.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-item:first-child { border-top: 1px solid var(--rule); }

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}
.faq-question:hover { color: var(--spirit); }
.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--spirit);
  transition: transform 0.25s;
  margin-top: 3px;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  display: none;
  padding: 0 32px 24px 0;
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }
.faq-answer strong { font-weight: 600; }
.faq-answer a { color: var(--spirit); text-decoration: underline; }
.faq-answer a:hover { color: var(--navy); }

/* ============================================================
   RESOURCES
   ============================================================ */
.resources-sections { display: grid; gap: 64px; }

.resource-section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--spirit);
  display: inline-block;
}

.directions-block {
  background: var(--off-white);
  border-radius: 8px;
  padding: 28px 32px;
  border: 1px solid var(--rule);
}
.directions-block p {
  font-size: 17px;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.65;
}
.directions-block p:last-child { margin-bottom: 0; }
.directions-block strong { color: var(--text); font-weight: 700; }
.directions-block a { color: var(--spirit); text-decoration: underline; }

.reading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.reading-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 22px 22px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.reading-card:hover {
  border-color: var(--spirit);
  background: rgba(104, 172, 229, 0.09);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.reading-tag {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--spirit);
}
.reading-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.reading-author {
  font-size: 22px;
  color: var(--muted);
  font-style: italic;
  margin-top: auto;
}

.placeholder-block {
  background: var(--off-white);
  border: 1px dashed var(--rule);
  border-radius: 8px;
  padding: 40px 32px;
  text-align: center;
}
.placeholder-block p {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  font-style: italic;
}

/* ============================================================
   PEOPLE
   ============================================================ */
.people-section { margin-bottom: 64px; }
.people-section:last-child { margin-bottom: 0; }

.people-section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--spirit);
  display: inline-block;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.person-card { text-align: center; }
.person-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--rule);
  display: flex;
  align-items: center;
  object-fit: cover;
  justify-content: center;
  margin: 0 auto 14px;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  overflow: hidden;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.person-role {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--spirit);
  margin-bottom: 8px;
}
.person-bio {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.55;
}
.person-bio a { color: var(--spirit); text-decoration: underline; }
.person-bio a:hover { color: var(--navy); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root { --section-pad: 64px 24px; }

  .site-nav { padding: 0 24px; }
  .nav-inner { padding: 0; gap: 16px; }
  .nav-logo-text { display: none; }

  .hero { padding: 60px 24px 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: clamp(28px, 7vw, 52px); white-space: normal; }
  .hero-image { width: 300px; margin: 0 auto; }

  .timeline-grid { grid-template-columns: 1fr 1fr; }
  .timeline-card:first-child { border-radius: 8px 0 0 0; }
  .timeline-card:nth-child(2) { border-radius: 0 8px 0 0; }
  .timeline-card:nth-child(3) { border-radius: 0 0 0 8px; }
  .timeline-card:last-child { border-radius: 0 0 8px 0; }

  .team-grid { grid-template-columns: 1fr; }
  .prizes-grid { grid-template-columns: 1fr 1fr; }

  .page-hero { padding: 44px 24px 40px; }
}

@media (max-width: 600px) {
  .nav-links { gap: 0; }
  .nav-links a { font-size: 13px; padding: 8px 10px; }
  .nav-apply { padding: 8px 14px; font-size: 14px; }

  .hero h1 { font-size: clamp(24px, 8vw, 40px); white-space: normal; }

  .timeline-grid { grid-template-columns: 1fr; }
  .timeline-card { border-radius: 0 !important; }
  .timeline-card:first-child { border-radius: 8px 8px 0 0 !important; }
  .timeline-card:last-child  { border-radius: 0 0 8px 8px !important; }

  .prizes-grid { grid-template-columns: 1fr; max-width: 280px; }

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