:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #101010;
  --muted: #5e5e66;
  --faint: #8a8a92;
  --line: #dedfe3;
  --line-strong: #c7c9d1;
  --soft: #f6f6f7;
  --shadow: 0 16px 40px rgba(16, 16, 16, 0.07);
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "Roboto Mono", "SFMono-Regular", Consolas, ui-monospace, monospace;
  --max: 760px;
  --page-x: 28px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--ink);
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--ink);
  color: #fff;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-main,
.site-footer {
  width: min(calc(100% - var(--page-x) * 2), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1.05rem 0;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(222, 223, 227, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 24px;
}

.nav-cluster {
  display: flex;
  align-items: center;
  gap: clamp(1.35rem, 4vw, 2.3rem);
}

.nav-primary a {
  color: var(--faint);
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  transition: color 160ms ease, opacity 160ms ease;
}

.nav-primary a:hover,
.nav-primary a.active {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 184px;
  align-items: center;
  gap: clamp(3rem, 8vw, 6.4rem);
  padding: clamp(2.2rem, 5vw, 3.2rem) 0 clamp(2.4rem, 5vw, 3.35rem);
}

.hero h1,
.section-head h1,
.section-head h2 {
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.055em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 3.25rem);
}

.hero-role {
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-text {
  max-width: 590px;
  margin: 1.05rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.72;
}

.hero-portrait {
  display: flex;
  justify-content: flex-end;
}

.portrait-frame {
  width: 184px;
  height: 184px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--soft);
  border: 1px solid var(--line);
  filter: grayscale(1);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.section-block {
  padding: 3rem 0 0;
}

.hero + .section-block {
  padding-top: clamp(1.35rem, 3vw, 2rem);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  color: var(--faint);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 160ms ease, transform 160ms ease;
}

.section-link:hover {
  color: var(--ink);
  transform: translateX(2px);
}

.portfolio-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.portfolio-grid {
  padding: 0.25rem;
}

.portfolio-card,
.archive-card,
.research-card,
.pipeline-step,
.project-side-panel,
.prediction-showcase,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
}

.portfolio-card,
.archive-card {
  position: relative;
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border-radius: 6px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.portfolio-card {
  border: 0;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.archive-card {
  min-height: 232px;
}

.portfolio-card > * {
  min-width: 0;
}

.portfolio-card:hover,
.archive-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.portfolio-card:hover {
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.portfolio-card-body,
.archive-copy {
  flex: 1;
  padding: 1.2rem 1.2rem 0.85rem;
}

.portfolio-card-body {
  min-width: 0;
  padding: 0;
}

.portfolio-card h3,
.archive-card h3,
.writing-item h3,
.experience-item h3,
.research-card h3,
.pipeline-step h3,
.project-side-panel h3,
.prediction-showcase h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.portfolio-card h3,
.archive-card h3 {
  font-family: var(--mono);
}

.portfolio-card h3 {
  min-width: 0;
  font-size: 1rem;
  font-weight: 800;
}

.portfolio-card p,
.archive-location,
.writing-item p,
.experience-item p,
.research-card p,
.pipeline-step p,
.detail-copy p,
.side-copy,
.prediction-note {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.66;
}

.portfolio-card p,
.archive-location {
  margin: 0.65rem 0 0.75rem;
}

.portfolio-card p {
  font-size: 0.875rem;
}

.portfolio-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
  padding: 0;
  color: var(--faint);
  font-size: 0.92rem;
  font-weight: 500;
}

.portfolio-card-meta span {
  min-width: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f0f0f0;
  font-size: 0.75rem;
  line-height: 1.55;
}

.portfolio-card-topline,
.archive-bottomline {
  height: 4px;
  margin-top: auto;
  background: var(--card-accent, #6f8daa);
}

.writing-list {
  display: grid;
  gap: 1.85rem;
}

.writing-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 188px;
  gap: 1.5rem;
}

.experience-list {
  display: grid;
  gap: 2rem;
  max-width: 620px;
}

.experience-item {
  display: block;
}

.writing-row {
  display: contents;
}

.writing-item h3 {
  font-size: 1.04rem;
}

.experience-item h3 {
  font-size: 1rem;
}

.writing-item time {
  color: var(--faint);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: right;
}

.experience-meta {
  margin: 0.5rem 0 0;
  color: var(--faint);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
}

.writing-item p {
  grid-column: 1 / -1;
  margin: -1.1rem 0 0;
}

.writing-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: -0.8rem;
}

.writing-tags span {
  padding: 0.24rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.experience-item > p {
  margin: 1rem 0 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(5rem, 10vw, 6.5rem) 0 2.8rem;
  color: var(--faint);
  font-size: 0.85rem;
  font-weight: 500;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.3rem;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-line,
.fine {
  margin: 0;
}

.fine {
  margin-top: 0.35rem;
  color: var(--faint);
}

.archive-page {
  padding-top: clamp(4.5rem, 9vw, 6rem);
}

.archive-copy p {
  margin: 0.65rem 0 0;
}

.archive-meta {
  display: inline-flex;
  margin: 0 0.45rem 0.45rem 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.archive-card {
  min-height: 224px;
}

.archive-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--card-accent, #6f8daa);
}

.course-head {
  align-items: flex-start;
}

.course-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.course-nav {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  position: sticky;
  top: 92px;
  padding-left: 0.2rem;
}

.course-nav-link {
  width: 100%;
  padding: 0.45rem 0 0.45rem 0.7rem;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
}

.course-nav-link:hover,
.course-nav-link.active {
  color: var(--ink);
  border-left-color: var(--ink);
  font-weight: 700;
}

.course-content {
  min-width: 0;
}

.course-panel {
  scroll-margin-top: 96px;
}

.course-panel + .course-panel {
  margin-top: 2.5rem;
}

.course-panel h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.course-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.course-item {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.project-detail-page {
  width: min(calc(100% - var(--page-x) * 2), var(--max));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 5.6rem) 0 0;
}

.project-detail-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.2rem;
  color: var(--faint);
  font-size: 0.9rem;
  font-weight: 500;
}

.back-link:hover,
.detail-jump:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-page-tag,
.detail-eyebrow,
.detail-label,
.pipeline-index,
.prediction-kicker,
.prediction-badge,
.side-meta span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 2rem;
}

.project-detail-main {
  min-width: 0;
}

.detail-header h1 {
  max-width: 720px;
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.detail-lede {
  max-width: 640px;
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.75;
}

.detail-visual,
.prediction-showcase {
  margin-top: 2.2rem;
}

.detail-visual {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #6f8daa;
}

.detail-visual-card {
  width: min(78%, 360px);
  background: rgba(255, 255, 255, 0.9);
  padding: 1.3rem;
  box-shadow: var(--shadow);
}

.detail-visual-card p,
.detail-visual-card span {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.detail-visual-card strong {
  display: block;
  margin: 0.35rem 0;
  color: var(--ink);
}

.sorter-visual-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.sorter-visual-frame {
  background: #121212;
}

.sorter-visual-frame iframe {
  display: block;
  width: 100%;
  border: 0;
}

.sorter-visual-frame iframe {
  height: clamp(650px, 72vw, 780px);
}

.detail-copy {
  display: grid;
  gap: 2rem;
  margin-top: 2.3rem;
}

.detail-block p {
  margin: 0.7rem 0 0;
}

.detail-specs {
  border-top: 1px solid var(--line);
}

.spec-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.spec-row span {
  color: var(--faint);
  font-size: 0.9rem;
  font-weight: 500;
}

.spec-row strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.55;
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.pipeline-step,
.metric-card,
.project-side-panel,
.prediction-showcase {
  padding: 1rem;
  border-radius: 6px;
}

.pipeline-step p {
  margin: 0.55rem 0 0;
}

.prediction-header,
.prediction-score,
.prediction-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.prediction-badge {
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.prediction-score {
  margin-top: 1.5rem;
}

.player-label {
  display: block;
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 500;
}

.player-side strong {
  display: block;
}

.player-side--right {
  text-align: right;
}

.probability-pill {
  display: grid;
  place-items: center;
  min-width: 86px;
  height: 48px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.confidence-bar {
  height: 8px;
  overflow: hidden;
  margin: 1.2rem 0;
  border-radius: 999px;
  background: var(--soft);
}

.confidence-bar-fill {
  display: block;
  width: 63.4%;
  height: 100%;
  background: #6f8daa;
}

.prediction-metrics {
  align-items: stretch;
}

.metric-card {
  flex: 1;
}

.metric-card span {
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 500;
}

.metric-card strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.88rem;
}

.prediction-note {
  margin: 1rem 0 0;
}

.project-side-panel {
  position: sticky;
  top: 5.5rem;
}

.project-side-panel h3 {
  margin-top: 0.7rem;
}

.side-copy {
  margin: 0.7rem 0 1rem;
}

.side-meta {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.side-meta strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9rem;
}

.detail-jump {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.article-page {
  width: min(calc(100% - var(--page-x) * 2), 920px);
  margin-inline: auto;
  padding: clamp(4rem, 8vw, 5.8rem) 0 0;
}

.research-article {
  max-width: 70ch;
  margin-inline: auto;
}

.article-back-link {
  display: inline-flex;
  margin-bottom: 2rem;
  color: var(--faint);
  font-size: 0.92rem;
  font-weight: 600;
}

.article-back-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-header {
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
}

.article-kicker {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-header h1 {
  margin: 0.75rem 0 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.article-subtitle {
  max-width: 58ch;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.7;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.15rem;
  color: var(--faint);
  font-size: 0.94rem;
  font-weight: 600;
}

.article-meta span::after {
  content: "·";
  margin-left: 0.45rem;
}

.article-abstract {
  margin-top: 2rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.article-abstract h2,
.article-section h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-abstract p,
.article-section p,
.article-references li {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.78;
}

.article-abstract p {
  margin: 0.7rem 0 0;
}

.article-index-terms {
  color: var(--muted);
}

.project-fact-list {
  display: grid;
  gap: 0;
  margin: 1.35rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.project-fact-list div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.project-fact-list dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-fact-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.55;
}

.project-fact-list a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-article {
  --project-accent: #d28f73;
}

.project-light-visual {
  margin-top: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
  overflow: hidden;
}

.project-light-visual iframe {
  display: block;
  width: 100%;
  height: clamp(460px, 62vw, 640px);
  border: 0;
  background: #fafafa;
}

.project-analytics-visual {
  margin-top: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
  overflow: hidden;
}

.project-analytics-visual iframe {
  display: block;
  width: 100%;
  height: clamp(680px, 84vw, 820px);
  border: 0;
  background: #fafafa;
}

.visual-fullwidth {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

.visual-fullwidth iframe {
  width: 100%;
  height: 700px;
  border: none;
  display: block;
}

.moe-results-dashboard {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.moe-result-group {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.moe-result-group h3,
.moe-plot-card h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.moe-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.moe-metric-card {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}

.moe-metric-card span,
.moe-metric-card strong {
  display: block;
}

.moe-metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.moe-metric-card strong {
  margin-top: 0.35rem;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
}

.moe-metric-card--accent strong {
  color: #16a34a;
}

.moe-results-note {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: center;
}

.moe-plot-gallery {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.moe-plot-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.moe-plot-card h3 {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.moe-plot-card img {
  width: 100%;
  background: #fff;
  filter: invert(1) hue-rotate(180deg) brightness(1.05) contrast(0.95);
}

.project-canvas-placeholder {
  display: grid;
  min-height: 260px;
  align-content: center;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
}

.project-canvas-placeholder span {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-canvas-placeholder p {
  max-width: 48ch;
  margin: 0 auto;
}

.project-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.project-stat-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.project-stat-card strong,
.project-stat-card span,
.project-stat-card small {
  display: block;
}

.project-stat-card strong {
  color: var(--project-accent);
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
}

.project-stat-card span {
  margin-top: 0.45rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.project-stat-card small {
  margin-top: 0.25rem;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
}

.project-results-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.project-results-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.project-results-table th,
.project-results-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.project-results-table thead th {
  background: var(--soft);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-results-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.project-results-table tbody th {
  color: var(--ink);
  font-weight: 700;
}

.project-results-table tbody tr:last-child th,
.project-results-table tbody tr:last-child td {
  border-bottom: 0;
}

.article-section {
  padding-top: 2.25rem;
}

.article-section h3 {
  margin: 1.3rem 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.article-section p {
  margin: 0.85rem 0 0;
}

.article-list {
  margin: 0.85rem 0 0;
  padding-left: 1.35rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.78;
}

.article-list li + li {
  margin-top: 0.45rem;
}

.math-display {
  max-width: 100%;
  margin: 1.05rem 0;
  overflow-x: auto;
  color: var(--ink);
  text-align: center;
}

.article-visual-frame {
  width: min(calc(100vw - var(--page-x) * 2), 1080px);
  margin: 1.25rem 50% 0;
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.article-visual-frame iframe {
  display: block;
  width: 100%;
  height: clamp(880px, 92vw, 980px);
  border: 0;
  background: #ffffff;
}

.article-references {
  margin: 1rem 0 0;
  padding-left: 1.4rem;
}

.article-references li {
  padding-left: 0.25rem;
  margin-top: 0.55rem;
}

.project-presentation-body {
  background: #121212;
}

.project-presentation-body .site-header {
  width: 100%;
  padding-inline: var(--page-x);
  background: rgba(255, 255, 255, 0.92);
}

.project-presentation-body .nav-primary {
  width: min(100%, 1360px);
  margin-inline: auto;
}

.project-presentation-page {
  width: 100%;
  background: #121212;
  color: #e8e1db;
}

.project-presentation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(2rem, 4vw, 3.75rem);
  width: min(calc(100% - var(--page-x) * 2), 1360px);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 5.2rem) 0 0;
}

.project-presentation-main {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.4rem);
  min-width: 0;
}

.project-presentation-topbar {
  margin-bottom: 0;
  color: #9c948d;
}

.project-presentation-topbar .back-link:hover,
.project-presentation-topbar .detail-jump:hover {
  color: #f1ece7;
}

.presentation-slide {
  padding: clamp(1.35rem, 3vw, 2.25rem);
  border: 1px solid #303030;
  border-radius: 8px;
  background: #1a1a1a;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.presentation-visual-slide {
  padding: clamp(1rem, 1.4vw, 1.25rem);
}

.presentation-hero {
  min-height: 420px;
  display: grid;
  align-content: center;
}

.presentation-hero h1 {
  max-width: 960px;
  margin: 0.65rem 0 0;
  color: #f4eee8;
  font-family: var(--mono);
  font-size: clamp(2.65rem, 6vw, 5.7rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.presentation-hero p:not(.detail-eyebrow) {
  max-width: 860px;
  margin: 1.4rem 0 0;
  color: #c7beb6;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 500;
  line-height: 1.7;
}

.presentation-hero-tags,
.next-step-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.presentation-hero-tags span,
.next-step-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.42rem 0.7rem;
  border: 1px solid #3c3733;
  border-radius: 999px;
  color: #e5d4c4;
  background: #211d1a;
  font-size: 0.86rem;
  font-weight: 700;
}

.presentation-section-head {
  max-width: 850px;
  margin-bottom: 1.1rem;
}

.presentation-section-head h2 {
  margin: 0.45rem 0 0;
  color: #f4eee8;
  font-family: var(--mono);
  font-size: clamp(1.75rem, 3.4vw, 3.15rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.presentation-section-head p:not(.detail-label),
.presentation-two-column > p,
.presentation-note,
.dark-info-card strong,
.objective-grid p,
.ml-pipeline p {
  color: #c7beb6;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.68;
}

.presentation-section-head p:not(.detail-label),
.presentation-note {
  margin: 0.8rem 0 0;
}

.sorter-visual-frame {
  border-color: #303030;
  background: #121212;
}

.project-presentation-body .sorter-visual-frame iframe {
  height: clamp(600px, 58vw, 760px);
}

.presentation-two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.presentation-card-grid,
.objective-grid,
.dark-metrics-grid {
  display: grid;
  gap: 0.85rem;
}

.presentation-card-grid {
  grid-template-columns: 1fr;
}

.dark-info-card,
.objective-grid article,
.ml-pipeline article,
.dark-metrics-grid article {
  border: 1px solid #34312e;
  border-radius: 8px;
  background: #211d1a;
}

.dark-info-card {
  padding: 1rem;
}

.dark-info-card span,
.objective-grid span,
.ml-pipeline span,
.dark-metrics-grid span {
  color: #b89476;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dark-info-card strong {
  display: block;
  margin-top: 0.35rem;
  color: #f4eee8;
}

.objective-grid,
.dark-metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.objective-grid article,
.ml-pipeline article,
.dark-metrics-grid article {
  padding: 1rem;
}

.objective-grid p,
.ml-pipeline p,
.dark-metrics-grid p {
  margin: 0.45rem 0 0;
}

.system-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.system-flow div {
  position: relative;
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 0.8rem;
  border: 1px solid #3b3632;
  border-radius: 8px;
  background: #211d1a;
  color: #f4eee8;
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

.system-flow div:not(:last-child)::after {
  content: "->";
  position: absolute;
  right: -0.55rem;
  z-index: 2;
  color: #b89476;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.ml-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.ml-pipeline h3 {
  margin: 0.45rem 0 0;
  color: #f4eee8;
  font-size: 1rem;
  line-height: 1.25;
}

.dark-metrics-grid article {
  min-height: 150px;
}

.dark-metrics-grid strong {
  display: block;
  margin-top: 0.55rem;
  color: #f4eee8;
  font-family: var(--mono);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.dark-metrics-grid p {
  color: #c7beb6;
  font-size: 0.92rem;
  font-weight: 600;
}

.results-table {
  width: 100%;
  margin-top: 1.1rem;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid #34312e;
  border-radius: 8px;
}

.results-table th,
.results-table td {
  padding: 0.85rem;
  border-bottom: 1px solid #34312e;
  color: #c7beb6;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  vertical-align: top;
}

.results-table th {
  color: #f4eee8;
  background: #211d1a;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.results-table tr:last-child td {
  border-bottom: 0;
}

.project-presentation-side {
  align-self: start;
}

.project-side-panel--dark {
  position: sticky;
  top: 90px;
  border-color: #34312e;
  background: #1a1a1a;
  color: #f4eee8;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.project-side-panel--dark h3,
.project-side-panel--dark .side-meta strong,
.project-side-panel--dark a {
  color: #f4eee8;
}

.project-side-panel--dark .side-copy,
.project-side-panel--dark .detail-jump {
  color: #c7beb6;
}

.project-side-panel--dark .side-meta {
  border-color: #34312e;
}

.project-presentation-footer {
  width: min(calc(100% - var(--page-x) * 2), 1360px);
  color: #9c948d;
}

.project-presentation-footer a {
  color: #c7beb6;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  :root {
    --page-x: 22px;
  }

  .hero,
  .project-detail {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 2.2rem;
    padding-top: 3.2rem;
  }

  .hero-portrait {
    order: -1;
    justify-content: flex-start;
  }

  .portrait-frame {
    width: 150px;
    height: 150px;
  }

  .portfolio-grid,
  .archive-grid,
  .pipeline-grid {
    grid-template-columns: 1fr;
  }

  .writing-item {
    grid-template-columns: 1fr;
  }

  .writing-row {
    display: grid;
    gap: 0.3rem;
  }

  .writing-item time,
  .experience-meta {
    text-align: left;
  }

  .writing-item p {
    margin-top: -0.9rem;
  }

  .writing-tags {
    margin-top: -0.6rem;
  }

  .project-side-panel {
    position: static;
  }

  .sorter-visual-frame iframe {
    height: 620px;
  }

  .article-visual-frame iframe {
    height: 1260px;
  }

  .project-presentation-layout {
    grid-template-columns: 1fr;
  }

  .project-presentation-side {
    order: -1;
  }

  .project-side-panel--dark {
    position: static;
  }

  .presentation-two-column,
  .objective-grid,
  .ml-pipeline,
  .dark-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .system-flow div:nth-child(3)::after {
    content: none;
  }

  .project-presentation-body .sorter-visual-frame iframe {
    height: 600px;
  }

  .project-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0.9rem 0;
  }

  .nav-primary {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-cluster {
    width: 100%;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .section-head,
  .site-footer,
  .project-detail-topbar,
  .prediction-header,
  .prediction-score,
  .prediction-metrics {
    align-items: flex-start;
    flex-direction: column;
  }

  .sorter-visual-frame iframe {
    height: 560px;
  }

  .project-presentation-layout {
    width: min(calc(100% - var(--page-x) * 2), 1360px);
    padding-top: 2.2rem;
  }

  .course-layout {
    grid-template-columns: 1fr;
  }

  .course-nav {
    display: flex;
    gap: 0.5rem;
    position: static;
    padding-right: 0;
    padding-left: 0;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--line);
  }

  .course-nav-link {
    width: auto;
    padding: 0.35rem 0;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .course-nav-link:hover,
  .course-nav-link.active {
    border-bottom-color: var(--ink);
  }

  .presentation-slide {
    padding: 1rem;
  }

  .presentation-hero {
    min-height: 360px;
  }

  .presentation-two-column,
  .objective-grid,
  .ml-pipeline,
  .dark-metrics-grid,
  .system-flow {
    grid-template-columns: 1fr;
  }

  .system-flow div:not(:last-child)::after {
    content: none;
  }

  .project-presentation-body .sorter-visual-frame iframe {
    height: 520px;
  }

  .project-light-visual iframe {
    height: 520px;
  }

  .article-visual-frame iframe {
    height: 1440px;
  }

  .project-analytics-visual iframe {
    height: 760px;
  }

  .moe-metric-grid {
    grid-template-columns: 1fr;
  }

  .project-stat-grid {
    grid-template-columns: 1fr;
  }

  .results-table {
    display: block;
    overflow-x: auto;
  }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .player-side--right {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .portfolio-card,
  .archive-card,
  .section-link {
    transition: none !important;
    transform: none !important;
  }

  .reveal {
    opacity: 1 !important;
  }
}
