/* =========================================================
   Seunghoo Jeong — academic homepage
   Shared stylesheet. Edit CSS variables below to re-theme.
   ========================================================= */

:root {
  --accent: #a82e2e;          /* crimson, carried over from the original site */
  --accent-soft: #c24b4b;
  --bg: #ffffff;
  --bg-alt: #f6f5f3;
  --surface: #ffffff;
  --border: #e7e3df;
  --text: #1f1d1b;
  --text-soft: #5c574f;
  --text-faint: #8a847a;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --radius: 14px;
  --maxw: 1080px;
  --nav-h: 64px;
}

:root[data-theme="dark"] {
  --accent: #e06464;
  --accent-soft: #ef8b8b;
  --bg: #16151a;
  --bg-alt: #1d1c22;
  --surface: #211f27;
  --border: #322f3a;
  --text: #ececf0;
  --text-soft: #b6b1bd;
  --text-faint: #8c8794;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

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

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

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

/* ---------- Top navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-weight: 800; font-size: 1.05rem; color: var(--text); letter-spacing: -0.02em; }
.nav-brand:hover { text-decoration: none; color: var(--accent); }
.nav-brand span { color: var(--accent); }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 9px;
  color: var(--text-soft); font-weight: 600; font-size: .94rem;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: ""; display: block; height: 2px; border-radius: 2px;
  background: var(--accent); margin: 4px 14px 0;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text-soft);
}
.icon-btn:hover { background: var(--bg-alt); color: var(--text); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav-toggle { display: none; }

/* ---------- Generic section ---------- */
main { display: block; }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: 1.5rem; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em;
}
.section-title .accent-bar {
  display: inline-block; width: 28px; height: 4px; border-radius: 3px;
  background: var(--accent); vertical-align: middle; margin-right: 12px;
}
.section-lead { color: var(--text-soft); margin: 0 0 28px; }

.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: 2rem; margin: 0 0 8px; letter-spacing: -0.03em; }
.page-head p { color: var(--text-soft); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px; font-weight: 700; font-size: .95rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: #fff; }

/* ---------- Hero (home) ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: 260px 1fr; gap: 44px; align-items: center;
}
.hero-photo {
  width: 100%; border-radius: 18px; aspect-ratio: 3/4; object-fit: cover;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.hero-welcome { color: var(--accent); font-weight: 700; letter-spacing: .02em; margin: 0 0 6px; }
.hero-name { font-size: 2.4rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.03em; }
.hero-name small { font-size: 1.1rem; font-weight: 700; color: var(--text-soft); }
.hero-roles { margin: 14px 0; color: var(--text-soft); }
.hero-roles strong { color: var(--text); font-weight: 700; }
.hero-roles .ko { display: block; margin-top: 10px; font-size: .95rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-contact { margin-top: 20px; font-size: .9rem; color: var(--text-faint); line-height: 1.9; }
.hero-contact a { color: var(--text-soft); }

/* ---------- Cards / grids ---------- */
.card-grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-soft); font-size: .95rem; }
.card .card-kicker { color: var(--accent); font-weight: 700; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--border);
  font-size: .85rem; color: var(--text-soft); font-weight: 600;
}
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px;
  border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); margin-left: 6px; vertical-align: middle; letter-spacing: .02em;
}

/* ---------- Timeline (profile) ---------- */
.timeline { position: relative; margin: 0; padding: 0 0 0 26px; list-style: none; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding: 0 0 26px; }
.timeline-item::before {
  content: ""; position: absolute; left: -26px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-period { font-size: .82rem; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.timeline-title { font-size: 1.05rem; font-weight: 700; margin: 2px 0 2px; }
.timeline-sub { color: var(--text-soft); font-size: .94rem; }
.timeline-sub em { color: var(--text-faint); font-style: normal; }

/* ---------- Publication / list pages ---------- */
.pub-year {
  font-size: 1.25rem; font-weight: 800; color: var(--accent);
  margin: 34px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--border);
}
.pub-year:first-child { margin-top: 0; }
.pub-list { list-style: none; counter-reset: none; margin: 0; padding: 0; }
.pub-list li {
  position: relative; padding: 12px 0 12px 0; border-bottom: 1px solid var(--border);
  color: var(--text-soft); font-size: .96rem;
}
.pub-list li:last-child { border-bottom: 0; }
.pub-num { color: var(--accent); font-weight: 700; margin-right: 6px; }
.pub-list strong { color: var(--text); }   /* author highlight */
.pub-list em { color: var(--text); font-style: italic; }
.subhead {
  font-size: 1.05rem; font-weight: 800; margin: 30px 0 10px;
  color: var(--text);
}
.note { color: var(--text-faint); font-size: .9rem; }

/* ---------- News ---------- */
.news-year { font-size: 1.3rem; font-weight: 800; color: var(--accent); margin: 30px 0 14px; }
.news-year:first-child { margin-top: 0; }
.news-item {
  display: grid; grid-template-columns: 120px 1fr; gap: 18px;
  padding: 16px 0; border-top: 1px solid var(--border);
}
.news-item:last-child { border-bottom: 1px solid var(--border); }
.news-date { font-weight: 700; color: var(--accent); font-size: .9rem; }
.news-body h3 { margin: 0 0 4px; font-size: 1rem; }
.news-body p { margin: 0; color: var(--text-soft); font-size: .92rem; }

/* ---------- Gallery + slideshow ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-item { margin: 0; }
.gallery-item button {
  display: block; width: 100%; padding: 0; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--radius); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .15s;
}
.gallery-item button:hover { transform: translateY(-3px); }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-item figcaption { padding: 12px 14px; font-size: .86rem; color: var(--text-soft); text-align: left; }

.slideshow { position: relative; max-width: 720px; margin: 28px auto 0; }
.slides { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); background: var(--surface); }
.slide { display: none; }
.slide.active { display: block; }
.slide img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; font-size: .9rem;
}
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,.45); color: #fff; font-size: 1.3rem; z-index: 2;
}
.slide-btn:hover { background: rgba(0,0,0,.7); }
.slide-prev { left: 12px; } .slide-next { right: 12px; }
.slide-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.slide-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: var(--border); cursor: pointer; padding: 0; }
.slide-dots button.active { background: var(--accent); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(0,0,0,.86); align-items: center; justify-content: center; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; }
.lightbox figcaption { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #eee; font-size: .95rem; }
.lightbox-close { position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-alt);
  padding: 36px 0; color: var(--text-soft); font-size: .9rem;
}
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.footer-grid a { color: var(--text-soft); }
.site-footer .muted { color: var(--text-faint); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 26px; text-align: left; }
  .hero-photo { max-width: 220px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 8px 16px 16px;
    transform: translateY(-130%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 8px; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: inline-flex; }
  .news-item { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-name { font-size: 2rem; }
}
