/* ============================================================
   CSS Variables & Reset
   ============================================================ */
:root {
  --primary:     #1a3a5c;
  --accent:      #2e7bd6;
  --accent-dk:   #1c5ba0;
  --bg:          #ffffff;
  --bg-alt:      #f0f4f8;
  --text:        #1e2530;
  --muted:       #5a6478;
  --border:      #dde3ec;
  --nav-h:       60px;
  --max-w:       1100px;
  --radius:      8px;
  --shadow:      0 2px 12px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

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

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

section { padding: 72px 0; }
.alt-bg { background: var(--bg-alt); }

.section-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  margin-bottom: 44px;
}

.center-title {
  display: block;
  border-bottom: none;
  text-align: center;
  padding-bottom: 0;
  margin-bottom: 44px;
}

/* ============================================================
   Navigation
   ============================================================ */
#navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

.nav-brand {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
}

.nav-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

/* ============================================================
   Hero / About
   ============================================================ */
#about {
  padding: 88px 0 72px;
  background: linear-gradient(140deg, #eaf0f8 0%, #ffffff 55%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.name-en {
  display: block;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.01em;
}

.hero-title {
  font-size: 0.97rem;
  color: var(--accent);
  font-weight: 600;
  margin: 14px 0 18px;
}

.bio {
  font-size: 0.97rem;
  color: var(--text);
  max-width: 560px;
  margin-bottom: 28px;
  line-height: 1.85;
}

/* Social buttons */
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
}
.social-links a:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* Profile photo */
.hero-photo { position: relative; width: 190px; height: 190px; flex-shrink: 0; }
.hero-photo img {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #6b7a90;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.photo-placeholder {
  display: none;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 4rem;
  border: 3px solid #6b7a90;
}

/* ============================================================
   Research
   ============================================================ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.research-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.research-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.research-icon { font-size: 1.8rem; color: var(--accent); margin-bottom: 12px; }

.research-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.research-card p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.65;
}

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  background: #deeaf9;
  color: var(--accent-dk);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* ============================================================
   Publications
   ============================================================ */
.pub-year-group { margin-bottom: 40px; }

.pub-year {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 16px;
}

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

.pub-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.18s;
}
.pub-item:hover { border-color: var(--accent); }

.pub-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  margin-top: 3px;
  letter-spacing: 0.01em;
}
.pub-badge.journal      { background: var(--primary); color: #fff; }
.pub-badge.conference   { background: var(--accent);  color: #fff; }
.pub-badge.intl-journal { background: #0d6efd;        color: #fff; }
.pub-badge.intl-conf    { background: #6f42c1;        color: #fff; }
.pub-badge.book         { background: #198754;        color: #fff; }

.pub-title   { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.pub-authors { font-size: 0.84rem; color: var(--muted); margin-bottom: 3px; }
.pub-venue   { font-size: 0.84rem; color: var(--muted); }

/* ============================================================
   Projects
   ============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.project-thumb {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  font-size: 2.5rem;
}

.project-info { padding: 18px; }
.project-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.project-info p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

/* ============================================================
   Project Table
   ============================================================ */
.project-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.project-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--bg);
}

.project-table thead {
  background: var(--primary);
  color: #fff;
}

.project-table th {
  padding: 13px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.project-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.55;
}

.project-table tbody tr:last-child td { border-bottom: none; }

.project-table tbody tr:hover { background: var(--bg-alt); }

.project-table td:nth-child(2),
.project-table td:nth-child(3) {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.project-table td:nth-child(4) {
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .project-table th,
  .project-table td { padding: 10px 12px; }
  .project-table { font-size: 0.83rem; }
}

/* ============================================================
   Laboratory
   ============================================================ */
.lab-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.lab-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.lab-name-en { font-size: 0.9rem; color: var(--muted); margin-bottom: 18px; }

.lab-desc {
  font-size: 0.94rem;
  color: var(--text);
  line-height: 1.82;
  margin-bottom: 22px;
}

.lab-focus { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lab-focus li { display: flex; align-items: center; gap: 10px; font-size: 0.93rem; }
.lab-focus li i { color: var(--accent); flex-shrink: 0; }

.lab-side { display: flex; flex-direction: column; gap: 16px; }

.affiliation-card,
.contact-card {
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}

.affiliation-card {
  background: var(--primary);
  color: #fff;
}
.affiliation-card i { color: rgba(255,255,255,0.75); margin-bottom: 14px; display: block; }
.affiliation-card h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.affiliation-card p { font-size: 0.875rem; color: rgba(255,255,255,0.72); margin-bottom: 3px; }

.contact-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.contact-card i { color: var(--accent); margin-bottom: 12px; display: block; }
.contact-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.contact-card a { font-size: 0.84rem; color: var(--accent); text-decoration: none; word-break: break-all; }
.contact-card a:hover { text-decoration: underline; }

/* ============================================================
   News
   ============================================================ */
.empty-section {
  text-align: center;
  padding: 48px 0;
  color: var(--muted);
}
.empty-section i { margin-bottom: 16px; opacity: 0.35; }
.empty-section p { font-size: 1rem; }

.news-list { display: flex; flex-direction: column; gap: 16px; }

.news-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 22px;
  transition: border-color 0.18s;
}
.news-item:hover { border-color: var(--accent); }

.news-date {
  flex-shrink: 0;
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 3px;
  white-space: nowrap;
}

.news-content { flex: 1; }

.news-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.news-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.news-body {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 700px) {
  .news-item { flex-direction: column; gap: 6px; }
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  max-width: 700px;
  margin: 0 auto;
}

.contact-item {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  border: 1px solid var(--border);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.contact-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(46,123,214,0.1);
}
.contact-item i { color: var(--accent); margin-bottom: 10px; }
.contact-item h4 { font-size: 0.87rem; font-weight: 700; color: var(--primary); margin-bottom: 7px; }
.contact-item a,
.contact-item p { font-size: 0.84rem; color: var(--muted); text-decoration: none; }
.contact-item a:hover { color: var(--accent); }

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.65);
  padding: 22px 0;
  text-align: center;
  font-size: 0.84rem;
}

/* ============================================================
   Responsive — 900px
   ============================================================ */
@media (max-width: 900px) {
  .lab-layout { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 2rem; }
}

/* ============================================================
   Responsive — 700px (mobile)
   ============================================================ */
@media (max-width: 700px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 10px 16px 16px;
    gap: 2px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }

  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .hero-photo { margin: 0 auto; }
  .social-links { justify-content: center; }
  .bio { margin-left: auto; margin-right: auto; }
  .hero-text h1 { font-size: 1.85rem; }

  section { padding: 52px 0; }
  .section-title { font-size: 1.4rem; margin-bottom: 32px; }

  .pub-item { flex-direction: column; gap: 8px; }
  .pub-badge { align-self: flex-start; }
}

@media (max-width: 400px) {
  .hero-photo, .hero-photo img, .photo-placeholder {
    width: 150px; height: 150px;
  }
}
