/* Robotics site. Same theme as Shuja Abidi's research site: navy menu bar, serif headings, warm paper background. */
:root {
  --bg: #f7f7f3; --surface: #ffffff; --soft: #eceee8; --ink: #14294d; --ink-2: #4f5d6c; --line: #d9dcd5;
  --navy: #14294d; --accent: #1f7f93; --orange: #b6562f; --green: #2a7f4f; --blue: #4a6ea9; --warn-bg: #fbf1e3;
  --fill-a: rgba(31, 127, 147, 0.13); --fill-o: rgba(182, 86, 47, 0.13); --fill-b: rgba(74, 110, 169, 0.14); --fill-g: rgba(42, 127, 79, 0.14);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15191f; --surface: #1e242c; --soft: #27303a; --ink: #eef1f4; --ink-2: #bcc5cf; --line: #333d48;
    --navy: #0d1b31; --accent: #6cc4d6; --orange: #e68e68; --green: #7fcf9f; --blue: #9db8e6; --warn-bg: #33291a;
    --fill-a: rgba(108, 196, 214, 0.15); --fill-o: rgba(230, 142, 104, 0.15); --fill-b: rgba(157, 184, 230, 0.15); --fill-g: rgba(127, 207, 159, 0.15);
  }
}
:root[data-theme="dark"] {
  --bg: #15191f; --surface: #1e242c; --soft: #27303a; --ink: #eef1f4; --ink-2: #bcc5cf; --line: #333d48;
  --navy: #0d1b31; --accent: #6cc4d6; --orange: #e68e68; --green: #7fcf9f; --blue: #9db8e6; --warn-bg: #33291a;
  --fill-a: rgba(108, 196, 214, 0.15); --fill-o: rgba(230, 142, 104, 0.15); --fill-b: rgba(157, 184, 230, 0.15); --fill-g: rgba(127, 207, 159, 0.15);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.62 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* menu */
.topbar { position: sticky; top: 0; z-index: 10; background: #14294d; }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 20px; overflow-x: auto; }
.brand { color: #fff; font-weight: 700; white-space: nowrap; text-decoration: none; padding: 13px 0; }
nav.menu { display: flex; gap: 2px; margin-left: auto; }
nav.menu a { color: #d7e0ea; text-decoration: none; padding: 14px 8px 11px; font-size: 14.5px; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
nav.menu a:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }
nav.menu a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.12); border-bottom-color: #6cc4d6; }

/* second menu row for sections inside a page */
.subnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.subnav-inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px 22px; overflow-x: auto; white-space: nowrap; }
.subnav a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 10px 0 8px; border-bottom: 3px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--orange); }
.has-subnav { scroll-padding-top: 104px; }
main { max-width: 1080px; margin: 0 auto; padding: 0 16px 56px; }
h1, h2, .num { font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif; font-weight: 700; }
.intro { padding: 50px 0 10px; }
.eyebrow { color: var(--orange); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; }
h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -0.01em; max-width: 20ch; }
.lead { font-size: clamp(19px, 2.6vw, 23px); line-height: 1.45; margin: 0 0 18px; max-width: 40em; }
h2 { font-size: clamp(26px, 4vw, 33px); line-height: 1.2; margin: 0 0 6px; }
h3 { font-size: 18px; line-height: 1.3; margin: 24px 0 6px; }
p { margin: 0 0 12px; max-width: 72ch; }
ul, ol { margin: 6px 0 12px; padding-left: 21px; max-width: 72ch; }
li { margin-bottom: 5px; }
.contents { list-style: none; padding: 0; margin: 20px 0 0; max-width: none; display: flex; flex-wrap: wrap; gap: 8px; }
.contents li { margin: 0; }
.contents a { display: inline-block; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: 15px; font-weight: 600; color: var(--ink); }
.contents a:hover { border-color: var(--accent); color: var(--accent); }
.contents b { color: var(--orange); margin-right: 5px; }
.field { padding: 44px 0 10px; border-top: 1px solid var(--line); margin-top: 32px; }
.num { color: var(--orange); font-size: 19px; margin: 0 0 2px; }
.sub { color: var(--ink-2); font-size: 19px; margin: 0 0 18px; max-width: 60ch; }
.cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 34px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 15px 17px; font-size: 15.5px; }
.panel h3 { margin: 0 0 8px; font-size: 16px; }
.panel ul, .panel p:last-child { margin-bottom: 0; }
.note { background: var(--warn-bg); border-radius: 8px; padding: 11px 15px; margin: 14px 0 16px; font-size: 15.5px; max-width: 72ch; }
.key { background: var(--fill-a); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; padding: 11px 15px; margin: 14px 0 16px; max-width: 72ch; }
.key p:last-child { margin-bottom: 0; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
figure { margin: 20px 0 10px; }
figcaption { color: var(--ink-2); font-size: 14px; margin-top: 7px; max-width: 80ch; }
.dg { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; }
.dg svg { display: block; width: 100%; height: auto; }
.dg svg.wide { min-width: 680px; }
.dg text { font: 13px "Segoe UI", system-ui, sans-serif; fill: var(--ink); }
.dg .t { font-weight: 700; }
.dg .m { fill: var(--ink-2); font-size: 12px; }
.dg .lab { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; }
.dg .bx { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.3; }
.dg .ba { fill: var(--fill-a); stroke: var(--accent); stroke-width: 1.5; }
.dg .bo { fill: var(--fill-o); stroke: var(--orange); stroke-width: 1.5; }
.dg .bb { fill: var(--fill-b); stroke: var(--blue); stroke-width: 1.5; }
.dg .bg { fill: var(--fill-g); stroke: var(--green); stroke-width: 1.5; }
.dg .ln { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dg .ar { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.dg .fb { fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-dasharray: 5 4; }
.dg .ah { fill: var(--ink); } .dg .ahm { fill: var(--ink-2); }
.dg .ca { fill: var(--accent); } .dg .co { fill: var(--orange); } .dg .cb { fill: var(--blue); } .dg .cg { fill: var(--green); }
.dg .sa { stroke: var(--accent); } .dg .so { stroke: var(--orange); }
.dg .ink { fill: var(--ink); }
.dg .grid { stroke: var(--line); stroke-width: 1; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.two > * { min-width: 0; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 8px; padding: 13px 16px 14px; font-size: 15.5px; }
.card.o { border-top-color: var(--orange); } .card.b { border-top-color: var(--blue); } .card.g { border-top-color: var(--green); }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.buttons button { font: 600 14.5px "Segoe UI", system-ui, sans-serif; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.buttons button:hover { border-color: var(--accent); }
.buttons button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.timeline { list-style: none; padding: 0; margin: 16px 0; max-width: none; border-left: 3px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 22px; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.timeline li.ai::before { border-color: var(--orange); }
.timeline time { display: block; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.timeline b { font-size: 16.5px; }
.timeline span { display: block; font-size: 15.5px; max-width: 70ch; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 10px 0 0; max-width: none; }
.steps li { counter-increment: s; position: relative; padding-left: 38px; margin: 0 0 10px; font-size: 15.5px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 13px/26px Georgia, serif; text-align: center; }
.layer { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-right: 4px; white-space: nowrap; }
.layer.p { background: var(--fill-a); color: var(--accent); }
.layer.c { background: var(--fill-o); color: var(--orange); }
.layer.s { background: var(--fill-b); color: var(--blue); }
.coming { background: var(--surface); border: 1px dashed var(--ink-2); border-radius: 10px; padding: 26px 22px; margin: 26px 0; max-width: 72ch; color: var(--ink-2); }
.coming b { color: var(--ink); }
.next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; font-weight: 600; }
.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 22px 0 6px; }
.photos figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.photos img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
.photos.tall img, .robot > img.tall { aspect-ratio: 3 / 4; object-position: center top; }
.photos figcaption { margin: 0; padding: 9px 12px 11px; }
.photos figcaption b { display: block; color: var(--ink); font-size: 15.5px; }
.credit { display: block; font-size: 12px; margin-top: 4px; }
.credit a { color: var(--ink-2); }
.robot { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 16px 0; }
.robot > img, .robot > .nophoto { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--soft); }
.robot .nophoto { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--ink-2); font-size: 14px; padding: 12px; border: 1px dashed var(--line); }
.robot h3 { margin: 0 0 2px; font-size: 21px; font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif; }
.robot .maker { color: var(--ink-2); font-size: 14.5px; margin: 0 0 10px; }
.robot dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 15.5px; }
.robot dt { font-weight: 700; }
.robot dd { margin: 0; }
.lic { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; white-space: nowrap; margin-right: 4px; }
.lic.open { background: var(--fill-g); color: var(--green); }
.lic.closed { background: var(--fill-o); color: var(--orange); }
.lic.mixed { background: var(--fill-b); color: var(--blue); }
@media (max-width: 860px) { .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .robot { grid-template-columns: minmax(0, 1fr); } .robot > img, .robot > .nophoto { max-width: 420px; } }
@media (max-width: 520px) { .robot dl { grid-template-columns: minmax(0, 1fr); } .robot dd { margin-bottom: 6px; } }
footer { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 13px; color: var(--ink-2); font-size: 14px; }
@media (max-width: 1100px) { .brand { display: none; } nav.menu { margin-left: 0; } nav.menu a { padding-left: 9px; padding-right: 9px; } }
@media (max-width: 860px) { .three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cols, .two, .three { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .brand { display: none; }
  nav.menu { margin-left: 0; }
  .intro { padding-top: 32px; }
}

/* formulas */
.eq { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; padding: 10px 14px; margin: 10px 0 14px; max-width: 760px; overflow-x: auto; white-space: pre; font: 14px/1.6 Consolas, "Cascadia Mono", Menlo, monospace; }
.steps .eq { margin-top: 8px; }
code { font: 0.92em Consolas, "Cascadia Mono", Menlo, monospace; background: var(--soft); padding: 1px 4px; border-radius: 4px; }
.topbar-inner, .subnav-inner { scrollbar-width: thin; }

/* results page: photo grids with fewer columns */
.photos.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photos.c3 img, .photos.d3 img { aspect-ratio: 3 / 2; }
@media (max-width: 760px) { .photos.c3 { grid-template-columns: minmax(0, 1fr); } }
