/* Roni Permana Saputra — personal academic site */
:root {
  --bg: #ffffff;
  --ink: #222831;
  --text: #3d4551;
  --muted: #6b7480;
  --line: #e6e8eb;
  --accent: #1f6f8b;
  --accent-strong: #154f63;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14181d; --ink: #eef0f3; --text: #c6ccd4; --muted: #939ba6; --line: #2a313a; --accent: #7cc0d8; --accent-strong: #a5d6e8; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg); }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; cursor: pointer; }
p { margin: 0 0 1em; }
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.3; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 8px 16px; background: var(--bg); z-index: 30; }
.skip-link:focus { top: 12px; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; gap: 8px 32px; min-height: 56px; flex-wrap: wrap; }
.site-name { font-weight: 700; font-size: 1rem; color: var(--ink); }
.site-name:hover { color: var(--ink); }
nav { display: flex; gap: 24px; }
nav a { padding: 16px 0; font-size: .95rem; color: var(--muted); }
nav a:hover { color: var(--ink); text-decoration: none; }
nav a[aria-current] { color: var(--ink); font-weight: 600; }
.menu-toggle { display: none; margin-left: auto; padding: 5px 12px; border: 1px solid var(--line); border-radius: 4px; background: none; color: var(--ink); font-size: .9rem; }

.banner { display: block; width: 100%; height: clamp(140px, 24vw, 270px); object-fit: cover; object-position: center 12%; margin-top: 24px; border-radius: 6px; }
.banner + * { }

/* Layout */
.layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; padding-top: 40px; padding-bottom: 64px; align-items: start; }
main { max-width: 720px; }

/* Sidebar */
.sidebar { font-size: .9rem; }
.portrait { display: block; width: 190px; height: 190px; object-fit: cover; object-position: center; border-radius: 50%; border: 1px solid var(--line); }
.who .name { margin: 16px 0 4px; font-size: 1.1rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.who .role { margin: 0; color: var(--muted); line-height: 1.5; }
.side-links { list-style: none; margin: 16px 0 0; padding: 0; }
.side-links li { display: flex; align-items: center; gap: 9px; padding: 3px 0; color: var(--text); }
.side-links a { color: var(--text); }
.side-links a:hover { color: var(--accent); }
.side-links svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--muted); }

