@font-face {
  font-family: "Portfolio Song";
  src: url("./song-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Portfolio Song";
  src: url("./song-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #090c12;
  --surface: #10151e;
  --surface-hover: #151d29;
  --foreground: #f1f3f4;
  --muted: #aab4c1;
  --subtle: #8f9cac;
  --line: #293240;
  --light-line: #3a495a;
  --accent: #bce6e8;
  --accent-ink: #0e2832;
  --radius: 14px;
  --shell: 1200px;
  --gutter: clamp(20px, 5vw, 72px);
  --typeface: "Times New Roman", Times, "Liberation Serif", SimSun, "Songti SC", "Portfolio Song", "Noto Serif CJK SC", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 90px; }
body { margin: 0; background: var(--background); color: var(--foreground); font: 400 16px/1.65 var(--typeface); }
body, button, input, textarea { -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
main:focus { outline: none; }

.shell { width: min(var(--shell), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 9; inset: 10px auto auto 12px; padding: 9px 16px; transform: translateY(-160%); border-radius: 7px; background: var(--accent); color: var(--accent-ink); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 5; top: 0; background: #090c12ed; border-bottom: 1px solid #ffffff14; backdrop-filter: blur(14px); }
.header-line { min-height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-weight: 680; letter-spacing: .04em; white-space: nowrap; }
.brand-mark { position: relative; display: grid; place-items: center; width: 29px; height: 29px; flex: none; border: 1px solid #bce6e876; border-radius: 50%; color: var(--accent); }
.brand-mark::before { position: absolute; width: 32px; height: 11px; border: 1px solid currentColor; border-radius: 50%; transform: rotate(-36deg); content: ""; }
.brand-mark i { display: block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.nav-links, .header-actions { display: flex; align-items: center; }
.nav-links { height: 100%; gap: clamp(13px, 2.35vw, 33px); color: var(--muted); }
.nav-links a { position: relative; display: grid; place-items: center; min-height: 44px; height: 100%; font-size: 14px; white-space: nowrap; }
.nav-links a[aria-current] { color: var(--foreground); }
.nav-links a[aria-current]::after { position: absolute; inset: auto 16% -1px; height: 2px; border-radius: 999px; background: var(--accent); content: ""; }
.header-actions { justify-content: end; gap: 15px; }
.language, .plain { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; color: var(--muted); white-space: nowrap; font-size: 13px; }
.language .arrow { color: var(--accent); }
.plain { padding: 0; background: transparent; border: 0; }
.plain:hover, .plain[aria-pressed="true"] { color: var(--accent); }
.audio-icon { display: inline-flex; align-items: center; gap: 2px; width: 14px; }
.audio-icon i { width: 2px; border-radius: 1px; height: 6px; background: currentColor; }
.audio-icon i:nth-child(2), .audio-icon i:nth-child(4) { height: 10px; }
.audio-icon i:nth-child(3) { height: 14px; }
.audio-control[aria-pressed="true"] .audio-icon i { animation: audio-level .9s infinite alternate; }
.audio-control[aria-pressed="true"] .audio-icon i:nth-child(even) { animation-delay: -.6s; }
@keyframes audio-level { 55% { transform: scaleY(.4); } }
.menu-control { display: none; }

.hero { position: relative; isolation: isolate; overflow: clip; border-bottom: 1px solid #bce6e821; background: #0b111a; }
.hero::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #0b111a 6%, #0b111afa 20%, #0b111ae7 30%, #0b111a9c 47%, #0b111a16 72%), linear-gradient(0deg, #0b111ac9 0%, transparent 28%, transparent 85%, #0b111a39 100%); content: ""; }
.orbital-view { position: absolute; z-index: -2; inset: 0 0 0 28%; overflow: hidden; background-color: #273e50; mask-image: linear-gradient(90deg, transparent, #000 24%); }
.orbital-view picture { position: absolute; inset: -6%; display: block; animation: orbital-drift 36s ease-in-out infinite alternate both; }
.orbital-view img { width: 100%; height: 100%; object-fit: cover; object-position: 56% 42%; filter: saturate(.75) brightness(.82); }
.orbital-view[data-paused="true"] picture { animation-play-state: paused; }
@keyframes orbital-drift {
  from { transform: translate3d(1%, -1.5%, 0) scale(1.015); }
  to { transform: translate3d(-1.5%, 2%, 0) scale(1.10); }
}
.hero-inner { position: relative; display: flex; align-items: center; min-height: clamp(525px, 43vw, 632px); padding-block: 68px 90px; }
.hero-copy { max-width: 540px; }
.eyebrow { display: flex; align-items: center; gap: 11px; color: var(--accent); font-size: 14px; letter-spacing: .16em; font-weight: 550; }
.eyebrow span { display: block; width: 22px; height: 1px; background: currentColor; }
.hero h1 { margin-top: 14px; font-size: clamp(54px, 5.8vw, 84px); line-height: 1.23; font-weight: 400; letter-spacing: .055em; }
.roman-name { margin-top: 4px; font-size: clamp(16px, 1.7vw, 22px); line-height: 1.45; color: var(--muted); letter-spacing: .12em; }
.hero-roles { margin-top: 31px; color: var(--foreground); font-size: clamp(15px, 1.7vw, 18px); font-weight: 560; letter-spacing: .03em; }
.hero-description { max-width: 355px; margin-top: 10px; color: #bac5d1; line-height: 1.85; text-wrap: pretty; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero .button-row { margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 46px; padding: 8px 17px; border: 1px solid var(--light-line); border-radius: 8px; background: #101924b3; color: var(--foreground); font-size: 14px; font-weight: 630; transition: background-color .18s, border-color .18s, color .18s; }
.button:hover { background: var(--surface-hover); border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: #dcf8f8; border-color: #dcf8f8; color: var(--accent-ink); }
.scene-controls { position: absolute; inset: auto 0 11px auto; display: flex; align-items: center; gap: 14px; }
.photo-credit { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; font-size: 12px; line-height: 1.3; color: #d4dee9; }
.motion-control { min-height: 44px; color: #d4dee9; font-size: 12px; }
.motion-control::before { display: block; width: 7px; height: 9px; border-inline: 2px solid currentColor; content: ""; }
.motion-control[aria-pressed="true"]::before { width: 0; height: 0; border: 5px solid transparent; border-left: 7px solid currentColor; border-right: 0; }

.home-section { padding-block: 52px 26px; }
.home-research { padding-bottom: 75px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; margin-bottom: 22px; }
.section-heading h2, .about-section h2 { font-size: clamp(25px, 2.8vw, 34px); font-weight: 630; line-height: 1.35; }
.text-link, .back-link { color: var(--accent); font-size: 14px; font-weight: 570; }
.text-link:hover, .back-link:hover { color: #e1fbfb; text-decoration: underline; text-underline-offset: 4px; }
.section-heading .text-link { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.project-card { display: flex; min-width: 0; }
.card-link { display: flex; flex-direction: column; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border .18s, background .18s; }
.card-link:hover { border-color: var(--light-line); background: var(--surface-hover); color: var(--foreground); }
.card-media { aspect-ratio: 1.95; overflow: hidden; background-color: #192636; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-link:hover img { transform: scale(1.035); }
.card-copy { display: flex; flex: 1; flex-direction: column; padding: 18px 18px 13px; }
.meta-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; color: var(--accent); font-size: 13px; line-height: 1.5; }
.meta-line span + span { color: var(--subtle); }
.card-copy h3 { margin-block: 8px 6px; font-size: 18px; line-height: 1.48; font-weight: 660; }
.card-copy > p { flex: 1; color: var(--muted); font-size: 14px; line-height: 1.65; }
.card-end { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 13px; }
.card-arrow { color: var(--accent); font-size: 18px; line-height: 1; }

.research-list { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.research-row + .research-row { border-top: 1px solid var(--line); }
.research-row > a { display: grid; grid-template-columns: 94px minmax(0, 1fr) auto 20px; gap: 20px; align-items: center; padding: 16px; transition: background .18s; }
.research-row > a:hover { background: var(--surface-hover); color: var(--foreground); }
.research-row > a:focus-visible { outline-offset: -3px; }
.research-thumb { overflow: hidden; aspect-ratio: 1.52; border-radius: 7px; background-color: #192636; }
.research-thumb img { width: 100%; height: 100%; object-fit: cover; }
.research-copy h3 { margin-block: 4px; font-size: 17px; font-weight: 620; line-height: 1.45; }
.research-copy > p:last-child { color: var(--muted); font-size: 13px; }
.research-state { color: var(--muted); font-size: 12px; white-space: nowrap; }

.inner-page { min-height: calc(100svh - 185px); padding-block: clamp(48px, 7vw, 91px) 76px; }
.page-heading { margin-bottom: 36px; }
.page-heading h1, .detail-heading h1 { font-size: clamp(37px, 5.1vw, 66px); font-weight: 630; line-height: 1.24; letter-spacing: -.025em; text-wrap: balance; }
.page-heading > p { margin-top: 12px; color: var(--muted); font-size: 17px; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 21px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters button { min-height: 42px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 13px; }
.filters button:hover { border-color: var(--light-line); color: var(--foreground); }
.filters button[aria-pressed="true"] { border-color: #7ca2a7; color: var(--accent); background: #203137; }
.result-count, .image-note { color: var(--subtle); font-size: 13px; }
.result-count { white-space: nowrap; }
.image-note { margin-top: 20px; }

.detail { max-width: 820px; margin-inline: auto; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; gap: 9px; }
.detail-heading { margin-block: 22px 29px; }
.detail-heading h1 { margin-top: 10px; font-size: clamp(32px, 5vw, 55px); }
.detail-heading .lead { margin-top: 12px; color: var(--muted); font-size: 17px; }
.detail-status { margin-top: 12px; color: var(--accent); font-size: 14px; }
.detail-figure { margin-block: 0 30px; }
.detail-figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); }
.detail-figure figcaption { margin-top: 7px; color: var(--subtle); font-size: 13px; }
.note-image img { max-height: 580px; width: auto; object-fit: contain; }
.prose { color: var(--muted); line-height: 1.85; overflow-wrap: anywhere; }
.prose p + p { margin-top: 12px; }
.prose h2, .prose h3 { color: var(--foreground); line-height: 1.45; }
.prose h2 { margin-bottom: 12px; font-size: 23px; font-weight: 640; }
.prose h3 { margin-bottom: 5px; font-size: 17px; font-weight: 620; }
.prose .article-section { padding-block: 22px; border-top: 1px solid var(--line); }
.prose ul { margin-block: 9px 0; padding-inline-start: 22px; }
.prose li + li { margin-top: 4px; }
.prose a:not(.button) { color: var(--accent); text-underline-offset: 4px; }
.prose a:not(.button):hover { text-decoration: underline; }
.prose .tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.prose .tags li { margin: 0; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); font-size: 13px; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 370px)); gap: 20px; }
.note-image + .prose .note-image { margin-top: 18px; }

.about-profile { display: grid; grid-template-columns: 1fr .82fr; align-items: center; gap: clamp(30px, 6vw, 85px); }
.about-portrait { width: 100%; border-radius: var(--radius); object-fit: cover; }
.about-copy h2 { font-size: 31px; }
.about-copy .button-row { margin-top: 26px; }
.about-section { margin-top: 50px; }
.capabilities, .about-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.capabilities > div, .about-stats > div { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.capabilities dt { color: var(--foreground); font-weight: 630; }
.capabilities dd, .about-stats dt { color: var(--muted); font-size: 13px; }
.about-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.about-stats > div { display: flex; flex-direction: column-reverse; }
.about-stats dd { color: var(--accent); font-size: 31px; line-height: 1.36; }
.about-statement { position: relative; display: grid; place-items: center; min-height: 240px; margin-top: 40px; isolation: isolate; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.about-statement img { position: absolute; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 65%; }
.about-statement::before { position: absolute; z-index: -1; inset: 0; background: #060b16a6; content: ""; }
.about-statement p { padding: 20px; text-align: center; font-size: clamp(23px, 4vw, 38px); font-weight: 600; }

.resume-actions { margin: -12px 0 34px; }
.resume-grid { display: grid; grid-template-columns: minmax(148px, 210px) minmax(0, 1fr); align-items: start; gap: clamp(24px, 5vw, 64px); }
.resume-nav { position: sticky; top: 91px; display: grid; gap: 1px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.resume-nav a { display: block; min-height: 40px; padding: 7px 10px; border-radius: 6px; color: var(--muted); font-size: 14px; }
.resume-nav a:hover { background: var(--surface-hover); color: var(--accent); }
.resume-intro { display: grid; grid-template-columns: 1fr 115px; gap: 24px; align-items: start; }
.resume-intro img { border-radius: 8px; border: 1px solid var(--line); }
.resume-entry + .resume-entry { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--line); }
.entry-line { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.entry-line span { font-size: 13px; color: var(--subtle); white-space: nowrap; }
.entry-subtitle { margin-bottom: 6px; color: var(--accent); font-size: 14px; }
.resume-body .resume-papers { margin-bottom: 20px; }
.resume-papers li + li { margin-top: 13px; }
.resume-papers p { font-size: 14px; }
.resume-skills dd + dt { margin-top: 13px; }
.resume-skills dt { color: var(--foreground); font-weight: 630; }

.contact-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: start; }
.panel { min-width: 0; padding: clamp(17px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel h2 { margin-bottom: 17px; font-size: 22px; font-weight: 640; }
.panel form { display: grid; gap: 15px; justify-items: start; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.panel form label { display: grid; gap: 5px; min-width: 0; width: 100%; font-size: 14px; }
.panel input, .panel textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--light-line); border-radius: 7px; background: #0a0f17; color: var(--foreground); }
.panel textarea { resize: vertical; }
.delivery-hint, .form-status { color: var(--muted); font-size: 13px; }
.form-status:empty { display: none; }
.contact-links { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.contact-links a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; }
.contact-links a:hover { border-color: var(--light-line); background: var(--surface-hover); }
.contact-links a > span:first-child { grid-column: 1; color: var(--muted); font-size: 13px; }
.contact-links strong { grid-column: 1; grid-row: 2; font-weight: 520; font-size: 14px; overflow-wrap: anywhere; }
.contact-links .arrow { grid-column: 2; grid-row: 1 / 3; color: var(--accent); }
.location { margin-top: 21px; }
.location h3 { font-size: 17px; }
.location p { margin-top: 5px; color: var(--muted); font-size: 14px; }

.site-footer { border-top: 1px solid var(--line); }
.footer-line { display: flex; justify-content: space-between; align-items: center; min-height: 82px; gap: 16px; color: var(--muted); }
.footer-line > div { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 14px; }

@media (max-width: 960px) {
  .header-line { gap: 14px; }
  .header-actions { gap: 11px; }
  .audio-label { display: none; }
  .audio-control { min-width: 34px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capabilities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .header-line { display: flex; flex-wrap: wrap; justify-content: space-between; min-height: 61px; gap: 0; }
  .nav-links { order: 3; width: 100%; justify-content: space-between; gap: 3px; }
  .nav-links a { padding-inline: 5px; }
  .site-header[data-enhanced] .nav-links { display: none; }
  .site-header[data-enhanced] .nav-links[data-open] { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 3px 14px; border-top: 1px solid var(--line); }
  .site-header[data-enhanced] .menu-control { display: inline-flex; min-width: 44px; }
  .hero::after { background: linear-gradient(90deg, #0b111af5 0%, #0b111ab3 40%, #0b111a36 100%), linear-gradient(0deg, #0b111aee 0%, transparent 38%); }
  .orbital-view { inset-inline-start: 10%; }
  .hero-inner { min-height: 505px; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-profile { grid-template-columns: 1fr; }
  .about-portrait { max-width: 500px; }
  .resume-grid { grid-template-columns: 1fr; gap: 24px; }
  .resume-nav { position: static; display: flex; flex-wrap: wrap; }
}

@media (max-width: 510px) {
  .header-actions { gap: 10px; }
  .hero::after { background: linear-gradient(0deg, #0b111a 3%, #0b111af5 22%, #0b111acb 55%, #0b111a30 100%), linear-gradient(90deg, #0b111a88, transparent 86%); }
  .orbital-view { inset: 0; mask-image: none; }
  .orbital-view img { object-position: 65% 16%; }
  .hero-inner { min-height: 535px; padding-top: 118px; padding-bottom: 77px; }
  .hero h1 { font-size: clamp(43px, 12.8vw, 60px); }
  .roman-name { font-size: 16px; }
  .hero-roles { margin-top: 23px; }
  .hero-description { max-width: 320px; font-size: 15px; }
  .hero .button-row { margin-top: 25px; }
  .scene-controls { inset-block-end: 7px; gap: 13px; }
  .home-section { padding-block: 37px 14px; }
  .home-research { padding-bottom: 54px; }
  .section-heading { margin-bottom: 15px; }
  .project-grid { grid-template-columns: 1fr; gap: 14px; }
  .research-row > a { grid-template-columns: 63px minmax(0, 1fr) 15px; gap: 9px; padding: 12px 9px; }
  .research-state { display: none; }
  .research-copy h3 { font-size: 15px; }
  .research-copy > p:last-child { font-size: 12px; }
  .filter-bar { display: block; }
  .result-count { margin-top: 9px; }
  .capabilities, .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-line { display: block; }
  .resume-intro { grid-template-columns: 1fr 85px; gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
