/* =========================================================
   Earnest J. Ujaama — site stylesheet
   Sections: Tokens (light + dark) → Base → Utility bar →
   Nav / sticky header → Hero → Sections → Footer → Responsive
   ========================================================= */

:root {
  --paper: #EFEAE1;
  --paper-deep: #E6E0D3;
  --ink: #1C1B19;
  --ink-soft: #5B564C;
  --navy: #1B2438;
  --oxblood: #7A1F2B;
  --rule: #C9C1B4;
  --rule-on-navy: rgba(239, 234, 225, 0.22);
  --on-dark: #EFEAE1; /* fixed light text for the footer's always-dark strip */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset, 90px);
  font-size: 150%; /* fixed readable baseline */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif, "Newsreader", Georgia, "Times New Roman", serif);
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

a {
  color: inherit !important; /* defends against Divi's own link-color rules */
}

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- Sticky header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
}

nav {
  border-bottom: 2px solid var(--oxblood);
  background: var(--paper);
}

nav .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--ink);
}

.wordmark {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: clamp(0.6875rem, 2.6vw, 0.9375rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--oxblood) !important;
  white-space: nowrap;
}

.navlinks {
  display: flex;
  gap: 32px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.875rem;
}

.navlinks a {
  text-decoration: none;
  color: var(--ink-soft) !important;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.navlinks a:hover {
  color: var(--ink) !important;
  border-color: var(--oxblood);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--rule);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--ink);
}

/* ---------- Hero ---------- */

header.hero {
  padding: 88px 0 96px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 64px;
  align-items: start;
}

.hero-rule {
  width: 56px;
  height: 3px;
  background: var(--oxblood);
  margin-bottom: 28px;
}

h1 {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 2.875rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  max-width: 15ch;
}

.hero-sub {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 36px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 13px 22px;
  display: inline-block;
  border: 1px solid var(--ink);
}

.btn-primary {
  background: var(--oxblood);
  border-color: var(--oxblood);
  color: var(--paper) !important;
}

.btn-primary:hover {
  background: #631A24;
  border-color: #631A24;
}

.btn-secondary {
  background: transparent;
  color: var(--ink) !important;
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper) !important;
}

/* Citation block */

.citation {
  border: 1px solid var(--ink);
  padding: 30px 28px;
  background: var(--paper-deep);
}

.citation-label {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.citation dl {
  margin: 0;
}

.citation dt {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin: 0 0 4px;
}

.citation dd {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 1rem;
  margin: 0 0 18px;
  line-height: 1.4;
}

.citation dd:last-child {
  margin-bottom: 0;
}

.citation .diss-title {
  font-style: italic;
}

/* ---------- Section shell ---------- */

section {
  padding: 76px 0;
  border-bottom: 1px solid var(--rule);
}

.kicker {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  color: var(--oxblood);
  margin: 0 0 14px;
}

h2 {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.875rem;
  margin: 0 0 28px;
  max-width: 20ch;
}

.measure {
  max-width: 68ch;
}

.measure p {
  color: var(--ink);
  margin: 0 0 18px;
}

/* ---------- About ---------- */

.about-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

.about-photo-wrap {
  /* Fills its 260px grid column; the photo itself is cropped to a
     circle (see .about-photo) rather than shown at full rectangle. */
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border: 1px solid var(--ink);
  background: var(--paper-deep);
  overflow: hidden;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin: 14px 0 0;
}

.about-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-deep);
}

/* ---------- Research ---------- */

.research-intro {
  max-width: 68ch;
  margin-bottom: 40px;
}

.research-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.research-list li {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
}

.research-list h3 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  margin: 0;
  color: var(--ink);
}

.research-list p {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  margin: 0;
  color: var(--ink);
  max-width: 60ch;
}

/* ---------- Publications ---------- */

.pub {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
}

.pub:last-child {
  border-bottom: 1px solid var(--rule);
}

.pub-year {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.pub-title {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-style: italic;
  margin: 0 0 8px;
}

.pub-desc {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0 0 10px;
  max-width: 60ch;
}

.pub-link {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}

/* ---------- Expertise ---------- */

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 64px;
}

.expertise-group {
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.expertise-group h3 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  margin: 0 0 10px;
}

.expertise-group p {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}

/* ---------- Footer / contact ---------- */

footer {
  background: var(--navy);
  color: var(--on-dark);
  padding: 72px 0 40px;
}

footer h2 {
  color: var(--on-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule-on-navy);
}

footer .kicker {
  color: #C98A92;
}

.footer-lede {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 1.375rem;
  line-height: 1.45;
  max-width: 30ch;
  margin: 0;
}

.contact-list {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
}

.contact-list dt {
  color: #A9A497;
  font-size: 0.75rem;
  margin: 0 0 4px;
}

.contact-list dd {
  margin: 0 0 22px;
}

.contact-list a {
  text-decoration: none;
  border-bottom: 1px solid rgba(239, 234, 225, 0.4);
}

.contact-list a:hover {
  border-color: var(--on-dark);
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  color: #A9A497;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .wrap {
    padding: 0 24px;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.25rem;
    max-width: none;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .research-list li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pub {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .foot-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

/* Below this width the nav links collapse behind a hamburger button
   (toggled by script.js) so the wordmark always has room to sit on
   one line instead of wrapping or overlapping the links. */
@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .navlinks {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--oxblood);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .navlinks.is-open {
    max-height: min(600px, calc(100vh - var(--header-offset, 90px)));
    overflow-y: auto;
  }

  .navlinks a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--rule);
  }

  .navlinks a:last-child {
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }

  .navlinks {
    transition: none;
  }
}

:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 2px;
}