:root {
    color-scheme: dark;
    --bg: #151719;
    --surface: #1b1e20;
    --raised: #232729;
    --sidebar: #191b1d;
    --text: #e5e9e5;
    --soft: #bbc3be;
    --muted: #929d97;
    --border: #333a36;
    --accent: #a3e3b5;
    --accent-wash: #26362d;
    --amber: #e9c481;
    --cyan: #8acbd5;
    --danger: #ffabab;
    --sidebar-width: 264px;
    --title-height: 52px;
    --status-height: 30px;
    --mono: 'Cascadia Code', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 16px;
}
[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f8f7;
    --surface: #ffffff;
    --raised: #e8eeeb;
    --sidebar: #edf1ef;
    --text: #202a24;
    --soft: #43554a;
    --muted: #59695f;
    --border: #ccd6d0;
    --accent: #23613d;
    --accent-wash: #e0eee4;
    --amber: #866012;
    --cyan: #216976;
    --danger: #a12d38;
}
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
html { scroll-padding-top: 120px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 1rem; line-height: 1.7; }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button, input, select, textarea { color: var(--text); }
button { background: none; border: 0; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid var(--border); background: var(--bg); border-radius: 4px; padding: 11px 13px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; }
label { display: block; font-size: .875rem; color: var(--soft); margin: 18px 0 7px; }
form > .button { margin-top: 22px; }
input[type="search"]::-webkit-search-cancel-button { appearance: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px; }
::selection { background: var(--accent); color: var(--bg); }
h1, h2, p, figure { margin: 0; }
h1, h2 { font-weight: 500; }
.fa { flex: 0 0 auto; }
.muted { color: var(--muted); }
.skip-link { position: fixed; top: -100px; left: 15px; z-index: 100; background: var(--accent); color: var(--bg); padding: 10px 15px; }
.skip-link:focus { top: 8px; }
.titlebar { height: var(--title-height); position: fixed; inset: 0 0 auto; z-index: 15; border-bottom: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; padding: 0 22px; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 14px; font-size: .875rem; }
.terminal-mark { color: var(--accent); font-size: 1.375rem; font-weight: 600; }
.window-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: .8125rem; color: var(--muted); }
.window-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-button { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; color: var(--muted); border-radius: 4px; line-height: 1; flex: 0 0 36px; }
.icon-button:hover { color: var(--text); background: var(--raised); }
.workspace { padding-top: var(--title-height); }
.sidebar { width: var(--sidebar-width); position: fixed; top: var(--title-height); bottom: var(--status-height); left: 0; background: var(--sidebar); border-right: 1px solid var(--border); padding: 20px 20px 12px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; display: flex; flex-direction: column; }
.sidebar-section-label { font-size: .75rem; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.profile-image { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 3px; background: #fff; }
.profile-copy { margin: 16px 0; }
.profile-name { font-size: .875rem; color: var(--text); line-height: 1.6; }
.profile-role { font-size: .8125rem; color: var(--amber); margin-top: 3px; }
.profile-focus { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 9px 15px; font-size: .875rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); line-height: 1.5; }
.button:hover { background: var(--raised); border-color: var(--muted); }
.button-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
.button-primary:hover { background: var(--accent); border-color: var(--accent); filter: brightness(.9); }
.cv-button { width: 100%; margin-bottom: 28px; padding-inline: 10px; }
.cv-button .muted { font-size: .75rem; margin-left: auto; }
.explorer { margin-inline: -20px; }
.explorer .sidebar-section-label { padding-inline: 20px; }
.directory { font-size: .8125rem; color: var(--soft); padding: 0 24px 8px; }
.directory .fa { color: var(--amber); margin-right: 7px; }
.file-tree { display: flex; flex-direction: column; }
.file-tree a { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 6px 20px 6px 36px; font-size: .875rem; border-left: 2px solid transparent; color: var(--soft); }
.file-tree a:hover { background: var(--raised); }
.file-tree a[aria-current="page"] { background: var(--accent-wash); color: var(--accent); border-left-color: var(--accent); }
[data-view="home"] > .fa { color: var(--cyan); }
[data-view="papers"] > .fa { color: var(--amber); }
[data-view="portfolio"] > .fa { color: var(--accent); }
[data-view="contact"] > .fa { color: var(--muted); }
.file-ext { color: var(--muted); }
.nav-count { color: var(--muted); font-size: .75rem; margin-left: auto; }
.sidebar-links { margin-top: 28px; }
.sidebar-links a, .contact-profiles a { display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: .8125rem; padding: 7px 0; }
.sidebar-links a > .fa:first-child, .contact-profiles a > .fa:first-child { width: 18px; }
.sidebar-links a > .fa:last-child, .contact-profiles a > .fa:last-child { margin-left: auto; font-size: .75rem; color: var(--muted); }
.sidebar-links a:hover, .contact-profiles a:hover { color: var(--accent); }
.sidebar-footer { padding-top: 28px; margin-top: auto; color: var(--muted); font-size: .6875rem; }
.editor { margin-left: var(--sidebar-width); min-height: calc(100vh - var(--title-height)); padding-bottom: 155px; }
.editor-tabs { display: flex; position: sticky; top: var(--title-height); background: var(--sidebar); border-bottom: 1px solid var(--border); z-index: 10; overflow-x: auto; scrollbar-width: none; }
.editor-tabs a { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; font-size: .875rem; color: var(--muted); border-right: 1px solid var(--border); border-top: 2px solid transparent; }
.editor-tabs a:hover { background: var(--surface); color: var(--text); }
.editor-tabs a[aria-current="page"] { background: var(--bg); color: var(--text); border-top-color: var(--accent); }
.editor-tabs .nav-count { display: none; }
.editor-breadcrumb { padding: 12px 36px; display: flex; align-items: center; gap: 13px; font-size: .75rem; color: var(--muted); border-bottom: 1px solid var(--border); }
#current-file { color: var(--soft); }
.file-type { margin-left: auto; }
.editor-content { padding: 34px 44px 40px; max-width: 1360px; margin: auto; }
.view { animation: reveal .18s ease-out; }
@keyframes reveal { from { opacity: .5; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.command-heading { display: flex; gap: 10px; align-items: center; font-size: .875rem; color: var(--soft); margin-bottom: 20px; }
.prompt-user { color: var(--accent); }
.prompt-symbol { color: var(--cyan); }
.command-heading .muted { margin-left: -10px; }
.home-view h1 { font-size: 2.5rem; line-height: 1.22; font-weight: 500; margin-bottom: 18px; }
.cursor { color: var(--accent); animation: cursor 1.3s steps(1) infinite; }
@keyframes cursor { 50% { opacity: 0; } }
.identity-line { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 1rem; margin-bottom: 38px; }
.role { color: var(--amber); }
.focus { color: var(--cyan); }
.identity-divider { color: var(--border); }
.section-heading { font-size: 1rem; font-weight: 500; display: flex; align-items: baseline; gap: 10px; line-height: 1.5; }
.section-heading > span { color: var(--accent); }
.about-section p { margin-top: 16px; font-family: var(--mono); font-size: 1rem; line-height: 1.85; color: var(--soft); max-width: 1100px; }
.research-index { display: flex; align-items: center; gap: 28px; margin: 28px 0 32px; padding: 17px 0; border-block: 1px solid var(--border); font-size: .875rem; }
.research-index a { display: flex; align-items: baseline; gap: 10px; }
.research-index a:hover { color: var(--accent); }
.research-index .fa { color: var(--muted); font-size: .8125rem; }
.index-value { color: var(--accent); font-size: 1.25rem; }
.index-period { margin-left: auto; color: var(--muted); font-size: .8125rem; }
.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.text-link { display: inline-flex; gap: 8px; align-items: center; font-size: .8125rem; color: var(--muted); }
.text-link:hover { color: var(--accent); }
.cover-grid { display: grid; gap: 22px; }
.cover-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cover-link { display: block; position: relative; background: var(--surface); overflow: hidden; border: 1px solid var(--border); border-radius: 3px; }
.cover-item img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; transition: transform .2s ease; }
.cover-item figcaption { font-size: .75rem; line-height: 1.5; color: var(--soft); margin-top: 10px; }
.cover-link:hover img { transform: scale(1.025); }
.cover-zoom { position: absolute; bottom: 8px; right: 8px; display: grid; place-items: center; width: 30px; height: 30px; background: #151719dd; color: #fff; opacity: 0; transition: opacity .2s; border-radius: 3px; }
.cover-link:hover .cover-zoom, .cover-link:focus-visible .cover-zoom { opacity: 1; }
.recent-section { margin-top: 42px; }
.recent-paper { display: block; padding: 18px 0; border-top: 1px solid var(--border); }
.recent-paper span { display: block; color: var(--muted); font-size: .75rem; margin-bottom: 5px; }
.recent-paper p { color: var(--soft); font-size: .9375rem; line-height: 1.65; }
.recent-paper:hover p { color: var(--accent); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-heading h1 { font-size: 2rem; line-height: 1.3; }
.syntax-dot { color: var(--accent); }
.page-subtitle { margin-top: 10px; font-size: .875rem; color: var(--muted); }
.count-label { font-size: .8125rem; color: var(--accent); white-space: nowrap; padding-bottom: 3px; }
.publication-filters { display: flex; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.search-field { flex: 1; display: flex; align-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 4px; padding-left: 14px; min-width: 0; }
.search-field > .fa { color: var(--muted); font-size: .875rem; }
.search-field input { border: 0; background: transparent; padding-right: 8px; }
.search-field:focus-within { outline: 1px solid var(--accent); }
.search-field input:focus-visible { outline: none; }
.search-field .icon-button { margin-right: 5px; }
.select-field { position: relative; width: 150px; flex: 0 0 150px; }
.select-field select { appearance: none; height: 100%; background: var(--surface); padding-right: 35px; cursor: pointer; }
.select-field > .fa { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.publication-list { list-style: none; margin: 0; padding: 0; }
.publication { padding: 25px 0; border-bottom: 1px solid var(--border); }
.publication-title { font-size: 1rem; line-height: 1.75; margin-bottom: 8px; max-width: 1000px; }
.publication-title strong { font-weight: 500; }
.publication > span { color: var(--amber); font-size: .8125rem; }
.publication > p:last-child { color: var(--border); font-size: .875rem; margin-top: 12px; }
.publication a { color: var(--cyan); display: inline-flex; gap: 7px; align-items: center; padding-block: 3px; }
.publication a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.publication a[href^="Papers/"] { color: var(--accent); }
.empty-state { text-align: center; padding: 60px 15px; color: var(--muted); }
.empty-state > .fa { font-size: 1.5rem; }
.empty-state h2 { font-size: 1.125rem; margin-block: 16px 24px; }
.portfolio-filters { display: flex; flex-wrap: wrap; gap: 6px 20px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.portfolio-filters button { color: var(--muted); border-bottom: 2px solid transparent; padding: 9px 2px 14px; font-size: .875rem; }
.portfolio-filters button:hover { color: var(--text); }
.portfolio-filters button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.portfolio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.portfolio-grid figcaption { font-size: .875rem; }
.heading-icon { color: var(--cyan); font-size: 2rem; }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 12px; }
.info-list { margin: 24px 0 34px; }
.info-list dt { color: var(--cyan); font-size: .8125rem; margin-top: 17px; }
.info-list dd { margin: 3px 0 0; color: var(--soft); font-size: .9375rem; overflow-wrap: anywhere; }
.info-list a:hover { color: var(--accent); }
.contact-profiles { margin-top: 16px; max-width: 300px; }
.contact-profiles a { font-size: .875rem; padding-block: 11px; border-bottom: 1px solid var(--border); }
.required { color: var(--amber); }
.terminal-dock { position: fixed; left: var(--sidebar-width); right: 0; bottom: var(--status-height); z-index: 12; background: var(--bg); border-top: 1px solid var(--border); }
.terminal-toolbar { padding: 3px 18px 3px 25px; height: 34px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .6875rem; }
.terminal-toolbar > span { display: flex; gap: 9px; align-items: center; }
.terminal-toolbar > div { display: flex; }
.terminal-toolbar .icon-button { width: 28px; height: 28px; flex-basis: 28px; }
.terminal-prompt { display: flex; align-items: center; gap: 14px; padding: 5px 20px 12px 25px; }
.terminal-prompt label { margin: 0; display: flex; gap: 0; font-size: .875rem; white-space: nowrap; }
.terminal-prompt .prompt-symbol { margin-left: 5px; }
.terminal-prompt input { background: transparent; border: 0; padding: 4px 0; border-radius: 0; font-size: .9375rem; }
.terminal-prompt input:focus-visible { outline: none; box-shadow: 0 1px var(--border); }
.terminal-output { padding: 0 25px; max-height: 155px; overflow: auto; scrollbar-width: thin; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8125rem; color: var(--soft); }
.terminal-output p { margin-bottom: 7px; }
.terminal-output .input-echo { color: var(--muted); }
.statusbar { position: fixed; inset: auto 0 0; height: var(--status-height); background: var(--surface); border-top: 1px solid var(--border); z-index: 20; display: flex; align-items: center; gap: 24px; padding: 0 20px; font-size: .6875rem; color: var(--muted); }
.statusbar > span:first-child { color: var(--accent); }
.statusbar .fa { margin-right: 7px; }
.status-right { margin-left: auto; display: flex; gap: 28px; }
.dialog { padding: 0; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); width: min(580px, calc(100% - 32px)); max-height: calc(100dvh - 48px); box-shadow: 0 24px 90px #0007; overflow: auto; }
.dialog::backdrop { background: #090d0bbb; backdrop-filter: blur(4px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 15px 10px 22px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .8125rem; }
.dialog-header h2 { font-size: .875rem; line-height: 1.5; }
.dialog-header .fa { margin-right: 5px; }
.dialog-header .icon-button .fa { margin: 0; }
.dialog-body { padding: 28px; }
.dialog-body h2 { font-size: 1.375rem; margin-bottom: 16px; }
.requested-paper { color: var(--soft); font-size: .875rem; line-height: 1.7; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.form-note { font-size: .8125rem; color: var(--muted); line-height: 1.65; margin: 20px 0; }
.form-error { font-size: .875rem; color: var(--danger); margin: 18px 0; overflow-wrap: anywhere; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cover-dialog { width: fit-content; max-width: calc(100% - 32px); }
.cover-dialog > img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 180px); object-fit: contain; margin: auto; }
.cover-dialog-controls { display: flex; align-items: center; justify-content: center; gap: 24px; border-top: 1px solid var(--border); padding: 8px; font-size: .75rem; color: var(--muted); }
.command-dialog { margin-top: min(18vh, 150px); }
.palette-search { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); color: var(--accent); }
.palette-search input { border: 0; background: transparent; padding: 8px 0; }
.palette-search input:focus-visible { outline: none; }
.command-list { padding: 8px; }
.command-list button { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 13px 15px; border-radius: 4px; font-size: .9375rem; }
.command-list button .fa { color: var(--accent); width: 20px; }
.command-list button span:last-child { color: var(--muted); font-size: .75rem; margin-left: auto; }
.command-list button:hover, .command-list button:focus-visible, .command-list button[data-selected="true"] { background: var(--accent-wash); outline: none; }
#command-empty { margin: 16px 22px 24px; }
@media (min-width: 1800px) { :root { --sidebar-width: 290px; } .sidebar { padding-inline: 28px; } .explorer { margin-inline: -28px; } .editor-content { padding-top: 46px; } .home-view h1 { font-size: 3rem; } }
@media (max-width: 1199px) { :root { --sidebar-width: 230px; } .sidebar { padding-inline: 16px; } .explorer { margin-inline: -16px; } .editor-content { padding: 30px; } .editor-tabs a { padding-inline: 15px; } .cover-grid { gap: 15px; } .contact-layout { gap: 26px; } .research-index { gap: 18px; } .index-period { display: none; } }
@media (max-width: 960px) { .home-view h1 { font-size: 2rem; } .identity-line { gap: 9px; font-size: .875rem; } .cover-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .contact-layout { grid-template-columns: 1fr; gap: 40px; } .window-title { display: none; } .editor-tabs .file-ext { display: none; } .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; } }
@media (max-width: 720px) {
    :root { --title-height: 50px; --status-height: 27px; }
    .titlebar { padding-inline: 16px; }
    .wordmark { gap: 10px; font-size: .8125rem; }
    .sidebar { position: static; width: 100%; padding: 22px 20px; border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }
    .sidebar > .sidebar-section-label, .explorer, .sidebar-links, .sidebar-footer { display: none; }
    .profile { display: grid; grid-template-columns: 80px minmax(0, 1fr); column-gap: 18px; align-items: center; }
    .profile-image { grid-row: span 2; }
    .profile-copy { margin: 0 0 8px; }
    .profile-name { font-size: .875rem; }
    .profile-role, .profile-focus { font-size: .75rem; }
    .cv-button { width: max-content; min-height: 34px; padding: 5px 10px; margin: 0; font-size: .75rem; }
    .cv-button .muted { display: none; }
    .editor { margin-left: 0; }
    .editor-tabs { justify-content: stretch; }
    .editor-tabs a { flex: 1; gap: 7px; padding: 0 10px; min-height: 46px; font-size: .8125rem; }
    .editor-breadcrumb { padding: 10px 20px; }
    .editor-content { padding: 26px 20px 30px; }
    .home-view h1 { font-size: 2rem; }
    .identity-line { margin-bottom: 30px; gap: 6px 12px; }
    .about-section p { line-height: 1.8; }
    .research-index { gap: 22px; flex-wrap: wrap; }
    .research-index a { gap: 8px; font-size: .8125rem; }
    .research-index .fa { display: none; }
    .cover-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
    .section-bar { gap: 12px; align-items: flex-start; }
    .section-bar > .text-link { font-size: .75rem; padding-top: 4px; }
    .section-heading { font-size: .9375rem; }
    .recent-section .section-bar { flex-wrap: wrap; }
    .page-heading h1 { font-size: 1.75rem; }
    .publication-filters { gap: 10px; }
    .select-field { width: 120px; flex-basis: 120px; }
    .publication-filters input, .publication-filters select { font-size: .875rem; }
    .portfolio-filters { gap: 5px 16px; }
    .portfolio-filters button { font-size: .8125rem; }
    .portfolio-grid { gap: 24px 16px; }
    .portfolio-grid figcaption { font-size: .8125rem; }
    .terminal-dock { left: 0; }
    .terminal-prompt { gap: 10px; padding-inline: 16px; }
    .terminal-prompt label { font-size: .75rem; }
    .terminal-output { padding-inline: 16px; max-height: 120px; }
    .terminal-toolbar { padding-inline: 16px; }
    .statusbar { padding-inline: 15px; gap: 16px; }
    .status-right { font-size: .625rem; }
    .status-encoding { display: none; }
    .dialog { width: calc(100% - 24px); max-width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
    .dialog-body { padding: 22px; }
    .cover-dialog { width: fit-content; }
}
@media (max-width: 380px) { .editor-tabs a { gap: 5px; padding-inline: 7px; font-size: .75rem; } .editor-tabs .fa { font-size: .8125rem; } .home-view h1 { font-size: 1.75rem; } .identity-divider { display: none; } .identity-line { flex-direction: column; align-items: flex-start; } .publication-filters { flex-direction: column; } .select-field { flex-basis: auto; width: 100%; } .section-bar { flex-wrap: wrap; } .status-right { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .titlebar, .sidebar, .editor-tabs, .editor-breadcrumb, .terminal-dock, .statusbar, .publication-filters { display: none; } .editor { margin: 0; padding: 0; } .editor-content { padding: 0; } body { color: #000; background: #fff; } a { color: inherit; } .publication { break-inside: avoid; } }
