/* ============================================================
   Sam Hirst — Desert Southwest Theme
   Palette: cream #f5f8e4 · teal #719f9f · orange #ed8b22
            burgundy #663434 · sand #826640
   ============================================================ */

:root {
  --cream:    #f5f8e4;
  --teal:     #719f9f;
  --orange:   #ed8b22;
  --burgundy: #663434;
  --sand:     #826640;

  /* Derived */
  --dark:      #150a0a;   /* near-black warm */
  --dark2:     #2a1212;   /* card on dark */
  --text:      #2a1a0a;   /* body on light */
  --muted:     #6e5c47;   /* subdued on light */
  --line:      #e2dcd0;
  --line-dark: rgba(255 255 255 / 0.09);

  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ── Navigation ──────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}

.site-header.scrolled {
  background: rgba(21, 10, 10, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--line-dark);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
}

.brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: white;
  flex-shrink: 0;
}

.nav { display: flex; gap: 4px; }

.nav-link {
  text-decoration: none;
  color: rgba(255 255 255 / 0.65);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 7px 15px;
  border-radius: 100px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-link:hover  { color: white; background: rgba(255 255 255 / 0.08); }
.nav-link.active { color: var(--orange); background: rgba(237 139 34 / 0.14); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile full-screen nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 0;
  background: rgba(21, 10, 10, 0.97);
  z-index: 150;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-nav.open { opacity: 1; pointer-events: all; }
.mobile-nav .nav-link {
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(255 255 255 / 0.8);
  padding: 10px 24px;
}
.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active { color: var(--orange); background: none; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: white;
}

.hero-bg {
  position: absolute;
  inset: -5%;
  background-size: cover;
  background-position: center 40%;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(21,10,10,0.55) 0%,
    rgba(21,10,10,0.65) 55%,
    rgba(21,10,10,0.82) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding: 0 28px;
  animation: fadeUp 1s 0.1s both;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
}

.hero-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3.8rem, 9vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: rgba(255 255 255 / 0.75);
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 0.9rem;
  color: rgba(255 255 255 / 0.45);
  margin-bottom: 38px;
  letter-spacing: 0.06em;
}

.hero-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  padding: 13px 28px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  display: inline-block;
}
.btn:hover { transform: translateY(-3px); }

.btn-primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 4px 20px rgba(237 139 34 / 0.4);
}
.btn-primary:hover {
  background: #f5a030;
  box-shadow: 0 8px 30px rgba(237 139 34 / 0.55);
}

.btn-ghost {
  border: 1.5px solid rgba(255 255 255 / 0.32);
  color: white;
  background: rgba(255 255 255 / 0.07);
}
.btn-ghost:hover {
  background: rgba(255 255 255 / 0.14);
  border-color: rgba(255 255 255 / 0.6);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255 255 255 / 0.45);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  z-index: 2;
  animation: fadeUp 1.8s 0.4s both;
}
.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(255 255 255 / 0.4), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── Section bases ───────────────────────────────────────── */
.section { padding: 84px 0; }
.section-light { background: var(--cream); }
.section-dark  { background: var(--dark);  color: white; }
.section-sand  { background: #eee8d8; }

.section-header        { margin-bottom: 56px; }
.section-header.light  { color: white; }

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(237 139 34 / 0.12);
  margin-bottom: 14px;
}
.section-dark .section-tag { background: rgba(237 139 34 / 0.18); }

.section-header h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-desc {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
}
.section-dark .section-desc { color: rgba(255 255 255 / 0.55); }

/* ── About ───────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 52px;
  align-items: start;
}

/* Photo block */
.about-photos { position: relative; }

.photo-main img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0 0 0 / 0.18);
}

.photo-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.photo-sub-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0 0 0 / 0.12);
}

/* About text */
.about-text { padding-top: 16px; }

.lead-text {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--burgundy);
  line-height: 1.55;
  margin-bottom: 22px;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 14px;
  font-size: 0.97rem;
}

.theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(113 159 159 / 0.1);
  color: var(--teal);
  border: 1px solid rgba(113 159 159 / 0.3);
  letter-spacing: 0.02em;
}

/* ── Research ─────────────────────────────────────────────── */
.research-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.research-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--dark2);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.research-card.has-image { grid-template-columns: 300px 1fr; }

.research-card:hover {
  border-color: rgba(237 139 34 / 0.35);
  background: rgba(255 255 255 / 0.04);
  box-shadow: 0 8px 32px rgba(0 0 0 / 0.3);
}

.research-card-img {
  position: relative;
  overflow: hidden;
  min-height: 240px;
}
.research-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.research-card:hover .research-card-img img { transform: scale(1.04); }

.research-card-body { padding: 28px 32px; }

.research-number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--orange);
  margin-bottom: 10px;
}

.research-card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
  line-height: 1.3;
}

