@font-face{font-family:"Geist";src:url("/fonts/Geist-Variable.woff2") format("woff2");font-style:normal;font-weight:100 900;font-display:swap;}
:root {
  color-scheme: dark;
  --bg: #141414;
  --surface: #1b1b1a;
  --surface-hover: #222220;
  --text: #ecece7;
  --body: #c4c4be;
  --muted: #a2a29c;
  --quiet: #8e8e87;
  --line: #30302d;
  --accent: #eca36f;
  --font: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* Centralized Typographic Scale */
  --text-2xs: 12px;
  --text-xs: 12.5px;
  --text-sm: 14px;
  --text-base: 15.5px;
  --text-md: 17.5px;
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; scroll-padding-top: 30px; }
body { min-height: 100vh; display: flex; flex-direction: column; margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--text-base); font-weight: 400; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.dialog-open { overflow: hidden; }
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); color: #fff; }

/* Subtle dark scrollbars */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444440; }

a { color: inherit; text-decoration: none; text-underline-offset: 4px; }
button { color: inherit; font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
h1, h2, h3, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
svg { flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 8px 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line); transform: translateY(-150%); font-size: var(--text-sm); }
.skip-link:focus { transform: translateY(0); }
.page { width: min(620px, calc(100% - 48px)); margin: auto; padding: 32px 0; }
.page:focus { outline: none; }

.eyebrow, .section-heading h2 { font-family: var(--mono); font-size: var(--text-xs); font-weight: 500; line-height: 1.5; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.location { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; font-size: var(--text-xs); letter-spacing: .08em; }
.location-icon { color: var(--accent); flex-shrink: 0; }

h1 { font-size: var(--text-4xl); font-weight: 450; line-height: 1.12; letter-spacing: -.045em; }
.home-header h1 { margin-left: -2px; }
.mission { margin-top: 8px; font-size: var(--text-md); line-height: 1.45; letter-spacing: -.02em; color: #deded9; }
.mobile-break { display: none; }
.specialties { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 9px; color: var(--muted); font-size: var(--text-sm); margin-top: 5px; letter-spacing: -.01em; }
.specialties span { color: #787873; font-size: 11px; }
.intro { color: var(--body); margin-top: 20px; margin-bottom: 20px; font-size: var(--text-base); line-height: 1.65; letter-spacing: -.01em; }
.intro p + p { margin-top: 10px; }
.intro a { color: var(--text); text-decoration: underline; text-decoration-color: #585853; text-decoration-thickness: 1px; transition: text-decoration-color .15s; }
.intro a:hover { text-decoration-color: var(--text); }

.index-section + .index-section { margin-top: 18px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.section-index { color: var(--quiet); font-family: var(--mono); font-size: var(--text-2xs); }
.section-footer { margin-top: 2px; display: flex; justify-content: flex-end; }
.section-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1.4; color: var(--muted); padding: 2px 0; transition: color .15s ease; }
.section-link:hover { color: var(--text); }
.section-link:hover .link-arrow, .section-link:focus-visible .link-arrow { transform: translateX(3px); color: var(--accent); }
.link-arrow { display: inline-block; transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), color .18s ease; }

.index-row { display: flex; align-items: flex-start; column-gap: 12px; position: relative; padding: 7px 0; }
.index-row .row-main { flex: 0 1 auto; min-width: 0; }
.row-title { display: block; font-size: var(--text-base); font-weight: 450; color: var(--text); line-height: 1.45; letter-spacing: -.015em; overflow-wrap: anywhere; min-width: 0; }
.row-role, .row-description { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; line-height: 1.45; transition: color .15s ease; }
a.index-row:hover .row-role, a.index-row:hover .row-description { color: #bfbfb8; }
.row-leader { min-width: 12px; flex: 1 1 24px; height: 1px; background: var(--line); margin-top: 10px; opacity: .6; }
.row-year { flex-shrink: 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.6; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.arrow { color: var(--muted); }
.index-row > .arrow { margin-top: 4px; width: 11px; height: 11px; }
a.index-row::before { content: ""; position: absolute; inset: 1px -10px; background: var(--surface); border-radius: 4px; z-index: -1; opacity: 0; transition: opacity .15s; }
a.index-row { isolation: isolate; }
a.index-row:hover::before { opacity: 1; }
a.index-row:hover .row-title { color: #fff; }
a.index-row .arrow { transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), color .18s ease; }
a.index-row:hover .arrow, a.index-row:focus-visible .arrow { transform: translate(1.5px, -1.5px); color: var(--accent); }
.yc-badge { margin-left: 8px; color: var(--accent); font-family: var(--mono); font-size: var(--text-2xs); font-weight: 500; letter-spacing: -.01em; white-space: nowrap; vertical-align: 1px; }
.work-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: flex-start; column-gap: 12px; }
.work-row .row-title { grid-column: 1; grid-row: 1; }
.work-row .row-leader { grid-column: 2; grid-row: 1; }
.work-row .row-year { grid-column: 3; grid-row: 1; }
.work-row > .arrow { grid-column: 4; grid-row: 1; }
.work-row .row-role { grid-column: 1 / -1; grid-row: 2; }
.research-row { padding: 5px 0; }
.research-row .row-title { color: var(--body); font-size: 15px; font-weight: 400; }
.research-row .row-leader { margin-top: 10px; }

.site-footer { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 24px; row-gap: 0; }
.site-footer nav a { display: inline-flex; align-items: center; justify-content: flex-start; min-height: 32px; font-size: var(--text-sm); color: var(--muted); transition: color .15s ease; }
.site-footer nav a:hover { color: var(--text); }

/* Secondary pages */
.page-header { margin-bottom: 22px; }
.page-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 20px; }
.back-link { display: inline-flex; align-items: center; min-height: 32px; gap: 7px; font-size: var(--text-sm); color: var(--muted); transition: color .15s ease; }
.back-link svg { transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), color .18s ease; }
.back-link:hover { color: var(--text); }
.back-link:hover svg { transform: translateX(-2.5px); color: var(--accent); }
.page-nav { display: flex; gap: 20px; font-size: var(--text-sm); }
.page-nav a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); transition: color .15s ease; }
.page-nav a:hover { color: var(--text); }
.page-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
.page-header h1 { font-size: var(--text-3xl); font-weight: 450; line-height: 1.15; }
.page-description { color: var(--body); font-size: var(--text-base); line-height: 1.6; margin-top: 8px; letter-spacing: -.01em; }

