/* ===== Tokens ===== */
:root {
  --bg:        #141310;
  --bg-2:      #1b1914;
  --surface:   #221f18;
  --surface-2: #2a261d;
  --line:      rgba(236, 231, 220, .10);
  --line-2:    rgba(236, 231, 220, .16);
  --text:      #ece7dc;
  --muted:     #a59e8d;
  --faint:     #7d7666;
  --gold:      #cda24e;
  --gold-2:    #e0bd73;
  --green:     #93a567;
  --maxw:      1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--gold-2); }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(20, 19, 16, 0);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.nav.is-scrolled {
  background: rgba(20, 19, 16, .82);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand__logo { height: 42px; width: auto; display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 16px; letter-spacing: .1px; }
.brand__role { font-size: 11px; color: var(--muted); letter-spacing: .3px; }
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-size: 14px; color: var(--muted); font-weight: 500; position: relative;
  transition: color .2s ease;
}
.nav__links a:hover, .nav__links a.is-current { color: var(--text); }
.nav__links a.is-current::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--gold); border-radius: 2px;
}
.lang { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.lang__btn {
  background: none; border: none; color: var(--faint); font-family: var(--sans);
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 3px 4px; transition: color .2s;
}
.lang__btn.is-active { color: var(--gold); }
.lang__btn:hover { color: var(--text); }
.lang__sep { color: var(--faint); font-size: 12px; }

/* ===== Mobile burger ===== */
.nav__burger { display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 9px; margin-left: 4px; background: none; border: none; cursor: pointer; }
.nav__burger span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease; }
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; padding: 12px 22px; border-radius: 999px;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--gold); color: #20180a; }
.btn--primary:hover { background: var(--gold-2); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-2); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden;
  background:
    radial-gradient(120% 90% at 78% 18%, rgba(205,162,78,.16), rgba(20,19,16,0) 55%),
    radial-gradient(90% 80% at 10% 100%, rgba(147,165,103,.10), rgba(20,19,16,0) 60%),
    var(--bg);
}
/* darkened, blurred wildlife photo as faint ambient texture — not a subject */
.hero__bg {
  position: absolute; inset: 0;
  background: url("/assets/hero-zebra.jpg") center 30% / cover no-repeat;
  filter: blur(7px) brightness(.46) saturate(1.05);
  opacity: .42; transform: scale(1.12);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20,19,16,.86) 0%, rgba(20,19,16,.22) 45%, rgba(20,19,16,.42) 100%);
}
.hero__inner {
  position: relative; z-index: 2; max-width: var(--maxw); width: 100%;
  margin: 0 auto; padding: 110px 24px 90px;
  display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center;
}
.hero__portrait { position: relative; }
.hero__portrait::before {
  content: ""; position: absolute; inset: -14px;
  border-radius: 22px; background: linear-gradient(150deg, rgba(205,162,78,.55), rgba(147,165,103,.25) 60%, transparent);
  filter: blur(20px); opacity: .6; z-index: -1;
}
.hero__portrait img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px;
  border: 1px solid rgba(224,189,115,.35); box-shadow: 0 30px 70px rgba(0,0,0,.55);
}
.hero__eyebrow {
  color: var(--gold-2); font-weight: 600; font-size: 13px; letter-spacing: 2.5px;
  text-transform: uppercase; margin-bottom: 16px;
}
.hero__title {
  font-family: var(--serif); font-weight: 500; line-height: 1.02;
  font-size: clamp(40px, 6.5vw, 78px); letter-spacing: -1px; margin-bottom: 12px;
}
.hero__tagline {
  font-family: var(--serif); font-style: italic; font-size: clamp(18px, 2.4vw, 23px);
  color: var(--gold-2); margin-bottom: 18px;
}
.hero__lead { max-width: 540px; font-size: clamp(16px, 2.2vw, 18px); color: #d8d2c5; }
.hero__meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 22px; color: var(--muted); font-size: 14px; font-weight: 500;
}
.hero__meta .dot { color: var(--gold); }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero__scroll {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2;
  color: var(--muted); font-size: 20px; animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ===== Sections ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 100px 24px; }
