/* ---------- Design tokens ---------- */
:root {
  --surface-1:  #fcfcfb;
  --surface-2:  #f9f9f7;
  --card:       #ffffff;
  --text-primary:   #0b0b0b;
  --text-secondary: #52514e;
  --text-muted:     #898781;
  --border:     rgba(11, 11, 11, 0.10);
  --gridline:   #e1e0d9;

  --series-blue:   #2a78d6;
  --series-aqua:   #1baf7a;
  --series-yellow: #eda100;
  --danger:        #c93a3a;

  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px rgba(11, 11, 11, 0.06);
  --shadow-lift: 0 2px 4px rgba(11, 11, 11, 0.05), 0 14px 34px rgba(11, 11, 11, 0.10);
  --container: clamp(840px, 72vw, 1180px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-1:  #1a1a19;
  --surface-2:  #0d0d0d;
  --card:       #232322;
  --text-primary:   #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted:     #898781;
  --border:     rgba(255, 255, 255, 0.10);
  --gridline:   #2c2c2a;

  --series-blue:   #3987e5;
  --series-aqua:   #199e70;
  --series-yellow: #c98500;
  --danger:        #ff7b72;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.40), 0 16px 40px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-1:  #1a1a19;
    --surface-2:  #0d0d0d;
    --card:       #232322;
    --text-primary:   #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted:     #898781;
    --border:     rgba(255, 255, 255, 0.10);
    --gridline:   #2c2c2a;

    --series-blue:   #3987e5;
    --series-aqua:   #199e70;
    --series-yellow: #c98500;
    --danger:        #ff7b72;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.40), 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* 선 아이콘 (Lucide, ISC License). 색은 글자색(currentColor)을 따릅니다. */
.icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  background: var(--surface-2);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

a { color: inherit; }

::selection { background: rgba(42, 120, 214, 0.22); }

:focus-visible {
  outline: 2px solid var(--series-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
/* 메뉴가 한 줄로 펼쳐지는 화면에서는, 메뉴 항목이 콘텐츠 폭보다 넓으면
   필요한 만큼만 넓어지고 가운데 정렬을 유지합니다 */
@media (min-width: 1161px) {
  .nav-inner { min-width: max-content; }
}

.brand {
  font-weight: 700;
  font-size: 21px;
  text-decoration: none;
  color: var(--text-primary);
  margin-right: auto;
  flex: 0 0 auto;
}
.brand span { color: var(--series-blue); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 18px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--series-blue); }

/* 노트북 화면처럼 폭이 애매할 때는 메뉴 글자를 조금 줄여 한 줄에 들어가게 합니다 */
@media (max-width: 1440px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 16px; }
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.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); }

/* Collapse the nav into a dropdown once links no longer fit comfortably
   in one row (covers both narrow windows and half-maximized ones). */
@media (max-width: 1160px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px 24px 16px;
  }
  .nav-links.nav-open { display: flex; }
  .nav-links a {
    display: block;
    padding: 12px 4px;
    font-size: 15px;
    border-bottom: 1px solid var(--gridline);
  }
  .nav-links li:last-child a { border-bottom: none; }
}

/* 폭이 좁은 휴대폰(375px 이하 등)에서 메뉴 줄이 화면 밖으로 밀리지 않도록 줄입니다 */
@media (max-width: 480px) {
  .nav-inner { padding: 12px 16px; gap: 12px; }
  .nav-right { gap: 12px; }
  .brand { font-size: 17px; }
}
@media (max-width: 350px) {
  .brand { font-size: 15px; }
}

