/* Styles for research.html. Shared styles (menu, icons, progress line) are in assets/css/site.css. */
:root{--theme:#0f6e56;--theme-dk:#0a5240;--wash:#eef6f3;--mut:#828282;--divider:#e8e8e8}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:#fff;color:#000;font-family:"Roboto",-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;font-weight:300;font-size:16px;line-height:1.55}
a{color:var(--theme);text-decoration:none}
a:hover{text-decoration:underline}
a:focus-visible{outline:2px solid var(--theme);outline-offset:2px}
.navbar{position:fixed;top:0;left:0;right:0;z-index:20;background:rgba(255,255,255,.97);border-bottom:1px solid var(--divider);padding-top:env(safe-area-inset-top,0px)}
.nav-inner{max-width:930px;margin:0 auto;padding:0 15px;height:56px;display:flex;align-items:center;justify-content:space-between}
.brand{font-size:1.25rem;font-weight:300;color:#000}
.brand b{font-weight:700}
.brand:hover{text-decoration:none;color:#000}
.nav-links{display:flex;gap:2px}
.nav-links a{color:#000;padding:8px 9px;font-size:15px;font-weight:400}
.nav-links a:hover{color:var(--theme);text-decoration:none}
.nav-links a.active{color:var(--theme);font-weight:500}
.container{max-width:960px;margin:0 auto;padding:calc(88px + env(safe-area-inset-top,0px)) 15px 40px}
.post-title{font-size:2.6rem;font-weight:300;margin:0 0 .3rem;line-height:1.2}
.post-description{color:#555;font-size:1rem;margin:0}
h2.tier{margin:2.4rem 0 .9rem;font-size:.78rem;font-weight:500;letter-spacing:.07em;text-transform:uppercase;color:#111;border-top:1px solid #111;padding-top:10px}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.card{border:1px solid var(--divider);border-radius:4px;padding:14px 15px 13px;display:flex;flex-direction:column}
.fig{margin:-14px -15px 13px;border-bottom:1px solid var(--divider);background:#fff;border-radius:4px 4px 0 0;overflow:hidden}
.fig.svg svg{display:block;width:100%;height:auto}
.card.wide .fig.svg{display:flex;align-items:center;justify-content:center;background:#fff}
.fig img{display:block;width:100%;aspect-ratio:16/9;object-fit:contain;background:#fff}
.fig.empty{aspect-ratio:16/9;background:#f4f6f5;display:flex;align-items:center;justify-content:center}
.fig.empty span{font-size:.72rem;color:#b3bab7;letter-spacing:.03em}
.card.wide{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);gap:0 20px;padding:0}
.card.wide .fig{margin:0;border-bottom:0;border-right:1px solid var(--divider);border-radius:4px 0 0 4px;height:100%}
.card.wide .fig.empty{aspect-ratio:auto;min-height:190px}
.card.wide .wbody{padding:14px 16px 13px 0;display:flex;flex-direction:column}
.card h3{margin:0 0 3px;font-size:1.04rem;font-weight:500;line-height:1.35}
.line{margin:0 0 9px;font-size:.9rem;color:#333;line-height:1.5}
.keys{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 11px}
.keys span{font-size:.7rem;color:var(--theme-dk);background:var(--wash);border-radius:2px;padding:1px 6px;letter-spacing:.01em}
ul.cites{list-style:none;margin:auto 0 0;padding:10px 0 0;border-top:1px solid #f0f0f0}
ul.cites li{margin:0 0 6px;line-height:1.35}
ul.cites li:last-child{margin-bottom:0}
ul.cites .t{display:block;font-size:.8rem;color:#111;font-weight:400}
ul.cites a.t:hover{color:var(--theme)}
ul.cites .v{display:block;font-size:.72rem;color:var(--mut)}
ul.talks{list-style:none;margin:0;padding:0}
ul.talks li{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:14px;align-items:center;padding:10px 0;border-bottom:1px solid #f2f2f2}
ul.talks li:last-child{border-bottom:0}
.ty{font-size:.85rem;color:var(--mut)}
ul.talks b{display:block;font-weight:500;font-size:.95rem;line-height:1.4}
ul.talks div span{display:block;font-size:.8rem;color:var(--mut)}
.watch{font-size:.72rem;text-transform:uppercase;letter-spacing:.03em;color:#fff;background:var(--theme);border-radius:2px;padding:.3rem .8rem;white-space:nowrap}
.watch:hover{background:var(--theme-dk);text-decoration:none}
.watch span{font-size:.6rem;margin-right:3px}
footer{border-top:1px solid var(--divider);color:var(--mut);font-size:.8rem;text-align:center;padding:16px 15px calc(16px + env(safe-area-inset-bottom,0px));margin-top:30px}
@media(max-width:900px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .card.wide{grid-template-columns:1fr;padding:0}
  .card.wide .fig{border-right:0;border-bottom:1px solid var(--divider);border-radius:4px 4px 0 0}
  .card.wide .fig.empty{aspect-ratio:16/9;min-height:0}
  .card.wide .wbody{padding:0 15px 13px}
  .nav-links a:not(.active){display:none}
  .post-title{font-size:2rem}
  .grid{grid-template-columns:1fr}
  ul.talks li{grid-template-columns:44px minmax(0,1fr)}
  .watch{grid-column:2;justify-self:start}
}
.fig.svg img {display:block;width:100%;height:auto}

/* ===== Dark mode: dark-theme versions of the colors above ===== */
html[data-theme="dark"] {color-scheme:dark}
html[data-theme="dark"] {--theme:#62dabc;--theme-dk:#62dabc;--wash:#1e392f;--mut:#888f96;--divider:#35383b}
html[data-theme="dark"] body {background:#121314;color:#e4e6e7}
html[data-theme="dark"] .navbar {background:rgba(18,19,20,0.97)}
html[data-theme="dark"] .brand {color:#e4e6e7}
html[data-theme="dark"] .brand:hover {color:#e4e6e7}
html[data-theme="dark"] .nav-links a {color:#e4e6e7}
html[data-theme="dark"] .post-description {color:#9aa0a5}
html[data-theme="dark"] h2.tier {color:#d5d8da;border-top:1px solid #d5d8da}
html[data-theme="dark"] .fig {background:#121314}
html[data-theme="dark"] .card.wide .fig.svg {background:#121314}
html[data-theme="dark"] .fig img {background:#121314}
html[data-theme="dark"] .fig.empty {background:#212325}
html[data-theme="dark"] .fig.empty span {color:#888f96}
html[data-theme="dark"] .line {color:#b7bcbf}
html[data-theme="dark"] ul.cites {border-top:1px solid #1e2021}
html[data-theme="dark"] ul.cites .t {color:#d5d8da}
html[data-theme="dark"] ul.talks li {border-bottom:1px solid #1c1e20}
html[data-theme="dark"] .watch {color:#fff;background:#0f6e56}
