:root {
  --bg: #fffdf9;
  --ink: #252a27;
  --ink-soft: #555e58;
  --ink-faint: #747d77;
  --blue: #81988b;
  --blue-dark: #405f50;
  --blue-pale: #f1f5f2;
  --line: #dce5df;
  --line-soft: #edf2ef;
  --font: system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --media-width: 17rem;
  --media-gap: clamp(1.5rem, 3vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 10; padding: .55rem .85rem; background: var(--ink); color: white; transform: translateY(-160%); transition: transform .2s ease; }
.skip-link:focus { transform: none; }
.main { width: 100%; margin: 0; padding-inline: clamp(1.25rem, 6vw, 7rem); }
.section { padding: 5rem 0; border-top: 2px solid var(--line); }
.section:first-child { border-top: 0; }
.section--hero { padding-top: 5.5rem; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 25.125rem); gap: clamp(2rem, 7vw, 5rem); align-items: center; }
.hero__name { font-size: clamp(2.35rem, 7vw, 4.2rem); letter-spacing: -.035em; }
.hero__intro { max-width: none; margin-top: 1.4rem; color: var(--ink-soft); font-size: 1.05rem; }
.hero__figure { margin: 0; }
.hero__figure img { width: auto; height: auto; max-width: 100%; border: 1px solid var(--line); }

.chips, .tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips { margin-top: 1.5rem; }
.chips li, .tag, .status, .cat { padding: .22rem .6rem; background: var(--blue-pale); color: var(--blue-dark); border: 1px solid var(--line); border-radius: 3px; font-size: .76rem; font-weight: 600; }
.btnrow { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.7rem; }
.btn, .iconlink { display: inline-flex; align-items: center; gap: .4rem; color: var(--blue-dark); padding: .48rem .75rem; border: 1px solid var(--blue); background: white; text-decoration: none; font-size: .88rem; font-weight: 600; transition: background .18s ease, transform .18s ease; }
.btn:hover, .iconlink:hover { background: var(--blue-pale); transform: translateY(-1px); }
.btn--primary { background: var(--blue-dark); color: white; }
.btn--primary:hover { background: var(--blue-dark); color: white; }
.btn svg, .iconlink svg { width: 15px; height: 15px; }

.sechead { margin-bottom: 2.5rem; }
.sechead__title { font-size: clamp(1.55rem, 4vw, 2rem); padding-bottom: .65rem; }
.sechead__title::after { content: ""; display: block; width: 3rem; height: 3px; margin-top: .65rem; background: var(--blue); }