/* Content */
h1 { font-size: 1.8rem; margin-bottom: 20px; }
h2 { font-size: 1.25rem; margin: 32px 0 10px; }
h3 { font-size: 1rem; }
.intro { font-size: 1.15rem; line-height: 1.55; color: var(--ink); margin-bottom: 1.1em; }
.prose h3 { margin: 22px 0 6px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.plain-list strong { font-weight: 400; color: var(--ink); }
.areas .plain-list, .areas-list { list-style: none; padding-left: 0; }
.areas .plain-list li { padding: 5px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .94rem; }
.areas .plain-list li:first-child { border-top: 0; }
.areas .plain-list strong { display: block; font-size: 1rem; }
.two-col { columns: 2; column-gap: 32px; }
.two-col li { break-inside: avoid; }
@media (max-width: 560px) { .two-col { columns: 1; } }
.team { columns: 2; column-gap: 32px; }
.team li { break-inside: avoid; }
@media (max-width: 760px) { .team { columns: 1; } }
.areas > h2:first-child { margin-top: 0; }
.areas + .entry { margin-top: 4px; padding-top: 12px; border-top: 0; }
.robots { margin: 14px 0 18px; }
.robot { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 24px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.robot:first-child { border-top: 0; padding-top: 4px; }
.robot img { background: #fff; display: block; width: 168px; height: 168px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.robot .ph { width: 168px; height: 168px; border-radius: 50%; border: 1px dashed var(--line); background: color-mix(in srgb, var(--line) 35%, transparent); }
.robot h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.robot p { margin: 0; font-size: .95rem; }
@media (max-width: 560px) { .robot { grid-template-columns: 108px minmax(0, 1fr); gap: 14px; } .robot img, .robot .ph { width: 108px; height: 108px; } }
.lab-logo { display: block; width: 100%; max-width: 220px; height: auto; margin: 4px 0 14px -8px; background: #fff; border-radius: 6px; }
.figure { margin: 20px 0 8px; }
.figure img { display: block; width: 100%; max-width: 360px; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.figure figcaption { margin-top: 6px; font-size: .88rem; color: var(--muted); }
.page-head { margin-bottom: 20px; }
.page-head .lead { color: var(--muted); margin-bottom: 0; }
.page-head h1 { margin-bottom: 10px; }
.eyebrow { display: none; }
.plain-list { margin: 0 0 1em; padding-left: 1.2em; }
.plain-list li { padding: 1px 0; }
.note { font-size: .9rem; color: var(--muted); }
.section > div > :last-child, .prose > :last-child { margin-bottom: 0; }

/* Research */
.entry { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.entry .num { display: none; }
.entry .meta { margin: 0 0 4px; font-size: .78rem; color: var(--muted); }
.entry .meta br { display: none; }
.entry h2 { margin: 0 0 10px; }
.entry-links { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: .9rem; }

.group-head { margin: 44px 0 0; padding-bottom: 8px; border-bottom: 2px solid var(--ink); font-size: 1.25rem; }
.group-head + .entry { margin-top: 0; padding-top: 22px; border-top: 0; }
.entry h3 { margin: 0 0 10px; font-size: 1.12rem; }
.entry .funding { font-size: .88rem; color: var(--muted); margin-bottom: .6em; }
.entry .funding span { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; margin-right: 6px; }

/* Publications */
.pub-year { margin-top: 28px; }
.year-heading { margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.publication { margin-bottom: 20px; }
.publication .kind { display: none; }
.publication h3 { margin-bottom: 2px; font-weight: 600; }
.publication h3 a { color: var(--ink); }
.publication h3 a:hover { color: var(--accent); }
.publication p { margin: 0; font-size: .92rem; }
.publication strong { color: var(--ink); }
.publication .venue { font-style: italic; color: var(--muted); }
.publication .entry-links { margin-top: 2px; font-size: .88rem; }

/* CV */
.print-button { margin-top: 14px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 4px; background: none; color: var(--ink); font-size: .88rem; }
.print-button:hover { border-color: var(--accent); color: var(--accent); }
.cv-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 8px 0; }
.cv-row .period { font-size: .88rem; color: var(--muted); padding-top: 2px; }
.cv-row h3 { margin-bottom: 1px; }
.cv-row p { margin: 0; font-size: .93rem; }
.cv-row p + p { color: var(--muted); }
.cv-sub { margin: 14px 0 4px; font-size: .95rem; font-weight: 600; }
.cv-sub:first-child { margin-top: 0; }
.cv-pubs { margin: 0; padding-left: 1.5em; font-size: .92rem; }
.cv-pubs li { padding: 3px 0; }
.cv-pubs strong { color: var(--ink); }

footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; padding-top: 20px; padding-bottom: 24px; color: var(--muted); font-size: .85rem; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-links a { white-space: nowrap; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; padding-bottom: 40px; }
  .sidebar { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 4px 16px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .portrait { width: 84px; height: 84px; }
  .who .name { margin-top: 0; }
  .side-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 10px; }
  .side-links li { min-height: 36px; }
  .menu-toggle { display: block; }
  nav { width: 100%; flex-direction: column; gap: 0; padding-bottom: 8px; }
  nav a { padding: 10px 0; border-top: 1px solid var(--line); }
  .js nav:not(.is-open) { display: none; }
  .cv-row { grid-template-columns: 1fr; gap: 0; }
  h1 { font-size: 1.6rem; }
}
@media print {
  :root { --bg: #fff; --ink: #000; --text: #111; --muted: #444; --line: #ccc; --accent: #154f63; }
  body { font-size: 10.5pt; }
  .masthead, .sidebar, footer, .print-button, .skip-link { display: none !important; }
  .layout { display: block; padding: 0; }
  .wrap, main { max-width: none; padding: 0; }
  .cv-row, .publication, .entry { break-inside: avoid; }
}

.video { margin: 16px 0; max-width: 640px; }
.video-facade, .video iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 6px; overflow: hidden; background: #000; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-facade .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px; border-radius: 10px; background: rgba(0,0,0,.7); transition: background .15s; }
.video-facade .play::after { content: ""; position: absolute; left: 26px; top: 13px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.video-facade:hover .play, .video-facade:focus-visible .play { background: #c00; }
.video figcaption { margin-top: 6px; font-size: .88rem; color: var(--muted); }

.sup-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.sup-card { padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.sup-card .sup-label { margin: 0 0 2px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.sup-card h3 { margin: 0 0 4px; font-size: 1.02rem; line-height: 1.4; color: var(--ink); }
.sup-card p { margin: 0; color: var(--text); }
.section .sup-list { margin-top: 12px; }
.proj-grid { list-style: none; margin: 16px 0 32px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.proj-card { display: flex; flex-direction: column; gap: 3px; height: 100%; box-sizing: border-box; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 1px 3px rgba(0,0,0,.05); color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.proj-card:hover, .proj-card:focus-visible { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.proj-card .sup-label { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.proj-title { font-weight: 600; color: var(--ink); line-height: 1.35; }
.proj-text { font-size: .92rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 640px) { .proj-grid { grid-template-columns: 1fr; } }
.entry { scroll-margin-top: 16px; }
.proj-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0 16px; }
.proj-more { margin-top: auto; padding-top: 8px; font-size: .85rem; color: var(--accent); }
@media (max-width: 760px) { .proj-grid.three { grid-template-columns: 1fr; } }
.areas-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0 8px; }
.area-card { padding: 14px 18px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.area-card.wide { grid-column: 1 / -1; }
.area-card h3.sup-label { margin: 0 0 4px; font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.area-card .plain-list { margin: 0; }
.area-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.area-cols li:nth-child(2) { border-top: 0; }
@media (max-width: 640px) { .areas-grid, .area-cols { grid-template-columns: 1fr; } .area-cols li:nth-child(2) { border-top: 1px solid var(--line); } }
