/* ==========================================================================
   HRI Lab: site styles
   Colors, fonts, and widths are defined once here. Change a value below and
   every page follows. Main and accent colors are PNU's official colors.
   ========================================================================== */

:root {
  --blue: #005BAA;          /* PNU main color: links, buttons, headings accents */
  --blue-dark: #004282;
  --blue-tint: #E8F0F9;
  --accent: #00A651;        /* PNU sub color: highlights and animation */
  --accent-dark: #00773A;   /* accent for small text on light backgrounds */
  --accent-tint: #E5F6EC;
  --ink: #0F2540;           /* headings */
  --text: #28364A;          /* body text */
  --muted: #5B6B7D;         /* secondary text */
  --line: #E3E8EE;          /* hairlines */
  --line-strong: #CCD5DF;
  --bg: #FFFFFF;
  --bg-soft: #F9FAFC;
  --dot: #D2D9E2;           /* dot grid in the intro and page headers */
  --footer: #004282;        /* footer background (PNU dark blue) */
  --amber: #E39B00;         /* robot status in the intro: pause ... */
  --amber-dark: #8A5500;
  --amber-tint: #FFF5E0;
  --red: #D93025;           /* ... and emergency stop */
  --red-dark: #B3261E;
  --red-tint: #FDECEA;

  --radius: 12px;
  --wrap: 1120px;
  --header-h: 64px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Helvetica Neue", "Apple SD Gothic Neo",
          "Malgun Gothic", sans-serif;
}

/* Base ------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue-tint); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 8px 14px; border-radius: 8px;
  background: var(--ink); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.kicker {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Buttons, tags, chips ---------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--blue-tint);
  color: var(--blue-dark);
  font-size: 12px; font-weight: 700; line-height: 1.6;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.tag-award { background: var(--accent-tint); color: var(--accent-dark); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 600; line-height: 1.6;
  transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.chip svg { width: 11px; height: 11px; fill: currentColor; }

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }

.brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; color: var(--blue); }
.brand-sub {
  padding-left: 10px; border-left: 1px solid var(--line-strong);
  color: var(--muted); font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.site-nav a {
  position: relative;
  padding: 8px 14px; border-radius: 8px;
  color: var(--muted); font-size: 15px; font-weight: 600;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.site-nav a[aria-current] { color: var(--ink); }
.site-nav a[aria-current]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 1px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.nav-toggle { display: none; }

/* A menu item with sub-pages (Board): they drop down on hover or keyboard focus. */
.nav-group { position: relative; }
.caret {
  display: inline-block; width: 6px; height: 6px; margin: 0 1px 3px 7px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); vertical-align: middle;
}
.sub-nav {
  position: absolute; top: 100%; left: 50%; z-index: 60;
  display: none; min-width: 132px; margin-top: 6px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 37, 64, .08);
  transform: translateX(-50%);
}
.sub-nav::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-group:hover .sub-nav, .nav-group:focus-within .sub-nav { display: block; }
.site-nav .sub-nav a { display: block; padding: 8px 12px; }
.site-nav .sub-nav a[aria-current] { background: var(--accent-tint); color: var(--accent-dark); }
.site-nav .sub-nav a[aria-current]::after { display: none; }

@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; margin-left: auto; padding: 0 10px;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px 12px 14px;
    background: #fff; border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; font-size: 16px; }
  .site-nav a[aria-current]::after { left: 12px; right: auto; width: 22px; bottom: 6px; }
  /* on phones, sub-pages are listed under their item */
  .caret { display: none; }
  .sub-nav, .nav-group:hover .sub-nav, .nav-group:focus-within .sub-nav {
    position: static; display: block; min-width: 0; margin: 0 0 4px; padding: 0 0 0 14px;
    border: 0; border-radius: 0; box-shadow: none; transform: none;
  }
  .sub-nav::before { display: none; }
  .site-nav .sub-nav a { padding: 9px 12px; font-size: 15px; }
  .site-nav .sub-nav a[aria-current] { background: none; }

  .no-js .nav-toggle { display: none; }
  .no-js .site-nav { position: static; display: flex; flex-direction: row; overflow-x: auto; padding: 0; border: 0; }
  .no-js .sub-nav { display: none; }
}
@media (max-width: 440px) { .brand-sub { display: none; } }

/* Sections and page headers ---------------------------------------------- */

.section { padding: 72px 0; }
.section-first { padding-top: 56px; }

