/* RudhLab — minimal sans-serif theme. Tokens first; every page shares them. */
:root{
  --bg:#ffffff;--fg:#0b0b0c;--muted:#64646a;--faint:#9a9aa0;--line:#e7e7ea;--soft:#f5f5f6;--accent:#1f5eff;
  --sans:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --max:1200px;--gutter:clamp(16px,4vw,40px);
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#0c0c0e;--fg:#ececee;--muted:#9c9ca4;--faint:#6c6c74;--line:#232328;--soft:#151518;--accent:#7aa2ff;color-scheme:dark}}
:root[data-theme="dark"]{--bg:#0c0c0e;--fg:#ececee;--muted:#9c9ca4;--faint:#6c6c74;--line:#232328;--soft:#151518;--accent:#7aa2ff;color-scheme:dark}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:80px}
body{display:flex;flex-direction:column;min-height:100dvh;margin:0;background:var(--bg);color:var(--fg);font:400 16px/1.6 var(--sans);font-feature-settings:"cv11","ss01";-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
h1,h2,h3,p,ul,ol,dl,dd,figure{margin:0}
main{flex:1}
ul{padding:0;list-style:none}
img,video{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
button,input{font:inherit;color:inherit}
button{background:none;border:0;padding:0;cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:2px}
::selection{background:var(--fg);color:var(--bg)}
[hidden]{display:none!important}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.wrap{max-width:var(--max);margin-inline:auto;padding-inline:var(--gutter)}
.skip{position:absolute;left:-999px;top:12px;z-index:100;background:var(--fg);color:var(--bg);padding:8px 14px;border-radius:6px}
.skip:focus{left:12px}

/* Typography */
.muted{color:var(--muted)}
.label{font-size:13px;line-height:1.4;color:var(--muted);letter-spacing:.01em}
.link{border-bottom:1px solid var(--line);transition:border-color .15s,color .15s;padding-bottom:1px}
.link:hover{border-color:currentColor}
.arrow{display:inline-block;transition:transform .15s}
a:hover .arrow{transform:translateX(3px)}
.prose p+p{margin-top:1em}
.prose a{border-bottom:1px solid var(--line)}
.prose a:hover{border-color:currentColor}

/* Header */
.header{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:saturate(1.4) blur(12px);-webkit-backdrop-filter:saturate(1.4) blur(12px);border-bottom:1px solid transparent;transition:border-color .2s}
.header.scrolled{border-color:var(--line)}
.header .wrap{display:flex;align-items:center;gap:32px;height:64px}
.brand{display:flex;align-items:center;gap:10px;font-weight:600;font-size:17px;letter-spacing:-.02em;margin-right:auto}
.brand svg{width:22px;height:22px}
.brand .mark-tile{fill:var(--fg)}.brand .mark-lines{stroke:var(--bg);stroke-width:3}.brand .mark-nodes{fill:var(--bg)}
.nav{display:flex;gap:28px;font-size:14.5px}
.nav a{color:var(--muted);transition:color .15s}
.nav a:hover,.nav a[aria-current="page"]{color:var(--fg)}
.icon-button{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;color:var(--muted);transition:background .15s,color .15s}
.icon-button:hover{background:var(--soft);color:var(--fg)}
.icon-button svg{width:17px;height:17px}
.theme-toggle .sun{display:none}
:root[data-theme="dark"] .theme-toggle .sun{display:block}
:root[data-theme="dark"] .theme-toggle .moon{display:none}
.menu-toggle{display:none}

/* Page sections */
.section{padding-block:clamp(64px,9vw,112px);border-top:1px solid var(--line)}
.section-grid{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,9fr);gap:24px 48px}
.section-head{display:flex;flex-direction:column;gap:12px;align-self:start;position:sticky;top:96px}
.section-head h2{font-size:15px;font-weight:500;letter-spacing:-.005em}
.section-head .link{font-size:14px;color:var(--muted);align-self:flex-start}
.section-head .link:hover{color:var(--fg)}

/* Home hero */
.hero{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(32px,5vw,72px);align-items:center;padding-block:clamp(56px,9vw,120px)}
.hero h1{font-size:clamp(32px,3.9vw,52px);line-height:1.08;font-weight:500;letter-spacing:-.035em}
.hero .lede{margin-top:24px;font-size:clamp(16px,1.35vw,18px);line-height:1.6;color:var(--muted);max-width:48ch}
.hero .lede a{color:var(--fg)}
.notice{display:inline-flex;align-items:center;gap:10px;margin-top:32px;padding:8px 16px 8px 14px;border:1px solid var(--line);border-radius:999px;font-size:14px;transition:border-color .15s,background .15s}
.notice:hover{border-color:var(--faint);background:var(--soft)}
.notice .dot{width:7px;height:7px;border-radius:50%;background:#22a55a;animation:pulse 2.4s ease-in-out infinite}
.notice .muted{margin-left:2px}
@keyframes pulse{50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){.notice .dot{animation:none}html{scroll-behavior:auto}}

/* Media */
.player{position:relative;overflow:hidden;background:#0b0b0c;border-radius:6px;aspect-ratio:16/9}
.player video,.player img{width:100%;height:100%;object-fit:cover}
.player .play{position:absolute;inset:0;display:grid;place-items:center;color:#fff;background:linear-gradient(to top,rgba(0,0,0,.35),transparent 50%);transition:background .2s}
.player .play span{display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:rgba(255,255,255,.16);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.28);transition:transform .2s,background .2s}
.player .play svg{width:18px;height:18px;margin-left:3px}
.player:hover .play span{transform:scale(1.06);background:rgba(255,255,255,.24)}
.player.playing .play{display:none}
.featured figcaption{display:flex;justify-content:space-between;gap:24px;margin-top:14px;font-size:13.5px;line-height:1.5}
.featured figcaption strong{font-weight:500}
.featured figcaption button{color:var(--muted);white-space:nowrap;align-self:flex-start}
.featured figcaption button:hover{color:var(--fg)}

/* Research areas */
.areas{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px}
.areas h3,.row h3,.sim h3,.person h3{font-size:17px;font-weight:500;letter-spacing:-.01em;line-height:1.35}
.areas p{margin-top:10px;color:var(--muted);font-size:15px}
.areas a{display:inline-block;margin-top:14px;font-size:14px}

/* Generic rows (projects, code, positions) */
.rows{border-top:1px solid var(--line)}
.row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 32px;padding-block:24px;border-bottom:1px solid var(--line)}
.row .meta{font-size:14px;color:var(--muted);text-align:right;white-space:nowrap}
.row p{grid-column:1;color:var(--muted);font-size:15px;max-width:68ch}
.row details{grid-column:1/-1;margin-top:6px;font-size:14px;color:var(--muted)}
.row summary{cursor:pointer;width:max-content;list-style:none;color:var(--muted)}
.row summary::-webkit-details-marker{display:none}
.row summary::before{content:"+";display:inline-block;width:16px}
.row details[open] summary::before{content:"−"}
.row summary:hover{color:var(--fg)}
.row dl{display:grid;grid-template-columns:max-content 1fr;gap:6px 24px;margin-top:14px;padding-left:16px}
.row dt{color:var(--faint)}
.row dd{color:var(--fg)}
a.row{transition:background .15s}
a.row:hover h3{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.subhead{font-size:15px;font-weight:500;margin:64px 0 16px}

/* Simulation grid */
.sims{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px 24px}
.sim button{display:block;width:100%;text-align:left}
.sim .player{aspect-ratio:16/10}
.sim h3{margin-top:14px;font-size:15.5px}
.sim p{margin-top:4px;font-size:14px;color:var(--muted)}
.sim button:hover h3{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.sim img{transition:transform .4s ease}
.sim button:hover img{transform:scale(1.025)}

/* Publications */
.pubs{border-top:1px solid var(--line)}
.pub{padding-block:22px;border-bottom:1px solid var(--line)}
.pub h3{font-size:16.5px;font-weight:500;line-height:1.4;letter-spacing:-.01em;max-width:72ch}
.pub h3 a:hover{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.pub .authors{margin-top:6px;font-size:14.5px;color:var(--muted)}
.pub .authors strong{color:var(--fg);font-weight:500}
.pub .venue{margin-top:2px;font-size:14.5px;color:var(--muted)}
.pub .venue em{font-style:normal;color:var(--fg)}
.pub .links{display:flex;gap:18px;margin-top:10px;font-size:13.5px;color:var(--muted)}
.pub .links a:hover{color:var(--fg)}
.year-group{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,9fr);gap:0 48px;border-top:1px solid var(--line)}
.year-group>h2{font-size:15px;font-weight:500;padding-top:22px}
.year-group .pub:last-child{border-bottom:0}
.year-group .pub:first-of-type{border-top:0}
.year-list{border-bottom:1px solid var(--line)}

/* People */
.people{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px 24px}
.person .avatar{aspect-ratio:1;border-radius:6px;background:var(--soft);display:grid;place-items:center;font-size:28px;font-weight:500;color:var(--faint);letter-spacing:-.02em;overflow:hidden;margin-bottom:16px}
.person .avatar img{width:100%;height:100%;max-width:none;object-fit:cover}
.person .label{margin-top:2px}
.person p:not(.label){margin-top:10px;font-size:14.5px;color:var(--muted)}
.person a{display:inline-block;margin-top:12px;font-size:14px}

/* Contact */
.contact h2{font-size:clamp(28px,3.6vw,44px);font-weight:500;letter-spacing:-.03em;line-height:1.1}
.contact .big{display:inline-block;margin-top:20px;font-size:clamp(18px,2vw,22px)}
.contact ul{display:flex;flex-wrap:wrap;gap:12px 28px;margin-top:36px;font-size:14.5px;color:var(--muted)}
.contact ul a:hover{color:var(--fg)}

/* Footer */
.footer{border-top:1px solid var(--line);font-size:13.5px;color:var(--muted)}
.footer .wrap{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px 32px;padding-block:32px}
.footer nav{display:flex;flex-wrap:wrap;gap:8px 24px}
.footer a:hover{color:var(--fg)}

/* Inner pages */
.page-head{padding-block:clamp(64px,10vw,120px) clamp(40px,6vw,64px)}
.page-head h1{font-size:clamp(34px,5vw,56px);line-height:1.08;font-weight:500;letter-spacing:-.035em}
.page-head .lede{margin-top:20px;font-size:clamp(16px,1.5vw,18px);color:var(--muted);max-width:60ch}
.page-head .lede a{color:var(--fg)}
.page-body{padding-bottom:clamp(64px,9vw,112px)}

/* Publications page controls */
.controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 32px;margin-bottom:32px}
.search{position:relative;flex:1 1 320px;max-width:440px}
.search svg{position:absolute;left:14px;top:50%;width:16px;height:16px;transform:translateY(-50%);color:var(--faint)}
.search input{width:100%;height:42px;padding:0 14px 0 40px;border:1px solid var(--line);border-radius:8px;background:var(--bg);font-size:15px;transition:border-color .15s}
.search input:focus{outline:none;border-color:var(--faint)}
.chips{display:flex;gap:6px}
.chip{height:34px;padding:0 14px;border-radius:999px;font-size:14px;color:var(--muted);border:1px solid var(--line);transition:all .15s}
.chip:hover{color:var(--fg);border-color:var(--faint)}
.chip[aria-pressed="true"]{background:var(--fg);border-color:var(--fg);color:var(--bg)}
.chip span{opacity:.6;margin-left:4px;font-variant-numeric:tabular-nums}
.empty{padding-block:40px;color:var(--muted)}
.footnote{margin-top:32px;font-size:13.5px;color:var(--faint);max-width:80ch}

/* Profile */
.profile-head{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:48px;align-items:end}
.profile-head img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:6px;background:var(--soft)}
.profile-head ul{display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:28px;font-size:14.5px}
.profile-head ul a,.profile-head ul button{color:var(--muted)}
.profile-head ul a:hover,.profile-head ul button:hover{color:var(--fg)}
.cv{border-top:1px solid var(--line)}
.cv-section{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,9fr);gap:16px 48px;padding-block:40px;border-bottom:1px solid var(--line)}
.cv-section>h2{font-size:15px;font-weight:500}
.cv-section .prose{max-width:68ch;color:var(--muted)}
.cv-section .prose a{color:var(--fg)}
.cv-section .prose strong{color:var(--fg);font-weight:500}
.entries{display:grid;gap:20px}
.entry{display:grid;grid-template-columns:180px minmax(0,1fr);gap:4px 24px}
.entry .when{font-size:14px;color:var(--faint);font-variant-numeric:tabular-nums;padding-top:1px}
.entry h3{font-size:15.5px;font-weight:500}
.entry p{font-size:14.5px;color:var(--muted)}
.bullets{display:grid;gap:8px;color:var(--muted);font-size:15px;max-width:68ch}
.bullets li{padding-left:18px;position:relative}
.bullets li::before{content:"";position:absolute;left:0;top:.75em;width:6px;height:1px;background:var(--faint)}
.cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 40px}
.cols h3{font-size:14px;font-weight:500;margin-bottom:6px}
.cols p{font-size:14.5px;color:var(--muted)}

/* News */
.news{display:grid}
.news .entry{padding-block:20px;border-bottom:1px solid var(--line)}
.news .entry:first-child{padding-top:0}
.news .entry:last-child{border-bottom:0;padding-bottom:0}
.news .when .status{display:flex;margin-top:4px;font-size:13px;color:var(--fg)}
.news-meta{margin-top:2px}
.news-link{margin-top:8px;font-size:14px}

/* Careers */
.cta{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 20px;border-radius:999px;background:var(--fg);color:var(--bg);font-size:15px;font-weight:500;transition:opacity .15s}
.cta:hover{opacity:.85}
.status{display:inline-flex;align-items:center;gap:8px}
.positions .row:first-child{padding-top:0}
.positions .row:last-child{border-bottom:0;padding-bottom:0}
.apply{display:flex;flex-wrap:wrap;align-items:center;gap:16px 24px;margin-top:28px}
.status::before{content:"";width:6px;height:6px;border-radius:50%;background:#22a55a}

/* Dialog */
dialog{width:min(1000px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--fg);overflow:auto}
dialog::backdrop{background:rgba(0,0,0,.6);backdrop-filter:blur(4px)}
dialog video{width:100%;max-height:62vh;background:#000}
.dialog-body{padding:28px 32px 32px;display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:16px 40px}
.dialog-body h2{grid-column:1/-1;font-size:22px;font-weight:500;letter-spacing:-.02em}
.dialog-body p{color:var(--muted);font-size:15px}
.dialog-body aside{font-size:14px;display:grid;gap:16px;align-content:start}
.dialog-body aside div span{display:block;color:var(--faint);font-size:13px;margin-bottom:2px}
.dialog-close{position:absolute;top:12px;right:12px;z-index:1;width:36px;height:36px;border-radius:50%;background:rgba(0,0,0,.5);color:#fff;display:grid;place-items:center}
.dialog-close:hover{background:rgba(0,0,0,.75)}
.dialog-close svg{width:16px;height:16px}

/* Responsive */
@media (max-width:960px){
  .hero{grid-template-columns:1fr}
  .areas,.sims,.people{grid-template-columns:repeat(2,minmax(0,1fr))}
  .areas{grid-template-columns:1fr;gap:32px}
  .section-grid,.year-group,.cv-section{grid-template-columns:1fr}
  .section-head{position:static}
  .year-group>h2{padding-top:22px;padding-bottom:0}
  .dialog-body{grid-template-columns:1fr}
}
/* Seven nav links need ~860px; collapse to the menu below that. */
@media (max-width:860px){
  .header .wrap{gap:8px}
  .menu-toggle{display:grid}
  .nav{position:absolute;top:64px;left:0;right:0;flex-direction:column;gap:0;padding:8px var(--gutter) 20px;background:var(--bg);border-bottom:1px solid var(--line);font-size:17px;display:none}
  .nav.open{display:flex}
  .nav a{padding-block:12px;color:var(--fg)}
  .menu-toggle .close{display:none}
  .menu-toggle[aria-expanded="true"] .close{display:block}
  .menu-toggle[aria-expanded="true"] .open-icon{display:none}
}
@media (max-width:760px){
  .row{grid-template-columns:1fr}
  .row .meta{text-align:left;grid-row:auto}
  .entry{grid-template-columns:1fr}
  .profile-head{grid-template-columns:1fr;gap:28px}
  .profile-head img{width:120px;grid-row:1}
  .cols{grid-template-columns:1fr}
  .featured figcaption{flex-direction:column;gap:6px}
}
@media (max-width:560px){
  .sims,.people{grid-template-columns:1fr}
  .chips{width:100%}
  .dialog-body{padding:22px 20px 24px}
}

@media print{
  :root,:root[data-theme]{--bg:#fff;--fg:#000;--muted:#333;--faint:#555;--line:#ccc;color-scheme:light}
  body{font-size:10pt}
  .header,.footer,.skip,.no-print,.controls{display:none!important}
  .wrap{max-width:none;padding:0}
  .page-head{padding:0 0 12pt}
  .page-head h1{font-size:24pt}
  .profile-head{grid-template-columns:1fr}
  .profile-head img{display:none}
  .cv-section{grid-template-columns:120pt 1fr;padding-block:12pt;break-inside:avoid}
  .entry{grid-template-columns:110pt 1fr}
  .pub{break-inside:avoid}
}
