:root {
  --bg: #fbfbfa;
  --fg: #1b1b1a;
  --muted: #6b6b66;
  --line: #e4e4e0;
  --accent: #2b4fd8;
  --frame: #0e0e0e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --fg: #ececea;
    --muted: #9a9a94;
    --line: #2a2a28;
    --accent: #8fa6ff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 1040px; margin: 0 auto; padding: 56px 20px 40px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* header */
.intro { display: flex; gap: 24px; align-items: center; margin-bottom: 56px; }
.photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; }
h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.02em; }
.bio { margin: 0 0 10px; color: var(--muted); text-wrap: pretty; }
.social { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.social a { font-weight: 500; }

h2 {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 20px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
section { margin-bottom: 64px; }
h3 { margin: 0; }

/* media: always shown whole, never cropped */
.frame {
  position: relative; aspect-ratio: 16 / 9; background: var(--frame); border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.frame video, .frame img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* publications */
.pubs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
.pub h3 { font-size: 1.05rem; line-height: 1.35; margin-top: 14px; font-weight: 600; }
.pub p { margin: 4px 0 0; }
.authors { color: var(--muted); font-size: 0.9rem; }
.authors strong { color: var(--fg); font-weight: 600; }
.venue { font-size: 0.9rem; font-weight: 500; }
.note { color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.9rem; margin-top: 8px !important; }

/* projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
.project h3 { font-size: 0.95rem; margin-top: 10px; font-weight: 600; overflow-wrap: anywhere; }
.project p { margin: 2px 0 0; font-size: 0.85rem; color: var(--muted); }

footer { color: var(--muted); font-size: 0.8rem; padding-top: 24px; border-top: 1px solid var(--line); }

@media (max-width: 820px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  main { padding: 36px 16px 28px; }
  .intro { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 40px; }
  h1 { font-size: 1.7rem; }
  .pubs { grid-template-columns: 1fr; gap: 36px; }
  .projects { gap: 24px 14px; }
}
@media (max-width: 420px) {
  .projects { grid-template-columns: 1fr; }
}

/* scrub bar: click or drag along the bottom of a clip to seek */
.scrub { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; cursor: pointer; touch-action: none; opacity: 0; transition: opacity .15s; }
.frame:hover .scrub, .frame.scrubbing .scrub { opacity: 1; }
@media (hover: none) { .scrub { opacity: 1; } }
.scrub .track { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); transition: height .12s; }
.scrub:hover .track, .frame.scrubbing .track { height: 8px; }
.scrub .bar { height: 100%; width: 0; background: #fff; }