.projects { display: grid; gap: 2.5rem; }
.pcard { display: grid; grid-template-columns: var(--media-width) minmax(0, 1fr); gap: var(--media-gap); border-top: 1px solid var(--line); padding-top: 1.5rem; }
.pcard--text { grid-template-columns: 1fr; }
.pcard__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: white; border: 1px solid var(--line-soft); }
.pcard__media img, .pcard__media iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.pcard__body { padding-left: 0; }
.pcard--text .pcard__body { padding-left: 0; }
.pcard__year, .act__cat { color: var(--blue-dark); font-size: .73rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.pcard__title { margin: .25rem 0; font-size: 1.3rem; }
.pcard__title a { color: inherit; text-decoration: none; }
.pcard__title a:hover { color: var(--blue-dark); }
.pcard__tagline { margin-bottom: .75rem; color: var(--ink-faint); font-size: .92rem; }
.pcard__desc, .pcard__role { color: var(--ink-soft); font-size: .93rem; }
.pcard__role { margin-bottom: .9rem; padding-left: .75rem; border-left: 2px solid var(--blue); }
.pcard__note { margin: -.15rem 0 .9rem; padding: .55rem .7rem; background: var(--blue-pale); color: var(--blue-dark); font-size: .88rem; }
.tags { margin-bottom: .85rem; }
.linkrow { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.linkrow a { font-size: .86rem; font-weight: 600; text-decoration: none; }
.linkrow a::after { content: " →"; }

.featured-projects { display: grid; gap: 3rem; }
.fproject { display: grid; grid-template-columns: var(--media-width) minmax(0, 1fr); gap: var(--media-gap); padding-top: 1.5rem; border-top: 1px solid var(--line); align-items: start; }
.fproject__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--blue-pale); border: 1px solid var(--line); }
.fproject__media img, .fproject__media iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; background: #fff; }
.video-play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; border: 0; background: transparent; color: white; cursor: pointer; transition: background .18s ease; }
.video-play span { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; padding-left: .18rem; border-radius: 50%; background: rgb(37 42 39 / 82%); box-shadow: 0 2px 12px rgb(0 0 0 / 18%); font-size: 1.15rem; transition: transform .18s var(--ease), background .18s ease; }
.video-play:hover { background: rgb(37 42 39 / 6%); }
.video-play:hover span { transform: scale(1.06); background: var(--blue-dark); }
.video-play.is-hidden { display: none; }
.fproject__context { margin-bottom: .3rem; color: var(--blue-dark); font-size: .73rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.fproject__title { margin-bottom: .35rem; font-size: 1.3rem; }
.fproject__tagline { margin-bottom: .85rem; color: var(--ink-faint); font-size: .92rem; }
.fproject__highlights { display: grid; gap: .35rem; margin-bottom: 1rem; }
.fproject__highlights li { position: relative; padding-left: 1rem; color: var(--ink-soft); font-size: .9rem; }
.fproject__highlights li::before { content: ""; position: absolute; left: 0; top: .72em; width: 4px; height: 4px; border-radius: 50%; background: var(--blue); }

.pubs { display: grid; gap: 2.5rem; }
.pubyear { display: grid; gap: 1.25rem; }
.pubyear__label { display: flex; gap: .8rem; align-items: center; color: var(--blue-dark); font-size: 1rem; }
.pubyear__label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pub { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1.15rem; }
.pub--nothumb { grid-template-columns: 1fr; }
.pub__thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.pub__title { margin-bottom: .3rem; font-size: 1rem; }
.pub__authors, .pub__venue, .pub__summary { margin-bottom: .25rem; color: var(--ink-soft); font-size: .89rem; }
.pub__authors .me { color: var(--ink); font-weight: 700; }
.pub__venue { color: var(--ink-faint); }
.pub__summary { margin-top: .45rem; }
.pub__foot { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: .5rem; }
.status { text-transform: uppercase; letter-spacing: .04em; }

.timeline { display: grid; gap: 2.5rem; }
.tl { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.tl__layout { display: grid; grid-template-columns: var(--media-width) minmax(0, 1fr); gap: var(--media-gap); align-items: start; }
.tl__media { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: white; border: 1px solid var(--line-soft); }
.tl__image { width: 100%; height: 100%; object-fit: contain; }
.tl__content { padding-left: 0; }
.tl__top { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.tl__role { font-size: 1.02rem; }
.cat { text-transform: uppercase; letter-spacing: .05em; }
.tl__meta { margin: .25rem 0 .55rem; color: var(--ink-faint); font-size: .88rem; }
.tl__bullets li { position: relative; padding-left: 1rem; color: var(--ink-soft); font-size: .92rem; }
.tl__bullets li::before { content: ""; position: absolute; left: 0; top: .7em; width: 4px; height: 4px; border-radius: 50%; background: var(--blue); }

/* Activity donut */
.donut { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; margin-bottom: 3.5rem; padding: 1.75rem clamp(1rem, 3vw, 2.5rem); background: var(--blue-pale); border: 1px solid var(--line); }
.donut__figure { position: relative; width: 15rem; aspect-ratio: 1; }
.donut__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.donut__seg { cursor: pointer; transform: translate(0, 0); transition: transform .3s var(--ease), opacity .25s ease; }
.donut__seg circle { fill: none; stroke: var(--c); stroke-width: 28; stroke-dasharray: 0 var(--circ); transition: stroke-dasharray .9s var(--ease) calc(var(--i) * .12s + .1s), stroke-width .25s var(--ease); }
.donut.is-in .donut__seg circle { stroke-dasharray: var(--len) var(--circ); }
.donut.has-active .donut__seg { opacity: .35; }
.donut .donut__seg.is-active { opacity: 1; transform: translate(var(--dx), var(--dy)); }
.donut__seg.is-active circle { stroke-width: 34; }
.donut__seg:focus-visible { outline: none; }
.donut__center { position: absolute; inset: 22%; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut__num { color: var(--ink); font-size: 2.4rem; font-weight: 650; line-height: 1.05; }
.donut__label { max-width: 7.5rem; margin-inline: auto; color: var(--ink-faint); font-size: .76rem; line-height: 1.35; }
.donut__caption { margin-bottom: .75rem; color: var(--blue-dark); font-size: .73rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.donut__legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem 1.5rem; max-width: 34rem; }
.donut__key { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .35rem .5rem; color: var(--ink-soft); font-size: .88rem; text-decoration: none; border-radius: 3px; transition: background .2s ease, color .2s ease; }
.donut__key.is-active { background: white; color: var(--ink); }
.donut__swatch { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px white; transition: transform .25s var(--ease); }
.donut__key.is-active .donut__swatch { transform: scale(1.25); }
.donut__val { color: var(--ink-faint); font-size: .8rem; font-variant-numeric: tabular-nums; }

/* Activity cards */
.activities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.75rem 2rem; }
.act { padding-top: 1rem; border-top: 1px solid var(--line); transition: transform .2s var(--ease); scroll-margin-top: 2rem; }
.act:hover { transform: translateY(-2px); }
.act.is-active { border-top-color: var(--c); }
.act__media { position: relative; margin-bottom: 1.15rem; }
.act__media--stack { margin-right: .6rem; margin-bottom: 1.6rem; }
.act__frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--blue-pale); border: 1px solid var(--line-soft); }
.act__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.act:hover .act__img { transform: scale(1.03); }
.act__inset { position: absolute; right: -.6rem; bottom: -1.1rem; width: 34%; max-height: 72%; object-fit: cover; border: 4px solid white; box-shadow: 0 4px 14px rgb(37 42 39 / 18%); transform: rotate(3deg); transition: transform .3s var(--ease); }
.act:hover .act__inset { transform: rotate(0deg) scale(1.04); }
.act__badge { position: absolute; top: .6rem; left: .6rem; background: rgb(255 253 249 / 92%); }
.act__title, .by__title { margin: .2rem 0; font-size: 1rem; }
.act__date, .act__note, .by__body { color: var(--ink-faint); font-size: .88rem; }
.act__date { margin-bottom: .35rem; }
.act__date::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .45rem; border-radius: 50%; background: var(--c); vertical-align: .05em; }