.section-title {
  position: relative;
  margin-bottom: 32px; padding-bottom: 14px;
  font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.02em;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 36px; height: 3px; border-radius: 3px; background: var(--accent);
}
.section-title-spaced { margin-top: 88px; }
.sub-title { margin: 36px 0 12px; font-size: 17px; }

.page-head {
  padding: 64px 0 40px;
  background-color: var(--bg-soft);
  background-image: radial-gradient(circle, var(--dot) 1.1px, transparent 1.5px);
  background-size: 18px 18px;
  border-bottom: 1px solid var(--line);
}
.page-title { font-size: clamp(32px, 5vw, 46px); letter-spacing: -0.03em; line-height: 1.15; }
.page-head.has-tabs { padding-bottom: 0; }
.tabs { display: flex; gap: 28px; margin-top: 26px; }
.tabs a { position: relative; padding: 8px 0 13px; color: var(--muted); font-size: 16px; font-weight: 600; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--accent);
}

/* Home: animated intro --------------------------------------------------- */

.intro { position: relative; overflow: hidden; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.intro-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.intro-inner { position: relative; padding-top: 60px; padding-bottom: 28px; }
.intro-stage { display: grid; }

.scene {
  grid-area: 1 / 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 48px; align-items: center;
  min-height: 400px;
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.scene.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease .1s; }
@media (min-width: 801px) and (max-width: 1000px) {
  /* keep each grey description on its two lines on narrow laptops and tablets */
  .scene { grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr); gap: 32px; }
}

.scene-text { max-width: 540px; }
.scene-title {
  margin-bottom: 18px;
  font-size: clamp(30px, 3.6vw, 44px); line-height: 1.18; letter-spacing: -0.025em;
  text-wrap: balance;
}
.scene-join .scene-title { font-size: clamp(26px, 3vw, 36px); }
.scene-desc { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.scene-actions { margin: 26px 0 0; }
.scene-art { display: flex; justify-content: center; }
.scene-art .art { width: 100%; max-width: 540px; height: auto; }

/* The states a scene steps through (touch types, EMG states) */
.scene-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0 0; list-style: none; }
.scene-steps li { display: flex; align-items: center; gap: 8px; }
.scene-steps span {
  padding: 4px 13px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--muted);
  font-size: 13px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  transition: background-color .25s, border-color .25s, color .25s;
}
.scene-steps li.is-on span { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-dark); }
.scene-steps.is-sequence { flex-wrap: nowrap; gap: 6px; }
.scene-steps.is-sequence li { gap: 6px; }
.scene-steps.is-sequence span { padding: 4px 11px; font-size: 12.5px; }
.scene-steps.is-sequence li:not(:last-child)::after { content: "→"; color: var(--muted); }
@media (max-width: 420px) {
  .scene-steps.is-sequence, .scene-steps.is-sequence li { gap: 5px; }
  .scene-steps.is-sequence span { padding: 3px 9px; font-size: 12px; }
}
@media (max-width: 360px) {
  .scene-steps.is-sequence, .scene-steps.is-sequence li { gap: 4px; }
  .scene-steps.is-sequence span { padding: 3px 7px; font-size: 11px; }
}
.art-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.scene.is-active .scene-text > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.scene.is-active .scene-text > :nth-child(2) { animation-delay: .06s; }
.scene.is-active .scene-text > :nth-child(3) { animation-delay: .12s; }
.scene.is-active .scene-text > :nth-child(4) { animation-delay: .18s; }

