@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=IBM+Plex+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #f7f3ea;
  --bg-2: #fffdf8;
  --bg-3: #efe8da;
  --fg: #1c1814;
  --fg-soft: #3f3832;
  --muted: #7a7268;
  --hair: #e4dccb;
  --hair-2: #d7cebb;
  --accent: #c24d2c;
  --accent-2: #9a3b20;
  --accent-ink: #7a3019;
  --glow: rgba(194, 77, 44, 0.22);
  --live: #2f8a4e;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.mono {
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  z-index: 200;
}
.skip:focus { top: 12px; }

/* ---------- Atmosphere ---------- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}

.atmosphere-topo {
  position: absolute;
  width: min(760px, 62vw);
  right: -8%;
  top: 4%;
  opacity: 0.18;
  animation: spinSlow 90s linear infinite;
  transform-origin: 52% 54%;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
}

.orb-a {
  width: min(620px, 55vw);
  height: min(620px, 55vw);
  background: #f0b08a;
  opacity: 0.45;
  top: -12%;
  right: -8%;
  animation: driftA 22s ease-in-out infinite;
}

.orb-b {
  width: min(480px, 46vw);
  height: min(480px, 46vw);
  background: #e8c9a0;
  opacity: 0.5;
  bottom: 4%;
  left: -10%;
  animation: driftB 28s ease-in-out infinite;
}

.orb-c {
  width: min(340px, 34vw);
  height: min(340px, 34vw);
  background: #f3c2ae;
  opacity: 0.4;
  top: 42%;
  left: 38%;
  animation: driftC 18s ease-in-out infinite;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.045;
  background-image: url('../img/noise.svg');
}

.pointer-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 460px;
  height: 460px;
  margin: -230px 0 0 -230px;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle, rgba(194, 77, 44, 0.2), transparent 64%);
  will-change: transform;
}

main { position: relative; z-index: 2; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  background: rgba(247, 243, 234, 0.86);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--hair);
  box-shadow: 0 8px 24px rgba(28, 24, 20, 0.04);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 41;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff8ed;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 8px 20px var(--glow);
}

.brand-text .name {
  font-weight: 600;
  font-size: 14px;
}

.brand-text .role {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

.main-nav {
  display: none;
  gap: 4px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  color: var(--muted);
}

.main-nav a:hover,
.main-nav a.active { color: var(--fg); }

.main-nav a.active {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.location-tag {
  font-size: 10px;
  color: var(--muted);
  display: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--bg-2);
  border: 1px solid var(--hair-2);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  z-index: 41;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--fg);
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (min-width: 880px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
  .location-tag { display: inline; }
}

@media (max-width: 879px) {
  .header-right .btn { display: none; }
  .main-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(247, 243, 234, 0.96);
    backdrop-filter: blur(18px);
    padding: 110px 28px 40px;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 39;
  }
  body.nav-open .main-nav { transform: none; }
  .main-nav a {
    font-size: 28px;
    font-family: var(--serif);
    padding: 10px 0;
    color: var(--fg);
    box-shadow: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  min-height: 46px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-dark {
  background: var(--fg);
  color: #fff8ed;
}
.btn-dark:hover { background: var(--accent-ink); }

.btn-outline {
  background: var(--bg-2);
  border-color: var(--hair-2);
  color: var(--fg);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-2); }

.btn-accent {
  background: var(--accent);
  color: #fff8ed;
  box-shadow: 0 10px 24px var(--glow);
}
.btn-accent:hover { background: var(--accent-2); }

.btn-sm { padding: 8px 14px; min-height: 0; font-size: 12.5px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 48px 0 72px;
}

.hero-lab { padding-bottom: 28px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
  }
}

.hero-copy { min-width: 0; }

.hero-flag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 24px;
  padding: 8px 12px 8px 10px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--bg-2);
}

.hero-flag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 2.2s ease-out infinite;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
}

.hero-lab .hero-title { font-size: clamp(36px, 6vw, 72px); }

.hero-title .line { display: block; overflow: hidden; }

.hero-title .line-inner {
  display: block;
  animation: rise 1s var(--ease) both;
  animation-delay: calc(var(--i, 1) * 0.1s);
}

.hero-title .accent {
  color: var(--accent);
  font-style: italic;
}

.hero-summary {
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-soft);
  max-width: 540px;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-portrait {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(100%, 460px);
  justify-self: center;
}

@media (min-width: 900px) {
  .hero-portrait {
    width: 100%;
    justify-self: end;
  }
}

.hero-portrait .frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--hair);
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 0.35s var(--ease);
  box-shadow: 0 24px 50px rgba(28, 24, 20, 0.12);
}

.hero-portrait .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.hero-portrait::before {
  content: '';
  position: absolute;
  inset: 10% -7% -7% 10%;
  border: 1px solid var(--accent);
  border-radius: 20px;
  transform: rotate(2.5deg);
  z-index: -1;
  opacity: 0.45;
}

.viewfinder {
  position: absolute;
  inset: 14px;
  z-index: 2;
  pointer-events: none;
}

.viewfinder span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.55;
}
.viewfinder .tl { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.viewfinder .tr { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.viewfinder .bl { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.viewfinder .br { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 36px;
}

.stat {
  padding: 16px 14px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--bg-2);
}

.stat .value {
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}

.stat .label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.06em;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  z-index: 2;
  padding: 80px 0;
}

.section-kicker {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

.section-kicker .num { color: var(--accent); font-weight: 500; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.section-sub {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
  max-width: 520px;
  margin-top: 12px;
}

.current-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px 32px;
  border-radius: 20px;
  border: 1px solid var(--hair);
  background: var(--bg-2);
  box-shadow: 0 16px 40px rgba(28, 24, 20, 0.05);
}

.current-card .pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 6px rgba(47, 138, 78, 0.14);
  animation: pulse 2.2s ease-out infinite;
  flex-shrink: 0;
}

.current-title { font-weight: 600; font-size: 16.5px; }
.current-loc { color: var(--muted); font-size: 13px; margin-top: 4px; }
.current-person { display: flex; align-items: center; gap: 14px; }

/* ---------- Timeline ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--hair-2);
}

@media (min-width: 760px) {
  .timeline::before { left: 171px; }
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 28px 0 28px 32px;
  position: relative;
}

@media (min-width: 760px) {
  .timeline-item {
    grid-template-columns: 140px 1fr;
    gap: 48px;
    padding-left: 0;
  }
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 34px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent);
}

@media (min-width: 760px) {
  .timeline-item::after { left: 167px; }
}

.timeline-period {
  font-size: 11px;
  color: var(--muted);
  padding-top: 6px;
}

.timeline-role {
  font-size: 22px;
  font-family: var(--serif);
  font-weight: 600;
}

.timeline-org {
  font-size: 13.5px;
  color: var(--accent-2);
  margin: 4px 0 10px;
}

.timeline-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 640px;
}

.timeline-item + .timeline-item { border-top: 1px solid var(--hair); }

/* ---------- Skills / education ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 700px) {
  .skills-grid { grid-template-columns: 1fr; }
}

.skill-card {
  padding: 24px 22px;
  border-radius: 18px;
  border: 1px solid var(--hair);
  background: var(--bg-2);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(28, 24, 20, 0.07);
}

.skill-index {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.skill-group-title {
  font-size: 11px;
  color: var(--fg-soft);
  margin-bottom: 14px;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--hair);
  color: var(--fg-soft);
}

.tag:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8ed;
}

.edu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 800px) {
  .edu-grid { grid-template-columns: 0.9fr 1.1fr; }
}

.edu-card,
.cert-list {
  border: 1px solid var(--hair);
  border-radius: 18px;
  background: var(--bg-2);
}

.edu-card { padding: 28px; }

.edu-card h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  margin: 10px 0 6px;
}

.edu-card p { color: var(--fg-soft); }
.edu-card .period { color: var(--muted); font-size: 12px; margin-top: 16px; display: block; }

.cert-list { padding: 8px; }

.cert-item {
  padding: 14px 16px;
  color: var(--fg-soft);
  font-size: 14px;
  border-bottom: 1px solid var(--hair);
}

.cert-item:last-child { border-bottom: none; }

/* ---------- Projects ---------- */

