/* 정보보안SW융합전공 — site.css
   밝은 종이 바탕 + 네이비 잉크 + 형광펜 노랑(논문·수상 전용) */

:root {
  --paper: #fbfcfe;
  --surface: #ffffff;
  --tint: #eef2f8;
  --rule: #dce2ea;
  --rule-strong: #c3ccd8;
  --text: #1e2633;
  --muted: #5c6778;
  --navy: #1a2a6c;
  --navy-hover: #2b40a0;
  --mark: #ffe066;
  --mark-deep: #f2c200;

  --font: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;   /* 17px */
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 2rem;
  --step-4: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);

  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 4px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { color: var(--navy); line-height: 1.3; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: var(--step-3); font-weight: 700; }
h2 { font-size: var(--step-2); font-weight: 600; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--navy-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--navy-hover); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--surface); padding: 6px 12px; z-index: 10; }

/* ------------------------------------------------------------ header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.25; padding-block: 12px; }
.brand-ko { font-weight: 700; font-size: 1.125rem; color: var(--navy); letter-spacing: -0.02em; }
.brand-sub { font-size: var(--step--1); color: var(--muted); }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; }
.nav a {
  display: block; padding: 8px 12px; text-decoration: none; color: var(--text);
  font-size: 0.9375rem; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--navy); border-bottom-color: var(--rule-strong); }
.nav a[aria-current='page'] { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: block; margin-left: auto; font: inherit; font-size: 0.9375rem;
    background: none; border: 1px solid var(--rule-strong); border-radius: var(--radius);
    padding: 6px 14px; color: var(--navy); cursor: pointer;
  }
  .nav { display: none; width: 100%; margin: 0; }
  .nav-open .nav { display: block; }
  .nav ul { flex-direction: column; padding-bottom: 12px; }
  .nav a { border-bottom: 0; border-left: 2px solid transparent; }
  .nav a[aria-current='page'] { border-left-color: var(--navy); }
}

/* ------------------------------------------------------------ main / footer */
main { padding-block: 48px 80px; min-height: 60vh; }
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); color: var(--muted); font-size: var(--step--1); }
.footer-inner { padding-block: 28px; display: grid; gap: 4px; }
.footer-inner strong { color: var(--navy); margin-right: 6px; }