.research-affil {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.04em;
  margin-bottom: 18px !important;
}

.research-card p {
  color: rgba(255 255 255 / 0.6);
  font-size: 0.94rem;
  line-height: 1.78;
  margin-bottom: 10px;
}
.research-card p:last-child { margin-bottom: 0; }

/* ── Publications ─────────────────────────────────────────── */
.pub-list {
  list-style: none;
  margin-bottom: 24px;
}

.pub-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  transition: padding-left 0.25s;
}
.pub-item:last-child { border-bottom: 1px solid var(--line); }
.pub-item:hover { padding-left: 6px; }

.pub-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.06em;
  padding-top: 3px;
  white-space: nowrap;
}

.pub-content p {
  font-size: 0.94rem;
  line-height: 1.72;
  color: var(--muted);
  margin-bottom: 10px;
}
.pub-content p:last-child { margin-bottom: 0; }
.pub-content strong { color: var(--text); }

.pub-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(237 139 34 / 0.1);
  border: 1px solid rgba(237 139 34 / 0.28);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.pub-links a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid rgba(113 159 159 / 0.3);
  border-radius: 100px;
  transition: background 0.2s, border-color 0.2s;
}
.pub-links a:hover {
  background: rgba(113 159 159 / 0.12);
  border-color: var(--teal);
  color: var(--text);
}

.pub-note { font-size: 0.84rem; color: var(--muted); margin-bottom: 6px; }

.pub-subheading {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 48px 0 4px;
  padding-top: 48px;
  border-top: 2px solid var(--orange);
  display: inline-block;
}

.scholar-link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.scholar-link:hover { color: var(--orange); }

/* Photo credit line */
.photo-credit {
  margin-top: 20px;
  font-size: 0.8rem;
  color: rgba(255 255 255 / 0.4);
  text-align: center;
  font-style: italic;
}
.photo-credit a {
  color: rgba(255 255 255 / 0.65);
  text-decoration: none;
  border-bottom: 1px solid rgba(255 255 255 / 0.25);
  transition: color 0.2s, border-color 0.2s;
}
.photo-credit a:hover {
  color: var(--orange);
  border-color: var(--orange);
}

/* ── Field Work Gallery ──────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: 8px;
}

.gallery-item         { grid-column: span 1; grid-row: span 1; }
.gallery-item.gi-tall { grid-column: span 2; grid-row: span 2; }
.gallery-item.gi-wide { grid-column: span 2; grid-row: span 1; }

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  background: var(--dark2);
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.07); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(21 10 10 / 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay span {
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1.5px solid rgba(255 255 255 / 0.55);
  padding: 8px 18px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10 4 4 / 0.96);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lb-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 90vw;
  max-height: 90vh;
}

#lb-img {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 40px 80px rgba(0 0 0 / 0.5);
  animation: lbFadeIn 0.25s ease;
}

@keyframes lbFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

#lb-caption {
  color: rgba(255 255 255 / 0.55);
  font-size: 0.88rem;
  text-align: center;
  font-style: italic;
}

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: rgba(255 255 255 / 0.1);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.6rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255 255 255 / 0.2); }

.lb-close { top: 20px; right: 20px; font-size: 1.8rem; }
.lb-prev  { left: 16px;  top: 50%; transform: translateY(-50%); font-size: 2rem; }
.lb-next  { right: 16px; top: 50%; transform: translateY(-50%); font-size: 2rem; }

/* ── Contact ──────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  max-width: 900px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 28px 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0 0 0 / 0.1);
  border-color: var(--orange);
}

.contact-icon {
  font-size: 1.4rem;
  color: var(--orange);
  margin-bottom: 6px;
  line-height: 1;
}

.contact-card strong { font-size: 0.88rem; font-weight: 700; }
.contact-card span   { font-size: 0.82rem; color: var(--muted); }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: rgba(255 255 255 / 0.35);
  padding: 22px 0;
  font-size: 0.82rem;
  text-align: center;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.9; }
}

.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .research-card.has-image { grid-template-columns: 1fr; }
  .research-card-img img   { height: 240px; min-height: unset; }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
  .gallery-item.gi-tall { grid-column: span 2; grid-row: span 1; }
  .gallery-item.gi-wide { grid-column: span 2; }
}

@media (max-width: 768px) {
  .nav        { display: none; }
  .hamburger  { display: flex; }
  .mobile-nav { display: flex; }

  .section { padding: 72px 0; }

  .hero-name { letter-spacing: -1px; }

  .about-grid    { grid-template-columns: 1fr; gap: 40px; }
  .photo-sub     { grid-template-columns: 1fr 1fr; }
  .photo-main img { height: 260px; }

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

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }
  .gallery-item.gi-tall,
  .gallery-item.gi-wide { grid-column: span 1; grid-row: span 1; }

  .research-card-body { padding: 24px 22px; }

  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