/* ---------- Hero ----------
   Padding and type use clamp() so the hero reads well both on a wide,
   short window (ultrawide / landscape maximize) and a narrow, tall one
   (portrait monitor / vertically-snapped window) instead of only being
   tuned for one exact width. */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 82% -12%, rgba(255, 255, 255, 0.14), transparent 62%),
    radial-gradient(760px 400px at 8% 112%, rgba(27, 175, 122, 0.28), transparent 62%),
    linear-gradient(160deg, #1c355e 0%, #2a78d6 100%);
  color: #ffffff;
  padding: clamp(56px, 10vw, 88px) 24px clamp(44px, 7vw, 64px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, black 25%, transparent 78%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.avatar {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.10));
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow {
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 600;
  color: #cde2fb;
  margin: 0 0 12px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4.5vw, 38px);
}
.hero-degree { font-weight: 400; font-size: clamp(18px, 2.5vw, 22px); color: #cde2fb; }

.hero-role {
  margin: 0 0 16px;
  font-size: 16px;
  color: #e6eefb;
}

.hero-bio {
  margin: 0 auto 28px;
  max-width: 560px;
  font-size: 15px;
  color: #dbe7fa;
}

.hero-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.btn {
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: #ffffff;
  color: #1c355e;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22); }

.hero-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-tags span {
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
}

.scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 40px auto 0;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) 24px;
}
.section-muted {
  background: var(--surface-1);
  max-width: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-muted > * { max-width: var(--container); margin-left: auto; margin-right: auto; }

.section-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--series-blue);
}

.section-title {
  position: relative;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  margin: 0 0 28px;
  padding-bottom: 16px;
  word-break: keep-all;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--series-blue), var(--series-aqua));
}

/* ---------- Split section (label left / content right) ---------- */
.section-split {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  gap: 40px;
  align-items: start;
}
.section-split .section-label { position: sticky; top: 96px; }
.section-split .section-title { margin-bottom: 0; }
.section-body { min-width: 0; }

@media (max-width: 640px) {
  .section-split { grid-template-columns: 1fr; gap: 20px; }
  .section-split .section-label { position: static; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  align-items: start;
}
.about-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.quick-facts {
  list-style: none;
  margin: 0;
  padding: 20px 22px;
  font-size: 13.5px;
  color: var(--text-secondary);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.quick-facts li {
  display: grid;
  grid-template-columns: 76px 1fr;
  column-gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gridline);
}
.quick-facts li:last-child { border-bottom: none; padding-bottom: 0; }
.quick-facts li:first-child { padding-top: 0; }
.quick-facts strong {
  color: var(--text-primary);
  font-weight: 600;
}
.quick-facts span { text-align: left; word-break: break-word; }

@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- Stat tiles ----------
   auto-fit instead of a fixed column count: adapts whether there are
   3 or 4 tiles, and reflows smoothly across any window width instead
   of only looking right at one exact breakpoint. */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 20px;
}
.stat-tile {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px 20px 26px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.stat-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--series-blue), var(--series-aqua));
  opacity: 0;
  transition: opacity 0.18s ease;
}
.stat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: transparent;
}
.stat-tile:hover::before { opacity: 1; }
.stat-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  border-radius: 15px;
  background: linear-gradient(140deg, rgba(42, 120, 214, 0.15), rgba(27, 175, 122, 0.10));
  box-shadow: inset 0 0 0 1px rgba(42, 120, 214, 0.16);
  color: var(--series-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon .icon { width: 24px; height: 24px; stroke-width: 1.7; }
.stat-value {
  display: block;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--series-blue);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

/* 전체 숫자 아래 세부 구분 (SSCI·SCOPUS·KCI·기타 / 국내·국외) */
.stat-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px dashed var(--gridline);
}
.stat-breakdown > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
  padding: 7px 4px 6px;
  border-radius: 9px;
  background: var(--surface-2);
}
.stat-breakdown dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}
.stat-breakdown dd {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.stat-breakdown .is-zero dd { color: var(--text-muted); font-weight: 600; }

/* ---------- Publication / presentation list ---------- */
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pub-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  column-gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pub-item:hover {
  border-color: var(--series-blue);
  box-shadow: var(--shadow);
}
.pub-year {
  font-size: 13px;
  font-weight: 700;
  color: var(--series-blue);
  font-variant-numeric: tabular-nums;
}
.pub-title {
  margin: 0 0 3px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.pub-venue {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  justify-self: end;
}
.badge-journal { background: rgba(42,120,214,0.14); color: var(--series-blue); }
.badge-talk    { background: rgba(27,175,122,0.14); color: var(--series-aqua); }
.badge-poster  { background: rgba(237,161,0,0.16);  color: var(--series-yellow); }

@media (max-width: 560px) {
  .pub-item {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "year badge"
      "body body";
    row-gap: 10px;
  }
  .pub-year { grid-area: year; }
  .badge { grid-area: badge; }
  .pub-body { grid-area: body; }
}

/* ---------- Presentation columns (국외 / 국내) ---------- */
.presentation-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.presentation-col {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px 22px 12px;
  box-shadow: var(--shadow);
}
.presentation-col::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--series-blue), var(--series-aqua));
}
.presentation-col-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--gridline);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.col-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(140deg, rgba(42, 120, 214, 0.15), rgba(27, 175, 122, 0.10));
  box-shadow: inset 0 0 0 1px rgba(42, 120, 214, 0.16);
  color: var(--series-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.col-icon .icon { width: 17px; height: 17px; stroke-width: 1.9; }
.col-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.col-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 11px;
  border-radius: 999px;
  background: rgba(42, 120, 214, 0.10);
  color: var(--series-blue);
  font-variant-numeric: tabular-nums;
}

