:root {
  --sand: #F5EDE0;
  --sand-light: #FAF6F0;
  --sand-dark: #E8DCC8;
  --earth: #2A1F16;
  --earth-mid: #4A3728;
  --earth-light: #6B5744;
  --ochre: #C27830;
  --ochre-dark: #A86520;
  --ochre-light: #D4924A;
  --ochre-glow: rgba(194, 120, 48, 0.12);
  --rust: #8B4513;
  --sage: #6B7F5E;
  --bone: #E8DBC8;
  --bone-dark: #C9B99A;
  --font-display: 'EB Garamond', 'Garamond', 'Georgia', serif;
  --font-mono: 'Courier Prime', 'Courier New', monospace;
  --max-w: 1100px;
  --content-w: 740px;
  --nav-h: 60px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1.5rem); }
body { font-family: var(--font-display); color: var(--earth); background: var(--sand); line-height: 1.75; -webkit-font-smoothing: antialiased; }
::selection { background: var(--ochre-light); color: #fff; }
a { color: var(--ochre); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--ochre-dark); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); background: rgba(245, 237, 224, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(42, 31, 22, 0.08); z-index: 1000; transition: box-shadow 0.3s var(--ease); }
.nav.scrolled { box-shadow: 0 2px 20px rgba(42, 31, 22, 0.08); }
.nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--earth); text-decoration: none; letter-spacing: 0.01em; }
.nav-brand:hover { color: var(--ochre); }
.nav-links { display: flex; list-style: none; gap: 0.15rem; align-items: center; }
.nav-links a { font-family: var(--font-display); font-size: 0.82rem; font-weight: 500; color: var(--earth-light); padding: 0.35rem 0.55rem; border-radius: 6px; transition: all 0.25s var(--ease); text-decoration: none; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--earth); background: var(--ochre-glow); }
.lang-switch { display: flex; gap: 2px; margin-left: 0.75rem; border: 1px solid var(--bone-dark); border-radius: 5px; overflow: hidden; }
.lang-switch a { font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700; padding: 0.25rem 0.45rem; color: var(--earth-light); text-decoration: none; transition: all 0.2s; letter-spacing: 0.05em; }
.lang-switch a:hover { background: var(--sand-dark); }
.lang-switch a.active { background: var(--earth); color: var(--sand); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--earth); margin: 4px 0; border-radius: 2px; transition: all 0.3s var(--ease); }

