:root {
  --ink: #17211d;
  --muted: #657169;
  --paper: #f6f4eb;
  --surface: #fffdf7;
  --line: #d7d8c9;
  --teal: #2d806f;
  --teal-dark: #1f554a;
  --green: #4d7f42;
  --gold: #b47931;
  --charcoal: #22312b;
  --field: #e5efe3;
  --shadow: 0 20px 56px rgba(34, 49, 43, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(45, 128, 111, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 128, 111, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 8% 12%, rgba(180, 121, 49, 0.11), transparent 28%),
    radial-gradient(circle at 92% 30%, rgba(77, 127, 66, 0.13), transparent 26%),
    var(--paper);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 14px clamp(20px, 5vw, 72px);
  background: rgba(246, 244, 235, 0.9);
  border-bottom: 1px solid rgba(215, 216, 201, 0.85);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--charcoal), var(--green));
  color: var(--surface);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a:hover,
.text-link:hover,
.contact-links a:hover,
.pub-links a:hover {
  color: var(--teal);
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 16vh;
  background: linear-gradient(180deg, rgba(246, 244, 235, 0), var(--paper));
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(246, 244, 235, 0.98) 0%, rgba(246, 244, 235, 0.86) 34%, rgba(246, 244, 235, 0.24) 68%),
    linear-gradient(180deg, rgba(34, 49, 43, 0.04), rgba(34, 49, 43, 0.18)),
    url("assets/animal-genomics-hero-clean.png") center / cover no-repeat;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(45, 128, 111, 0.08) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, transparent 0%, rgba(246, 244, 235, 0.24) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  margin-left: clamp(20px, 7vw, 96px);
  padding: 7vh 0 15vh;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  line-height: 1.3;
}

.hero-subtitle {
  max-width: 620px;
  margin: 24px 0 0;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  line-height: 1.45;
}

.hero-summary {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid rgba(45, 128, 111, 0.28);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.74);
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--charcoal);
  border-radius: 8px;
  font-weight: 700;
}

.button.primary {
  background: linear-gradient(135deg, var(--charcoal), var(--teal-dark));
  color: var(--surface);
}

.button.secondary {
  background: rgba(255, 253, 247, 0.7);
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0;
}

.band {
  width: 100%;
  padding-inline: max(20px, calc((100% - 1180px) / 2));
  background:
    linear-gradient(135deg, rgba(45, 128, 111, 0.08), rgba(180, 121, 49, 0.06)),
    var(--field);
}

.section-heading {
  margin-bottom: 32px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.text-link {
  color: var(--teal-dark);
  font-weight: 700;
  white-space: nowrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 22px;
}

.bio-panel,
.facts-panel,
.research-item,
.project-card,
.publication,
.skill-card {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 253, 247, 0.92)),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.research-item,
.project-card,
.publication,
.skill-card {
  position: relative;
  overflow: hidden;
}

.research-item::before,
.project-card::before,
.publication::before,
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--green), var(--gold));
}

.bio-panel {
  padding: clamp(24px, 4vw, 42px);
}

.bio-panel p,
.research-item p,
.timeline-item p,
.project-card p,
.skill-card p,
.contact-content p {
  color: var(--muted);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.metric-row span {
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(45, 128, 111, 0.18);
  border-radius: 8px;
  background: rgba(229, 239, 227, 0.52);
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-row strong {
  display: block;
  color: var(--teal-dark);
  font-size: 1.35rem;
  line-height: 1.2;
}

.facts-panel {
  margin: 0;
  padding: 24px;
}

.photo-slot {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.photo-slot img {
  width: 132px;
  aspect-ratio: 1;
  border: 1px solid rgba(45, 128, 111, 0.28);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(34, 49, 43, 0.14);
  object-fit: cover;
  object-position: center top;
}

.facts-panel div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.facts-panel div:first-child {
  padding-top: 0;
}

.facts-panel div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.facts-panel dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.facts-panel dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.research-grid,
.project-grid,
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.skill-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.research-item,
.project-card,
.skill-card {
  padding: 24px;
}

.item-index,
.project-meta,
.pub-type {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 34px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item time {
  color: var(--teal-dark);
  font-weight: 800;
}

.muted {
  margin-top: -4px;
  color: var(--muted);
}

.filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.filter-button.active,
.filter-button:hover {
  border-color: var(--teal);
  background: linear-gradient(135deg, var(--teal), var(--green));
  color: var(--surface);
}

.publication-list {
  display: grid;
  gap: 14px;
}

.publication {
  padding: 24px;
}

.publication.is-hidden {
  display: none;
}

.authors,
.venue {
  margin: 8px 0;
  color: var(--muted);
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pub-links a,
.contact-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.grant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.grant-list span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(45, 128, 111, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.76);
  color: var(--teal-dark);
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 54px clamp(24px, 5vw, 52px);
  margin-bottom: 70px;
  background:
    linear-gradient(135deg, rgba(34, 49, 43, 0.98), rgba(31, 85, 74, 0.95)),
    var(--charcoal);
  color: var(--surface);
  border-radius: 8px;
}

.contact-content p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.76);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.contact-links a {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 840px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 4px;
  }

  .hero {
    min-height: auto;
  }

  .hero-backdrop {
    background:
      linear-gradient(180deg, rgba(246, 244, 235, 0.98) 0%, rgba(246, 244, 235, 0.78) 54%, rgba(246, 244, 235, 0.64) 100%),
      url("assets/animal-genomics-hero-clean.png") 58% center / cover no-repeat;
  }

  .hero-content {
    width: min(100% - 40px, 680px);
    margin: 0 auto;
    padding: 86px 0 130px;
  }

  .profile-grid,
  .research-grid,
  .project-grid,
  .skill-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .section-heading.split {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .site-nav {
    font-size: 0.88rem;
  }

  .hero-actions,
  .filter-group {
    width: 100%;
  }

  .button,
  .filter-button {
    flex: 1 1 auto;
  }

  .section {
    width: min(100% - 28px, 1180px);
    padding: 64px 0;
  }

  .band {
    padding-inline: 14px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