.page-head { margin-bottom: 40px; max-width: 72ch; }
.page-head p { color: var(--muted); margin-top: 10px; }
.section { margin-top: 56px; }
.section > h2 { margin-bottom: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.more { font-size: 0.9375rem; }
.muted { color: var(--muted); }

.notice {
  border: 1px solid var(--mark-deep); background: #fff8d6; padding: 16px 20px;
  border-radius: var(--radius); margin-bottom: 32px;
}
.notice ul { list-style: disc; padding-left: 1.2em; margin: 8px 0; }
code { font-size: 0.9em; background: var(--tint); padding: 1px 5px; border-radius: 3px; }

/* ------------------------------------------------------------ home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; }
.hero h1 { font-size: var(--step-4); letter-spacing: -0.035em; line-height: 1.12; }
.hero .en { color: var(--muted); font-size: var(--step-1); margin-top: 8px; letter-spacing: -0.01em; }
.hero .lead { margin-top: 24px; max-width: 34em; }

.archive { margin: 0; }
.archive-cols { display: flex; align-items: flex-end; gap: 6px; min-height: 230px; }
.archive-col {
  display: flex; flex-direction: column-reverse; align-items: center; gap: 3px;
  text-decoration: none; color: var(--muted); padding: 4px 2px 0; border-radius: var(--radius);
}
.archive-col:hover { background: var(--tint); color: var(--navy); }
.archive-year { font-size: 0.75rem; margin-top: 6px; line-height: 1; padding-bottom: 4px; }
.cell { width: 16px; height: 16px; border-radius: 2px; background: var(--navy); }
.cell-paper { background: var(--mark); box-shadow: inset 0 0 0 1px var(--mark-deep); }
.cell-award { background: var(--mark); box-shadow: inset 0 0 0 1px var(--mark-deep); position: relative; }
.cell-award::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--navy); }
.archive figcaption { margin-top: 14px; font-size: var(--step--1); color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend .cell { width: 12px; height: 12px; }
.legend .cell-award::after { inset: 3.5px; }

.totals {
  display: grid; grid-template-columns: repeat(5, 1fr); margin: 56px 0 0;
  border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule);
}
.totals div { padding: 18px 16px 18px 0; }
.totals div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.totals dt { font-size: var(--step--1); color: var(--muted); }
.totals dd { margin: 2px 0 0; font-size: var(--step-2); font-weight: 600; color: var(--navy); letter-spacing: -0.02em; }
.totals dd small { font-size: var(--step-0); font-weight: 400; margin-left: 2px; color: var(--text); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .archive-cols { gap: 3px; min-height: 0; }
  .archive-col { flex: 1; }
  .cell { width: 100%; max-width: 16px; height: auto; aspect-ratio: 1; }
  .totals { grid-template-columns: repeat(2, 1fr); }
  .totals div, .totals div + div { padding: 14px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .totals div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
  .totals div:first-child, .totals div:nth-child(2) { border-top: 0; }
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { border: 1px solid var(--rule-strong); border-radius: 999px; padding: 4px 14px; font-size: 0.9375rem; background: var(--surface); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 0; } }

/* ------------------------------------------------------------ rows: projects & papers */
.rows > li { padding: 16px 0; border-top: 1px solid var(--rule); }
.rows > li:last-child { border-bottom: 1px solid var(--rule); }

.project-title, .paper-title { font-weight: 600; line-height: 1.5; }
.project-title a, .paper-title a { text-decoration: none; color: var(--text); background-image: linear-gradient(var(--rule-strong), var(--rule-strong)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; }
.project-title a:hover, .paper-title a:hover { color: var(--navy); background-image: linear-gradient(var(--navy), var(--navy)); }
.project-members, .paper-authors { color: var(--muted); font-size: 0.9375rem; margin-top: 4px; }
.project-links, .paper-extra { font-size: 0.9375rem; margin-top: 6px; display: flex; gap: 16px; flex-wrap: wrap; }
.paper-venue { font-size: 0.9375rem; margin-top: 4px; }
.au-prof { color: var(--muted); opacity: 0.85; }
.paper-authors .au { color: var(--text); }

.kind { display: inline-block; font-size: 0.8125rem; padding: 0 8px; margin-right: 6px; border-radius: var(--radius); border: 1px solid var(--rule-strong); color: var(--muted); line-height: 1.6; }
.kind-journal { border-color: var(--navy); color: var(--navy); }

mark.award {
  background: linear-gradient(transparent 12%, var(--mark) 12%, var(--mark) 88%, transparent 88%);
  color: var(--text); font-weight: 600; font-size: 0.875rem; padding: 0 6px; margin-left: 6px; white-space: nowrap;
}

/* ------------------------------------------------------------ projects page */
.year-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 40px; border-bottom: 1px solid var(--rule); }
.year-tabs a {
  padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.year-tabs a:hover { color: var(--navy); }
.year-tabs a[aria-current='page'] { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }

.year-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.year-head h1 small { display: block; font-size: var(--step-0); font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: 0.9375rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 860px) { .year-head { grid-template-columns: 1fr; } }

.sem-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sem-head span { color: var(--muted); font-size: 0.9375rem; }
.name-list { color: var(--text); }

/* ------------------------------------------------------------ papers page */
.filters {
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end;
  padding: 20px 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule);
}
.field { display: grid; gap: 4px; font-size: var(--step--1); color: var(--muted); }
.field input[type='search'], .field select {
  font: inherit; font-size: 0.9375rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 7px 10px; min-width: 9em;
}
.field input[type='search'] { min-width: min(18em, 80vw); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; color: var(--text); padding-bottom: 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.result-count { margin: 16px 0 0; color: var(--muted); font-size: 0.9375rem; }
.year-group { margin-top: 36px; }
.year-group h2 { font-size: var(--step-1); display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.year-group h2 span { font-size: 0.9375rem; color: var(--muted); font-weight: 400; }
.empty { padding: 40px 0; color: var(--muted); }

.bars { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; font-size: 0.9375rem; max-width: 560px; }
.bars .bar { height: 12px; background: var(--mark); box-shadow: inset 0 0 0 1px var(--mark-deep); border-radius: 2px; min-width: 2px; }
.bars .bar.is-zero { background: transparent; box-shadow: none; border-left: 2px solid var(--rule-strong); }
.bars .bar.navy { background: var(--navy); box-shadow: none; }
.bars .y { color: var(--muted); }

/* ------------------------------------------------------------ people */
.prof { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 28px; padding: 28px 0; border-top: 1px solid var(--rule); }
.prof:last-child { border-bottom: 1px solid var(--rule); }
.prof img { width: 168px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); background: var(--tint); }
.prof h3 { font-size: var(--step-2); }
.prof h3 span { font-size: var(--step-0); font-weight: 400; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.prof .role { color: var(--muted); margin-top: 2px; }
.prof .facts { margin-top: 16px; }

.prof-past { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--rule); align-items: start; }
.prof-past:last-child { border-bottom: 1px solid var(--rule); }
.prof-past img { width: 72px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); background: var(--tint); }
.prof-past h3 { font-size: var(--step-1); }
.prof-past h3 span { font-size: 0.9375rem; font-weight: 400; color: var(--muted); margin-left: 6px; }
.prof-past p { font-size: 0.9375rem; color: var(--muted); }

@media (max-width: 600px) {
  .prof { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .prof img { width: 96px; }
  .prof .facts { grid-template-columns: 1fr; gap: 0; }
  .prof .facts dd { margin-bottom: 8px; }
}

.cohort { padding: 28px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
.cohort:last-child { border-bottom: 1px solid var(--rule); }
.cohort-head h2 { font-size: var(--step-2); }
.cohort-head p { color: var(--muted); font-size: 0.9375rem; margin-top: 4px; }
.cohort-body .sem { display: grid; grid-template-columns: 4em minmax(0, 1fr); gap: 10px 12px; margin: 0; }
.cohort-body .sem dt { color: var(--muted); font-size: 0.9375rem; padding-top: 4px; }
.cohort-body .sem dd { margin: 0; }
.cohort-foot { margin-top: 14px; font-size: 0.9375rem; display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 760px) { .cohort { grid-template-columns: 1fr; gap: 12px; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: 0.9375rem; line-height: 1.5; color: var(--text); background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: 999px; padding: 2px 12px; cursor: pointer;
}
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip.is-new::after { content: '신규'; font-size: 0.75rem; color: var(--navy); margin-left: 6px; }
.chip.is-match { background: var(--mark); border-color: var(--mark-deep); }

.person-dialog {
  border: 1px solid var(--rule-strong); border-radius: 6px; padding: 0; width: min(560px, calc(100vw - 32px));
  color: var(--text); background: var(--surface); box-shadow: 0 20px 50px rgba(26, 42, 108, 0.18);
}
.person-dialog::backdrop { background: rgba(30, 38, 51, 0.35); }
.person-dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--rule); }
.person-dialog .dlg-body { padding: 8px 24px 24px; max-height: 70vh; overflow: auto; }
.person-dialog h3 { margin-top: 18px; font-size: 1rem; color: var(--muted); font-weight: 500; }
.btn-close { font: inherit; font-size: 0.9375rem; background: none; border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 4px 12px; cursor: pointer; color: var(--navy); }

/* ------------------------------------------------------------ about / links / achievements */
.def { display: grid; grid-template-columns: 9em minmax(0, 1fr); margin: 0; }
.def dt, .def dd { padding: 16px 0; border-top: 1px solid var(--rule); margin: 0; }
.def dt { color: var(--navy); font-weight: 600; }
.def dd ul { list-style: none; }
.def dd li + li { margin-top: 4px; }
.def dd li::before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--navy); margin: 0 10px 0.2em 0; vertical-align: middle; }
@media (max-width: 600px) { .def { grid-template-columns: 1fr; } .def dd { border-top: 0; padding-top: 0; } }