/* HERO */
.hero { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; margin-top: var(--nav-h); position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 120% 80% at 50% 90%, rgba(194, 120, 48, 0.08) 0%, transparent 70%), radial-gradient(ellipse 80% 60% at 20% 30%, rgba(107, 127, 94, 0.06) 0%, transparent 60%), var(--sand); }
#topo-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
#bone-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.bone-deco { position: absolute; opacity: 0; font-size: 2rem; pointer-events: none; transition: all 0.6s var(--ease); z-index: 2; }
.bone-deco:nth-child(2) { top: 15%; left: 8%; transform: rotate(-15deg); }
.bone-deco:nth-child(3) { top: 25%; right: 12%; transform: rotate(25deg); font-size: 1.5rem; }
.bone-deco:nth-child(4) { bottom: 20%; left: 15%; transform: rotate(40deg); font-size: 1.8rem; }
.bone-deco:nth-child(5) { bottom: 30%; right: 8%; transform: rotate(-30deg); font-size: 1.3rem; }
.bone-deco:nth-child(6) { top: 55%; left: 5%; transform: rotate(10deg); font-size: 1.6rem; }
.bone-deco:nth-child(7) { top: 40%; right: 5%; transform: rotate(-20deg); font-size: 2.2rem; }
@keyframes boneJump {
  0% { transform: translateY(0) rotate(var(--rot, 0deg)); opacity: 0; }
  20% { transform: translateY(-40px) rotate(calc(var(--rot, 0deg) + 20deg)); opacity: 0.35; }
  40% { transform: translateY(-25px) rotate(calc(var(--rot, 0deg) - 15deg)); opacity: 0.25; }
  60% { transform: translateY(-35px) rotate(calc(var(--rot, 0deg) + 10deg)); opacity: 0.3; }
  80% { transform: translateY(-10px) rotate(calc(var(--rot, 0deg) - 5deg)); opacity: 0.15; }
  100% { transform: translateY(0) rotate(var(--rot, 0deg)); opacity: 0; }
}
.bones-jumping .bone-deco { animation: boneJump 1.2s var(--ease) forwards; }
.bones-jumping .bone-deco:nth-child(2) { --rot: -15deg; animation-delay: 0s; }
.bones-jumping .bone-deco:nth-child(3) { --rot: 25deg; animation-delay: 0.08s; }
.bones-jumping .bone-deco:nth-child(4) { --rot: 40deg; animation-delay: 0.15s; }
.bones-jumping .bone-deco:nth-child(5) { --rot: -30deg; animation-delay: 0.05s; }
.bones-jumping .bone-deco:nth-child(6) { --rot: 10deg; animation-delay: 0.12s; }
.bones-jumping .bone-deco:nth-child(7) { --rot: -20deg; animation-delay: 0.18s; }
.hero-content { position: relative; z-index: 2; max-width: 700px; }
.hero-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ochre); margin-bottom: 1rem; opacity: 0; animation: fadeUp 0.8s 0.2s var(--ease) forwards; }
.hero-name { font-size: clamp(2.0rem, 4.5vw, 3.0rem); font-weight: 800; color: var(--earth); letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 0.6rem; cursor: pointer; transition: color 0.3s; opacity: 0; animation: fadeUp 0.8s 0.35s var(--ease) forwards; user-select: none; }
.hero-name:hover { color: var(--ochre-dark); }
.hero-name:active { transform: scale(0.98); }
.hero-role { font-size: 1.3rem; font-style: italic; font-weight: 400; color: var(--earth-light); margin-bottom: 0.5rem; opacity: 0; animation: fadeUp 0.8s 0.5s var(--ease) forwards; }
.hero-divider { width: 50px; height: 2px; background: var(--ochre); margin: 1.2rem auto; border-radius: 2px; opacity: 0; animation: fadeUp 0.8s 0.6s var(--ease) forwards; }
.hero-blurb { font-size: 1.05rem; color: var(--earth-mid); max-width: 560px; margin: 0 auto; line-height: 1.8; opacity: 0; animation: fadeUp 0.8s 0.7s var(--ease) forwards; }
.hero-scroll { position: absolute; bottom: 2rem; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--bone-dark); opacity: 0; animation: fadeUp 0.8s 1.2s var(--ease) forwards; }
.hero-scroll::after { content: ''; display: block; width: 1px; height: 30px; background: var(--bone-dark); margin: 0.5rem auto 0; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* SECTIONS */
.section { max-width: var(--content-w); margin: 0 auto; padding: 5rem 1.5rem; }
.section-wide { max-width: var(--max-w); margin: 0 auto; padding: 5rem 1.5rem; }
.section-label { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ochre); margin-bottom: 0.5rem; }
.section-title { font-size: 2.2rem; font-weight: 700; color: var(--earth); margin-bottom: 1.5rem; letter-spacing: -0.02em; }
.section-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--bone-dark), transparent); margin: 0 auto; max-width: 200px; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; align-items: start; }
.about-photo-wrap { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.about-photo-placeholder { width: 100%; aspect-ratio: 3/4; background: linear-gradient(160deg, var(--sand-dark) 0%, var(--bone) 40%, var(--sand-dark) 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--bone-dark); font-style: italic; font-size: 0.85rem; text-align: center; padding: 1.5rem; border: 1px solid var(--bone-dark); position: relative; overflow: hidden; }
.about-photo-placeholder::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(42, 31, 22, 0.015) 20px, rgba(42, 31, 22, 0.015) 21px); }
.about-text p { margin-bottom: 1.2rem; font-size: 0.95rem; }
.about-text p:first-of-type::first-letter { font-size: 3.2rem; float: left; line-height: 0.85; margin: 0.1rem 0.5rem 0 0; font-weight: 700; color: var(--ochre); }
.inline-link { color: var(--ochre); border-bottom: 1px solid rgba(194, 120, 48, 0.3); transition: border-color 0.25s; }
.inline-link:hover { border-color: var(--ochre); }
.photo-wide { width: 100%; aspect-ratio: 16/7; background: linear-gradient(135deg, var(--sand-dark) 0%, var(--bone) 50%, var(--sand-dark) 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--bone-dark); font-style: italic; font-size: 0.85rem; text-align: center; padding: 2rem; margin: 2.5rem 0; border: 1px solid var(--bone-dark); position: relative; overflow: hidden; }
.photo-caption { font-family: var(--font-mono); font-size: 0.65rem; color: var(--bone-dark); text-align: center; margin-top: -1.5rem; margin-bottom: 2rem; letter-spacing: 0.03em; }