/* Projects Page */
.project-detail { padding: 20px 0 22px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.project-detail:first-child { border-top: 1px solid var(--accent); }
.project-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.project-number { color: var(--accent); margin-right: 10px; font-weight: 500; }
.project-detail h2 { font-size: var(--text-xl); font-weight: 450; letter-spacing: -.03em; line-height: 1.25; }
.project-overview { margin-top: 10px; font-size: var(--text-base); line-height: 1.7; color: var(--body); }
.contribution { margin-top: 14px; }
.contribution h3 { color: var(--text); font-weight: 500; font-size: var(--text-sm); margin-bottom: 5px; }
.contribution p { color: var(--muted); font-size: 14.5px; line-height: 1.75; }
.technologies { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.technologies li { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: rgba(255, 255, 255, 0.035); border: 1px solid #2e2e2b; border-radius: 4px; padding: 2.5px 8px; letter-spacing: -.01em; line-height: 1.4; transition: border-color .18s ease, color .18s ease, background-color .18s ease; }
.technologies li:hover { border-color: var(--accent); color: #fff; background: rgba(236, 163, 111, 0.08); }
.other-projects, .earlier-work { margin-top: 32px; }
.other-projects .section-heading, .earlier-work .section-heading { margin-bottom: 0; padding-bottom: 8px; }
.other-projects-stack, .earlier-stack { display: flex; flex-direction: column; }
.other-project, .earlier-project { padding: 20px 0 22px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.other-project:first-child, .earlier-project:first-child { border-top: none; }
.other-project-meta, .earlier-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.other-project h3, .earlier-project h3 { font-size: var(--text-lg); font-weight: 450; letter-spacing: -.025em; line-height: 1.3; color: var(--text); transition: color .15s ease; }
.other-project:hover h3, .earlier-project:hover h3 { color: #fff; }
.other-project .project-overview, .earlier-project .project-overview { margin-top: 8px; font-size: 14.5px; line-height: 1.68; color: var(--body); }
.other-project .contribution, .earlier-project .contribution { margin-top: 12px; }
.other-project .contribution h3, .earlier-project .contribution h3 { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-family: var(--mono); margin-bottom: 5px; font-weight: 500; }
.other-project .contribution p, .earlier-project .contribution p { font-size: 13.5px; line-height: 1.68; color: #a4a49e; }
.other-project .technologies, .earlier-project .technologies { margin-top: 12px; }
.page-endnote { margin-top: 16px; font-size: var(--text-sm); color: var(--muted); line-height: 1.6; }
.page-endnote .text-action { min-height: unset; display: inline-flex; align-items: center; gap: 4px; color: var(--text); text-decoration: underline; text-decoration-color: #484844; text-underline-offset: 4px; vertical-align: baseline; }
.page-endnote .text-action:hover { color: var(--accent); text-decoration-color: var(--accent); }
.text-action { display: inline-flex; align-items: center; justify-content: flex-start; gap: 6px; padding: 0; min-height: 32px; border: 0; background: none; color: var(--text); font-size: var(--text-sm); transition: color .15s ease; }
.text-action .arrow { transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), color .18s ease; }
.text-action:hover { text-decoration: underline; }
.text-action:hover .arrow { transform: translate(1.5px, -1.5px); color: var(--accent); }
.text-action:hover [aria-hidden] { color: var(--accent); }
.page-projects .site-footer { margin-top: 28px; }

/* Coursework page */
.page-courses { width: min(1040px, calc(100% - 56px)); }
.page-courses .page-header { margin-bottom: 22px; }
.education-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.university { scroll-margin-top: 24px; }
.university-header { padding-bottom: 12px; border-bottom: 1px solid var(--accent); margin-bottom: 16px; }
.university-header h2 { font-size: 24px; font-weight: 450; letter-spacing: -.03em; line-height: 1.25; margin-top: 0; }
.university-header > p:last-child { font-size: var(--text-sm); color: var(--muted); margin-top: 4px; }
.degree-dot { display: inline-block; width: 4.5px; height: 4.5px; border-radius: 50%; background: #70706a; margin: 0 8px; vertical-align: 1.5px; }
.course-section + .course-section { margin-top: 20px; }
.course-section h3 { margin-bottom: 8px; }
.course-row { display: flex; align-items: baseline; column-gap: 12px; padding: 5px 0; }
.course-name { font-size: var(--text-base); color: var(--text); line-height: 1.5; flex: 0 1 auto; min-width: 0; }
.course-leader { min-width: 12px; flex: 1 1 20px; height: 1px; background: var(--line); opacity: .45; margin-bottom: 4px; }
.course-code { font-family: var(--mono); font-size: var(--text-sm); color: var(--muted); font-weight: 450; letter-spacing: -.01em; white-space: nowrap; flex-shrink: 0; transition: color .15s ease; }
.course-note { font-size: var(--text-sm); color: var(--muted); line-height: 1.6; margin-top: 16px; max-width: 440px; }
.course-asterisk { color: var(--accent); margin-left: 2px; font-size: 13px; vertical-align: baseline; flex-shrink: 0; }
.page-courses .site-footer { margin-top: 24px; padding-top: 12px; }
.page-not-found .eyebrow { color: var(--accent); }
.page-not-found h1 { margin-top: 16px; }
.page-not-found > .back-link { margin-top: 20px; }

/* Native dialog supplies focus containment and Escape support. */
dialog { width: min(440px, calc(100% - 32px)); padding: 0; background: #1b1b1a; color: var(--text); border: 1px solid #41413b; border-radius: 10px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6); }
dialog[open] { animation: dialog-fade-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes dialog-fade-in {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
dialog::backdrop { background: rgba(8, 8, 8, 0.78); backdrop-filter: blur(8px); }
.dialog-content { position: relative; padding: 28px 28px 20px; }
.dialog-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; display: grid; place-items: center; border: none; background: transparent; color: var(--muted); border-radius: 5px; transition: background .15s, color .15s; }
.dialog-close:hover { background: #272725; color: var(--accent); }
.dialog-content h2 { font-size: var(--text-2xl); font-weight: 450; letter-spacing: -.035em; line-height: 1.25; margin-top: 14px; }
.dialog-intro { font-size: var(--text-sm); line-height: 1.6; color: var(--muted); margin-top: 8px; }
.email-link { display: block; overflow-wrap: anywhere; font-size: var(--text-md); line-height: 1.5; letter-spacing: -.02em; margin-top: 22px; transition: color .15s ease; }
.email-link:hover { color: var(--accent); text-decoration: underline; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.copy-status { min-height: 18px; margin-top: 8px; font-size: var(--text-xs); line-height: 1.6; color: var(--accent); }

@media (max-width: 740px) {
  .education-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .page-courses { width: min(620px, calc(100% - 48px)); }
  .course-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
@media (max-width: 480px) {
  .page, .page-courses { width: calc(100% - 36px); padding-top: 28px; padding-bottom: 24px; }
  .location { margin-bottom: 14px; font-size: 11.5px; }
  h1 { font-size: 34px; }
  .mission { font-size: 16px; line-height: 1.45; margin-top: 8px; }
  .mobile-break { display: block; }
  .specialties { margin-top: 8px; font-size: 13px; gap: 0 7px; }
  .specialties span { font-size: 10px; }
  .intro { margin-top: 18px; margin-bottom: 18px; font-size: 15px; line-height: 1.65; }
  .intro p + p { margin-top: 10px; }
  .section-heading { margin-bottom: 4px; }
  .section-heading h2 { font-size: 11.5px; }
  .section-link { font-size: 11.5px; }
  .index-section + .index-section { margin-top: 18px; }
  .index-row { display: flex; align-items: flex-start; column-gap: 8px; padding: 8px 0; }
  .index-row .row-main { flex: 0 1 auto; min-width: 0; }
  .row-title { font-size: 15px; line-height: 1.5; min-width: 0; }
  .row-description { font-size: 13px; line-height: 1.5; margin-top: 2px; }
  .row-leader { min-width: 8px; flex: 1 1 12px; height: 1px; background: var(--line); margin-top: 11px; opacity: .6; }
  .row-year { font-size: 12px; line-height: 1.8; flex-shrink: 0; }
  .index-row > .arrow { margin-top: 5px; width: 10px; height: 10px; flex-shrink: 0; }
  .yc-badge { margin-left: 6px; font-size: 11px; }
  .research-row { padding: 6px 0; column-gap: 8px; }
  .research-row .row-title { font-size: 14px; line-height: 1.5; min-width: 0; flex: 0 1 auto; }
  .research-row .row-leader { margin-top: 10px; }
  .work-row { display: grid; grid-template-columns: minmax(0, auto) 1fr auto 10px; column-gap: 8px; padding: 8px 0; }
  .work-row .row-title { grid-column: 1; grid-row: 1; min-width: 0; }
  .work-row .row-leader { grid-column: 2; grid-row: 1; min-width: 8px; margin-top: 11px; }
  .work-row .row-year { grid-column: 3; grid-row: 1; }
  .work-row > .arrow { grid-column: 4; grid-row: 1; margin-top: 5px; }
  .work-row .row-role { grid-column: 1 / -1; grid-row: 2; font-size: 11px; line-height: 1.45; margin-top: 2px; }
  a.index-row::before { inset-inline: -6px; }
  .site-footer { margin-top: 20px; padding-top: 10px; }
  .site-footer nav { column-gap: 18px; }
  .site-footer nav a { font-size: 13px; min-height: 38px; }
  .page-topline { margin-bottom: 22px; gap: 8px; }
  .back-link { font-size: 13px; }
  .page-nav { gap: 16px; font-size: 13px; }
  .page-header { margin-bottom: 22px; }
  .page-header h1 { font-size: 30px; }
  .page-description { font-size: 14px; margin-top: 8px; }
  .project-detail { padding-top: 16px; padding-bottom: 20px; }
  .project-detail h2 { font-size: 21px; }
  .project-meta { margin-bottom: 10px; gap: 8px; }
  .project-meta .eyebrow { font-size: 11px; }
  .project-number { margin-right: 6px; }
  .project-overview { font-size: 14.5px; }
  .contribution { margin-top: 14px; }
  .contribution p { font-size: 13.5px; line-height: 1.7; }
  .page-courses .page-header { margin-bottom: 22px; }
  .course-row { column-gap: 8px; padding: 4px 0; margin: 0; }
  .course-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .course-code { font-size: 12px; }
  .course-section h3 { font-size: 11px; }
  .university-header h2 { font-size: 22px; }
  .dialog-content { padding: 24px 20px 18px; }
  .email-link { font-size: 16px; }
  .dialog-actions { column-gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .row-leader, .course-leader, .section-heading, .site-footer, .project-detail, .university-header { border-color: CanvasText; }
  a { text-decoration: underline; }
  .location-icon { color: CanvasText; }
}
@media print {
  :root { color-scheme: light; --bg: #fff; --text: #111; --body: #333; --muted: #555; --line: #ddd; --accent: #555; }
  body { background: white; color: #111; font-size: 11pt; }
  .page, .page-courses { width: 100%; max-width: none; padding: 0; }
  .skip-link, .site-footer, .page-topline, .section-link, dialog { display: none; }
  .mission, .specialties { color: #333; }
  .project-detail, .course-section { break-inside: avoid; }
  .education-grid { gap: 24px; }
  h1 { font-size: 26pt; }
}