.ledger { display: grid; gap: 14px; }

.ledger-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 28px 26px;
  border-radius: 20px;
  border: 1px solid var(--hair);
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.ledger-entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(28, 24, 20, 0.08);
}

@media (min-width: 760px) {
  .ledger-entry {
    grid-template-columns: 180px 1fr;
    gap: 28px;
    padding: 32px;
  }
}

.ledger-index {
  position: absolute;
  right: 18px;
  top: 8px;
  font-family: var(--serif);
  font-size: 64px;
  font-style: italic;
  color: rgba(28, 24, 20, 0.06);
  line-height: 1;
  pointer-events: none;
}

.ledger-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.ledger-status {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  color: var(--accent-2);
  background: var(--bg);
}

.ledger-status.live {
  color: var(--live);
  border-color: #b7dcc3;
  background: #eef7f1;
}

.ledger-meta .mono { color: var(--muted); font-size: 11px; }

.ledger-copy h3 {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  margin: 0 0 10px;
}

.ledger-copy p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 640px;
}

.ledger-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.ledger-tech span {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--hair);
  background: var(--bg);
  padding: 4px 9px;
  border-radius: 999px;
}

.inline-link {
  color: var(--accent-2);
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inline-link:hover { color: var(--fg); }

.ledger-note { font-size: 13px; color: var(--muted); margin-top: 16px; display: block; }

.ledger-copy h3 a { color: inherit; }
.ledger-copy h3 a:hover { color: var(--accent-2); }

.ledger-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.ledger-actions .inline-link,
.ledger-actions .ledger-note { margin-top: 0; }

.ledger-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--hair);
}