/* RESEARCH */
.research-stripe { background: var(--earth); color: var(--sand); padding: 5rem 1.5rem; position: relative; overflow: hidden; }
.research-stripe .section-label { color: var(--ochre-light); }
.research-stripe .section-title { color: var(--sand); }
.research-stripe p { color: rgba(245, 237, 224, 0.85); }
.research-stripe a { color: var(--ochre-light); }
.research-inner { max-width: var(--content-w); margin: 0 auto; position: relative; z-index: 1; }
.research-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem; }
.research-card { background: rgba(245, 237, 224, 0.06); border: 1px solid rgba(245, 237, 224, 0.1); border-radius: 10px; padding: 1.5rem; transition: all 0.3s var(--ease); }
.research-card:hover { background: rgba(245, 237, 224, 0.1); border-color: rgba(194, 120, 48, 0.3); transform: translateY(-2px); }
.research-card h3 { font-size: 1.05rem; color: var(--sand); margin-bottom: 0.5rem; }
.research-card p { font-size: 0.85rem; color: rgba(245, 237, 224, 0.65); line-height: 1.6; }
.research-card .card-icon { font-size: 1.5rem; margin-bottom: 0.6rem; display: block; }

/* CV */
.cv-download-btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; background: var(--earth); color: var(--sand); padding: 0.65rem 1.3rem; border-radius: 6px; text-decoration: none; transition: all 0.3s var(--ease); margin-bottom: 2.5rem; }
.cv-download-btn:hover { background: var(--ochre-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(194, 120, 48, 0.2); }
.cv-group { margin-bottom: 2.5rem; }
.cv-group-title { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ochre); margin-bottom: 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--bone-dark); }
.cv-item { margin-bottom: 1rem; padding-left: 1rem; border-left: 2px solid var(--bone); transition: border-color 0.3s; }
.cv-item:hover { border-left-color: var(--ochre-light); }
.cv-link-icons { display: inline; margin-left: 0.4rem; }
.cv-link-icon { display: inline-block; font-size: 0.65em; color: var(--bone-dark); cursor: pointer; padding: 0.15em 0.3em; border-radius: 3px; transition: all 0.25s var(--ease); text-decoration: none; vertical-align: middle; line-height: 1; }
.cv-link-icon:hover { color: var(--ochre); background: var(--ochre-glow); }
.cv-link-icon.map-icon { font-style: normal; }
.cv-link-icon.ext-icon { font-style: normal; font-variant-emoji: text; font-family: var(--font-mono); font-size: 0.9em; }
.cv-languages { font-size: 0.9rem; padding-left: 1rem; overflow-wrap: break-word; }
.cv-item-title { font-weight: 600; font-size: 0.95rem; color: var(--earth); }
.cv-item-sub { font-style: italic; font-size: 0.88rem; color: var(--earth-mid); }
.cv-item-detail { font-size: 0.82rem; color: var(--earth-light); }
.cv-item-date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--bone-dark); }
.cv-item-link { display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--ochre); letter-spacing: 0.02em; transition: color 0.25s var(--ease); text-decoration: none; margin-top: 0.1rem; }
.cv-item-link:hover { color: var(--ochre-dark); }

/* PUBLICATIONS */
.pub-card { padding: 1.2rem 1.5rem; background: var(--sand-light); border: 1px solid var(--bone); border-radius: 8px; margin-bottom: 1.25rem; transition: all 0.3s var(--ease); }
.pub-card:hover { border-color: var(--ochre-light); box-shadow: 0 3px 12px rgba(42, 31, 22, 0.05); }
.pub-badge { display: inline-block; font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 3px; margin-bottom: 0.4rem; font-weight: 700; }
.pub-badge.article { background: var(--ochre-glow); color: var(--ochre-dark); }
.pub-badge.chapter { background: rgba(107, 127, 94, 0.1); color: var(--sage); }
.pub-badge.talk { background: rgba(139, 69, 19, 0.08); color: var(--rust); }
.pub-badge.upcoming { background: rgba(42, 31, 22, 0.05); color: var(--earth-light); }
.pub-title { font-weight: 600; font-size: 0.95rem; color: var(--earth); margin-bottom: 0.2rem; }
.pub-authors { font-size: 0.82rem; color: var(--earth-light); }
.pub-venue { font-size: 0.82rem; font-style: italic; color: var(--bone-dark); }
.pub-link { font-size: 0.8rem; margin-top: 0.3rem; }
.pub-card.is-upcoming { opacity: 0.7; border-style: dashed; }

/* MAP */
.map-section { background: var(--sand-dark); padding: 5rem 1.5rem; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
  background: rgba(194, 120, 48, 0.25) !important;
}
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
  background: var(--ochre) !important;
  color: #fff !important;
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
.map-section .section-label { padding: 0 0.5rem; }
.map-section .section-title { padding: 0 0.5rem; }
.map-wrap { max-width: var(--max-w); margin: 1.5rem auto 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--bone-dark); height: 500px; }
#fieldwork-map { width: 100%; height: 100%; }
.map-legend { max-width: var(--max-w); margin: 1rem auto 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: center; }
.map-legend span { font-family: var(--font-mono); font-size: 0.6rem; color: var(--earth-light); letter-spacing: 0.03em; }