/* Rows inside the panel: divider list instead of nested cards,
   so long titles get the full column width. */
.presentation-col .pub-list { gap: 0; }
.presentation-col .pub-item {
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "year badge"
    "body body";
  row-gap: 8px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--gridline);
  border-radius: 0;
  padding: 15px 0 17px;
}
.presentation-col .pub-item:hover { box-shadow: none; }
.presentation-col .pub-item:last-child { border-bottom: none; }
.presentation-col .pub-year {
  grid-area: year;
  justify-self: start;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(42, 120, 214, 0.10);
}
.presentation-col .badge { grid-area: badge; align-self: center; }
.presentation-col .pub-body { grid-area: body; }
.presentation-col .pub-title { transition: color 0.15s ease; }
.presentation-col .pub-item:hover .pub-title { color: var(--series-blue); }

/* ---------- Expandable lists (더보기 / 접기) ---------- */
.expandable .pub-item.is-hidden { display: none; }
.show-more-btn {
  display: none;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  padding: 9px 18px;
  width: 100%;
  border-radius: 999px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.show-more-btn.is-visible { display: inline-flex; }
.show-more-btn:hover {
  border-color: var(--series-blue);
  color: var(--series-blue);
  background: rgba(42, 120, 214, 0.06);
}
.show-more-icon {
  display: inline-block;
  font-size: 12px;
  transition: transform 0.15s ease;
}
.show-more-btn[aria-expanded="true"] .show-more-icon { transform: rotate(180deg); }

/* Stack the two columns before they get too narrow for long titles
   (the split layout's left label already eats ~250px of width). */
@media (max-width: 960px) {
  .presentation-columns { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--gridline);
}
.timeline-item {
  display: flex;
  gap: 24px;
  padding: 0 0 30px 24px;
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--series-blue);
  border: 2px solid var(--surface-1);
  box-shadow: 0 0 0 4px rgba(42, 120, 214, 0.14);
}
.timeline-year {
  flex: 0 0 120px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}
.timeline-title { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.timeline-desc { margin: 0; font-size: 14.5px; color: var(--text-secondary); }

@media (max-width: 560px) {
  .timeline-item { flex-direction: column; gap: 4px; }
}

/* ---------- Contact ---------- */
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 14px 28px;
  font-size: 14px;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.contact-list li::before {
  content: attr(data-icon);
  flex: 0 0 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(42, 120, 214, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--series-blue); }

/* ---------- Shared: lead text, buttons, badges, empty state ---------- */
.section-lead {
  margin: 0 0 22px;
  font-size: 15px;
  color: var(--text-secondary);
  word-break: keep-all;
}

.btn-solid,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 13px;
  white-space: nowrap;
}
.btn-solid { background: var(--series-blue); color: #ffffff; }
.btn-solid:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: var(--card); color: var(--text-primary); border-color: var(--border); }
.btn-outline:hover { border-color: var(--series-blue); color: var(--series-blue); }

.draft-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px dashed var(--text-muted);
  color: var(--text-muted);
  vertical-align: middle;
}

