/* ==========================================================================
   Large-scale AI Research Center @ KISTI — site styles
   ========================================================================== */

:root {
  --navy: #0b2447;
  --navy-2: #123a6b;
  --blue: #1c6dd0;
  --kisti-blue: #0072bc;
  --blue-light: #e8f1fc;
  --accent: #00b3a4;
  --text: #24292f;
  --text-muted: #57606a;
  --border: #e4e8ee;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --radius: 12px;
  --maxw: 1080px;
  --shadow: 0 2px 12px rgba(11, 36, 71, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Noto Sans KR", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; display: block; }

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--navy);
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
}
.brand:hover { text-decoration: none; }

.brand img {
  height: 40px;
  width: auto;
  flex-shrink: 0;
}

.brand-text { border-left: 1px solid var(--border); padding-left: 14px; }
.brand-name { font-size: 15px; display: block; }
.brand-sub {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--blue-light);
  color: var(--blue);
  text-decoration: none;
}
.site-nav a.active {
  color: var(--blue);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy);
  font-size: 24px;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(0, 179, 164, 0.25), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(28, 109, 208, 0.35), transparent 60%),
    linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 96px 0 88px;
}

.hero-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9fd8d2;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.5px;
  max-width: 760px;
}

.hero p.lead {
  margin-top: 22px;
  font-size: 18px;
  color: #c9d6e8;
  max-width: 660px;
}

.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #04302c; }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(0, 179, 164, 0.4); }

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }

.section-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.section h2 {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.3px;
  margin-bottom: 16px;
}

.section .section-intro {
  max-width: 720px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* About split layout (text + mascot) */
.about-split {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  align-items: center;
}
.about-split .mascot {
  max-width: 240px;
  margin: 0 auto;
}
.about-split p + p { margin-top: 14px; }

/* Page hero (interior pages) */
.page-hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 56px 0;
}
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.page-hero p { margin-top: 10px; color: #c9d6e8; max-width: 660px; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 22px;
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) {
  .card-grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(11, 36, 71, 0.12); }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 22px;
}

.card h3 { font-size: 18px; color: var(--navy); margin-bottom: 10px; }
.card p { font-size: 14.5px; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   News list
   -------------------------------------------------------------------------- */

.news-list { list-style: none; }
/* Direct-child selectors only: a news body may contain its own nested <ul>,
   which must not inherit the flex row / divider styling of an entry. */
.news-list > li {
  display: flex;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.news-list > li:last-child { border-bottom: none; }
.news-list time {
  flex-shrink: 0;
  width: 110px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

/* News page: headline plus body text */
.news-body h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.news-body p { color: var(--text-muted); font-size: 14.5px; }
/* The global reset strips margins, so space siblings explicitly. */
.news-body > * + * { margin-top: 12px; }
.news-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 20px;
}
.news-body ul {
  margin-left: 18px;
  color: var(--text-muted);
  font-size: 14.5px;
}
.news-body ul li { margin-bottom: 8px; }
.news-body ul li:last-child { margin-bottom: 0; }
.news-body ul strong { color: var(--navy); }

/* Photo pair inside a news entry */
.news-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.news-figures img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Home page: headline-only list, no links — "All news" carries the click */
.news-titles span { font-weight: 600; color: var(--navy); }

/* Entries keep an id so a single item can be linked directly. Such a link
   must clear the sticky 73px header, and the target gets highlighted. */
.news-list > li[id] { scroll-margin-top: 92px; }
.news-list > li:target h3 { color: var(--blue); }

/* --------------------------------------------------------------------------
   People
   -------------------------------------------------------------------------- */

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.person {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.person .name { font-weight: 700; color: var(--navy); font-size: 16.5px; }
.person .name a { color: inherit; }
.person .name a:hover { text-decoration: underline; }
.person .role { font-size: 13.5px; color: var(--blue); margin-top: 2px; font-weight: 600; }
.person .interest { font-size: 13.5px; color: var(--text-muted); margin-top: 10px; }
.person .links { margin-top: 10px; font-size: 13.5px; }

.person.lead-card { border-top: 4px solid var(--kisti-blue); }

.group-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--navy);
  margin: 48px 0 22px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-light);
}
.group-title:first-of-type { margin-top: 0; }

/* --------------------------------------------------------------------------
   Publications
   -------------------------------------------------------------------------- */

.pub-year {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin: 44px 0 8px;
}
.pub-year:first-of-type { margin-top: 0; }

/* Year subsection nested under a .group-title section */
.year-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue);
  margin: 30px 0 4px;
}
.year-title:first-of-type { margin-top: 0; }

.pub-list { list-style: none; }
.pub-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.pub-title { font-weight: 600; color: var(--text); font-size: 16px; }
/* [J1] / [C1] reference tag: J = journal, C = conference, numbered oldest
   first so an entry keeps its label as newer papers are added on top. */
.pub-label {
  display: inline-block;
  min-width: 42px;
  margin-right: 8px;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.pub-authors { font-size: 14.5px; color: var(--text-muted); margin-top: 4px; }
.pub-venue { font-size: 14px; color: var(--blue); font-style: italic; margin-top: 2px; }
.pub-links { margin-top: 8px; font-size: 13.5px; }
.pub-links a {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 500;
}
.pub-links a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

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

.research-block {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
}
.research-block:last-child { border-bottom: none; }

.research-block .icon {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.research-block .icon .icon-img {
  width: 68%;
  height: 68%;
  object-fit: contain;
}
.research-block h3 { font-size: 20px; color: var(--navy); margin-bottom: 8px; }
.research-block h3 a { color: inherit; }
.research-block p { color: var(--text-muted); max-width: 760px; }
.research-block ul {
  margin: 12px 0 0 18px;
  color: var(--text-muted);
  font-size: 14.5px;
}
.research-block li { margin-bottom: 4px; }

.video-link { margin-top: 14px; font-size: 14px; font-weight: 600; }
.video-link a { color: var(--blue); }

/* "All news →" style link at the end of a section */
.more-link { margin-top: 20px; font-size: 14.5px; font-weight: 600; }

/* Embedded video (YouTube iframe) — spans the content column, so it lines up
   with the section rules and the news list below it. */
.video-embed,
.video-caption {
  width: 100%;
  max-width: 960px;
}

.video-embed {
  aspect-ratio: 16 / 9;
  margin-top: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}
.video-embed iframe { display: block; width: 100%; height: 100%; border: 0; }

.video-caption {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--text-muted);
}

/* Model links (Hugging Face etc.) */
.model-links { margin-top: 14px; }
.model-links a {
  display: inline-block;
  margin: 4px 8px 4px 0;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.model-links a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

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

.site-footer {
  background: var(--navy);
  color: #b9c6d9;
  padding: 56px 0 36px;
  font-size: 14.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.site-footer h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 14px;
}
.site-footer a { color: #b9c6d9; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }

.footer-contact { margin-top: 12px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  font-size: 13px;
  color: #8fa0b8;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: none;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 12px 20px; }
  .site-nav a { padding: 12px 10px; }

  .brand-sub { display: none; }

  .about-split { grid-template-columns: 1fr; }
  .about-split .mascot { max-width: 180px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .research-block { grid-template-columns: 1fr; }
  .news-list > li { flex-direction: column; gap: 4px; }
  .news-figures { grid-template-columns: 1fr; }
}
