/* ---------------------------------------------------------
   Hodgkinson Lab — design tokens
   Palette drawn from fluorescence-microscopy mitochondrial
   staining (teal ~ MitoTracker Green, coral ~ MitoTracker Red)
   on a cool paper-white ground with journal-style typesetting.
--------------------------------------------------------- */
:root {
  --paper: #F7F8F6;
  --paper-raised: #FFFFFF;
  --ink: #16211F;
  --ink-soft: #4B5751;
  --ink-faint: #8A938D;
  --line: #DBDED6;
  --line-strong: #C3C8BE;
  --teal: #2F6F62;
  --teal-deep: #1F4E45;
  --teal-tint: #E4EEEA;
  --coral: #BF5237;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max-width: 1080px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

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

a {
  color: var(--teal-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--coral); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  z-index: 100;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

/* ---------------------------------------------------------
   Header / nav
--------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 20px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark-ring {
  color: var(--teal);
  display: inline-flex;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  justify-content: flex-end;
}
.site-nav a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius);
}
.site-nav a:hover { color: var(--teal-deep); background: var(--teal-tint); }
.site-nav a.active {
  color: var(--teal-deep);
  background: var(--teal-tint);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--ink);
}

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 64px 28px 40px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  max-width: 14ch;
  margin-bottom: 0.5em;
}

.hero-lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
}
.button-primary {
  background: var(--teal-deep);
  color: var(--paper-raised);
}
.button-primary:hover { background: var(--ink); color: var(--paper-raised); }
.button-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}
.button-ghost:hover { border-color: var(--teal-deep); color: var(--teal-deep); background: var(--teal-tint); }
.button-small { padding: 9px 16px; font-size: 0.85rem; }

.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mito-hero {
  width: 100%;
  max-width: 400px;
  height: auto;
}
.mito-outer {
  stroke: none;
}
.mito-outline {
  fill: none;
  stroke: var(--teal-deep);
  stroke-width: 2.5;
}
.mito-inner {
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.3;
  opacity: 0.55;
}
.mito-cristae path {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.75;
}
.mito-cristae path:nth-child(even) {
  stroke: var(--teal-deep);
  opacity: 0.55;
}
.mito-nucleoid circle {
  fill: var(--coral);
  opacity: 0.85;
}
.mito-ring-nucleoid circle {
  fill: none;
  stroke: var(--coral);
  stroke-width: 1.6;
}
.mito-ring-nucleoid circle:not(:first-child) {
  fill: var(--coral);
  stroke: none;
}

.hero-art-caption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  margin: 0;
}

/* ---------------------------------------------------------
   Funding strip
--------------------------------------------------------- */
.funding-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 28px;
  margin-top: 8px;
}
.funding-strip p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------------------------------------------------------
   Generic page header / prose
--------------------------------------------------------- */
.page-header {
  padding: 56px 28px 8px;
}
.page-header h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  max-width: 22ch;
}
.alumni-header {
  padding-top: 20px;
}
.alumni-header h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}

.prose-block {
  padding: 20px 28px 56px;
  max-width: 74ch;
}
.prose-block .lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.prose-block p { margin: 0 0 1.1em; }

.position-block { margin-top: 28px; }
.position-block h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

/* ---------------------------------------------------------
   Research themes
--------------------------------------------------------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 8px auto 64px;
}
.theme-card {
  background: var(--paper-raised);
  padding: 30px 26px;
}
.theme-icon-wrap {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
}
.theme-icon { width: 100%; height: 100%; }
.theme-icon .ti-stroke {
  stroke: var(--teal-deep);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-icon .ti-fill-none { fill: none; }
.theme-icon .ti-accent { stroke: var(--coral); }
.theme-icon .ti-dot { fill: var(--teal-deep); stroke: none; }
.theme-icon .ti-arrow { stroke-width: 2; }
.theme-card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.theme-card p {
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------------------------------------------------------
   People grid
--------------------------------------------------------- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding: 24px 28px 56px;
}
.person-card { display: flex; flex-direction: column; }
.person-photo {
  aspect-ratio: 4 / 5;
  background: var(--teal-tint);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo-placeholder { color: var(--teal); opacity: 0.5; }
.person-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 2px;
}
.person-role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--teal-deep);
  margin: 0 0 10px;
}
.person-bio {
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------------------------------------------------------
   Publications
--------------------------------------------------------- */
.pub-list {
  padding: 16px 28px 64px;
  max-width: 900px;
}
.pub-entry {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.pub-entry:last-child { border-bottom: 1px solid var(--line); }
.pub-year {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--ink-faint);
  padding-top: 2px;
}
.pub-citation {
  font-size: 0.96rem;
  color: var(--ink);
}
.pub-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: nowrap;
  margin-left: 6px;
}

/* ---------------------------------------------------------
   Software
--------------------------------------------------------- */
.software-list {
  padding: 16px 28px 64px;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 900px;
}
.software-entry {
  background: var(--paper-raised);
  padding: 26px 28px;
}
.software-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.software-desc {
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.software-method {
  font-size: 0.86rem;
  color: var(--ink-faint);
  margin: 0 0 16px;
}
.software-method .label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--teal-deep);
}

/* ---------------------------------------------------------
   Contact
--------------------------------------------------------- */
.contact-block {
  padding: 16px 28px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
}

.contact-map-wrap {
  padding: 0 28px 64px;
  display: flex;
  justify-content: center;
}
.contact-map {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.contact-block address {
  font-style: normal;
  color: var(--ink-soft);
  line-height: 1.8;
}
.contact-details { margin: 0; }
.contact-details div { margin-bottom: 18px; }
.contact-details dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--teal-deep);
  margin-bottom: 4px;
}
.contact-details dd {
  margin: 0;
  font-size: 1.02rem;
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.footer-inner a { color: var(--ink-faint); }
.footer-inner a:hover { color: var(--coral); }
.footer-social {
  display: flex;
}
.footer-social a + a {
  margin-left: 16px;
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 880px) {
  .people-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-block { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }
  .hero-art { order: -1; max-width: 220px; margin: 0 auto 12px; }
  .theme-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    margin-top: 12px;
  }
  .site-nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .people-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
  .pub-entry { grid-template-columns: 1fr; gap: 4px; }
}