.empty-state {
  text-align: center;
  padding: 40px 24px;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.empty-title { margin: 0 0 6px; font-size: 15.5px; font-weight: 700; }
.empty-desc { margin: 0; font-size: 13.5px; color: var(--text-muted); word-break: keep-all; }
.empty-action { margin: 18px 0 0; }

.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 13px;
  white-space: nowrap;
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
  cursor: pointer;
  font-family: inherit;
}
.btn-danger.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-danger:hover { background: rgba(201, 58, 58, 0.08); }
button.btn { font-family: inherit; cursor: pointer; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Write / edit buttons (each asks for the password) ---------- */
.section-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 22px;
}
.section-toolbar .section-lead { flex: 1 1 340px; margin: 0; }
.write-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.write-btn:hover { border-color: var(--series-blue); color: var(--series-blue); }
.write-btn .icon { width: 15px; height: 15px; stroke-width: 1.9; }
.section-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}
@media (max-width: 560px) {
  .section-toolbar { flex-direction: column; }
  .section-toolbar .section-lead { flex: 0 0 auto; }
  .section-actions { justify-content: flex-start; margin-left: 0; }
}

/* Article page: small edit button next to the date */
.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.post-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.post-edit-btn:hover { border-color: var(--series-blue); color: var(--series-blue); }
.post-edit-btn .icon { width: 14px; height: 14px; stroke-width: 1.9; }

/* Picker that lists posts (drafts included) after the password check */
.modal-panel.modal-mid {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.manage { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.manage-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  min-height: 0;
  padding: 16px 20px 20px;
}
.manage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 52vh;
  overflow: auto;
  border: 1px solid var(--gridline);
  border-radius: 12px;
}
.manage-list li + li { border-top: 1px solid var(--gridline); }
.manage-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.manage-item:hover,
.manage-item:focus-visible { background: var(--surface-1); }
.manage-item strong { font-size: 14.5px; font-weight: 700; line-height: 1.45; word-break: keep-all; }
.manage-item span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.manage-item em { font-style: normal; }
.manage-empty { padding: 22px 16px; text-align: center; font-size: 13.5px; color: var(--text-muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 300;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--text-primary);
  color: var(--surface-2);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lift);
  transition: opacity 0.4s ease;
}
.toast.is-leaving { opacity: 0; }

/* Loading placeholders while posts are fetched */
.skeleton-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 18px;
}
.skeleton-card {
  height: 190px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, var(--card) 0%, var(--surface-1) 50%, var(--card) 100%);
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .skeleton-card { animation: shimmer 1.4s ease-in-out infinite; }
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ---------- Admin: dialogs and editor ---------- */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.modal-panel {
  position: relative;
  width: min(400px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  background: var(--card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
}
.modal-wide {
  width: min(900px, 100%);
  height: min(900px, calc(100vh - 48px));
  padding: 0;
  overflow: hidden;
}
.modal-title { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.modal-title span { margin-left: 6px; font-size: 13px; font-weight: 700; color: var(--series-blue); }
.modal-desc { margin: 0 0 16px; font-size: 14px; color: var(--text-secondary); word-break: keep-all; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
.login-form .modal-actions,
.notice .modal-actions { margin-top: 18px; }
.login-input {
  font-size: 22px;
  letter-spacing: 0.35em;
  text-align: center;
}
.form-error { margin: 10px 0 0; font-size: 13px; color: var(--danger); }

.editor-form { display: flex; flex-direction: column; height: 100%; }
.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 14px 24px;
  border-bottom: 1px solid var(--gridline);
}
.modal-head .modal-title { margin: 0; }
.modal-x {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal-x:hover { background: var(--surface-1); color: var(--text-primary); }
.modal-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  margin: 0;
  padding: 20px 24px 8px;
  border: 0;
}
.modal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 24px;
  border-top: 1px solid var(--gridline);
  background: var(--card);
}
.modal-foot .form-error { margin: 0; flex: 1 1 100%; order: -1; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-secondary); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--series-blue); }

