/* Arnold Geochemistry Lab — shared styles
   Colors: primary charcoal #2B2D2F, accent forest green #2E6B4A. System fonts only. */

:root {
  --charcoal: #2b2d2f;
  --green: #2e6b4a;
  --green-dark: #24563b;
  --green-soft: #e8f1ec;
  --bg: #ffffff;
  --bg-alt: #f5f6f5;
  --ink: #2b2d2f;
  --muted: #5f6466;
  --line: #e1e4e2;
  --ph-bg: #fff4c2;   /* placeholder highlight */
  --ph-line: #d9b100;
  --radius: 8px;
  --max: 1040px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--font);
}

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

a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: var(--charcoal); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); font-weight: 700; margin-top: 1.8em; }
h3 { font-size: 1.15rem; font-weight: 600; }

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

/* ---------- header / nav ---------- */

.site-header { background: var(--charcoal); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-block: 14px;
}
.brand {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { width: 24px; height: 32px; flex: none; }
.brand:hover { color: #fff; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a {
  color: #d6dad8;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .95rem;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav a[aria-current="page"] { color: #fff; background: var(--green); }

/* ---------- homepage intro ---------- */

.intro {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(40px, 8vw, 80px);
}
.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
@media (max-width: 760px) { .intro-grid { grid-template-columns: 1fr; } }
.intro-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
.intro h1 { max-width: 22ch; }
.intro p { font-size: 1.1rem; max-width: 65ch; margin: 0 0 1.4em; }
.intro .affil { color: var(--green); font-weight: 600; font-size: .95rem; margin-bottom: 10px; }

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { background: var(--green-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--green); border: 1px solid var(--green); margin-left: 6px; }
.btn.secondary:hover { background: var(--green-soft); color: var(--green-dark); }

/* ---------- homepage "Join the lab" band ---------- */

.join {
  background: var(--green);
  color: #fff;
  padding-block: clamp(32px, 6vw, 52px);
}
.join h2 { color: #fff; margin: 0 0 .4em; }
.join p { max-width: 70ch; margin: 0; font-size: 1.08rem; }
.join a { color: #fff; font-weight: 600; }
.join a:hover { color: #fff; text-decoration-thickness: 2px; }

/* ---------- page layout ---------- */

main { padding-bottom: 64px; }
.page-head { padding-block: 44px 0; }
.page-head p { color: var(--muted); max-width: 65ch; margin: 0; }
/* page heading with a photo beside it (stacked on phones) */
.head-photo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.head-photo img { width: 100%; height: auto; border-radius: var(--radius); }
@media (max-width: 760px) { .head-photo { grid-template-columns: 1fr; } }
.more { margin-top: 12px; }

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--bg);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.meta { color: var(--muted); font-size: .92rem; margin: 0 0 8px; }

/* project with photo: photo left, text right; stacked on phones */
.projects { display: grid; gap: 24px; }
.project {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
/* every photo is shown 4:3 (cropped to fit) so tall photos don't stretch the card */
.project img { width: 100%; height: auto; aspect-ratio: 4 / 3; align-self: stretch; object-fit: cover; }
.project > div { padding: 22px 24px; border-left: 4px solid var(--green); }
.project h3 { margin-top: 0; }
.project p:last-child { margin-bottom: 0; }
@media (max-width: 680px) {
  .project { grid-template-columns: 1fr; }
  .project img { align-self: auto; }
  .project > div { border-left: none; border-top: 4px solid var(--green); }
}

/* ---------- people ---------- */

.people {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.person img,
.photo-ph {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.photo-ph {
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: .9rem;
}
.person h3 { margin: 12px 0 2px; font-size: 1.05rem; }
.person p { margin: 0; color: var(--muted); font-size: .93rem; }

.pi {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
.pi-photo { width: 100%; height: auto; border-radius: var(--radius); }
@media (max-width: 680px) { .pi { grid-template-columns: 1fr; } .pi .photo-ph, .pi img { max-width: 260px; } }

/* ---------- publications ---------- */

.pub-year {
  font-size: 1.15rem;
  color: var(--green);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 28px 0 4px;
}
.jump { color: var(--muted); font-size: .95rem; margin-top: 16px; }
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pubs li:last-child { border-bottom: none; }
.pub-title { font-weight: 600; }
.pub-venue { font-style: italic; }
.pub-links { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: .8rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green-dark);
  text-decoration: none;
}
.legend { color: var(--muted); font-size: .92rem; }

/* ---------- placeholders (remove the class once real text is in) ---------- */

.ph {
  background: var(--ph-bg);
  outline: 1px dashed var(--ph-line);
  border-radius: 3px;
  padding: 0 3px;
}

/* ---------- footer ---------- */

.site-footer { background: var(--charcoal); color: #d6dad8; font-size: .93rem; }
.site-footer a { color: #fff; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
}
.site-footer p { margin: 0; }
.site-footer .ph { color: var(--charcoal); }
