:root {
  --paper: #fbfaf7;
  --white: #fff;
  --ink: #172b35;
  --muted: #50616a;
  --line: #dce3e2;
  --accent: #205d68;
  --accent-dark: #174550;
  --soft: #edf3f1;
  --warm: #b48649;
  --max: 1110px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: #0e3039; }
a:focus-visible { outline: 3px solid var(--warm); outline-offset: 4px; border-radius: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.22; }
h1, h2, .serif { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { font-size: clamp(2.35rem, 4.3vw, 4.15rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.45rem); letter-spacing: -.025em; }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin-bottom: 1rem; }
.container { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 48px), 850px); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -70px; z-index: 10; padding: 8px 13px; background: var(--ink); color: white; }
.skip-link:focus { top: 10px; color: white; }

.site-header { background: rgba(251,250,247,.97); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 83px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; background: var(--ink); color: white; border-radius: 3px; font: 21px Georgia, serif; letter-spacing: -.09em; padding-right: 3px; }
.brand-name { display: block; font-size: 1.03rem; font-weight: 650; letter-spacing: -.015em; line-height: 1.15; }
.brand-sub { display: block; color: var(--muted); font-size: .73rem; letter-spacing: .075em; text-transform: uppercase; line-height: 1.5; }
.nav-list { display: flex; gap: clamp(13px, 2.25vw, 28px); align-items: center; list-style: none; padding: 0; margin: 0; }
.nav-list a { display: inline-block; padding: 30px 0 27px; border-bottom: 2px solid transparent; color: #43545d; text-decoration: none; font-size: .88rem; font-weight: 560; white-space: nowrap; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: .74rem; line-height: 1.3; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.intro { max-width: 730px; color: var(--muted); font-size: 1.13rem; line-height: 1.72; }
.hero { padding: 79px 0 81px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .74fr); gap: clamp(45px, 6.5vw, 105px); align-items: center; }
.hero h1 { max-width: 760px; margin-bottom: 24px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-copy > p:not(.eyebrow) { max-width: 660px; color: var(--muted); font-size: 1.1rem; line-height: 1.75; }
.hero-copy .role { margin-top: 27px; font-size: .91rem; color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 9px 16px; border: 1px solid var(--accent-dark); border-radius: 3px; background: var(--accent-dark); color: white; text-decoration: none; font-size: .88rem; font-weight: 650; }
.button:hover { background: var(--ink); border-color: var(--ink); color: white; }
.button.secondary { background: transparent; color: var(--accent-dark); }
.button.secondary:hover { background: var(--soft); color: var(--ink); }
.portrait-wrap { position: relative; margin: 0; }
.portrait-wrap:before { content: ""; position: absolute; z-index: -1; inset: 16px -15px -16px 15px; border: 1px solid #c9d6d3; }
.portrait { width: 100%; height: clamp(360px, 38vw, 460px); object-fit: cover; object-position: 50% 38%; border-radius: 2px; }
.portrait-wrap figcaption { margin-top: 11px; color: var(--muted); font-size: .78rem; }

.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 31px; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 9px 0 0; color: var(--muted); max-width: 650px; }
.text-link { flex: none; font-size: .87rem; font-weight: 650; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; min-height: 230px; padding: 27px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 2px; }
.card .number { color: var(--warm); font: 1rem Georgia, serif; margin-bottom: 22px; }
.card h3 { margin-bottom: 12px; font-family: Georgia, serif; font-size: 1.3rem; font-weight: 400; }
.card p { color: var(--muted); font-size: .92rem; line-height: 1.63; }
.card .text-link { align-self: flex-start; margin-top: auto; }
.soft-section { background: var(--soft); }
.highlight-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #cad8d6; }
.highlight-list li { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 21px 0; border-bottom: 1px solid #cad8d6; }
.highlight-year { color: var(--accent); font-family: Georgia, serif; font-size: 1.23rem; }
.highlight-title { margin: 0 0 5px; font-size: 1rem; font-weight: 650; line-height: 1.42; }
.highlight-meta { margin: 0; color: var(--muted); font-size: .84rem; }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 29px 32px; background: var(--ink); color: white; }
.callout h2 { margin: 0 0 5px; font-size: 1.75rem; }
.callout p { margin: 0; color: #d6e1e3; font-size: .92rem; }
.callout .button { flex: none; border-color: #d6e1e3; background: transparent; }
.callout .button:hover { background: white; color: var(--ink); }

.page-hero { padding: 67px 0 51px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: 17px; }
.page-hero .intro { margin-bottom: 0; }
.page-body { padding: 55px 0 92px; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: clamp(40px, 7vw, 100px); align-items: start; }
.content-block { padding: 0 0 40px; margin-bottom: 41px; border-bottom: 1px solid var(--line); }
.content-block:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.content-block h2 { margin: 0 0 22px; font-size: 1.8rem; }
.content-block h3 { margin: 28px 0 13px; font-size: 1rem; }
.content-block > p { max-width: 760px; color: var(--muted); }
.stack-list { list-style: none; margin: 0; padding: 0; }
.stack-list li { padding: 17px 0; border-top: 1px solid var(--line); }
.stack-list li:first-child { border-top: 0; padding-top: 0; }
.entry-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.entry-title { display: block; color: var(--ink); font-weight: 670; line-height: 1.45; }
.entry-date { flex: none; color: var(--accent); font-size: .82rem; font-weight: 650; white-space: nowrap; }
.entry-detail { display: block; color: var(--muted); font-size: .91rem; line-height: 1.55; margin-top: 3px; }
.entry-note { display: block; color: var(--muted); font-size: .82rem; line-height: 1.55; margin-top: 4px; }
.sidebar { position: sticky; top: 30px; border-top: 3px solid var(--accent); background: var(--white); padding: 24px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sidebar h2 { font: 1.18rem Georgia, serif; margin: 0 0 13px; }
.sidebar p { color: var(--muted); font-size: .84rem; line-height: 1.55; }
.sidebar-links { list-style: none; padding: 0; margin: 16px 0 0; }
.sidebar-links li { border-top: 1px solid var(--line); }
.sidebar-links a { display: block; padding: 10px 0; text-decoration: none; font-size: .86rem; font-weight: 600; }
.sidebar .button { margin-top: 12px; width: 100%; }
.small-note { color: var(--muted); font-size: .79rem; }

.pub-group { margin-bottom: 47px; }
.pub-group h2 { margin: 0 0 16px; font-size: 1.85rem; }
.pub-list { list-style: none; padding: 0; margin: 0; counter-reset: pub; }
.pub-list li { position: relative; padding: 22px 0 22px 45px; border-top: 1px solid var(--line); counter-increment: pub; }
.pub-list li:before { content: counter(pub, decimal-leading-zero); position: absolute; left: 0; top: 23px; color: var(--warm); font: 1.04rem Georgia, serif; }
.pub-list strong { font-weight: 680; }
.pub-title { display: block; color: var(--ink); font-weight: 680; line-height: 1.42; text-decoration: none; }
a.pub-title:hover { color: var(--accent); text-decoration: underline; }
.pub-authors { display: block; margin-top: 5px; color: var(--muted); font-size: .88rem; line-height: 1.48; }
.pub-venue { display: block; margin-top: 4px; color: var(--muted); font-size: .85rem; font-style: italic; }
.pub-link { display: inline-block; margin-top: 7px; font-size: .79rem; font-weight: 670; text-decoration: none; border-bottom: 1px solid currentColor; }
.research-feature { padding: 31px 0 39px; border-bottom: 1px solid var(--line); }
.research-feature:first-child { padding-top: 0; }
.research-feature:last-child { border-bottom: 0; }
.research-feature .kicker { color: var(--accent); font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 700; }
.research-feature h2 { margin: 10px 0 14px; max-width: 700px; }
.research-feature p { color: var(--muted); max-width: 760px; }
.research-feature .project-meta { margin-top: 18px; color: var(--ink); font-size: .88rem; }
.research-feature .project-meta + .project-meta { margin-top: 7px; }
.research-feature .project-meta a { font-weight: 650; }
.simple-list { margin: 0; padding-left: 21px; color: var(--muted); }
.simple-list li { padding: 4px 0; }
.simple-list strong { color: var(--ink); }
.conference-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.conference-table tr { border-top: 1px solid var(--line); }
.conference-table tr:last-child { border-bottom: 1px solid var(--line); }
.conference-table td { padding: 13px 0; color: var(--muted); vertical-align: top; }
.conference-table td:first-child { padding-right: 22px; }
.conference-table td:last-child { width: 138px; text-align: right; white-space: nowrap; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 19px 0 0; }
.tag { display: inline-block; padding: 4px 9px; background: var(--soft); color: var(--accent-dark); border-radius: 2px; font-size: .73rem; font-weight: 650; }

.simulator-section { scroll-margin-top: 20px; }
.simulator { display: grid; grid-template-columns: minmax(0, 1.24fr) minmax(315px, .82fr); background: var(--white); border: 1px solid #cad8d6; }
.simulator-visual { min-width: 0; padding: 25px; border-right: 1px solid var(--line); }
.simulator-canvas-wrap { padding: 8px; border: 1px solid var(--line); background: #f8faf9; }
.simulator canvas { display: block; width: 100%; height: auto; background: #fff; touch-action: none; cursor: crosshair; }
.simulator-legend { display: flex; flex-wrap: wrap; gap: 9px 18px; align-items: center; margin: 16px 0 18px; color: var(--muted); font-size: .78rem; }
.simulator-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.legend-a { background: #205d68; }
.legend-b { background: #b48649; }
.legend-line { display: inline-block; width: 18px; height: 0; border-top: 3px solid; }
.legend-low { border-color: #b74949; }
.legend-high { border-color: #cc8a2b; }
.simulator-playback { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sim-button { min-height: 36px; padding: 6px 12px; border: 1px solid var(--accent-dark); border-radius: 2px; background: var(--accent-dark); color: #fff; font: inherit; font-size: .79rem; font-weight: 650; cursor: pointer; }
.sim-button:hover { background: var(--ink); }
.sim-button-quiet { background: #fff; color: var(--accent-dark); }
.sim-button-quiet:hover { background: var(--soft); color: var(--ink); }
.simulator-playback label, .simulator-playback output { color: var(--muted); font-size: .78rem; }
.simulator-playback input[type="range"] { flex: 1 1 100px; min-width: 75px; accent-color: var(--accent); }
.sim-note { margin: 15px 0 0; color: var(--muted); font-size: .77rem; line-height: 1.5; }
.simulator-controls { min-width: 0; padding: 25px; }
.simulator-controls h3 { margin: 0 0 17px; font-family: Georgia, serif; font-size: 1.42rem; font-weight: 400; }
.sim-toggle { display: flex; align-items: center; gap: 9px; margin-bottom: 19px; font-size: .9rem; font-weight: 600; cursor: pointer; }
.sim-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.sim-parameter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-bottom: 13px; }
.sim-parameter-grid label { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.4; }
.sim-parameter-grid input, .sim-parameter-grid select { display: block; width: 100%; min-width: 0; min-height: 35px; margin-top: 6px; padding: 5px 8px; border: 1px solid #b7c7c8; border-radius: 2px; background: #fff; color: var(--ink); font: inherit; font-size: .86rem; }
.sim-field { position: relative; display: block; }
.sim-field input { padding-right: 55px; }
.sim-field small { position: absolute; right: 9px; bottom: 8px; color: #718188; font-size: .7rem; font-weight: 400; pointer-events: none; }
.sim-readout { margin: 19px 0 22px; padding: 14px; background: var(--soft); border-left: 3px solid var(--accent); }
.sim-readout[data-state="warning"] { border-left-color: #b8792c; background: #fbf5eb; }
.sim-readout[data-state="disabled"] { border-left-color: #8a9a9f; background: #f1f3f2; }
.sim-readout > strong { display: block; margin-bottom: 6px; font-size: .89rem; line-height: 1.4; }
.sim-readout > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 13px; color: var(--muted); font-size: .74rem; }
.sim-readout b { color: var(--ink); font-weight: 650; }
.sim-point-group { padding-top: 18px; border-top: 1px solid var(--line); }
.sim-point-group + .sim-point-group { margin-top: 18px; }
.sim-point-group[hidden] { display: none; }
.sim-group-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.sim-group-heading h4 { margin: 0; font-size: .86rem; }
.sim-group-heading button { border: 0; background: transparent; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: .75rem; font-weight: 650; cursor: pointer; }
.sim-point-list { display: grid; gap: 6px; }
.sim-point-row { display: grid; grid-template-columns: 27px minmax(0,1fr) minmax(0,1fr) 27px; gap: 6px; align-items: center; }
.sim-point-label { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; }
.sim-point-label.b { background: var(--warm); }
.sim-point-row label { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: .69rem; }
.sim-point-row input { width: 100%; min-width: 0; height: 29px; padding: 3px 4px; border: 1px solid #c3cece; border-radius: 2px; background: #fff; color: var(--ink); font: inherit; font-size: .78rem; }
.sim-point-row button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer; }
.sim-point-row button:hover { background: #f6eded; color: #a33c3c; }
.sim-point-row button:disabled { opacity: .35; cursor: default; }

.site-footer { background: #14313d; color: #e9f0f0; padding: 48px 0 23px; }
.footer-main { display: flex; justify-content: space-between; gap: 35px; padding-bottom: 44px; }
.footer-main h2 { font-size: 1.7rem; margin: 0 0 10px; }
.footer-main p { color: #c6d6d8; max-width: 510px; margin: 0; font-size: .91rem; }
.footer-links { display: flex; flex-wrap: wrap; align-content: start; gap: 9px; max-width: 360px; }
.footer-links a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #66818a; border-radius: 3px; text-decoration: none; }
.footer-links a:hover { background: #31505b; border-color: #c2d4d6; }
.footer-links img { width: 23px; height: 23px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 16px; border-top: 1px solid #44616a; color: #b9cbd0; font-size: .75rem; }

@media (max-width: 850px) {
  .header-inner { flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; padding: 15px 0 0; }
  .nav-list { flex-wrap: wrap; gap: 0 22px; }
  .nav-list a { padding: 12px 0 13px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(190px, .62fr); gap: 35px; }
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; max-width: 500px; }
  .simulator { grid-template-columns: 1fr; }
  .simulator-visual { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 650px) {
  .container, .narrow { width: min(calc(100% - 34px), var(--max)); }
  .header-inner { min-height: 0; }
  .brand-mark { width: 37px; height: 37px; font-size: 19px; }
  .brand-name { font-size: .98rem; }
  .nav-list { gap: 0 18px; }
  .nav-list a { font-size: .81rem; padding: 10px 0 11px; }
  .hero { padding: 45px 0 57px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.35rem, 9vw, 3.7rem); }
  .hero-copy > p:not(.eyebrow) { font-size: 1rem; }
  .portrait-wrap { max-width: 330px; }
  .portrait { height: 300px; object-position: 50% 35%; }
  .section { padding: 53px 0; }
  .section-heading { display: block; }
  .section-heading .text-link { display: inline-block; margin-top: 13px; }
  .grid-3 { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .highlight-list li { grid-template-columns: 55px 1fr; gap: 12px; }
  .callout { display: block; }
  .callout .button { margin-top: 18px; }
  .page-hero { padding: 46px 0 39px; }
  .page-body { padding: 43px 0 65px; }
  .entry-top { display: block; }
  .entry-date { display: block; margin-top: 2px; }
  .conference-table td:last-child { width: 112px; }
  .footer-main, .footer-bottom { display: block; }
  .footer-links { margin-top: 24px; }
  .footer-bottom span { display: block; margin-bottom: 4px; }
  .simulator-visual, .simulator-controls { padding: 16px; }
  .simulator-legend { gap: 7px 11px; }
}
@media (max-width: 420px) {
  .sim-parameter-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
