:root {
  --ink: #1c1917;
  --heading: #1c1917;
  --foreground: #44403c;
  --muted: #78716c;
  --light: #a8a29e;
  --border: #e7e5e4;
  --background: #ffffff;
  --hover-bg: #f5f5f4;
  --accent: #1d4ed8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 704px;
  margin: 0 auto;
  padding: 64px 24px;
}

/* Header */
.header {
  display: flex;
  align-items: stretch;
  gap: 28px;
}

.profile-picture-wrapper {
  width: 193px;
  aspect-ratio: 4 / 4.2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-picture-inner {
  width: 85%;
  height: 85%;
  overflow: hidden;
}

.profile-picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transform: scale(1.3);
  transform-origin: center 45%;
}

.header-text {
  flex: 1;
  padding-top: 4px;
}

h1 {
  font-weight: 600;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.bio {
  font-size: 15px;
  color: var(--foreground);
  line-height: 1.6;
  margin-bottom: 14px;
}

.bio a {
  color: var(--ink);
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

.inline-logo-link {
  white-space: nowrap;
}

.inline-logo {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
  margin-left: 3px;
  border-radius: 3px;
}

.bio a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.links a:hover {
  color: var(--accent);
}

/* Dividers */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Sections */
h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Project cards */
.project-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

section > h2 + .project-card {
  border-top: none;
  padding-top: 8px;
}

.project-img {
  width: 220px;
  height: 150px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
  box-sizing: border-box;
  cursor: zoom-in;
}

.chart-img {
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.paper-figure-img {
  background: transparent;
  border: 1px solid var(--border);
}

.slowformer-viz {
  background: transparent;
  border: 1px solid var(--border);
  overflow: hidden;
}

.slowformer-viz svg {
  display: block;
  width: 100%;
  height: 100%;
}

.slowformer-viz text {
  font-size: 6px;
  font-weight: 600;
  text-anchor: middle;
  fill: #334155;
}

.slowformer-viz .patch-grid rect {
  fill: #e7f0fb;
  stroke: #4f78a8;
  stroke-width: 0.9;
}

.slowformer-viz .patch-grid .attack-patch {
  fill: #f4c7b8;
  stroke: #b9533d;
}

.slowformer-viz .vit-block rect {
  fill: #f8fafc;
  stroke: #52606d;
  stroke-width: 1.2;
}

.slowformer-viz .vit-block path {
  stroke: #52606d;
  stroke-linecap: round;
  stroke-width: 1;
}

.slowformer-viz .compute-meter rect:first-child {
  fill: #fff4ee;
  stroke: #b9533d;
  stroke-width: 1.2;
}

.slowformer-viz .compute-meter rect:not(:first-child) {
  fill: #c75f45;
  opacity: 0.78;
}

.slowformer-viz .slow-arrow {
  fill: none;
  stroke: #52606d;
  stroke-linecap: round;
  stroke-width: 1.2;
}

.slowformer-viz .attack-wave {
  fill: none;
  stroke: #b9533d;
  stroke-dasharray: 2.5 2.5;
  stroke-linecap: round;
  stroke-width: 1.3;
  opacity: 0.8;
}

.slowformer-viz .energy-line {
  fill: none;
  stroke: #b9533d;
  stroke-linecap: round;
  stroke-width: 1.2;
}

.function-vector-viz {
  background: transparent;
  border: 1px solid var(--border);
  overflow: hidden;
}

.function-vector-viz .fv-figure {
  display: block;
  width: 100%;
  height: 100%;
}

.function-vector-viz text {
  text-anchor: middle;
  fill: var(--muted);
  font-family: inherit;
}

.function-vector-viz .fv-step {
  font-size: 5.8px;
  font-weight: 600;
  letter-spacing: 0.05em;
  fill: var(--muted);
}

.function-vector-viz .fv-stage-panel {
  fill: #ffffff;
  stroke: #dedbd6;
  stroke-width: 0.65;
}

.function-vector-viz .fv-divider {
  stroke: var(--border);
  stroke-width: 0.5;
  stroke-dasharray: 2 2;
}

.function-vector-viz .fv-eq-v {
  font-size: 10px;
  font-weight: 600;
  font-style: italic;
  font-family: 'Cambria Math', 'STIX Two Math', Georgia, serif;
  fill: var(--ink);
}

.function-vector-viz .fv-eq-sub {
  font-size: 5px;
  font-style: normal;
  font-weight: 600;
  fill: #64748b;
}

.function-vector-viz .fv-eq-neq {
  font-size: 13px;
  font-weight: 700;
  font-family: 'Cambria Math', 'STIX Two Math', Georgia, serif;
  fill: #b94a48;
}

.function-vector-viz .fv-eq-op {
  font-size: 10px;
  font-weight: 600;
  fill: var(--muted);
  font-family: 'Cambria Math', 'STIX Two Math', Georgia, serif;
}

.function-vector-viz .fv-eq-hint {
  font-size: 4.6px;
  font-weight: 500;
  font-style: italic;
  fill: var(--light);
}

.function-vector-viz .fv-prompt-box {
  fill: #fbfbfa;
  stroke: #d6d3d1;
  stroke-width: 0.7;
}

.function-vector-viz .fv-prompt-text {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 4.5px;
  font-weight: 600;
  text-anchor: start;
  fill: var(--ink);
}

.function-vector-viz .fv-src {
  fill: #3b6ea8;
}

.function-vector-viz .fv-tgt {
  fill: #b45309;
}

.function-vector-viz .fv-query {
  fill: #b94a48;
}

.function-vector-viz .fv-row-arrow {
  fill: none;
  stroke: #94a3b8;
  stroke-linecap: round;
  stroke-width: 0.9;
}

.function-vector-viz .fv-arrowhead {
  fill: #94a3b8;
}

.function-vector-viz .fv-vector-box {
  fill: #f8fbf9;
  stroke: #5f7f6d;
  stroke-width: 0.75;
}

.function-vector-viz .fv-decomp-box {
  fill: #ffffff;
  stroke: #d6d3d1;
  stroke-width: 0.65;
}

.function-vector-viz .fv-box-title {
  font-size: 4.5px;
  font-weight: 600;
  fill: #64748b;
  letter-spacing: 0.02em;
}

.function-vector-viz .fv-vector-label {
  font-size: 7.4px;
  font-weight: 700;
  font-style: italic;
  font-family: 'Cambria Math', 'STIX Two Math', Georgia, serif;
  fill: var(--ink);
}

.function-vector-viz .fv-chip-text {
  font-size: 5px;
  font-weight: 700;
  fill: var(--ink);
}

.function-vector-viz .fv-chip-note {
  font-size: 3.3px;
  font-weight: 500;
  font-style: italic;
  fill: var(--light);
}

.function-vector-viz .fv-caption {
  font-size: 5.6px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.03em;
  fill: var(--muted);
}

/* Harness evolution thumbnail */
.harness-evolution {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding: 14px 10px 8px;
}

.harness-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  opacity: 1;
}

.stage-1,
.stage-2,
.stage-3 {
  animation: none;
}

.project-card:hover .stage-1 { animation: harnessStage1 8.5s ease infinite; }
.project-card:hover .stage-2 { animation: harnessStage2 8.5s ease infinite; }
.project-card:hover .stage-3 { animation: harnessStage3 8.5s ease infinite; }

@keyframes harnessStage1 {
  0% { opacity: 0; }
  8% { opacity: 0.65; }
  78% { opacity: 0.65; }
  88% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes harnessStage2 {
  0% { opacity: 0; }
  15% { opacity: 0; }
  23% { opacity: 0.82; }
  78% { opacity: 0.82; }
  88% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes harnessStage3 {
  0% { opacity: 0; }
  30% { opacity: 0; }
  38% { opacity: 1; }
  78% { opacity: 1; }
  88% { opacity: 0; }
  100% { opacity: 0; }
}

.claude-char {
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

.claude-sm { height: 22px; }
.claude-md { height: 29px; }
.claude-lg { height: 31px; }

.harness-connector {
  width: 1px;
  height: 3px;
  background: #c8b9a8;
}

.harness-doc {
  border: 1px solid #cfcfcf;
  border-radius: 3px;
  padding: 5px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #ffffff;
}

.doc-sparse {
  width: 42px;
  border-color: #d6d6d6;
}

.doc-growing {
  width: 48px;
  border-color: #adadad;
}

.doc-full {
  width: 54px;
  border-color: #707070;
}

.doc-line {
  border-radius: 1px;
}

.doc-line-title {
  height: 3px;
  width: 65%;
  background: currentColor;
  border-radius: 1px;
}

.doc-line-short {
  height: 2px;
  width: 50%;
  background: currentColor;
  opacity: 0.5;
  border-radius: 1px;
}

.doc-line-med {
  height: 2px;
  width: 75%;
  background: currentColor;
  opacity: 0.5;
  border-radius: 1px;
}

.doc-sparse { color: #b6b6b6; }
.doc-growing { color: #8e8e8e; }
.doc-full { color: #5f5f5f; }

.doc-block {
  border: 0.5px solid currentColor;
  border-radius: 2px;
  padding: 3px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 1px;
  opacity: 0.6;
}

.doc-growing .doc-block {
  border-style: dashed;
}

.harness-pct {
  font-size: 9px;
  font-weight: 500;
  font-family: inherit;
  margin-top: 4px;
}

.pct-light { color: #c0b0a0; }
.pct-mid { color: #a09080; }
.pct-full { color: #5a4a3a; }

.harness-arrow {
  color: #8a8a8a;
  font-size: 12px;
  margin-bottom: 30px;
  opacity: 1;
}

.harness-stage.stage-1 + .harness-arrow,
.harness-stage.stage-2 + .harness-arrow {
  animation: none;
}

.project-card:hover .harness-stage.stage-1 + .harness-arrow { animation: harnessArrow1 8.5s ease infinite; }
.project-card:hover .harness-stage.stage-2 + .harness-arrow { animation: harnessArrow2 8.5s ease infinite; }

@keyframes harnessArrow1 {
  0% { opacity: 0; }
  10% { opacity: 0; }
  16% { opacity: 1; }
  78% { opacity: 1; }
  88% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes harnessArrow2 {
  0% { opacity: 0; }
  25% { opacity: 0; }
  31% { opacity: 1; }
  78% { opacity: 1; }
  88% { opacity: 0; }
  100% { opacity: 0; }
}

.embedding-viz {
  background: #fbfbfa;
  border: 1px solid #dedbd6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.embedding-viz svg {
  width: 100%;
  height: 100%;
}

.twitch-viz {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

/* === Continual self-supervised learning figure: video streams over time === */

.csl-figure {
  width: 100%;
  height: 100%;
  display: block;
  font-family: inherit;
}

.csl-figure text {
  font-family: inherit;
  text-anchor: middle;
  fill: var(--muted);
}

.csl-figure .model-label {
  font-size: 6.5px;
  font-weight: 600;
  fill: var(--ink);
  letter-spacing: 0.03em;
}

.csl-figure .model-sub {
  font-size: 5.5px;
  font-weight: 500;
  font-style: italic;
  fill: var(--muted);
  font-family: 'Cambria Math', 'STIX Two Math', Georgia, serif;
}

.csl-figure .curr-label {
  fill: var(--accent);
}

.csl-figure .curr-sub {
  fill: var(--accent);
  opacity: 0.85;
}

.csl-figure .data-label {
  font-size: 4.6px;
  fill: var(--light);
  letter-spacing: 0.05em;
  font-style: italic;
}

.csl-figure .clip-frame {
  fill: none;
  stroke-width: 0.45;
}

.csl-figure .clip-frame.back {
  stroke: var(--light);
  opacity: 0.7;
}

.csl-figure .clip-frame.front {
  stroke: var(--muted);
}

.csl-figure .clip-frame.curr-back {
  stroke: var(--accent);
  opacity: 0.55;
}

.csl-figure .clip-frame.curr-front {
  stroke: var(--accent);
  opacity: 0.85;
}

.csl-figure .play-icon {
  fill: #ffffff;
  stroke: rgba(0, 0, 0, 0.4);
  stroke-width: 0.2;
}

.csl-figure .feed-line {
  stroke: var(--muted);
  stroke-width: 0.5;
  fill: none;
}

.csl-figure .feed-arrowhead {
  fill: var(--muted);
}

.csl-figure .state-label {
  font-size: 4.8px;
  fill: var(--muted);
  letter-spacing: 0.04em;
  font-style: italic;
}

.csl-figure .emb-label {
  font-size: 4.4px;
  fill: var(--muted);
  letter-spacing: 0.02em;
  font-style: italic;
}

.csl-figure .curr-emb-label {
  fill: var(--accent);
}

.csl-figure .cluster-blob {
  stroke-width: 0.35;
  stroke-linejoin: round;
}

.csl-figure .old-blob {
  stroke: rgba(87, 83, 78, 0.55);
}

.csl-figure .new-blob {
  stroke: rgba(37, 99, 235, 0.65);
}

.csl-figure .prev-frame {
  fill: #fafaf9;
  stroke: var(--muted);
  stroke-width: 0.7;
  stroke-dasharray: 2 1.4;
}

.csl-figure .prev-layer {
  fill: #ffffff;
  stroke: var(--muted);
  stroke-width: 0.4;
}

.csl-figure .prev-emb {
  fill: #44403c;
  opacity: 0.85;
}

.csl-figure .curr-frame {
  fill: #ffffff;
  stroke: var(--accent);
  stroke-width: 0.9;
}

.csl-figure .curr-layer {
  fill: #eff6ff;
  stroke: var(--accent);
  stroke-width: 0.4;
}

.csl-figure .curr-emb-old {
  fill: #44403c;
  opacity: 0.85;
}

.csl-figure .curr-emb-new {
  fill: #1d4ed8;
}

.csl-figure .feature-bound {
  fill: none;
  stroke: var(--light);
  stroke-width: 0.4;
  stroke-dasharray: 1 1;
  opacity: 0.6;
}

.csl-figure .distill-line {
  stroke: var(--ink);
  stroke-width: 0.9;
  fill: none;
}

.csl-figure .distill-arrowhead {
  fill: var(--ink);
}

.csl-figure .distill-label {
  font-size: 5px;
  font-weight: 600;
  fill: var(--ink);
  letter-spacing: 0.06em;
}

.csl-figure .distill-sublabel {
  font-size: 4.1px;
  fill: var(--muted);
  letter-spacing: 0.04em;
  font-style: italic;
}

.csl-figure .time-line {
  stroke: var(--light);
  stroke-width: 0.5;
  fill: none;
}

.csl-figure .time-arrowhead {
  fill: var(--light);
}

.csl-figure .time-label {
  font-size: 5px;
  fill: var(--light);
  letter-spacing: 0.1em;
  font-style: italic;
}

.twitch-viz .csl-figure .clip-frame,
.twitch-viz .csl-figure .play-icon,
.twitch-viz .csl-figure .curr-frame,
.twitch-viz .csl-figure .curr-layer,
.twitch-viz .csl-figure .cluster-blob,
.twitch-viz .csl-figure .emb,
.twitch-viz .csl-figure .distill-arrowhead {
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 180ms ease, stroke-width 180ms ease, transform 260ms ease;
}

.twitch-viz .csl-figure .distill-line {
  transition: stroke-width 180ms ease, opacity 180ms ease;
}

.project-card:hover .twitch-viz .csl-figure .clip-frame.front,
.twitch-viz:hover .csl-figure .clip-frame.front {
  stroke-width: 0.65;
}

.project-card:hover .twitch-viz .csl-figure .play-icon,
.twitch-viz:hover .csl-figure .play-icon {
  transform: translateX(0.5px) scale(1.08);
}

.project-card:hover .twitch-viz .csl-figure .distill-line,
.twitch-viz:hover .csl-figure .distill-line {
  animation: csl-preserve-pulse 900ms ease-out both;
  stroke-width: 1.15;
}

.project-card:hover .twitch-viz .csl-figure .distill-arrowhead,
.twitch-viz:hover .csl-figure .distill-arrowhead {
  transform: translateX(1px);
}

.project-card:hover .twitch-viz .csl-figure .curr-frame,
.twitch-viz:hover .csl-figure .curr-frame {
  stroke-width: 1.1;
}

.project-card:hover .twitch-viz .csl-figure .curr-layer,
.twitch-viz:hover .csl-figure .curr-layer {
  transform: translateX(0.8px);
}

.project-card:hover .twitch-viz .csl-figure .old-blob,
.twitch-viz:hover .csl-figure .old-blob {
  transform: scale(1.02);
}

.project-card:hover .twitch-viz .csl-figure .new-blob,
.twitch-viz:hover .csl-figure .new-blob {
  transform: translateY(-0.6px) scale(1.05);
}

.project-card:hover .twitch-viz .csl-figure .curr-emb-new,
.twitch-viz:hover .csl-figure .curr-emb-new {
  animation: csl-new-rep-settle 760ms ease-out both;
}

@keyframes csl-preserve-pulse {
  0% {
    stroke-dasharray: 0 34;
    opacity: 0.45;
  }
  70% {
    stroke-dasharray: 34 0;
    opacity: 1;
  }
  100% {
    stroke-dasharray: none;
    opacity: 1;
  }
}

@keyframes csl-new-rep-settle {
  0% {
    opacity: 0.45;
    transform: translateY(1px) scale(0.82);
  }
  65% {
    opacity: 1;
    transform: translateY(-0.3px) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card:hover .twitch-viz .csl-figure .distill-line,
  .project-card:hover .twitch-viz .csl-figure .curr-emb-new,
  .twitch-viz:hover .csl-figure .distill-line,
  .twitch-viz:hover .csl-figure .curr-emb-new {
    animation: none;
  }

  .project-card:hover .twitch-viz .csl-figure .play-icon,
  .project-card:hover .twitch-viz .csl-figure .distill-arrowhead,
  .project-card:hover .twitch-viz .csl-figure .curr-layer,
  .project-card:hover .twitch-viz .csl-figure .old-blob,
  .project-card:hover .twitch-viz .csl-figure .new-blob,
  .twitch-viz:hover .csl-figure .play-icon,
  .twitch-viz:hover .csl-figure .distill-arrowhead,
  .twitch-viz:hover .csl-figure .curr-layer,
  .twitch-viz:hover .csl-figure .old-blob,
  .twitch-viz:hover .csl-figure .new-blob {
    transform: none;
  }
}

.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  color: var(--light);
}

.project-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-venue {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.project-authors {
  font-size: 13px;
  color: var(--light);
  line-height: 1.4;
}

.project-authors .author-self {
  color: var(--foreground);
}

.project-authors .pub-venue {
  color: var(--ink);
  font-weight: 500;
}

.project-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.project-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-top: 2px;
  letter-spacing: -0.005em;
}

.project-desc {
  font-size: 14.5px;
  color: var(--foreground);
  line-height: 1.55;
  margin-top: 4px;
}

.project-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--light);
}

.project-link {
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.15s ease;
}

.project-link:hover {
  color: var(--accent);
}

.project-link + .project-link::before,
.project-tag + .project-link::before,
.project-tag + .project-tag::before {
  content: "·";
  color: var(--light);
  margin-right: 10px;
}

.project-link + .project-tag::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  background: var(--border);
  vertical-align: middle;
  margin-right: 10px;
  position: relative;
  top: -1px;
}

.sub-papers {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
  border-left: 2px solid var(--border);
  padding-left: 14px;
}

.sub-paper {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin: 0 -10px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.sub-paper:hover {
  background-color: var(--hover-bg);
  opacity: 1;
}

.sub-paper-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sub-paper-num {
  font-size: 12px;
  color: var(--light);
  flex-shrink: 0;
}

.sub-paper-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--heading);
  line-height: 1.3;
}

.sub-paper-authors {
  font-size: 11px;
  color: var(--light);
  white-space: nowrap;
}

.sub-paper-detail {
  font-size: 11px;
  color: var(--light);
  margin-left: auto;
  flex-shrink: 0;
}

.sub-paper-soon {
  opacity: 0.5;
  cursor: default;
}


.see-all {
  margin-top: 16px;
  padding-left: 12px;
}

.see-all a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.see-all a:hover {
  color: var(--accent);
}

/* Items (Experience / Education) */
.item {
  margin-bottom: 22px;
}

.item:last-child {
  margin-bottom: 0;
}

.item-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.item-title {
  font-weight: 500;
  font-size: 15px;
  color: var(--heading);
}

.item-role {
  color: var(--light);
  font-size: 14px;
}

.item-detail {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.item-detail a {
  color: var(--foreground);
  text-decoration-color: var(--border);
}

.item-detail a:hover {
  text-decoration-color: var(--foreground);
}

/* Research page */
.back {
  margin-bottom: 32px;
}

.back a {
  font-size: 13px;
  color: var(--light);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.back a:hover {
  color: var(--foreground);
}

.page-title {
  margin-bottom: 32px;
}

.pub {
  margin-bottom: 22px;
}

.pub:last-of-type {
  margin-bottom: 0;
}

.pub-title {
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 2px;
}

.pub-title a {
  text-decoration: none;
  font-weight: 500;
  color: var(--heading);
}

.pub-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--muted);
}

.pub-authors {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 1px;
}

.pub-venue {
  font-size: 13px;
  color: var(--light);
}

.pub-venue a {
  font-size: 13px;
  color: var(--light);
}

/* Global links */
a {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

/* Footer */
footer {
  text-align: center;
}

footer p {
  font-size: 13px;
  color: var(--light);
}

footer .education {
  margin-bottom: 8px;
  color: var(--muted);
}

/* Image lightbox */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(248, 248, 248, 0.92);
  backdrop-filter: blur(6px);
}

.image-lightbox.is-open {
  display: flex;
}

.image-lightbox-content {
  max-width: min(92vw, 1040px);
  max-height: 82vh;
}

.image-lightbox-content > .project-img {
  width: min(92vw, 1040px);
  height: min(70vh, 710px);
  cursor: zoom-out;
}

.image-lightbox-content > img.project-img {
  padding: 0 34px;
  background: var(--background);
  object-fit: contain;
}

.image-lightbox-content > .harness-evolution {
  align-items: center;
  justify-content: center;
  gap: 52px;
  padding: 0;
}

.image-lightbox-content > .harness-evolution > * {
  transform: scale(2.1);
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  line-height: 1;
}

.image-lightbox-close:hover {
  color: var(--foreground);
}

/* Mobile */
@media (max-width: 640px) {
  .container {
    padding: 28px 18px 40px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .profile-picture-wrapper {
    width: 132px;
  }

  .header-text {
    width: 100%;
    padding-top: 0;
  }

  h1 {
    font-size: 26px;
    margin-bottom: 10px;
  }

  .bio {
    font-size: 14.5px;
    line-height: 1.58;
    margin-bottom: 12px;
  }

  .links {
    gap: 12px 16px;
  }

  hr {
    margin: 30px 0;
  }

  h2 {
    margin-bottom: 14px;
  }

  .project-card {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 22px 0;
  }

  section > h2 + .project-card {
    padding-top: 2px;
  }

  .project-img {
    width: 100%;
    height: auto;
    aspect-ratio: 220 / 150;
    max-height: 260px;
  }

  .harness-evolution {
    align-items: center;
    gap: 8px;
    padding: 14px;
  }

  .project-title {
    font-size: 17px;
    line-height: 1.32;
  }

  .project-desc {
    font-size: 14px;
    line-height: 1.55;
  }

  .project-links {
    gap: 8px;
    margin-top: 8px;
  }

  .project-link + .project-link::before,
  .project-tag + .project-link::before,
  .project-tag + .project-tag::before,
  .project-link + .project-tag::before {
    content: "·";
    width: auto;
    height: auto;
    background: none;
    margin-right: 8px;
    position: static;
    vertical-align: baseline;
  }

  .sub-papers {
    margin-top: 10px;
    padding-left: 12px;
  }

  .sub-paper {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    padding: 7px 0;
    margin: 0;
  }

  .sub-paper-info {
    min-width: 0;
  }

  .sub-paper-title {
    font-size: 12.5px;
  }

  .sub-paper-detail {
    margin-left: 0;
    padding-top: 1px;
    white-space: nowrap;
  }

  .pub {
    margin-bottom: 20px;
  }

  .pub-title {
    font-size: 14.5px;
  }

  .pub-authors,
  .pub-venue {
    font-size: 12.5px;
  }

  .image-lightbox {
    padding: 12px;
  }

  .image-lightbox-content,
  .image-lightbox-content > .project-img {
    max-width: calc(100vw - 24px);
    width: calc(100vw - 24px);
  }

  .image-lightbox-content > img.project-img {
    padding: 0;
    height: auto;
  }

  .image-lightbox-content > .harness-evolution {
    gap: 16px;
  }

  .image-lightbox-content > .harness-evolution > * {
    transform: scale(1.3);
  }
}
