@font-face {
  font-family: "Silkscreen";
  src: url("fonts/Silkscreen-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #111b29;
  --text: #edf3fa;
  --secondary: #c1cedd;
  --muted: #9eafc4;
  --accent: #81d1e1;
  --accent-hover: #addaff;
  --line: #2d4057;
  --surface: #1a2a3e;
  --surface-hover: #22364e;
  --name-shadow: #080f19;
  --control-hover-border: #628aa8;
  --active-surface: #234058;
  --control-radius: 0;
  --control-height: 2.25rem;
  --selection: #28536d;
  --paper-target: #1b3548;
  --paper: #e4e0d5;
  --paper-text: #37342e;
  --particle-1: #edf6ff;
  --particle-2: #c0dfeb;
  --particle-3: #8dbbd1;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pixel: "Silkscreen", monospace;
  --font-body: 1.1875rem;
  --font-small: 1rem;
  --font-filter: 1.0625rem;
  --font-paper: 1.1875rem;
  --font-paper-small: 1.125rem;
  --font-paper-title: 1.25rem;
  --font-heading: 1.5rem;
  --section-gap: 48px;
  --meta-column: 112px;
  --meta-gap: 24px;
  --weight-body: 500;
  --weight-small: 450;
  --weight-title: 600;
}

:root[data-theme="day"] {
  color-scheme: light;
  --background: #ffffff;
  --text: #242a2f;
  --secondary: #4b5661;
  --muted: #5f6b75;
  --accent: #236d61;
  --accent-hover: #154b42;
  --line: #d9e2e4;
  --surface: #f5f8f9;
  --surface-hover: #eef3f3;
  --name-shadow: #e4eced;
  --control-hover-border: #8eabaa;
  --active-surface: #e8f2ef;
  --selection: #dcefe9;
  --paper-target: #f0f7f5;
  --particle-1: #60867d;
  --particle-2: #94aaa4;
  --particle-3: #bbc9c4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--background); color: var(--text); font: var(--weight-body) var(--font-body)/1.65 var(--sans); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.theme-toggle, .terminal-launch, .terminal-run, .terminal-close { min-height: var(--control-height); padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--control-radius); background: transparent; color: var(--muted); font: var(--weight-title) var(--font-small)/1.5 var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.theme-toggle:hover, .terminal-launch:hover, .terminal-run:hover, .terminal-close:hover { border-color: var(--control-hover-border); background: var(--surface-hover); color: var(--text); }
.hotbar a:focus-visible, .theme-toggle:focus-visible, .research-filters button:focus-visible, .terminal-launch:focus-visible, .terminal-run:focus-visible, .terminal-close:focus-visible { outline-offset: 3px; }
::selection { background: var(--selection); color: var(--text); }
.page { width: min(1120px, calc(100% - 96px)); margin: 64px auto 40px; display: grid; grid-template-columns: 248px minmax(0, 1fr); column-gap: 72px; }
.identity { position: sticky; top: 40px; align-self: start; }
.profile-photo { width: 136px; max-width: 100%; margin: 0 0 18px; }
.portrait-frame { width: 100%; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; }
.profile-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.home-link { color: var(--text); text-decoration: none; }
h1 { margin: 0; font: 400 2rem/1.35 var(--pixel); letter-spacing: 0; text-shadow: 2px 2px 0 var(--name-shadow); overflow-wrap: anywhere; }
.affiliation { color: var(--secondary); font-size: var(--font-body); line-height: 1.55; margin: 16px 0; }
.hotbar { display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; max-width: 224px; margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.hotbar a { position: relative; display: inline-flex; align-items: center; min-width: 0; max-width: 100%; min-height: 36px; padding: 5px 0; color: var(--muted); font: var(--weight-body) var(--font-filter)/1.5 var(--sans); text-decoration: none; overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent; }
.hotbar a::before { content: ""; position: absolute; left: -12px; top: 50%; width: 2px; height: 14px; transform: translateY(-50%); background: transparent; }
.hotbar a:hover { color: var(--text); }
.hotbar a[aria-current="location"] { color: var(--accent); }
.hotbar a[aria-current="location"]::before { background: var(--accent); }
.sidebar-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: -11px; }
.sidebar-links a { display: grid; place-items: center; flex: 0 0 auto; width: 2.75rem; height: 2.75rem; min-width: 44px; min-height: 44px; padding: 0; color: var(--secondary); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.sidebar-links a:hover { color: var(--accent); }
.sidebar-links svg { display: block; width: 1.375rem; height: 1.375rem; }
.theme-toggle { position: fixed; top: 20px; right: 24px; z-index: 10; display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px; padding: 7px; background: var(--background); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { display: block; width: 20px; height: 20px; }
.theme-toggle .icon-night { display: none; }
:root[data-theme="day"] .theme-toggle .icon-day { display: none; }
:root[data-theme="day"] .theme-toggle .icon-night { display: block; }
.content { min-width: 0; }
.about { max-width: 68ch; font: var(--weight-body) var(--font-body)/1.65 var(--sans); }
.about p { margin: 0 0 18px; }
.about .contact { margin-bottom: 0; color: var(--muted); }
h2 { font: 400 var(--font-heading)/1.5 var(--pixel); color: var(--text); letter-spacing: 0; margin: 0; overflow-wrap: anywhere; }
#news-title, #research-title, #service-title { display: flex; align-items: center; gap: 12px; }
#news-title::before, #research-title::before, #service-title::before { content: ""; flex: 0 0 6px; height: 6px; background: var(--accent); box-shadow: 3px -3px 0 var(--accent); }
#news-title::after, #research-title::after, #service-title::after { content: ""; flex: 1; min-width: 0; height: 1px; margin-left: 4px; background: var(--line); }
.news, .research, .service { margin-top: var(--section-gap); }
.research-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 12px; margin-bottom: 0; border-bottom: 1px solid var(--line); }
.research-filters button { position: relative; max-width: 100%; min-height: 44px; padding: 8px 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font: var(--weight-body) var(--font-filter)/1.5 var(--sans); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.research-filters button::after { content: ""; position: absolute; left: 0; bottom: 3px; width: 24px; height: 2px; background: transparent; }
.research-filters button:hover { color: var(--text); }
.research-filters button.active { color: var(--accent); }
.research-filters button.active::after { background: var(--accent); }
.papers { display: flex; flex-direction: column; gap: 32px; padding-top: 16px; }
.paper { display: grid; grid-template-columns: var(--meta-column) minmax(0, 1fr); column-gap: var(--meta-gap); overflow-wrap: anywhere; }
.paper[hidden] { display: none; }
.paper-venue { margin: 3px 0 0; color: var(--accent); font-size: var(--font-paper-small); font-weight: var(--weight-small); font-variant-numeric: tabular-nums; line-height: 1.55; }
.paper h3 { font-size: var(--font-paper-title); font-weight: var(--weight-title); line-height: 1.45; margin: 0 0 6px; }
.paper h3 a { color: var(--text); text-decoration: none; }
.paper h3 a:hover { color: var(--accent); text-decoration: underline; }
.authors { margin: 0; color: var(--muted); font-size: var(--font-paper-small); font-weight: var(--weight-small); line-height: 1.6; }
.authors strong { color: var(--text); font-weight: var(--weight-title); }
.paper-links { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 18px; row-gap: 10px; margin-top: 8px; font-size: var(--font-paper-small); font-weight: var(--weight-small); line-height: 1.6; }
.paper-links > a { text-decoration: none; }
.paper-links > a:hover { text-decoration: underline; }
.paper-links details { display: contents; }
.paper-links summary { cursor: pointer; color: var(--accent); list-style: none; width: max-content; }
.paper-links summary::-webkit-details-marker { display: none; }
.paper-links summary::after { content: "+"; margin-left: 7px; font-family: var(--sans); }
.paper-links details[open] summary::after { content: "−"; }
.paper-links summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.paper-summary { flex-basis: 100%; font-size: var(--font-paper); font-weight: var(--weight-body); line-height: 1.65; color: var(--secondary); }
.paper-summary p { margin: 0; padding-top: 4px; }
.news-list { list-style: none; padding: 0; margin: 18px 0 0; }
.news-list li { display: grid; grid-template-columns: var(--meta-column) minmax(0, 1fr); column-gap: var(--meta-gap); margin-bottom: 18px; }
.news-list li:last-child { margin-bottom: 0; }
.news-list time { font-size: var(--font-paper-small); font-weight: var(--weight-small); color: var(--muted); padding-top: 3px; }
.news-list p { font-size: var(--font-body); line-height: 1.65; margin: 0; }
.service-list { margin: 18px 0 0; }
.service-list > div { display: grid; grid-template-columns: var(--meta-column) minmax(0, 1fr); column-gap: var(--meta-gap); margin-bottom: 18px; }
.service-list > div:last-child { margin-bottom: 0; }
.service-list dt { color: var(--accent); font-size: var(--font-paper-small); font-weight: var(--weight-small); padding-top: 3px; }
.service-list dd { margin: 0; font-size: var(--font-body); line-height: 1.65; overflow-wrap: anywhere; }
footer { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 18px; display: flex; justify-content: space-between; gap: 20px; font-size: var(--font-small); font-weight: var(--weight-small); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); text-decoration: underline; }
.skip-link { position: fixed; top: -100px; left: 20px; background: var(--text); color: var(--background); padding: 10px 16px; z-index: 10; }
.skip-link:focus { top: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hit-particles { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.topic-title[hidden] { display: none; }
.topic-label { display: block; overflow-wrap: anywhere; }
.topic-title { margin: 20px 0 0; color: var(--accent); font: var(--weight-title) var(--font-paper-title)/1.5 var(--sans); }
.paper:target { background: var(--paper-target); }
.paper:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
@media (hover: hover) and (pointer: fine) {
  body { cursor: url("assets/pickaxe-cursor.png") 3 4, crosshair; }
  p, li { cursor: text; }
  a { cursor: pointer; }
}
@media (max-width: 1000px) {
  :root { --meta-column: 100px; --meta-gap: 20px; }
  .page { width: calc(100% - 64px); grid-template-columns: 224px minmax(0, 1fr); column-gap: 44px; margin-top: 56px; }
  h1 { font-size: 1.875rem; }
}
@media (max-height: 650px) {
  .identity { position: static; }
}
@media (max-width: 860px) {
  :root { --section-gap: 40px; }
  .page { width: min(720px, calc(100% - 40px)); display: block; margin-top: 56px; }
  .theme-toggle { right: 20px; }
  .identity { position: static; display: grid; grid-template-columns: 80px minmax(0, 1fr); column-gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
  .profile-photo { grid-column: 1; grid-row: 1 / 3; align-self: center; width: 80px; margin: 0; }
  .identity > .home-link { grid-column: 2; grid-row: 1; align-self: start; min-width: 0; }
  .identity > .affiliation { grid-column: 2; grid-row: 2; margin: 8px 0 0; font-size: var(--font-filter); }
  .identity > .sidebar-links, .identity > .hotbar, .identity > .terminal-launch { grid-column: 1 / -1; }
  .sidebar-links { margin-top: 16px; }
  h1 { font-size: 2rem; }
  .hotbar { flex-direction: row; flex-wrap: wrap; gap: 8px 24px; max-width: none; margin-top: 16px; }
  .hotbar a { min-height: 44px; padding: 8px 0; }
  .hotbar a::before { left: 0; top: auto; bottom: 3px; width: 24px; height: 2px; transform: none; }
  .about .contact { overflow-wrap: anywhere; }
  .paper { grid-template-columns: 1fr; gap: 6px; }
  .paper-venue { margin: 0; }
  .paper-links { margin-top: 8px; }
  .service-list > div { grid-template-columns: 1fr; gap: 5px; }
  .news-list li { grid-template-columns: 1fr; gap: 5px; }
  footer { margin-top: 33px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (max-width: 600px) {
  .identity { display: block; }
  .profile-photo { width: 160px; margin: 0 0 20px; }
  .identity > .home-link { display: block; }
  .identity > .affiliation { margin-top: 12px; }
}

@media (max-width: 480px) {
  .research-filters { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); column-gap: 24px; }
  .research-filters button { justify-self: start; align-self: stretch; }
}

.affiliation > span { display: block; }

.authorship-note { margin: 14px 0 4px; color: var(--muted); font-size: var(--font-filter); font-weight: var(--weight-small); line-height: 1.6; }
.venue-note { display: block; margin-top: 5px; font-size: var(--font-paper-small); line-height: 1.5; }
.alphabetical { white-space: nowrap; }

.terminal-launch { display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; margin-top: 16px; }
.terminal-launch[hidden] { display: none; }
.terminal-launch > span, .terminal-launch kbd { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.terminal-launch kbd { margin-left: 4px; color: var(--muted); font-size: .875rem; }
.site-terminal { position: fixed; top: var(--terminal-center, 50%); bottom: auto; left: 0; right: 0; width: min(680px, calc(100% - 40px)); height: min(500px, calc(var(--terminal-view-height, 100dvh) - 40px)); max-width: none; max-height: none; margin: 0 auto; padding: 0; transform: translateY(-50%); overflow: hidden; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--background); color: var(--text); cursor: default; }
.site-terminal[open] { display: flex; flex-direction: column; }
.site-terminal::backdrop { background: #0008; }
.terminal-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.terminal-bar h2 { font: var(--weight-title) var(--font-small)/1.5 var(--sans); }
.terminal-close { display: grid; place-items: center; flex: none; width: 36px; height: 36px; min-height: 36px; padding: 0; font: 400 24px/1 var(--sans); }
.terminal-output { position: relative; flex: 1; min-height: 0; padding: 16px; overflow: auto; overscroll-behavior: contain; overflow-wrap: anywhere; font: 400 1rem/1.65 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.terminal-output:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.terminal-entry { margin-bottom: 18px; }
.terminal-entry:last-child { margin-bottom: 0; }
.terminal-entry p { margin: 0 0 6px; }
.terminal-entry p:last-child { margin-bottom: 0; }
.terminal-command { color: var(--accent); }
.terminal-help { margin: 6px 0 0; }
.terminal-help > div { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 18px; margin-top: 10px; }
.terminal-help dt { color: var(--text); }
.terminal-help dd { margin: 0; color: var(--muted); }
.terminal-results { margin: 8px 0 0; padding: 0; list-style: none; }
.terminal-results li + li { margin-top: 8px; }
.terminal-results a { display: block; min-height: 44px; padding: 4px 0; text-decoration: none; }
.terminal-results a:hover { text-decoration: underline; }
.terminal-result-venue { display: block; color: var(--muted); }
.terminal-form { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 16px 6px; border-top: 1px solid var(--line); font: 400 1rem/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.terminal-prompt { color: var(--accent); }
.terminal-form input { flex: 1; min-width: 0; min-height: var(--control-height); padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--control-radius); background: transparent; color: var(--text); caret-color: var(--accent); font: inherit; }
.terminal-form input::placeholder { color: var(--muted); opacity: 1; }
.terminal-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.terminal-run { flex: none; min-width: 56px; }
.terminal-hint { flex: none; margin: 0; padding: 0 16px 12px; color: var(--muted); font: var(--weight-small) var(--font-small)/1.5 var(--sans); }
@media (max-width: 600px) {
  .terminal-launch kbd { display: none; }
  .terminal-help > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