/* GALLERY */
.gallery-bg { background: var(--sand-dark); padding: 5rem 1.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; max-width: var(--max-w); margin: 2rem auto 0; }
.gallery-cell { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--bone), var(--sand)); border: 1px solid var(--bone-dark); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--bone-dark); font-style: italic; font-size: 0.8rem; }
.gallery-cell-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 2rem 0.8rem 0.8rem; background: linear-gradient(transparent, rgba(42, 31, 22, 0.75)); color: #fff; transform: translateY(100%); transition: transform 0.35s var(--ease); }
.gallery-cell:hover .gallery-cell-info { transform: translateY(0); }
.gallery-cell-info .g-caption { font-size: 0.8rem; font-weight: 600; font-style: normal; }
.gallery-cell-info .g-loc { font-family: var(--font-mono); font-size: 0.6rem; color: rgba(255,255,255,0.6); margin-top: 0.1rem; }

/* CONTACT */
.contact-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 1.5rem; }
.contact-email-link { font-size: 1.15rem; font-weight: 600; color: var(--ochre); border-bottom: 2px solid var(--ochre-glow); transition: border-color 0.25s; }
.contact-email-link:hover { border-color: var(--ochre); }
.contact-address { font-size: 0.88rem; color: var(--earth-light); line-height: 1.8; margin: 1rem 0 1.5rem; }
.profile-list { list-style: none; }
.profile-list li { margin-bottom: 0.5rem; }
.profile-list a { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--earth-mid); padding: 0.35rem 0.5rem; border-radius: 6px; transition: all 0.25s var(--ease); }
.profile-list a:hover { background: var(--ochre-glow); color: var(--ochre-dark); }

/* FOOTER */
.footer { background: var(--earth); padding: 2.5rem 1.5rem; text-align: center; }
.footer-name { font-family: var(--font-display); font-size: 1rem; color: var(--sand); font-weight: 600; }
.footer-sub { font-family: var(--font-mono); font-size: 0.6rem; color: rgba(245, 237, 224, 0.4); letter-spacing: 0.1em; margin-top: 0.3rem; }
.footer-links { display: flex; justify-content: center; gap: 1rem; list-style: none; margin-top: 1rem; }
.footer-links a { font-size: 0.78rem; color: rgba(245, 237, 224, 0.45); transition: color 0.25s; }
.footer-links a:hover { color: var(--ochre-light); }
.footer-copy { font-family: var(--font-mono); font-size: 0.55rem; color: rgba(245, 237, 224, 0.25); margin-top: 1.5rem; letter-spacing: 0.05em; }

/* LIGHTBOX */
.lightbox { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(42, 31, 22, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); align-items: center; justify-content: center; flex-direction: column; cursor: pointer; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,0.4); cursor: default; opacity: 0; transition: opacity 0.3s var(--ease); }
.lightbox.active img { opacity: 1; }
.lightbox-caption { font-family: var(--font-display); color: rgba(245, 237, 224, 0.85); font-size: 0.9rem; text-align: center; margin-top: 1rem; max-width: 600px; }
.lightbox-caption .lb-loc { font-family: var(--font-mono); font-size: 0.65rem; color: rgba(245, 237, 224, 0.45); margin-top: 0.2rem; }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; color: rgba(245, 237, 224, 0.6); font-size: 2rem; cursor: pointer; transition: color 0.25s; z-index: 2001; line-height: 1; padding: 0.5rem; }
.lightbox-close:hover { color: var(--ochre-light); }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: rgba(245, 237, 224, 0.5); font-size: 3rem; cursor: pointer; transition: color 0.25s; z-index: 2001; padding: 1rem; line-height: 1; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover { color: var(--ochre-light); }

/* REVEAL */
.reveal { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.animated { opacity: 0; transform: translateY(20px); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 800px) {
  html { font-size: 16px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { position: static; max-width: 260px; margin: 0 auto 2rem; }
  .research-topics { grid-template-columns: 1fr; }
  .contact-cols { grid-template-columns: 1fr; }
  .hero-role { font-size: 1.1rem; }
  .section, .section-wide { padding: 3.5rem 1.25rem; }
  .map-wrap { height: 350px; }
  .photo-wide { aspect-ratio: 3/2; }
  .cv-languages strong { display: inline-block; }
}
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--sand); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--bone-dark); box-shadow: 0 10px 30px rgba(42, 31, 22, 0.1); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 1rem; width: 100%; }
  .lang-switch { margin: 0.5rem 1rem; justify-content: center; }
  .nav-toggle { display: block; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