.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; min-width: 0; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.field label b { color: var(--danger); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-row-3 { grid-template-columns: 0.7fr 1fr 1.3fr; }
.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-primary);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.5;
}
.field-input:focus {
  outline: none;
  border-color: var(--series-blue);
  box-shadow: 0 0 0 3px rgba(42, 120, 214, 0.18);
}
textarea.field-input { resize: vertical; line-height: 1.65; }
.field-help { margin: 0; font-size: 12px; color: var(--text-muted); word-break: keep-all; }
.field-help a { color: var(--series-blue); margin-left: 6px; }
.field-help .is-error { color: var(--danger); }
.editor-fields:disabled { opacity: 0.6; }

.body-head { display: flex; align-items: center; gap: 10px; }
.editor-tabs { display: flex; gap: 4px; margin-left: auto; }
.editor-tab {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.editor-tab[aria-selected="true"] { background: var(--series-blue); border-color: var(--series-blue); color: #ffffff; }
.md-toolbar { display: flex; flex-wrap: wrap; gap: 6px; }
.md-toolbar button {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.md-toolbar button:hover { border-color: var(--series-blue); color: var(--series-blue); }
.md-toolbar.is-disabled { opacity: 0.45; }
.body-input {
  min-height: 340px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "D2Coding", monospace;
  font-size: 14px;
}
.editor-preview {
  min-height: 340px;
  max-height: 60vh;
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-1);
  font-size: 15.5px;
}
.pdf-row { display: flex; gap: 8px; align-items: center; }
.pdf-row .field-input { flex: 1; min-width: 0; }
.file-btn { flex: 0 0 auto; cursor: pointer; }

@media (max-width: 640px) {
  .modal { padding: 0; align-items: stretch; }
  .modal-panel:not(.modal-wide):not(.modal-mid) { margin: auto 16px; }
  .modal-wide,
  .modal-mid { width: 100%; height: 100%; max-height: none; border-radius: 0; border: none; }
  .manage-list { max-height: none; flex: 1; min-height: 0; }
  .modal-scroll { padding: 16px 16px 8px; }
  .modal-head { padding: 12px 12px 12px 16px; }
  .modal-foot { padding: 12px 16px; }
  .field-row,
  .field-row-3 { grid-template-columns: 1fr; }
  .pdf-row { flex-direction: column; align-items: stretch; }
}

/* ---------- Education data insights ---------- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.filter-chip span {
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.filter-chip:hover { border-color: var(--series-blue); color: var(--series-blue); }
.filter-chip[aria-pressed="true"] {
  background: var(--series-blue);
  border-color: var(--series-blue);
  color: #ffffff;
}
.filter-chip[aria-pressed="true"] span { color: rgba(255, 255, 255, 0.8); }

.insight-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 18px;
}
.insight-grid > li { display: flex; min-width: 0; }
.insight-card {
  position: relative;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.insight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--series-blue), var(--series-aqua));
  opacity: 0;
  transition: opacity 0.18s ease;
}
.insight-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: transparent;
}
.insight-card:hover::before { opacity: 1; }
.insight-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.insight-date {
  margin-left: auto;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.cat-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.tone-blue   { background: rgba(42, 120, 214, 0.14); color: var(--series-blue); }
.tone-aqua   { background: rgba(27, 175, 122, 0.14); color: var(--series-aqua); }
.tone-yellow { background: rgba(237, 161, 0, 0.16);  color: var(--series-yellow); }
.insight-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.insight-card:hover .insight-title { color: var(--series-blue); }
.insight-summary {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  word-break: keep-all;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.insight-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--gridline);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  min-width: 0;
  color: var(--text-muted);
}
.insight-read {
  margin-left: auto;
  white-space: nowrap;
  font-weight: 700;
  color: var(--series-blue);
}

/* ---------- 글 / 영상 탭과 영상 카드 ---------- */
.icon-solid { fill: currentColor; stroke: none; }

.format-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.format-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.format-tab .icon { width: 16px; height: 16px; stroke-width: 1.9; }
.format-tab span {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.format-tab:hover { color: var(--series-blue); }
.format-tab[aria-selected="true"] {
  background: var(--card);
  color: var(--series-blue);
  box-shadow: var(--shadow);
}
.format-tab[aria-selected="true"] span { color: var(--series-blue); }

.insight-card::before { z-index: 1; }
.insight-card.is-video { padding-top: 0; }
.video-thumb {
  position: relative;
  margin: 0 -22px 4px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  /* 썸네일이 없을 때 보이는 바탕 */
  background: linear-gradient(140deg, #1c355e 0%, #2a78d6 65%, #1baf7a 100%);
}
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.insight-card.is-video:hover .video-thumb img { transform: scale(1.04); }
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(11, 11, 11, 0.55);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.2s ease;
}
.video-play .icon { width: 22px; height: 22px; margin-left: 3px; }
.insight-card.is-video:hover .video-play {
  background: var(--series-blue);
  transform: translate(-50%, -50%) scale(1.06);
}

/* 글 페이지의 영상 재생기 */
.video-block { margin: 0 0 28px; }
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #000000;
  box-shadow: var(--shadow);
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-block figcaption { margin-top: 8px; text-align: right; }
.video-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.video-source:hover { color: var(--series-blue); }
.video-source .icon { width: 13px; height: 13px; }
.video-link-only { margin: 0 0 28px; }
.video-link-only .video-source { font-size: 15px; font-weight: 700; color: var(--series-blue); }

/* 작성 창의 영상 주소 미리보기, 고르기 목록의 '영상' 표시 */
.video-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--gridline);
  border-radius: 10px;
  background: var(--surface-1);
  font-size: 13px;
  color: var(--text-secondary);
  word-break: keep-all;
}
.video-preview img {
  flex: 0 0 auto;
  width: 120px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
}
.video-preview .is-error { color: var(--danger); }
.format-badge {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(42, 120, 214, 0.12);
  color: var(--series-blue);
  font-size: 11px;
  font-weight: 700;
}

/* ---------- Issue briefs ---------- */
.brief-feature {
  position: relative;
  overflow: hidden;
  padding: 26px 28px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.brief-feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--series-blue), var(--series-aqua));
}
.brief-feature-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 14px;
  font-size: 12.5px;
}
.brief-vol {
  padding: 3px 11px;
  border-radius: 6px;
  background: var(--series-blue);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.brief-label {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--series-blue);
}
.brief-meta {
  margin-left: auto;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.brief-title {
  margin: 0 0 6px;
  font-size: clamp(19px, 2.3vw, 23px);
  font-weight: 800;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.brief-title a { text-decoration: none; }
.brief-title a:hover { color: var(--series-blue); }
.brief-subtitle {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--text-secondary);
  word-break: keep-all;
}
.brief-points {
  margin: 0 0 18px;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--gridline);
  border-radius: 12px;
}
.brief-points-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--series-blue);
}
.brief-points ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-secondary);
  word-break: keep-all;
}
.brief-points li + li { margin-top: 6px; }
.brief-points-action { margin-top: 14px; }
.brief-feature-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.brief-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.brief-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brief-archive { margin-top: 28px; }
.brief-archive-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}
.brief-archive-title span {
  font-size: 12px;
  font-weight: 700;
  padding: 1px 10px;
  border-radius: 999px;
  background: rgba(42, 120, 214, 0.10);
  color: var(--series-blue);
  font-variant-numeric: tabular-nums;
}
.brief-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--text-primary);
}
.brief-row {
  display: grid;
  grid-template-columns: 64px 1fr auto 48px;
  align-items: center;
  column-gap: 14px;
  padding: 14px 6px;
  border-bottom: 1px solid var(--gridline);
}
.brief-row-vol {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--series-blue);
  font-variant-numeric: tabular-nums;
}
.brief-row-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-decoration: none;
}
.brief-row-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
  transition: color 0.15s ease;
}
.brief-row-body:hover .brief-row-title { color: var(--series-blue); }
.brief-row-sub { font-size: 12.5px; color: var(--text-muted); word-break: keep-all; }
.brief-row-date {
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.brief-row-pdf {
  justify-self: end;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  text-decoration: none;
}
.brief-row-pdf:hover { border-color: var(--series-blue); color: var(--series-blue); }
.brief-row-pdf.is-empty { border: none; padding: 0; }

@media (max-width: 560px) {
  .brief-feature { padding: 22px 20px 20px; }
  .brief-meta { margin-left: 0; width: 100%; }
  .brief-actions { margin-left: 0; }
  .brief-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "vol pdf"
      "body body"
      "date date";
    row-gap: 6px;
  }
  .brief-row-vol { grid-area: vol; }
  .brief-row-pdf { grid-area: pdf; }
  .brief-row-body { grid-area: body; }
  .brief-row-date { grid-area: date; }
}