.ledger-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.ledger-entry:hover .ledger-thumb img { transform: scale(1.04); }

.ledger-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
}

@media (min-width: 760px) {
  .ledger-entry { grid-template-columns: 180px 180px 1fr; }
}

.lab-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 40px;
}

@media (min-width: 700px) {
  .lab-stats { grid-template-columns: repeat(3, 1fr); }
}

.lab-stat {
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: var(--bg-2);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.lab-stat .label { font-size: 13px; color: var(--muted); }
.lab-stat .value {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Contact ---------- */

.contact-panel {
  padding: clamp(32px, 5vw, 56px);
  border-radius: 28px;
  border: 1px solid var(--hair);
  background:
    radial-gradient(600px 240px at 90% 0%, rgba(194, 77, 44, 0.12), transparent 55%),
    var(--bg-2);
  display: grid;
  gap: 28px;
}

@media (min-width: 800px) {
  .contact-panel {
    grid-template-columns: 1.4fr auto;
    align-items: end;
  }
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.chip-link {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  background: var(--bg);
  color: var(--fg-soft);
}

.chip-link:hover { border-color: var(--accent); color: var(--accent-2); }

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 24, 20, 0.45);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--hair);
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  padding: 32px;
}

.modal-box h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 28px; font-weight: 600; }
.modal-box .modal-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; line-height: 1.6; }

.role-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--hair);
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: inherit;
  color: var(--fg);
}

.role-option:hover { border-color: var(--accent); }

.role-option .role-name { font-weight: 600; font-size: 14.5px; }
.role-option .role-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.role-option .role-creds { font-size: 11.5px; color: var(--accent-2); margin-top: 6px; }

.modal-close {
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--hair);
  padding: 32px 0 40px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--accent-2); }

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@keyframes rise {
  from { transform: translateY(110%); }
  to { transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 138, 78, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(47, 138, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 138, 78, 0); }
}

@keyframes driftA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6%, 8%) scale(1.08); }
}

@keyframes driftB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, -8%); }
}

@keyframes driftC {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8%, 6%) scale(1.12); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Project detail ---------- */

.project-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 860px) {
  .project-hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
}

.project-hero-media {
  aspect-ratio: 16 / 11;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  box-shadow: 0 24px 50px rgba(28, 24, 20, 0.1);
}

.project-hero-media img { width: 100%; height: 100%; object-fit: cover; }

.project-hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 16px 0 12px;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 900px) {
  .project-detail-grid { grid-template-columns: 1fr 300px; }
}

.project-description {
  color: var(--fg-soft);
  font-size: 16px;
  line-height: 1.8;
  max-width: 680px;
}

.feature-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 680px;
}

.feature-list li {
  position: relative;
  padding-left: 28px;
  color: var(--fg-soft);
  font-size: 15px;
  line-height: 1.6;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.project-sidebar-card {
  border: 1px solid var(--hair);
  border-radius: 16px;
  background: var(--bg-2);
  padding: 22px 24px;
  display: grid;
  gap: 16px;
}

.project-sidebar-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair);
}

.project-sidebar-row:last-child { border-bottom: none; padding-bottom: 0; }
.project-sidebar-row .mono { color: var(--muted); font-size: 11px; }
.project-sidebar-row span:last-child { color: var(--fg-soft); text-align: right; max-width: 60%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .atmosphere-topo,
  .orb,
  .hero-title .line-inner,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
  .pointer-glow { display: none; }
}