/* Beyond research: floating photo bubbles */
.bubbles { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 2rem; padding: 1rem 0 .5rem; }
.bubble { margin: 0; text-align: center; }
.bubble:nth-of-type(even) { margin-top: 3rem; }
.bubble__float { position: relative; width: min(100%, 13rem); margin: 0 auto 1.1rem; animation: bubble-float calc(5s + var(--i) * .7s) ease-in-out calc(var(--i) * -1.3s) infinite; }
.bubble__photo { aspect-ratio: 1; overflow: hidden; border-radius: 50%; border: 4px solid white; box-shadow: 0 0 0 2px var(--c), 0 10px 26px -8px color-mix(in srgb, var(--c) 55%, transparent); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.bubble__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.bubble:hover .bubble__photo { transform: scale(1.05); box-shadow: 0 0 0 3px var(--c), 0 0 0 11px color-mix(in srgb, var(--c) 16%, transparent), 0 14px 30px -8px color-mix(in srgb, var(--c) 60%, transparent); }
.bubble:hover .bubble__photo img { transform: scale(1.08); }
.bubble__icon { position: absolute; right: 6%; bottom: 4%; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--c); color: white; border: 3px solid var(--bg); transition: transform .4s var(--ease); }
.bubble__icon svg { width: 19px; height: 19px; }
.bubble:hover .bubble__icon { transform: rotate(-12deg) scale(1.1); }
.bubble figcaption { max-width: 16rem; margin: 0 auto; }
.bubbles__dot { position: absolute; border-radius: 50%; pointer-events: none; opacity: .5; animation: bubble-float 7s ease-in-out infinite; }
.bubbles__dot:nth-child(1) { width: 14px; height: 14px; left: 22%; top: 2%; background: #3a76c4; }
.bubbles__dot:nth-child(2) { width: 9px; height: 9px; left: 48%; top: 28%; background: #e0703f; animation-delay: -2s; }
.bubbles__dot:nth-child(3) { width: 18px; height: 18px; left: 73%; top: 6%; background: #1f9e74; opacity: .35; animation-delay: -4s; }
.bubbles__dot:nth-child(4) { width: 8px; height: 8px; left: 2%; top: 40%; background: #6a5acd; animation-delay: -1s; }
.bubbles__dot:nth-child(5) { width: 11px; height: 11px; right: 1%; top: 46%; background: #e2a21a; animation-delay: -3s; }
.bubbles__dot:nth-child(6) { width: 7px; height: 7px; left: 25%; top: 58%; background: #d9739c; animation-delay: -5s; }
@keyframes bubble-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.footer { padding: 2.5rem 0 3.5rem; border-top: 2px solid var(--line); }
.footer__links { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.footer__meta { color: var(--ink-faint); font-size: .82rem; }

.detail { padding: 4.5rem 0 4rem; }
.backlink { display: inline-block; margin-bottom: 2rem; font-size: .88rem; font-weight: 600; text-decoration: none; }
.backlink::before { content: "← "; }
.detail__title { font-size: clamp(2.1rem, 6vw, 3.4rem); letter-spacing: -.03em; }
.detail__tagline { margin: .55rem 0 1rem; color: var(--ink-faint); }
.detail__hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin: 2rem 0; border: 1px solid var(--line); }
.detail__lead { color: var(--ink-soft); font-size: 1.06rem; }
.detail__section { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.detail__section h2 { margin-bottom: .65rem; font-size: 1.3rem; }
.detail__section p { color: var(--ink-soft); }
.detail__gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.detail__gallery img { width: 100%; border: 1px solid var(--line); }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .activities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bubbles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bubble:nth-of-type(even) { margin-top: 0; }
  .bubble:nth-of-type(4n+2), .bubble:nth-of-type(4n+3) { margin-top: 2rem; }
}

@media (max-width: 700px) {
  .main { padding-inline: 1rem; }
  .section { padding: 3.5rem 0; }
  .section--hero { padding-top: 3rem; }
  .hero { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero__figure { order: -1; width: min(100%, 25.125rem); }
  .pcard { grid-template-columns: 1fr; gap: 1.1rem; }
  .pcard__media { width: min(100%, var(--media-width)); }
  .pcard__body { padding-top: 0; }
  .fproject { grid-template-columns: 1fr; gap: 1.25rem; }
  .fproject__media { width: min(100%, var(--media-width)); }
  .tl__layout { grid-template-columns: 1fr; gap: 1rem; }
  .tl__media { width: min(100%, var(--media-width)); }
  .tl__content { padding-left: 0; }
  .activities { grid-template-columns: 1fr; }
  .act__media { max-width: 28rem; }
  .donut { grid-template-columns: 1fr; justify-items: center; }
  .donut__side { width: 100%; }
  .donut__legend { grid-template-columns: 1fr; }
  .bubbles { gap: 2rem 1rem; }
  .bubble__icon { width: 34px; height: 34px; }
  .bubble__icon svg { width: 16px; height: 16px; }
}

@media (max-width: 460px) {
  .pub { grid-template-columns: 1fr; }
  .pub__thumb { display: none; }
  .btnrow .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
  .bubble__float, .bubbles__dot { animation: none; }
}

@media print {
  .skip-link { display: none; }
  .main { width: 100%; padding-inline: 0; }
  .reveal { opacity: 1; transform: none; }
}