/* ---------- Post page (post.html) ---------- */
.post-back {
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.post-back:hover { color: var(--series-blue); }
@media (max-width: 560px) {
  .post-back-label { display: none; }
}

.post-main {
  max-width: 780px;
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) 24px clamp(56px, 8vw, 88px);
}
.post-loading { color: var(--text-muted); }
.post-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gridline);
}
.post-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--series-blue);
}
.post-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.post-subtitle {
  margin: 0 0 14px;
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-secondary);
  word-break: keep-all;
}
.post-meta {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.post-tags span {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(42, 120, 214, 0.10);
  color: var(--series-blue);
  font-size: 12px;
  font-weight: 600;
}
.post-lead {
  margin: 0 0 32px;
  padding: 18px 22px;
  border-left: 3px solid var(--series-blue);
  border-radius: 0 10px 10px 0;
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 15.5px;
  word-break: keep-all;
}
.post-main .brief-points { margin-bottom: 32px; padding: 20px 24px; }
.post-main .brief-points ul { font-size: 15px; }

.post-body {
  font-size: 16.5px;
  line-height: 1.85;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.post-body > :first-child { margin-top: 0; }
.post-body h2 { margin: 44px 0 14px; font-size: 22px; line-height: 1.4; }
.post-body h3 { margin: 32px 0 10px; font-size: 18px; line-height: 1.45; }
.post-body p { margin: 0 0 18px; }
.post-body ul,
.post-body ol { margin: 0 0 18px; padding-left: 24px; }
.post-body li + li { margin-top: 6px; }
.post-body a { color: var(--series-blue); }
.post-body blockquote {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-left: 3px solid var(--series-aqua);
  border-radius: 0 8px 8px 0;
  background: var(--surface-1);
  color: var(--text-secondary);
}
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "D2Coding", monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(42, 120, 214, 0.10);
}
.post-body pre {
  margin: 0 0 20px;
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  line-height: 1.6;
}
.post-body pre code {
  padding: 0;
  background: none;
  font-size: 13.5px;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}
.post-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 14.5px;
  word-break: keep-all;
}
.post-body th,
.post-body td {
  padding: 9px 14px;
  border: 1px solid var(--gridline);
  text-align: left;
  overflow-wrap: normal;
}
.post-body th { background: var(--surface-1); font-weight: 700; }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; }
.post-body hr { margin: 36px 0; border: none; border-top: 1px solid var(--gridline); }
.post-body .math-display {
  margin: 0 0 20px;
  padding: 4px 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.post-body span.math-display { display: block; }

.post-refs {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--gridline);
  font-size: 13.5px;
  color: var(--text-secondary);
}
.post-refs h2 { margin: 0 0 10px; font-size: 15px; color: var(--text-primary); }
.post-refs ol { margin: 0; padding-left: 20px; }
.post-refs li + li { margin-top: 6px; }
.post-refs a { color: var(--series-blue); word-break: break-all; }

.post-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 48px;
}
.post-pager a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.post-pager a:hover { border-color: var(--series-blue); }
.post-pager span { font-size: 12px; color: var(--text-muted); }
.post-pager strong { font-size: 14px; line-height: 1.45; word-break: keep-all; }
.post-pager .next { grid-column: 2; text-align: right; }

@media (max-width: 560px) {
  .post-pager { grid-template-columns: 1fr; }
  .post-pager .next { grid-column: auto; }
}

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface-1);
  border-top: 1px solid var(--border);
}