.link-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.link-groups h2 { font-size: var(--step-1); margin-bottom: 8px; }
.link-groups li { padding: 10px 0; border-top: 1px solid var(--rule); }
.link-groups .host { display: block; font-size: var(--step--1); color: var(--muted); }
@media (max-width: 760px) { .link-groups { grid-template-columns: 1fr; gap: 28px; } }

.award-rows > li { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule); }
.award-rows > li:last-child { border-bottom: 1px solid var(--rule); }
.award-rows .yr { color: var(--muted); }
.award-rows .what { font-weight: 600; }
.award-rows .sub { color: var(--muted); font-size: 0.9375rem; margin-top: 2px; }

.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.videos figure { margin: 0; }
.videos figcaption { margin-top: 10px; font-size: 0.9375rem; }
.yt { position: relative; aspect-ratio: 16 / 9; background: var(--tint); border-radius: var(--radius); overflow: hidden; }
.yt button { all: unset; cursor: pointer; position: absolute; inset: 0; display: block; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.yt .play { position: absolute; left: 16px; bottom: 16px; background: var(--surface); color: var(--navy); font-size: 0.875rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; }
.yt button:focus-visible { outline: 3px solid var(--navy-hover); outline-offset: -3px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) { .videos { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: no-preference) {
  .archive-col .cell { animation: rise 420ms cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms + var(--j, 0) * 18ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