/* Line drawings in the intro (see _includes/art/) */
.art .k { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.art .thin { stroke-width: .85; }
.art .solid { fill: #fff; }
/* The hand is drawn at different sizes; --hs (its scale) keeps its lines as thick as the rest. */
.hand-model .k { stroke-width: calc(1.4px / var(--hs, 1)); }
.hand-model .thin { stroke-width: calc(.85px / var(--hs, 1)); }
.hand-model .far { stroke-opacity: .78; stroke-width: calc(1.2px / var(--hs, 1)); }
.art .sheen { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-linecap: round; }
.hand-model .patch { stroke-width: calc(1px / var(--hs, 1)); }
.hand-model .emg-wave { fill: none; stroke: var(--accent); stroke-width: calc(1.1px / var(--hs, 1)); stroke-linejoin: round; stroke-linecap: round; }
.art .leader { fill: none; stroke: var(--line-strong); stroke-width: .8; transition: stroke .3s; }
.art .leader.on { stroke: var(--accent); }
.art .tag-l { transition: fill .3s; }
.art .tag-l.on { fill: var(--accent-dark); }
.art .you-shape { fill: var(--bg-soft); stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 3.2; stroke-linejoin: round; transition: fill .5s; }
.art .you.is-filled .you-shape { fill: var(--accent-tint); stroke-dasharray: none; }
.art .led { fill: rgb(185, 197, 211); stroke: var(--ink); stroke-width: 1; }
.art .a { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.art .af { fill: var(--accent); }
.art .label { fill: var(--muted); font-family: var(--font); font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.art .label-acc { fill: var(--accent-dark); }

.art .layer { fill: var(--blue-tint); stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.art .layer-soft { fill: var(--blue-tint); }
.art .taxel { fill: rgb(110, 128, 152); }
.art .electrode { fill: var(--blue); }
.art .current { fill: none; stroke: var(--blue); stroke-width: 1; stroke-dasharray: 2.5 3.5; opacity: .55; animation: flow 1.4s linear infinite; }
.art .current.on { stroke: var(--accent); stroke-width: 1.5; opacity: 1; animation-duration: .5s; }
.art .wave { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.art .glow { fill: var(--accent); }
.art .cap { fill: #CFDDEE; }
.art .sleeve { fill: #26374F; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.art .sleeve-line { fill: none; stroke: #fff; stroke-opacity: .16; stroke-width: 1; stroke-linecap: round; }
.art .monitor { fill: #fff; stroke: var(--line-strong); stroke-width: 1; }
.art .baseline { fill: none; stroke: var(--line); stroke-width: .8; }
.art .threshold { fill: none; stroke: var(--muted); stroke-width: .8; stroke-dasharray: 3 3; }
.art .trace { fill: none; stroke: var(--blue); stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }
.art .trace-acc { stroke: var(--accent); }
.art .cursor { fill: none; stroke: var(--accent-dark); stroke-width: .8; stroke-opacity: .5; }
.art .patch { fill: var(--blue-tint); stroke: var(--blue); stroke-width: 1; }
.art .ghost { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-dasharray: 5 4.2; }
.art .detect-line { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 2; }
.art .cup { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }
.art .water { fill: #CFE0F2; }

/* Physical HRI: the robot's reaction, shown on its status badge and base light */
.art .status-box { fill: #fff; stroke: var(--accent); stroke-width: 1; }
.art .status-icon, .art .base-led { fill: var(--accent); }
.art .base-led { stroke: var(--ink); stroke-width: .8; }
.art .status-v { fill: var(--accent-dark); }
.art[data-state="pause"] .status-box { fill: var(--amber-tint); stroke: var(--amber); }
.art[data-state="pause"] .status-icon, .art[data-state="pause"] .base-led { fill: var(--amber); }
.art[data-state="pause"] .status-v { fill: var(--amber-dark); }
.art[data-state="cup"] .status-box { fill: var(--blue-tint); stroke: var(--blue); }
.art[data-state="cup"] .status-icon, .art[data-state="cup"] .base-led { fill: var(--blue); }
.art[data-state="cup"] .status-v { fill: var(--blue); }
.art[data-state="stop"] .status-box { fill: var(--red-tint); stroke: var(--red); }
.art[data-state="stop"] .status-icon, .art[data-state="stop"] .base-led { fill: var(--red); }
.art[data-state="stop"] .status-v { fill: var(--red-dark); }

.scene.is-active .draw > path {
  stroke-dasharray: 1 2; stroke-dashoffset: 1.01;
  animation: draw 1.5s cubic-bezier(.45, 0, .2, 1) forwards;
}
.scene.is-active .draw > path:nth-child(2) { animation-delay: .08s; }
.scene.is-active .draw > path:nth-child(3) { animation-delay: .16s; }
.scene.is-active .draw > path:nth-child(4) { animation-delay: .24s; }
.scene.is-active .draw > path:nth-child(n+5) { animation-delay: .32s; }
.scene.is-active .fade { opacity: 0; animation: fade .7s ease forwards; animation-delay: var(--d, .5s); }

/* Paused: freeze every animation. Static frame (paused, or reduced motion):
   show the finished drawing without the draw-in. */
.intro.is-paused .scene * { animation-play-state: paused; }
.scene.is-static .draw > path,
.scene.is-static .fade,
.scene.is-static .scene-text > * { animation: none; opacity: 1; stroke-dasharray: none; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes flow { to { stroke-dashoffset: -12; } }

/* Chapter bar and pause button */
.intro-controls { display: flex; align-items: flex-end; gap: 16px; margin-top: 36px; }
.intro-toggle {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--ink); cursor: pointer;
  transition: border-color .2s;
}
.intro-toggle:hover { border-color: var(--ink); }
.intro-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.intro-toggle .i-play, .intro-toggle.is-paused .i-pause { display: none; }
.intro-toggle.is-paused .i-play { display: block; }

.intro-chapters {
  flex: 1; list-style: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px;
}
.intro-chapters button {
  display: block; width: 100%; padding: 0;
  border: 0; background: none; color: var(--muted);
  text-align: left; cursor: pointer;
}
.ch-label {
  display: block; padding-bottom: 8px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
}
.ch-num { color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.intro-chapters button:hover .ch-label,
.intro-chapters button[aria-current="true"] .ch-label { color: var(--ink); }
.bar { display: block; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); }
.no-js .intro-controls, .no-js .hand-model { display: none; }

@media (max-width: 800px) {
  .intro-inner { padding-top: 36px; padding-bottom: 22px; }
  .scene { grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; min-height: 0; }
  .scene-desc { font-size: 16px; letter-spacing: -0.01em; }
  .scene-steps { margin-top: 16px; }
  .scene-art .art { max-width: 360px; }
  .intro-controls { margin-top: 24px; gap: 12px; }
  .intro-chapters { gap: 6px; }
  .intro-chapters button { padding: 12px 0; }
  .ch-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* News (Home and Board) ------------------------------------------------- */

.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.section-head .section-title { margin-bottom: 0; }
.more-link { flex: none; padding-top: 8px; font-size: 15px; font-weight: 600; }

.news-list { list-style: none; border-top: 1px solid var(--line); }
.news-list li {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px;
  padding: 16px 4px; border-bottom: 1px solid var(--line);
}
.news-list time { color: var(--accent-dark); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.news-empty { margin: 0; padding: 18px 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
@media (max-width: 520px) {
  .news-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Footer ---------------------------------------------------------------- */

.site-footer { padding: 44px 0 28px; background: var(--footer); color: #D3E0EF; font-size: 14px; }
.site-footer a { color: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; }
.footer-brand { margin: 0 0 6px; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.footer-brand span { margin-left: 10px; color: #D3E0EF; font-size: 14px; font-weight: 400; letter-spacing: 0; }
.footer-meta { margin: 0; }
.footer-contact { list-style: none; display: grid; gap: 6px; }
.footer-contact span { display: inline-block; min-width: 48px; color: #A9C0DB; }
.footer-bottom {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: #A9C0DB; font-size: 13px;
}

/* Team ------------------------------------------------------------------ */

.pi { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.pi-photo img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); }
.pi-name { font-size: clamp(26px, 3vw, 32px); letter-spacing: -0.02em; }
.pi-name span { color: var(--muted); font-size: .78em; font-weight: 500; }
.pi-title { margin: 6px 0 18px; font-size: 17px; font-weight: 600; }
.contact-list { list-style: none; display: grid; gap: 4px; }
.contact-list span { display: inline-block; min-width: 56px; color: var(--muted); font-size: 14px; font-weight: 600; }

.timeline { list-style: none; border-top: 1px solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.tl-period { padding-top: 1px; color: var(--muted); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-main strong { display: block; color: var(--ink); font-weight: 700; }
.tl-main span { color: var(--muted); font-size: 15px; }

@media (max-width: 760px) {
  .pi { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pi-photo { max-width: 220px; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

.group-title { margin: 36px 0 16px; font-size: 18px; }
/* Researchers: one grid across the page; every card is as tall as the tallest */
.member-grid {
  list-style: none; display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-rows: 1fr;
}
.member {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 28px 16px 26px; border: 1px solid var(--line); border-radius: var(--radius);
  text-align: center;
}
.member-photo { width: 140px; height: 140px; margin-bottom: 14px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; }
.member-initial { display: grid; place-items: center; background: var(--blue-tint); color: var(--blue-dark); font-size: 48px; font-weight: 700; }
.member-name { color: var(--ink); font-size: 17px; font-weight: 700; }
.member-role { color: var(--muted); font-size: 14px; }
.member-email { margin-top: 2px; font-size: 14px; word-break: break-all; }
@media (max-width: 560px) {
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .member { padding: 20px 10px 18px; }
  .member-photo { width: 104px; height: 104px; margin-bottom: 10px; }
  .member-initial { font-size: 38px; }
  .member-name { font-size: 16px; }
  .member-role, .member-email { font-size: 13px; }
}
/* "Waiting for YOU": an open place at the end of the grid */
.member-open { border-style: dashed; border-color: var(--line-strong); background: var(--bg-soft); }
.member-placeholder { display: block; overflow: hidden; border: 1.5px dashed var(--accent); background: var(--accent-tint); }
.member-placeholder svg { display: block; width: 100%; height: 100%; fill: #fff; stroke: var(--accent); stroke-width: 1.6; }
.alumni-list { list-style: none; border-top: 1px solid var(--line); }
.alumni-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.alumni-list span { margin-left: 10px; color: var(--muted); }

/* Research -------------------------------------------------------------- */

.project {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start;
  padding: 48px 0; border-bottom: 1px solid var(--line);
}
.project:first-child { padding-top: 0; }
.project:last-child { border-bottom: 0; padding-bottom: 0; }
.project-media {
  display: block; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: border-color .2s;
}
.project-media:hover { border-color: var(--line-strong); }
.project-media img { width: 100%; }
.project-title { margin-bottom: 6px; font-size: clamp(21px, 2.4vw, 25px); letter-spacing: -0.02em; }
.project-period { margin: 0 0 18px; color: var(--muted); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.project-points { list-style: none; display: grid; gap: 10px; }
.project-points li { position: relative; padding-left: 20px; }
.project-points li::before {
  content: ""; position: absolute; left: 3px; top: .72em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.project-points strong {
  color: var(--ink); font-weight: 600;
  background: linear-gradient(transparent 62%, var(--accent-tint) 62%);
}
.project-links { display: grid; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.links-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.links-label { min-width: 170px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }

@media (max-width: 860px) {
  .project { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .project-media { max-width: 540px; }
  .links-label { width: 100%; min-width: 0; }
}

/* Publication ----------------------------------------------------------- */

.pub-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-jump a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink); font-size: 14px; font-weight: 600;
  transition: border-color .2s, color .2s;
}
.pub-jump a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.pub-jump span {
  min-width: 24px; padding: 0 7px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line);
  color: var(--muted); font-size: 12px; text-align: center;
}

.pub-heading { margin: 56px 0 4px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); font-size: 24px; }
.pub-list { list-style: none; }
.pub {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 20px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.pub-id { padding-top: 1px; color: var(--blue); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pub-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.pub-title { margin-bottom: 6px; font-size: 17px; line-height: 1.45; letter-spacing: -0.01em; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--blue); }
.pub-authors { margin: 0; color: var(--muted); font-size: 15px; }
.pub-authors strong { color: var(--ink); font-weight: 700; }
.pub-note { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.pub-links { display: flex; gap: 16px; margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.pub-links a::after { content: " ↗"; }

.patent-table { margin-top: 12px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.patent-table th {
  padding: 0 28px 6px 0; text-align: left;
  color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.patent-table td { padding: 7px 28px 7px 0; border-top: 1px solid var(--line); }

@media (max-width: 600px) {
  .pub { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .patent-table th, .patent-table td { padding-right: 16px; }
}

/* Video ----------------------------------------------------------------- */

.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; }
.video-card { display: flex; flex-direction: column; }
.video-thumb, .video-frame {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  border: 0; border-radius: var(--radius); overflow: hidden; background: #0D1624;
}
.video-thumb { padding: 0; cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; left: 50%; top: 50%;
  display: grid; place-items: center;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: rgba(0, 66, 130, .85);
  transition: background-color .2s;
}
.play svg { width: 28px; height: 28px; margin-left: 3px; fill: #fff; }
.video-thumb:hover .play, .video-thumb:focus-visible .play { background: var(--blue); }
.video-body { padding: 16px 2px 0; }
.video-title { margin: 10px 0 6px; font-size: 18px; line-height: 1.4; letter-spacing: -0.01em; }
.video-note { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.video-link { font-size: 14px; font-weight: 600; }
@media (max-width: 760px) { .video-grid { grid-template-columns: minmax(0, 1fr); } }

/* Reduced motion: no draw-in, fades, or rotation (intro.js shows still frames) */

@media (prefers-reduced-motion: reduce) {
  .scene, .scene.is-active { transition: none; }
  .scene.is-active .scene-text > *,
  .scene.is-active .fade { animation: none; opacity: 1; }
  .scene.is-active .draw > path { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
  .art .current { animation: none; }
}