.section--alt { max-width: none; background: var(--bg-2); border-block: 1px solid var(--line); }
.section--alt > * { max-width: var(--maxw); margin-inline: auto; }
.section__head { margin-bottom: 48px; position: relative; }
.kicker {
  display: inline-block; color: var(--gold); font-size: 12px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 14px;
}
.section__head h2 {
  font-family: var(--serif); font-weight: 500; line-height: 1.08;
  font-size: clamp(28px, 4.5vw, 44px); letter-spacing: -.5px; max-width: 18ch;
}
.section__intro { margin-top: 18px; max-width: 60ch; color: var(--muted); font-size: 17px; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.about__portrait { position: sticky; top: 96px; }
.about__portrait img {
  width: 100%; border-radius: 16px; aspect-ratio: 1; object-fit: cover;
  border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.about__body p { margin-bottom: 18px; font-size: 17px; color: #d8d2c5; max-width: 60ch; }
.stats {
  display: flex; gap: 14px; flex-wrap: wrap; margin: 30px 0;
  padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.stat { flex: 1; min-width: 90px; }
.stat__num { display: block; font-family: var(--serif); font-size: 34px; font-weight: 600; color: var(--gold-2); line-height: 1; }
.stat__label { font-size: 13px; color: var(--muted); letter-spacing: .3px; }
.timeline { margin-top: 30px; }
.timeline__title { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--faint); margin-bottom: 16px; font-weight: 600; }
.timeline ul { list-style: none; }
.timeline li { display: flex; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.timeline li:last-child { border-bottom: none; }
.t-when { flex: 0 0 70px; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.t-what { color: #d2ccbe; }
.t-what strong { color: var(--text); font-weight: 600; }

/* ===== Cards ===== */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--surface-2); }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* ===== Highlight ===== */
.highlight {
  margin-top: 28px; padding: 38px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(205,162,78,.13), rgba(147,165,103,.07));
  border: 1px solid rgba(205,162,78,.28); position: relative;
}
.highlight__tag { color: var(--gold-2); font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }
.highlight__title { font-family: var(--serif); font-weight: 500; font-size: clamp(24px,3.5vw,32px); margin: 12px 0 14px; }
.highlight__body { color: #d8d2c5; font-size: 17px; max-width: 70ch; }
.highlight__quote {
  margin: 22px 0 14px; padding-left: 20px; border-left: 3px solid var(--gold);
  font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--text); max-width: 60ch;
}
.highlight__cite { color: var(--faint); font-size: 13.5px; }
.highlight__cite a, .highlight__body a { color: var(--gold-2); text-decoration: none; border-bottom: 1px solid rgba(224,189,115,.4); transition: border-color .2s; }
.highlight__cite a:hover, .highlight__body a:hover { border-color: var(--gold-2); }

/* ===== Publications ===== */
.pubs { list-style: none; }
.pub {
  display: flex; align-items: baseline; gap: 22px; padding: 20px 4px;
  border-bottom: 1px solid var(--line);
}
.pub:hover { background: rgba(255,255,255,.015); }
.pub__year { flex: 0 0 48px; font-family: var(--serif); font-weight: 600; color: var(--gold); font-size: 16px; font-variant-numeric: tabular-nums; }
.pub__main { flex: 1; }
.pub__t { font-size: 16.5px; font-weight: 500; color: var(--text); line-height: 1.45; }
.pub__j { font-size: 14px; color: var(--muted); margin-top: 3px; }
.pub__doi { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--faint); transition: color .2s; }
.pub__doi:hover { color: var(--gold-2); }
.pubs__more { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* ===== Gallery ===== */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery__item { overflow: hidden; border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 1; position: relative; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery__item::after {
  content: ""; position: absolute; inset: 0; background: rgba(20,19,16,.0); transition: background .3s ease;
}
.gallery__item:hover img { transform: scale(1.07); }
.gallery__item:hover::after { background: rgba(205,162,78,.12); }
.carlvet__cta { margin-top: 32px; text-align: center; }

/* ===== Aleph One project ===== */
.proj { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.proj__card {
  background: #fff; border-radius: 18px; padding: 26px; text-align: center;
  border: 1px solid var(--line-2); box-shadow: 0 26px 60px rgba(0,0,0,.42);
}
.proj__logo { height: 52px; width: auto; margin: 4px auto 18px; }
.proj__fig { width: 100%; max-width: 520px; margin: 0 auto; border-radius: 10px; }
.proj__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; margin-bottom: 24px; }
.proj__stats strong { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--gold-2); display: block; line-height: 1; }
.proj__stats span { font-size: 13px; color: var(--muted); }
.proj__list { list-style: none; margin-bottom: 26px; }
.proj__list li { position: relative; padding: 10px 0 10px 24px; color: #d2ccbe; font-size: 15px; border-bottom: 1px solid var(--line); }
.proj__list li:last-child { border-bottom: none; }
.proj__list li::before { content: ""; position: absolute; left: 3px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.proj__cta { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .proj { grid-template-columns: 1fr; gap: 28px; } }

/* ===== Contact links ===== */
.links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.link {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.link:hover { transform: translateY(-3px); border-color: var(--gold); background: var(--surface-2); }
.link__ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(205,162,78,.12); color: var(--gold-2); }
.link__ic svg { width: 22px; height: 22px; }
.link__text { display: flex; flex-direction: column; min-width: 0; }
.link__name { font-family: var(--serif); font-weight: 600; font-size: 18px; }
.link__val { color: var(--muted); font-size: 14px; }

/* ===== Logo badges (project / section heads) ===== */
.logo-badge { display: inline-flex; align-items: center; background: #fff; border-radius: 14px;
  padding: 10px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.32);
  position: absolute; top: 0; right: 0; margin: 0; }
.logo-badge img { height: 60px; width: auto; display: block; }
.logo-badge--wide img { height: 60px; width: auto; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line); }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 30px 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  color: var(--faint); font-size: 14px;
}

/* ===== Reveal animation ===== */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed; top: 66px; left: 0; right: 0; gap: 0; flex-direction: column;
    background: rgba(20,19,16,.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); padding: 6px 24px 16px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 14px 2px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav__links a:last-child { border-bottom: none; }
  .nav__links a.is-current::after { display: none; }
  .logo-badge { position: static; margin-bottom: 18px; }
  .hero__inner {
    grid-template-columns: 1fr; gap: 30px; padding: 120px 24px 80px;
    text-align: center; justify-items: center;
  }
  .hero__portrait { max-width: 220px; }
  .hero__lead { margin-inline: auto; }
  .hero__meta, .hero__cta { justify-content: center; }
  .about { grid-template-columns: 1fr; gap: 32px; }
  .about__portrait { position: static; max-width: 240px; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .links { grid-template-columns: 1fr; }
  .section { padding: 72px 22px; }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .pub { flex-wrap: wrap; gap: 6px 16px; }
  .pub__doi { flex-basis: 100%; }
  .stat__num { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
