/* ==========================================================================
   Junha Hyung — personal site
   ========================================================================== */

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

:root {
  --accent:       #2563eb;
  --accent-light: #eff6ff;
  --accent-deep:  #1e40af;
  --text:         #1e293b;
  --text-soft:    #334155;
  --text-muted:   #64748b;
  --border:       #e2e8f0;
  --bg:           #f1f5f9;
  --card:         #ffffff;
  --hairline:     #f1f5f9;
  --shadow:       0 1px 4px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .06);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero {
  background: var(--card);
  border-radius: 20px;
  padding: 48px 52px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.hero-info { flex: 1; min-width: 0; }

.hero-name {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 4px;
}

.hero-affiliation {
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 22px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: #f8fafc;
  transition: all .18s ease;
}

.hero-link:hover {
  color: var(--accent);
  border-color: #93c5fd;
  background: var(--accent-light);
}

.hero-bio {
  font-size: .93rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.hero-bio a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.hero-bio a:hover { text-decoration: underline; }

.hero-bio strong { color: var(--text); font-weight: 600; }

.profile-image img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .14);
  border: 3px solid #fff;
  display: block;
}

/* ── sections ───────────────────────────────────────────────────────────── */

.section {
  background: var(--card);
  border-radius: 20px;
  padding: 40px 52px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .ico { width: 17px; height: 17px; color: var(--accent); }

.section-subtitle {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 4px;
}

/* ── year groups ────────────────────────────────────────────────────────── */

.year-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 18px 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.year-label:first-child { margin-top: 0; }

.year-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── publications ───────────────────────────────────────────────────────── */

.pub-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.pub-card:last-child { border-bottom: none; padding-bottom: 0; }

.pub-media { flex: 0 0 180px; }

.pub-media img,
.pub-media video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.pub-body { flex: 1; min-width: 0; }

.pub-title {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.5;
}

.pub-title a { color: inherit; text-decoration: none; }
.pub-title a:hover { color: var(--accent); }

.pub-authors {
  font-size: .81rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  line-height: 1.65;
}

.pub-authors u,
.pub-authors ins {
  text-decoration: none;
  color: var(--accent-deep);
  font-weight: 600;
}

.pub-venue {
  font-size: .81rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-style: italic;
}

.pub-links { display: flex; flex-wrap: wrap; gap: 6px; }

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid #bfdbfe;
  background: var(--accent-light);
  transition: all .18s ease;
}

.pub-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── timeline ───────────────────────────────────────────────────────────── */

.timeline { display: flex; flex-direction: column; }

.timeline-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.timeline-item:last-child { border-bottom: none; padding-bottom: 0; }

.timeline-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  font-size: .85rem;
  margin-top: 1px;
}

.timeline-icon .ico { width: 15px; height: 15px; }

.timeline-content { flex: 1; min-width: 0; }

.timeline-org {
  font-size: .93rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.timeline-detail {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.65;
}

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

/* ── prose (CV, publication detail) ─────────────────────────────────────── */

.prose h1,
.prose h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.prose h1:first-child, .prose h2:first-child { margin-top: 0; }

.prose ul { padding-left: 18px; margin-bottom: 4px; }
.prose li { font-size: .85rem; color: var(--text-muted); margin-bottom: 6px; line-height: 1.65; }
.prose li strong, .prose p strong { color: var(--text); font-weight: 600; }
.prose p { font-size: .85rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.7; }
.prose a { color: var(--accent); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose u { text-decoration: none; color: var(--accent-deep); font-weight: 600; }

.pub-detail-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.35;
  margin-bottom: 8px;
}

.pub-detail-body { margin-top: 22px; }

.pub-detail-body video,
.pub-detail-body img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.pub-detail-body p { margin-top: 14px; font-size: .87rem; color: var(--text-muted); line-height: 1.75; }

.backlink {
  text-align: center;
  font-size: .82rem;
}

.backlink a { color: var(--text-muted); text-decoration: none; }
.backlink a:hover { color: var(--accent); }

.page-footer {
  margin-top: 4px;
  text-align: center;
  color: var(--text-muted);
  font-size: .78rem;
}

/* ── small screens ──────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .container { padding: 24px 14px 48px; }

  .hero {
    padding: 28px 24px;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 20px;
  }

  .hero-name { font-size: 1.75rem; }

  .profile-image img { width: 104px; height: 104px; }

  .section { padding: 26px 24px; }

  .pub-card { flex-direction: column; gap: 12px; }

  .pub-media { flex: none; width: 100%; }
}

.cv-download { margin-bottom: 22px; }
.cv-download .pub-link { padding: 6px 14px; font-size: .82rem; }

/* inline icon sprite */
.ico {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
  vertical-align: -.125em;
}

.hero-link .ico { width: 13px; height: 13px; }
.cv-download .ico { width: 13px; height: 13px; }
