:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #747474;
  --line: #d9d9d9;
  --gutter: clamp(22px, 5vw, 72px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

html.is-toggling-details {
  scroll-snap-type: none;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.site { overflow: clip; }
.scene { min-height: 100svh; scroll-snap-align: start; }

.scene-inner {
  width: min(1320px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: 9vh var(--gutter) 7vh;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.1fr);
  align-content: center;
  column-gap: clamp(38px, 10vw, 180px);
}

.intro-inner { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
h1, h2 { margin: 0; font-weight: 500; letter-spacing: -0.075em; }
h1 { max-width: 900px; margin-top: 22px; font-size: clamp(3.5rem, 10vw, 9.5rem); line-height: 0.91; }
.intro-copy { margin: 34px 0 0; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.2rem); }
.scroll-cue { display: inline-flex; align-items: center; gap: 14px; margin-top: clamp(70px, 14vh, 150px); color: var(--muted); font-size: 0.82rem; }
.scroll-line { width: 52px; height: 1px; background: var(--ink); transform-origin: left; animation: breathe 2.4s ease-in-out infinite; }
.section-heading { align-self: start; }
.section-heading h2 { margin-top: 18px; font-size: clamp(4rem, 8vw, 8.5rem); line-height: 0.87; }
.section-content, .contact-content { align-self: center; max-width: 590px; }
.section-note { margin: 0 0 28px; color: var(--muted); font-size: 0.95rem; }
.details-list, .contact-links { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); overflow-anchor: none; }
summary { display: flex; align-items: baseline; justify-content: space-between; gap: 28px; padding: 18px 0; cursor: pointer; list-style: none; font-size: 1rem; font-weight: 500; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: 0 0 auto; color: var(--muted); font-size: 1.25rem; font-weight: 400; transition: transform 180ms ease; }
details[open] summary::after { transform: rotate(45deg); }
summary span { margin-left: auto; color: var(--muted); font-size: 0.82rem; font-weight: 400; text-align: right; }
details p, details small { display: block; max-width: 48ch; margin: 0 40px 16px 0; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
details small { margin-bottom: 18px; color: var(--ink); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }
.role-points { max-width: 52ch; margin: 0 40px 18px 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.role-points li { padding-left: 0.25rem; margin-bottom: 10px; }
.role-points li:last-child { margin-bottom: 0; }
.research-entry strong { color: var(--ink); font-weight: 500; }
.paper-links { margin: 0 40px 18px 0; border-top: 1px solid #ededed; }
.paper-links a { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid #ededed; color: var(--ink); font-size: 0.86rem; line-height: 1.45; }
.paper-links a span { flex: 0 0 auto; color: var(--muted); font-size: 0.74rem; white-space: nowrap; }
.paper-links a:hover { color: var(--muted); }
.contact-links a, .back-top { display: flex; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 1rem; transition: padding 180ms ease; }
.contact-links a:hover, .back-top:hover { padding-right: 10px; }
.contact-links span, .back-top span { color: var(--muted); }
.contact-scene .scene-inner { position: relative; }
.back-top { position: absolute; right: var(--gutter); bottom: 7vh; width: 110px; border-bottom: 0; color: var(--muted); font-size: 0.82rem; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms ease, transform 900ms cubic-bezier(0.2, 0.75, 0.25, 1); }
.reveal-delay-1 { transition-delay: 120ms; }
.reveal-delay-2 { transition-delay: 220ms; }
.reveal-delay-3 { transition-delay: 330ms; }
.scene.is-visible .reveal { opacity: 1; transform: translateY(0); }

@keyframes breathe { 0%, 100% { transform: scaleX(0.5); opacity: 0.45; } 50% { transform: scaleX(1); opacity: 1; } }

@media (max-width: 760px) {
  html { scroll-snap-type: y proximity; }
  .scene-inner { grid-template-columns: 1fr; align-content: start; padding-top: 15vh; row-gap: 11vh; }
  .intro-inner { padding-top: 12vh; }
  h1 { font-size: clamp(3.3rem, 16vw, 6rem); }
  .section-heading h2 { font-size: clamp(4rem, 18vw, 7rem); }
  .section-content, .contact-content { width: 100%; }
  summary { gap: 12px; }
  summary span { max-width: 43%; }
  .back-top { bottom: 4vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  .reveal, .scroll-line { animation: none; transition: none; }
}
