/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent: #9e1b34;
  --accent-light: #c22845;
  --accent-dim: rgba(158, 27, 52, 0.15);
  --border: #222222;
  --border-light: #2a2a2a;
  --nav-bg: rgba(10, 10, 10, 0.85);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --max-width: 1100px;
  --section-padding: 120px 0;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--accent-light);
}

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

/* ===========================
   Utility
   =========================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding);
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-line {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 48px;
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Navigation
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 4px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -4px);
}

/* ===========================
   Hero
   =========================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at 70% 40%, rgba(158, 27, 52, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
}

.hero-text {
  flex: 1;
  text-align: center;
}

.hero-emblem {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: block;
  opacity: 0.9;
  filter: brightness(1.15);
}

.hero-greeting {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.hero-name-kr {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-weight: 300;
}

.hero-affiliation {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.accent {
  color: var(--accent);
}

.hero-links {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all var(--transition);
  background: var(--accent);
  color: #ffffff;
}

.hero-btn:hover {
  background: var(--accent-light);
  color: #ffffff;
  transform: translateY(-2px);
}

.hero-btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.hero-btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.hero-visual {
  flex-shrink: 0;
}

.hero-photo-placeholder {
  width: 280px;
  height: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-photo {
  width: 280px;
  height: 340px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.6); }
}

/* ===========================
   About
   =========================== */
.about-content {
  max-width: 720px;
}

.about-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-content strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ===========================
   Research
   =========================== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px 32px;
  transition: all var(--transition);
}

.research-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.research-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 24px;
}

.research-icon svg {
  width: 100%;
  height: 100%;
}

.research-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.research-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===========================
   Publications
   =========================== */
.pub-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}

.pub-filter {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.pub-filter:hover,
.pub-filter.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  display: flex;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.pub-item:first-child {
  border-top: 1px solid var(--border);
}

.pub-year {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 60px;
  padding-top: 2px;
}

.pub-details h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.5;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pub-note {
  margin-top: 40px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ===========================
   Teaching
   =========================== */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.teaching-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px 28px;
  transition: all var(--transition);
}

.teaching-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.teaching-level {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.teaching-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.teaching-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===========================
   Lab
   =========================== */
.lab-intro {
  max-width: 720px;
  margin-bottom: 48px;
}

.lab-intro p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.lab-subtitle {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.member-card {
  text-align: left;
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition);
}

.member-card:hover {
  border-color: var(--accent);
}

.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.member-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.member-topic {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 500;
}

.member-pubs {
  list-style: none;
  padding: 0;
}

.member-pubs li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.member-pubs li:last-child {
  border-bottom: none;
}

.member-pubs li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.member-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lab-join {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
}

.lab-join p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===========================
   News
   =========================== */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: flex;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.news-item:first-child {
  border-top: 1px solid var(--border);
}

.news-date {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  min-width: 100px;
  padding-top: 2px;
}

.news-content h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.news-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===========================
   CV / Timeline
   =========================== */
.cv-section {
  margin-bottom: 56px;
}

.cv-section:last-child {
  margin-bottom: 0;
}

.cv-subtitle {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 32px;
  color: var(--text-primary);
}

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

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

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  z-index: 1;
}

.timeline-dot.active {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 130px;
  padding-top: 1px;
}

.timeline-content h4 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cv-list {
  list-style: none;
  padding: 0;
}

.cv-list li {
  position: relative;
  padding: 10px 0 10px 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.cv-list li:last-child {
  border-bottom: none;
}

.cv-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.cv-list li strong {
  color: var(--text-primary);
}

/* ===========================
   Contact
   =========================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px 24px;
  text-align: center;
  transition: all var(--transition);
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin: 0 auto 20px;
}

.contact-icon svg {
  width: 100%;
  height: 100%;
}

.contact-card h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.contact-card a,
.contact-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===========================
   Footer
   =========================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  text-align: center;
}

.footer-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-affiliation {
  margin-top: 4px;
  font-size: 0.8rem;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
  .research-grid,
  .teaching-grid,
  .member-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 100px 40px 40px;
    gap: 20px;
    transition: right var(--transition);
    border-left: 1px solid var(--border);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    font-size: 1rem;
  }

  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

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

  .hero-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-photo-placeholder {
    width: 200px;
    height: 240px;
  }

  .section-title {
    font-size: 2rem;
  }

  .research-grid,
  .teaching-grid,
  .member-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .pub-item {
    flex-direction: column;
    gap: 8px;
  }

  .news-item {
    flex-direction: column;
    gap: 8px;
  }

  .timeline-date {
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2.4rem;
  }

  .hero-affiliation {
    font-size: 1rem;
  }

  .pub-filters {
    flex-wrap: wrap;
  }
}
