:root {
  color-scheme: light dark;

  /* Palette pulled from nicoleadabunu.com's compiled Squarespace CSS */
  --color-bg: #ffffff;
  --color-text: #000000;
  --color-dark-accent: #393a3c;   /* hsl(240, 2.6%, 22.5%) */
  --color-light-accent: #dee0e1;  /* hsl(210, 3.2%, 87.8%) */
  --color-accent: #a89e93;        /* hsl(42.9, 3.9%, 64.5%) */
  --color-link: #23547d;          /* content links + h3 subheadings */

  /* Reference site uses Adobe Garamond Pro / Orpheus Pro (Adobe Fonts,
     not publicly hostable) — EB Garamond and Cormorant are the closest
     free equivalents. */
  --font-body: 'EB Garamond', 'Garamond', Georgia, serif;
  --font-heading: 'Cormorant', 'EB Garamond', Georgia, serif;

  --heading-1-size: 4rem;
  --heading-2-size: 2.8rem;
  --heading-3-size: 2.2rem;
  --heading-4-size: 1.2rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: #ee7318;
}

h1 { font-size: var(--heading-1-size); }
h2 { font-size: var(--heading-2-size); }
h3 { font-size: var(--heading-3-size); }
h4 { font-size: var(--heading-4-size); }

/* Sub-subheadings use the landing page's blue (h1/h2 stay orange) */
h3, h4 { color: var(--color-link); }

em, i {
  font-style: italic;
}

a {
  color: var(--color-link);
}

/* Header / nav */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 3rem;
  background: #12263c;
  border-bottom: none;
  position: relative;
}

.logo {
  margin: 0;
}

.logo a {
  font-family: 'Oswald', Arial, sans-serif;
  font-weight: 400;
  font-size: 2.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #ffffff;
}

.site-nav ul {
  display: flex;
  gap: 2.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: #e9edf3;
  font-family: Georgia, serif;
  font-style: italic;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: #ee7318;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 1px;
  background: #ffffff;
}

/* Light/dark theme toggle (sits at the end of the nav) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #e9edf3;
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.theme-toggle:hover {
  color: #ee7318;
}

/* Main content */
main {
  padding: 4rem 2rem;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  flex: 1 0 auto; /* grow to fill so the footer stays at the bottom on short pages */
}

.page-content p {
  margin: 0 0 1.5rem;
  font-size: 1.25rem;
}

/* Pull the page title out of the centered column to the far-left edge,
   aligned with the site logo's gutter. */
.page-content h1 {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: 3rem;
  text-align: left;
}

/* ===========================================================
   Landing page (home) — blue hero, photo left / text panel right
   =========================================================== */

/* Header pins over the hero on the home page and fades in a background on scroll */
.home .site-header {
  background: transparent;
  border-bottom: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.home .site-header.scrolled {
  background: #12263c;
  box-shadow: 0 1px 14px rgba(0, 0, 0, 0.28);
}

/* Hero is the whole page: no padding above (touches header) or below (touches footer) */
.home main { padding: 0; }

/* Full-bleed hero band: photo on the left, all text on the right */
.hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: linear-gradient(160deg, #12263c 0%, #1b4162 58%, #23547d 100%);
  color: #ffffff;
  overflow: hidden;
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  gap: 3.5rem;
}

.hero-photo {
  width: 40%;
  max-width: 430px;
  height: auto;
  align-self: flex-end;
  display: block;
}

.hero-text {
  flex: 1;
  align-self: center;
  padding: 4rem 0;
  color: #ffffff;
}

.hero-name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.2rem, 3.6vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: #ffffff;
}

.hero-tagline {
  color: #d9e2ec;
  font-size: 1.2rem;
  margin: 0 0 2.75rem;
}

.hero-quote {
  margin: 0 0 2rem;
}

.hero-quote::before {
  content: '\201C'; /* large opening quotation mark */
  display: block;
  font-family: var(--font-heading);
  font-size: 3.75rem;
  line-height: 0.6;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.35rem;
}

.hero-quote p {
  font-style: italic;
  color: #eef2f7;
  margin: 0 0 0.65rem;
}

.hero-quote cite {
  display: block;
  font-style: normal;
  color: #d9e2ec;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.hero-cta {
  display: inline-block;
  background: #ee7318;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.7rem 1.9rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.hero-cta:hover { background: #d5610c; }

/* Each category (heading + its publications), separated by a divider */
.publication-group {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-light-accent);
}

.publication-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.publication-category {
  margin-bottom: 1.25rem;
}

.publication-list {
  margin: 0;
  padding-left: 1.5rem;
}

.publication-list li {
  margin-bottom: 0.5rem;
}

.publication-list li:last-child {
  margin-bottom: 0;
}

/* Grouped content sections (e.g. Teaching / Educational Publications page),
   separated by a divider like the publication groups. */
.content-group {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-light-accent);
}

.content-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.content-group > h2 {
  margin-bottom: 1.5rem;
}

.content-subsection {
  margin-bottom: 1.75rem;
}

.content-subsection:last-child {
  margin-bottom: 0;
}

.content-subsection h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.content-list {
  margin: 0;
  padding-left: 1.5rem;
}

.content-list li {
  margin-bottom: 0.5rem;
}

.content-list li:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 1.5rem 2.5rem;
  text-align: center;
  font-size: 0.875rem;
  background: #12263c;
  color: #c6d2df;
  border-top: 1px solid #23547d;
  flex-shrink: 0;
}

/* ===========================================================
   Dark theme — applied when the OS is in dark mode (and the user
   hasn't forced light), OR when the header toggle sets
   data-theme="dark". The header, footer and hero stay dark; the
   "white parts" become a dark grey with light text.
   =========================================================== */
:root[data-theme="dark"] {
  --color-bg: #2b2d30;          /* dark grey content background */
  --color-text: #e4e6e8;        /* light body text */
  --color-dark-accent: #a8abae; /* muted light for secondary text */
  --color-light-accent: #43464a;/* subtle divider on dark */
  --color-accent: #a89e93;
  --color-link: #7db0dd;        /* lighter blue for contrast on dark */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #2b2d30;
    --color-text: #e4e6e8;
    --color-dark-accent: #a8abae;
    --color-light-accent: #43464a;
    --color-accent: #a89e93;
    --color-link: #7db0dd;
  }
}

/* ===========================================================
   Mobile / narrow screens. Placed last so these overrides win
   over the base layout defined above.
   =========================================================== */
@media (max-width: 700px) {
  .site-header {
    padding: 1.25rem 1.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  /* Nav opens as a full-width dropdown panel below the header */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    background: #12263c;
    padding: 0.5rem 1.5rem 1.5rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.15rem;
    padding: 0.5rem 0 0;
  }

  /* Solid backdrop for the transparent home header while the menu is open */
  .home .site-header:has(.site-nav.is-open) {
    background: #12263c;
  }

  :root {
    --heading-1-size: 2.75rem;
    --heading-2-size: 2.1rem;
    --heading-3-size: 1.75rem;
  }

  .page-content h1 {
    padding-left: 1.5rem;
  }

  .hero-inner {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 7rem 1.5rem 3rem; /* top clears the fixed header */
    gap: 1.5rem;
  }

  .hero-photo {
    width: 70%;
    max-width: 260px;
  }

  .hero-text {
    align-self: center;
    padding: 0;
  }
}
