:root {
  color-scheme: light;
  --paper: #f6f6ef;
  --ink: #121d24;
  --muted: #46585f;
  --line: #cbd4cc;
  --accent: #135145;
  --dark: #102f2a;
  --mint: #cefdab;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
a { color: var(--accent); text-underline-offset: .19em; }
a:hover { text-decoration-thickness: .14em; }
a:focus-visible { outline: 3px solid #197762; outline-offset: 4px; }
p, h1, h2, h3 { margin: 0; }
.wrap { width: min(100% - 4rem, 69rem); margin-inline: auto; }
.skip { position: fixed; top: .75rem; left: .75rem; z-index: 2; transform: translateY(-170%); background: white; padding: .6rem 1rem; }
.skip:focus { transform: translateY(0); }
.site-header, .site-footer { border-block-start: 1px solid var(--line); }
.site-header { border-top: 0; border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.1rem; }
.wordmark { color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; }
nav { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1.25rem; row-gap: .45rem; }
nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
nav a:hover, nav a[aria-current] { text-decoration: underline; color: var(--accent); }

.hero { display: grid; grid-template-columns: 1.06fr .94fr; align-items: stretch; gap: 3rem; padding: 5rem 0 4rem; }
.hero-copy { align-self: center; }
.role { color: var(--accent); font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 650; font-size: .82rem; }
.hero h1, .cv-hero h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; line-height: .95; letter-spacing: -.065em; }
.hero h1 { font-size: clamp(4.25rem, 9.2vw, 8.6rem); margin: .62rem 0 1.4rem; }
.intro { max-width: 32rem; color: var(--muted); font-size: 1.09rem; }
.intro strong { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.55rem; }
.button { color: var(--accent); border: 1px solid var(--accent); display: inline-flex; align-items: center; justify-content: center; min-height: 2.8rem; padding: .55rem .92rem; border-radius: .3rem; font-weight: 650; text-decoration: none; font-size: .88rem; }
.button:hover { box-shadow: inset 0 0 0 1px currentColor; }
.button.primary { background: var(--accent); color: white; }
.lattice { position: relative; isolation: isolate; min-height: 24rem; overflow: hidden; background: var(--dark); border-radius: .45rem; }
.lattice::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at center, #b2edaa 1px, transparent 1.55px) 0 0 / 21px 21px; opacity: .48; mask-image: radial-gradient(ellipse at 51% 47%, black 20%, transparent 75%); }
.lattice::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 58% 51%, transparent 23%, #102f2a 95%); z-index: -1; }
.orbit { position: absolute; border: 1px solid #b0e8a970; left: 50%; top: 50%; width: 75%; height: 36%; border-radius: 50%; transform: translate(-50%, -50%) rotate(-35deg); }
.orbit.two { transform: translate(-50%, -50%) rotate(33deg); border-color: #b0e8a94d; }
.dot { position: absolute; width: .6rem; height: .6rem; transform: translate(-50%, -50%); border-radius: 50%; background: var(--mint); box-shadow: 0 0 22px 3px #c4f9ad83; }
.dot.a { left: 50%; top: 50%; width: .9rem; height: .9rem; }
.dot.b { left: 29%; top: 39%; }
.dot.c { left: 69%; top: 27%; }
.dot.d { left: 75%; top: 65%; }

.content-section { padding: 2rem 0 3rem; border-top: 1px solid var(--line); }
.content-section h2, .cv-section h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(1.85rem, 4vw, 2.65rem); letter-spacing: -.04em; color: var(--ink); margin-bottom: 1.05rem; }
h3 { font-size: 1.08rem; line-height: 1.4; letter-spacing: -.015em; }
.research-list { list-style: none; padding: 0; margin: 0; }
.research-list li { display: grid; grid-template-columns: 4.2rem 1fr minmax(min-content, 9rem); align-items: start; column-gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.research-list li:last-child { border-bottom: 0; }
.year { color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; padding-top: .15rem; }
.research-list h3 a { color: var(--ink); text-decoration: none; }
.research-list h3 a:hover { text-decoration: underline; }
.research-list p, .project p, .contest-grid p { color: var(--muted); margin: .28rem 0 0; }
.row-link, .text-link { font-size: .86rem; font-weight: 650; }
.row-link { justify-self: end; text-align: right; }
.project-grid, .contest-grid { display: grid; gap: 1rem; }
.project-grid { grid-template-columns: repeat(2, 1fr); }
.contest-grid { grid-template-columns: repeat(3, 1fr); }
.project, .contest-grid article { display: flex; flex-direction: column; border: 1px solid var(--line); background: #fffffa; padding: 1.15rem; border-radius: .35rem; }
.project .text-link, .contest-grid .text-link { margin-top: auto; padding-top: .75rem; }
.site-footer { margin-top: 1rem; }
.footer-inner { padding-block: 1.5rem; }
.cv-hero { padding: 3.65rem 0 2.45rem; }
.cv-hero h1 { font-size: clamp(3.25rem, 8vw, 6rem); margin: .55rem 0 1.25rem; }
.cv-section { border-top: 1px solid var(--line); padding: 1.6rem 0 2rem; }
.cv-section .entry { max-width: 58rem; overflow-wrap: anywhere; }
.cv-section .entry + .entry { margin-top: .68rem; }
.cv-section .detail { color: var(--muted); padding-left: .85rem; border-left: 2px solid var(--line); }
.entry-links { display: inline; }
.entry-links a { display: inline-block; margin-left: .7rem; font-size: .86rem; }

@media (max-width: 820px) {
  .hero { gap: 1.7rem; }
  .lattice { min-height: 20rem; }
  .wrap { width: min(100% - 2.5rem, 69rem); }
}
@media (max-width: 620px) {
  .wrap { width: min(100% - 2rem, 69rem); }
  .header-inner, .footer-inner { align-items: flex-start; flex-direction: column; }
  nav { column-gap: .9rem; }
  .hero { grid-template-columns: 1fr; padding-top: 2.7rem; padding-bottom: 2.3rem; }
  .hero h1 { font-size: clamp(3.7rem, 13vw, 5.2rem); }
  .hero-break { display: none; }
  .lattice { min-height: 12rem; }
  .research-list li { grid-template-columns: 2.75rem minmax(0, 1fr); gap: .35rem .65rem; }
  .row-link { grid-column: 2; justify-self: start; text-align: left; }
  .project-grid, .contest-grid { grid-template-columns: 1fr; }
}
@media print {
  .site-header, .site-footer, .button, .lattice { display: none; }
  body { background: white; }
  .wrap { width: 100%; }
  .cv-hero { padding-top: 0; }
  .entry { break-inside: avoid; }
}
