/* CNN4All — static site stylesheet
   Colors and sizes carried over from the original WordPress (Styx) theme. */
:root {
  --green: #81d742;
  --green-dark: #4b9a13;
  --green-deep: #203a0d;
  --menu: #325c14;
  --menu-active: #214b15;
  --blue: #3182ce;
  --text: #2d3748;
  --bg: #f7fafc;
  --white: #ffffff;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }
a:hover { color: var(--green-deep); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--white); padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header / navigation ---------- */
.site-header {
  background: var(--white);
  padding: 10px 0;
  position: relative;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.logo img { height: 50px; width: auto; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid rgba(0,0,0,.15); border-radius: 4px;
  padding: 6px 10px; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--menu); margin: 5px 0;
}

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; gap: 4px; }
.main-nav > ul > li { position: relative; }
.main-nav a,
.main-nav button {
  display: block;
  padding: 8px 12px;
  color: var(--menu);
  font-size: 16px;
  text-decoration: none;
  background: none; border: 0; font-family: inherit; line-height: 1.6; cursor: pointer;
}
.main-nav a:hover, .main-nav button:hover,
.main-nav li:focus-within > button { color: var(--green); }
.main-nav a[aria-current="page"] { color: var(--menu-active); font-weight: 600; }

.main-nav .has-sub > button::after {
  content: ""; display: inline-block; margin-left: 5px; vertical-align: 3px;
  border-top: 5px solid currentColor; border-left: 4px solid transparent; border-right: 4px solid transparent;
}
.submenu {
  display: none;
  position: absolute; right: 0; top: 100%;
  min-width: 220px;
  background: var(--white);
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 4px;
  padding: 6px 0;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.submenu a { font-size: 14px; padding: 5px 18px; white-space: nowrap; }
.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu,
.has-sub.open > .submenu { display: block; }

@media (max-width: 991px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; padding: 8px 0; }
  .main-nav a, .main-nav button { padding: 8px 4px; width: 100%; text-align: left; }
  .submenu {
    position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; display: none;
  }
  .has-sub:hover > .submenu, .has-sub:focus-within > .submenu { display: none; }
  .has-sub.open > .submenu { display: block; }
  .submenu a { white-space: normal; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: url("/images/11-02-21-02-scaled.jpg") center center / cover no-repeat;
  color: var(--white);
  text-align: center;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 70px 0;
  margin-bottom: 32px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; background: #000; opacity: .2;
}
.hero .container { position: relative; }
.hero h1 {
  font-size: 3rem; line-height: 1.6; margin: 0 0 8px; font-weight: 700;
}
.hero p { font-size: 20px; line-height: 1.6; margin: 0 0 24px; }
.hero--page { min-height: 42vh; }
.hero--page h1 { font-size: 2.6rem; }

.btn {
  display: inline-block;
  font-size: 20px; line-height: 1.5;
  padding: 10px 30px; margin: 0 10px 10px;
  border: 3px solid; border-radius: 4px;
  text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--green); color: #fff; border-color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; border-color: var(--green-deep); }
.btn-secondary { background: transparent; color: #fff; border-color: var(--blue); }
.btn-secondary:hover { background: #fff; color: #000; border-color: #fff; }

@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; line-height: 1.3; margin-bottom: 16px; }
  .hero--page h1 { font-size: 1.8rem; }
  .hero p { font-size: 17px; }
  .btn { font-size: 17px; padding: 8px 22px; }
}

/* ---------- Content card ---------- */
.card {
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 15px 25px -10px rgba(0,0,0,.05);
  margin-bottom: 24px;
}
.card-body { padding: 1.25rem 1.5rem; }
.card-body > :first-child { margin-top: 0; }
.card-body > :last-child { margin-bottom: 0; }
.card-body p { margin: 0 0 1rem; }
.card-body ol, .card-body ul { padding-left: 1.5rem; margin: 0 0 1rem; }
.card-body li { margin-bottom: .4rem; }
.card-body img { margin: 1rem auto; }
.card-body hr { border: 0; border-top: 1px solid #e2e8f0; margin: 1.5rem 0; }
.card-body a { overflow-wrap: anywhere; }
.center { text-align: center; }

/* Two-column book cover gallery on the home page */
.gallery {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; margin: 0; }
@media (max-width: 480px) { .gallery { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green);
  color: var(--text);
  text-align: center;
  padding: 64px 16px;
  font-size: 17px;
}
.site-footer p { margin: 0; }

/* ---------- Headings inside content ---------- */
.card-body h2 { font-size: 1.45rem; color: var(--menu); margin: 1.75rem 0 .75rem; line-height: 1.3; }
.card-body h3 { font-size: 1.2rem; margin: .25rem 0 .5rem; line-height: 1.35; }

/* ---------- Bio page ---------- */
.profile { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.profile .profile-photo { margin: 0; border-radius: 4px; width: 100%; }
.profile h2:first-of-type { margin-top: 1.25rem; }
.lead-in { font-size: 1.1rem; }
.photo-figure { margin: 2rem auto; max-width: 420px; text-align: center; }
.photo-figure img { margin: 0 auto .5rem; border-radius: 4px; }
.photo-figure figcaption { font-size: .95rem; color: #4a5568; }
@media (max-width: 700px) {
  .profile { grid-template-columns: 1fr; }
  .profile .profile-photo { max-width: 280px; margin: 0 auto; }
}

/* ---------- Research study cards ---------- */
.study { border-left: 4px solid var(--green); background: #f7fafc; padding: 1rem 1.25rem; margin: 0 0 1.5rem; border-radius: 0 4px 4px 0; }
.study > :last-child { margin-bottom: 0; }
.study-status { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--green-dark); margin: 0 0 .25rem !important; }
.study-authors { font-size: .95rem; color: #4a5568; }

/* ---------- Downloads ---------- */
.downloads { list-style: none; padding: 0 !important; }
.downloads li { padding: .75rem 0; border-bottom: 1px solid #e2e8f0; }
.downloads .meta { display: block; font-size: .9rem; color: #4a5568; }
@media (max-width: 600px) {
  .card-body { padding: 1rem; }
  .study { padding: .85rem .9rem; }
}
