@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/jost-latin.woff2) format('woff2');
}

:root {
  --paper: #ffffff;
  --panel: #f6f7f8;
  --ink: #16181b;
  --ink-soft: #4b5158;
  --ink-faint: #868c93;
  --accent: #2f6690;
  --rule: #e2e5e8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14161a;
    --panel: #1b1e22;
    --ink: #e7e9eb;
    --ink-soft: #a7adb4;
    --ink-faint: #676d74;
    --accent: #6fb0d6;
    --rule: #2a2d32;
  }
}
:root[data-theme="dark"] {
  --paper: #14161a;
  --panel: #1b1e22;
  --ink: #e7e9eb;
  --ink-soft: #a7adb4;
  --ink-faint: #676d74;
  --accent: #6fb0d6;
  --rule: #2a2d32;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .site-name {
  font-family: 'Jost', "Century Gothic", "Trebuchet MS", sans-serif;
  font-weight: 600;
}

a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.label {
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.wrap { max-width: 860px; margin: 0 auto; padding: 56px 24px 100px; }

/* ---- nav ---- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 54px;
  font-size: 13.5px;
  flex-wrap: wrap;
  gap: 10px;
}
.nav .site-name { color: var(--ink); text-decoration: none; letter-spacing: 0.01em; font-size: 15px; }
.nav .links a { color: var(--ink-soft); text-decoration: none; margin-left: 18px; }
.nav .links a:first-child { margin-left: 0; }
.nav .links a:hover { color: var(--accent); }

/* ---- hero (home) ---- */
.hero { display: flex; gap: 22px; align-items: center; margin-bottom: 30px; }
.avatar {
  width: 92px; height: 92px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 14%, var(--paper)), var(--panel));
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-family: 'Jost', "Century Gothic", "Trebuchet MS", sans-serif;
  font-size: 26px; color: var(--ink-soft); letter-spacing: 0.02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero h1 { font-size: 27px; margin: 0 0 6px; letter-spacing: -0.005em; text-wrap: balance; }
.hero .role { margin: 0; font-size: 15.5px; color: var(--ink-soft); line-height: 1.5; }

.bio p {
  font-size: 16px;
  line-height: 1.68;
  color: var(--ink);
  margin: 0 0 15px;
  max-width: 120ch;
}
.bio { margin-bottom: 8px; }

.meta-row {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 20px 0 46px;
  line-height: 1.9;
}
.meta-row a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
.meta-row a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.meta-row .sep { color: var(--rule); margin: 0 9px; }

/* ---- section / projects list ---- */
.section-label { margin-bottom: 18px; }
.section-label .label { display: block; margin-bottom: 5px; }
.section-label h2 { font-size: 20px; margin: 0; }

.projects { border-top: 1px solid var(--rule); }
.project {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.project-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--rule);
  background: var(--panel);
  flex-shrink: 0;
}
.project-body { flex: 1; min-width: 0; }
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.project h3 { font-size: 17.5px; margin: 0; color: var(--ink); }
.project:hover h3 { color: var(--accent); }
.project .count {
  font-size: 12px;
  color: var(--ink-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.project p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 120ch;
}

/* ---- project detail page ---- */
.crumb { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 14px; }
.crumb a { color: var(--ink-faint); text-decoration: none; }
.crumb a:hover { color: var(--accent); }

.hero-solo h1 { font-size: 30px; margin: 0 0 8px; letter-spacing: -0.005em; text-wrap: balance; }
.hero-solo .dek {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 68ch;
  margin: 0 0 34px;
}

.project-banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--rule);
  margin: 0 0 34px;
}

.body p {
  font-size: 16px;
  line-height: 1.68;
  color: var(--ink);
  margin: 0 0 16px;
  max-width: 120ch;
}
.body a { word-break: break-word; }

.embed-frame {
  position: relative;
  width: 100%;
  margin: 24px 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  background: var(--panel);
}
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-frame-fixed {
  display: block;
  width: 100%;
  margin: 24px 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--panel);
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 40px;
}
.play-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 8px 14px;
  border-radius: 3px;
  margin: 0;
}
.play-link:hover { border-color: var(--accent); color: var(--accent); }

.funding {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 72ch;
}
.funding .label { margin-right: 6px; }

section { margin-top: 46px; }

.pubs { border-top: 1px solid var(--rule); }
.pub { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.pub .cite {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}
.pub .cite a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule); }
.pub .cite a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.pub .venue {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 4px;
}
.pub .venue a { color: var(--ink-faint); margin-left: 10px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.pub .venue a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- footer ---- */
footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 520px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .project-top { flex-direction: column; gap: 2px; }
}
