@import url('https://fonts.googleapis.com/css2?family=Amaranth:wght@400;700&family=Karla:wght@400;500;600;700&display=swap');

:root {
  --brand:         #04009A;   /* primary — logo blue */
  --brand-light:   #77ACF1;   /* secondary — logo light blue */
  --brand-hover:   #2A18B8;   /* brand, nudged lighter, for hover states */

  --bg:            #ffffff;
  --bg-tint:       #EFF3FD;   /* faint tint of --brand-light */
  --ink:           #23262E;   /* near-black with a hint of blue, not pure black */
  --ink-soft:      #5B6270;
  --line:          #D8E1F5;   /* tint of --brand-light, for rules/borders */

  --font-display: 'Amaranth', sans-serif;
  --font-body:    'Karla', sans-serif;
  --font-code:    'Menlo', monospace;

  --container: 780px;
  --container-wide: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover, a:focus-visible {
  color: var(--brand-hover);
  text-decoration-color: currentColor;
}
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--brand);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 4.8vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: .4em; }

.eyebrow {
  display: block;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: .95rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: .6em;
}

.section-divider {
  border-top: 1px solid var(--line);
  margin: 3.2em 0 1.1em;
  padding-top: 1.3em;
}
.page > .hero + .section-divider {
  margin-top: 0;
}

/* ==========================================================================
   Layout shell
   ========================================================================== */

.wrap        { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.wrap--wide  { max-width: var(--container-wide); }

header.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6em;
  text-decoration: none;
}
.brand img { height: 68px; width: auto; }

nav.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.9em;
  margin: 0;
  padding: 0;
}
nav.main-nav a:not(.donate-btn) {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: .96rem;
  padding: .3em 0;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:not(.donate-btn):hover {
  color: var(--brand-hover);
  border-bottom-color: var(--brand-light);
}

.donate-btn {
  background: var(--brand);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: .95rem;
  padding: .85em 1.7em;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-block;
}
.donate-btn:hover { background: var(--brand-hover); }

/* -- mobile menu toggle: input + label + nav are siblings of the SAME
      parent (.header-inner), which is what makes the ~ selector below
      actually work. Nesting the checkbox inside another wrapper breaks it. -- */
.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 26px; height: 20px;
  position: relative;
}
.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
  content: '';
  position: absolute;
  height: 2px; width: 100%;
  background: var(--brand);
  left: 0; top: 9px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-label span::before { top: -8px; }
.nav-toggle-label span::after  { top: 8px; }
input.nav-toggle { display: none; }

@media (max-width: 760px) {
  nav.main-nav {
    position: absolute;
    top: 76px; right: 0;
    width: 75%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-bottom-left-radius: 10px;
    box-shadow: 0px 35px 35px 0px rgba(0, 0, 0, 0.08);
    display: none;
  }
  nav.main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5em 24px 1.2em;
  }
  nav.main-nav li { border-top: 1px solid var(--bg-tint); }
  nav.main-nav a { display: block; padding: .8em 0; }
  nav.main-nav .donate-btn {
    display: inline-block;
    margin-top: .6em;
    padding: .85em 1.7em;
  }
  .nav-toggle-label { display: block; }
  input.nav-toggle:checked ~ nav.main-nav { display: block; }
}

/* ==========================================================================
   Hero / sections
   ========================================================================== */

.hero { padding: 4.5em 0 3em; }
.hero p { font-size: 1.14rem; color: var(--ink-soft); }
.hero p strong { color: var(--ink); }

main .page { padding-bottom: 1em; }
.callout {
  background-color: color-mix(in srgb, var(--brand-light), transparent 50%);
  border-radius: 10px;
  margin: auto;
  padding: 10px;
  text-align: center;
  width: 85%;
}
.email {
  font-family: var(--font-code);
  font-size: 0.9em;
  letter-spacing: 0.02em;
}
.content-block { margin-bottom: 2.6em; }
.content-block img {
  border-radius: 10px;
  margin: 1.6em 0;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: .85em 1.8em;
  border-radius: 6px;
  margin-top: .6em;
}
.btn:hover { background: var(--brand-hover); color: #fff; }

.references { font-size: .92rem; color: var(--ink-soft); }
.references li { margin-bottom: .9em; }
.references em { font-style: italic; }

/* ==========================================================================
   Team grid (home section)
   ========================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 2em;
  margin: 1.6em 0 2.4em;
}
.person {
  border-radius: 12px;
  box-shadow: 0px 0px 35px 0px rgba(0, 0, 0, 0.08);
  padding: 40px;
}
.person img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: .9em;
  background: var(--bg-tint);
}
.person h4 {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
  margin: 0 0 .1em;
}
.person .role { color: var(--ink-soft); font-size: .9rem; margin: 0 0 .5em; }
.person .links { display: flex; gap: .8em; }
.person .links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .85rem;
  border-bottom: 1px solid var(--line);
}
.person .links a:hover { color: var(--brand); border-color: var(--brand); }

details.cohort { border-top: 1px solid var(--line); }
details.cohort:last-of-type { border-bottom: 1px solid var(--line); }
details.cohort summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1em 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
details.cohort summary::-webkit-details-marker { display: none; }
details.cohort summary::after {
  content: '+';
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--brand-light);
}
details.cohort[open] summary::after { content: '\2013'; }
details.cohort .team-grid { padding-bottom: 1.8em; }

/* ==========================================================================
   Footer
   ========================================================================== */

footer.site-footer {
  display: flex;
  border-top: 1px solid var(--line);
  background: var(--bg-tint);
  margin-top: 4em;
  padding: 2em 20px 1em;
  column-gap: 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: .88rem;
}
footer.site-footer p { margin-bottom: .6em; max-width: 80ch; margin-left: auto; margin-right: auto; }
footer.site-footer a { color: var(--ink-soft); text-decoration: underline; }
footer.site-footer a:hover { color: var(--brand); }

@media (max-width: 500px) {
  body { font-size: 16px; }
  .header-inner { height: 76px; }
}

/* ==========================================================================
   Fragment-based page switching
   Pages are shown/hidden purely with :target. #home is last in the
   source order on purpose.
   ========================================================================== */

.page { display: none; }
.page:target { display: block; }
#home { display: block; } /* default when there's no hash yet */
#seminar:target ~ #home,
#apply:target ~ #home { display: none; }

/* Highlight the active nav link (progressive enhancement — modern
   browsers only; harmless no-op on older ones). */
body:has(#seminar:target) a[href="#seminar"],
body:has(#apply:target) a[href="#apply"],
body:not(:has(#seminar:target)):not(:has(#apply:target)) a[href="#home"] {
  color: var(--brand-hover);
  border-bottom-color: var(--brand-light);
}
