/* ===== Akinyi Lab — shared stylesheet ===== */

:root {
  --sand: #F6F1E6;
  --sand-deep: #EFE8D8;
  --ink: #232821;
  --ink-soft: #4A5047;
  --forest: #2F4438;
  --forest-deep: #1D2B22;
  --clay: #A6582E;
  --clay-bright: #FF9B54;
  --clay-deep: #7C4222;
  --line: #DAD0B8;
  --card: #FFFFFF;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--sand);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--forest-deep);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1.1em;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.hero-tagline,
.nav-links a,
.footer-links a,
.eyebrow {
  text-align: left;
}

a { color: var(--clay-deep); text-decoration-thickness: 1px; }
a:hover { color: var(--clay); }

.eyebrow {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 600;
  margin-bottom: 0.7em;
}

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

/* ---------- Nav ---------- */
.site-nav {
  background: var(--forest-deep);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--clay);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  flex-wrap: wrap;
  gap: 0.5rem 0;
}
.brand {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: #FBF7EC;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand span { color: var(--clay); }
.nav-links {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: #D8D2C0;
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #FBF7EC;
  border-bottom-color: var(--clay);
}

/* ---------- Hero ---------- */
.hero-title {
  text-align: center;
  padding: 3.2rem 0 2.4rem;
}
.hero-title .eyebrow { text-align: center; color: var(--clay-deep); }
.hero-title h1 { text-align: center; margin: 0; }

.hero-image {
  position: relative;
  width: 100%;
  height: 46vh;
  min-height: 340px;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 24s infinite;
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s; }
.hero-slide:nth-child(4) { animation-delay: 18s; }

@keyframes heroFade {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  22%  { opacity: 1; }
  28%  { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; opacity: 0; }
  .hero-slide:first-child { opacity: 1; }
}

.hero-caption {
  position: absolute;
  left: 1.75rem;
  bottom: 1.75rem;
  right: 1.75rem;
  display: flex;
  justify-content: flex-start;
}
.hero-caption p {
  background: rgba(22,32,26,0.82);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  margin: 0;
  text-align: left;
  color: #FFFFFF;
  font-size: 1.02rem;
  max-width: 560px;
}
@media (max-width: 640px) {
  .hero-caption { left: 1rem; right: 1rem; bottom: 1rem; }
  .hero-caption p { padding: 0.85rem 1.1rem; font-size: 0.95rem; }
}

.page-header {
  background: var(--forest);
  color: #FBF7EC;
  padding: 3.4rem 0 2.6rem;
}
.page-header h1 { color: #FBF7EC; }
.page-header .eyebrow { color: #E7B98D; }
.page-header p { color: #D8D2C0; max-width: 640px; margin: 0; }

/* ---------- Sections ---------- */
.section { padding: 3.4rem 0; }
.section-tight { padding: 2.2rem 0; }
.section-alt { background: var(--sand-deep); }

.divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 2.4rem;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.divider .dot {
  width: 7px; height: 7px;
  background: var(--clay);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Cards / rows ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.8rem 2rem;
  margin-bottom: 1.6rem;
}

.project-row {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.8rem;
  align-items: start;
  margin-bottom: 2.6rem;
}
.project-row img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.project-row .meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.8rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}
@media (max-width: 720px) {
  .project-row { grid-template-columns: 1fr; }
}

.theme-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: var(--forest);
  color: #FBF7EC;
  border-radius: 50%;
  font-family: "Fraunces", serif;
  font-size: 0.95rem;
  margin-right: 0.6rem;
  flex-shrink: 0;
}
.theme-head { display: flex; align-items: center; margin-bottom: 0.5rem; }

/* ---------- Team ---------- */
.pi-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.2rem;
  align-items: start;
  margin-bottom: 3rem;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid var(--line);
}
.pi-row img, .pi-photo-placeholder {
  width: 220px; height: 290px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.pi-photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--forest);
  color: #E7B98D;
  font-family: "Fraunces", serif;
  font-size: 3rem;
}
@media (max-width: 640px) {
  .pi-row { grid-template-columns: 1fr; }
  .pi-row img, .pi-photo-placeholder { width: 100%; height: 340px; }
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.9rem 1.6rem;
}
.team-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-bottom: 0.9rem;
}
.team-card h3 { margin-bottom: 0.15em; font-size: 1.08rem; }
.team-card .role {
  font-size: 0.82rem;
  color: var(--clay-deep);
  font-weight: 600;
  margin-bottom: 0.6em;
  display: block;
}
.team-card p { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 0.6em; text-align: left; hyphens: none; }
.team-card .email { font-size: 0.85rem; }

.alumni-list { columns: 2; column-gap: 3rem; font-size: 0.95rem; }
.alumni-list p { margin: 0 0 0.4em; break-inside: avoid; }
@media (max-width: 640px) { .alumni-list { columns: 1; } }

/* ---------- Publications ---------- */
.pub-year {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  color: var(--clay-deep);
  margin: 2.2rem 0 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--line);
}
.pub-year:first-of-type { margin-top: 0; }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
  line-height: 1.55;
}
.pub-list li:last-child { border-bottom: none; }

/* ---------- Media ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.6rem;
}
.media-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.media-card .video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--forest-deep);
}
.media-card .video-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.media-card .body { padding: 1.2rem 1.3rem; }
.media-card .tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 700;
  display: block;
  margin-bottom: 0.4em;
}
.media-card h3 { font-size: 1.02rem; margin-bottom: 0.35em; }
.media-card p { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 0.6em; }
.media-card a.go { font-size: 0.88rem; font-weight: 600; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
}
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-block h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clay-deep);
  margin-bottom: 0.7em;
}
.contact-block p { margin-bottom: 0.4em; }
.social-row { display: flex; gap: 1.2rem; margin-top: 0.5rem; flex-wrap: wrap; }
.social-row a {
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--line);
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--forest-deep);
}
.social-row a:hover { border-color: var(--clay); color: var(--clay-deep); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-deep);
  color: #C9C3B1;
  padding: 2.4rem 0;
  font-size: 0.88rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer a { color: #E7B98D; }
.footer-links {
  display: flex; gap: 1.4rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0;
}
.footer-links a { color: #C9C3B1; text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: #FBF7EC; }
