/* ADAM Lab@PNU — GitHub Pages shell */
:root {
  --ground: #f4f6fb;
  --sheet: #ffffff;
  --grid: #f0f2f7;
  --line: #d8dde8;
  --line-soft: #e9ecf3;
  --navy: #102b86;
  --blue: #0707aa;
  --ink: #161a2b;
  --ink-dim: #5a6378;
  --ink-faint: #9aa3b5;
  --accent: #ff9900;
  --accent-deep: #d97e00;
  --band: #102b86;
  --font-display: "Chakra Petch", "Noto Sans KR", system-ui, sans-serif;
  --font-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --max: 1185px;
  --nav-h: 68px;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(16, 43, 134, 0.07), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(255, 153, 0, 0.08), transparent 55%),
    linear-gradient(180deg, #eef1f8 0%, var(--ground) 280px, #f7f8fc 100%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Korean: keep syllables together; English: break at words */
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 8px 12px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: var(--blue); }
.brand__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
}
.brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.brand__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
}
.brand__sub {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-dim);
  line-height: 1.25;
  white-space: normal;
  max-width: 28ch;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a, .search-toggle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav a:hover, .search-toggle:hover {
  background: var(--grid);
  color: var(--navy);
}
.nav a[aria-current="page"] {
  color: var(--navy);
  background: rgba(16, 43, 134, 0.08);
}
.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}


/* Photos band: Instagram sits immediately beside the h2 title */
.band__inner--with-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.band__inner--with-action h2 { margin: 0; }
.band-ig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: background 0.2s var(--ease);
}
.band-ig:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
}

@media (max-width: 900px) {
  .brand__sub { display: none; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 12px;
    margin: 0;
  }
  .site-header.is-open .nav { display: flex; }
}

/* ---------- Layout ---------- */
main { display: block; }

.hero-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 12px 0;
}

.hero-frame {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.hero-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.band {
  background: var(--band);
  color: #fff;
  margin: 28px 0 0;
}
.band__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 16px;
}
.band h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  letter-spacing: 0.02em;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 12px 8px;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 4px 12px;
  flex-wrap: wrap;
}
.section__head h1, .section__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: -0.02em;
}
.section__head p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.95rem;
}

.page-kicker {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 16px 0;
}
.page-kicker .label {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent-deep);
  text-transform: uppercase;
}
.page-kicker h1 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #1f2430;
  letter-spacing: -0.03em;
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 14px 0 0;
}
.team-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.team-links a:hover {
  border-bottom-color: var(--accent);
  color: var(--blue);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

/* Home Research Pillars — Sites-like 50:50 split: carousel | A·I·D cards */
.pillars-split {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}
.pillars-visual {
  overflow: hidden;
  display: flex;
  min-height: 0;
}
.pillars-visual .carousel {
  flex: 1 1 auto;
  width: 100%;
  min-height: 280px;
  aspect-ratio: 1 / 1;
  border: 0;
  max-height: none;
}
.pillars-aid {
  padding: 10px 12px 12px;
  min-width: 0;
}
.pillars-aid .sx-cards.sx-aid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px;
}
.pillars-aid .sx-card--aid {
  padding: 12px 14px;
}
.pillars-aid .sx-aid-letter {
  width: 30px;
  height: 30px;
  font-size: 1rem;
}
@media (max-width: 820px) {
  .pillars-split { grid-template-columns: 1fr; }
  .pillars-visual .carousel {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}

/* Search deep-link highlight */
.is-search-hit {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.22);
  transition: outline-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* ---------- Panels (hover glow only) ---------- */
.panel {
  position: relative;
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  overflow: visible;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.panel:hover {
  border-color: #c5cee6;
  box-shadow: 0 0 0 1px rgba(16, 43, 134, 0.06), 0 12px 32px rgba(16, 43, 134, 0.1);
}
.panel .ax-root,
.panel .adam-sheet { max-width: 100%; }

/* ---------- Carousel ---------- */
.carousel {
  position: relative;
  aspect-ratio: 1.25 / 1;
  background: #fff;
  overflow: hidden;
  border: 1px solid var(--line);
}
.carousel__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
  /* fallback if a slide still uses background-image */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.carousel__slide.is-active { opacity: 1; }
.carousel__slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}
.carousel__dots {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.carousel__dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(16, 43, 134, 0.25);
  padding: 0;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.carousel__dots button[aria-current="true"] {
  background: var(--accent);
}
/* Board album carousel nav pattern (gl-carousel-nav) — Home Pillars only */
.carousel__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.55); border-radius: 999px;
  background: rgba(16, 26, 43, 0.42); color: #fff; cursor: pointer;
  opacity: 0; transition: opacity 0.18s var(--ease), background 0.18s var(--ease);
  padding: 0;
}
.carousel:hover .carousel__nav,
.carousel:focus-within .carousel__nav { opacity: 1; }
.carousel__prev { left: 8px; }
.carousel__next { right: 8px; }
.carousel__nav:hover { background: rgba(16, 26, 43, 0.7); }

/* ---------- Allowed motion: (1) scroll fade-up (2) card hover glow (3) slide crossfade ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .carousel__slide { transition: none; }
  .panel { transition: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: #eef4fa;
}
.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 16px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}
.footer-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.95;
  transition: opacity 0.2s var(--ease);
}
.footer-logo:hover { opacity: 1; }
.footer-logo img {
  display: block;
  height: auto;
  max-height: 64px;
  width: auto;
  max-width: min(320px, 78vw);
  object-fit: contain;
}
.footer-logo:last-child img {
  max-height: 76px;
  max-width: min(140px, 40vw);
}
.copyright {
  margin: 0;
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 52ch;
}

/* ---------- Site search ---------- */
.site-search {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(16, 26, 43, 0.35);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 24px;
  backdrop-filter: blur(2px);
}
.site-search[hidden] { display: none !important; }
.site-search__panel {
  width: min(560px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(16, 43, 134, 0.18);
  overflow: hidden;
}
.site-search__form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.site-search__input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 1.05rem;
  padding: 8px 6px;
  color: var(--ink);
  background: transparent;
}
.site-search__close {
  border: 0;
  background: var(--grid);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-dim);
}
.site-search__close:hover { color: var(--navy); }
.site-search__results {
  max-height: min(50vh, 420px);
  overflow: auto;
  padding: 8px;
}
.site-search__hit {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s var(--ease);
}
.site-search__hit:hover { background: var(--grid); }
.site-search__kind {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 2px;
}
.site-search__hit strong {
  display: block;
  font-family: var(--font-display);
  color: var(--navy);
  margin-bottom: 2px;
}
.site-search__blurb {
  display: block;
  font-size: 0.86rem;
  color: var(--ink-dim);
}
.site-search__empty {
  margin: 12px;
  color: var(--ink-dim);
  font-size: 0.92rem;
}
body.search-open { overflow: hidden; }

/* orange bar above tab page titles (matches home .mk-cp .bar) */
.page-kicker .kicker-bar{display:block;width:44px;height:4px;background:#2f6bff;margin-bottom:14px}
.page-kicker .kicker-bar + h1{margin-top:0}
.page-kicker .kicker-bar + h1{line-height:1.1;font-size:40px}
@media (max-width:640px){.page-kicker .kicker-bar{margin-bottom:10px}.page-kicker .kicker-bar + h1{font-size:28px}}
