:root {
  --navy: #16305e;
  --navy-dark: #0e2145;
  --accent: #e8871e;
  --ink: #22293a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg-alt: #f5f7fa;
  --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; color: var(--ink); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 38px; width: auto; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 0.95rem; color: var(--ink);
}
.nav-link:hover { background: var(--bg-alt); text-decoration: none; }
.nav-link.active { color: var(--navy); background: var(--bg-alt); font-weight: 700; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--navy); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, #274a8c 100%);
  color: var(--white); padding: 150px 24px 90px;
}
.hero-inner {
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center;
}
.hero-kicker { color: #aebfe0; font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.hero h1 { font-size: 2.7rem; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 18px; }
.hero-tagline { font-size: 1.15rem; color: #d4def1; max-width: 34em; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 0.95rem; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #d0770f; }
.btn-ghost { border: 1.5px solid rgba(255,255,255,0.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.hero-img img { background: #fff; border-radius: 16px; padding: 18px; max-height: 320px; object-fit: contain; margin: 0 auto; }

/* ---------- Sections ---------- */
.section { padding: 84px 24px; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--navy-dark); color: #dbe4f5; }
.section-dark a { color: #f0b26a; }
.container { max-width: 1140px; margin: 0 auto; }
.section-title { font-size: 2rem; letter-spacing: -0.02em; color: var(--navy); margin-bottom: 16px; }
.section-dark .section-title { color: #fff; }
.section-lead { max-width: 46em; color: var(--muted); margin-bottom: 40px; }

/* ---------- Research ---------- */
.research-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.research-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow 0.2s;
}
.research-card:hover { box-shadow: 0 8px 24px rgba(22,48,94,0.10); }
.research-img { background: #fff; border-bottom: 1px solid var(--line); height: 190px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.research-img img { max-height: 100%; object-fit: contain; }
.research-body { padding: 22px 24px 26px; }
.research-num { font-weight: 800; color: var(--accent); font-size: 0.85rem; letter-spacing: 0.1em; }
.research-body h3 { margin: 6px 0 10px; font-size: 1.15rem; color: var(--navy); }
.research-body p { font-size: 0.95rem; color: var(--ink); }
.research-apps { margin-top: 10px; font-size: 0.88rem !important; color: var(--muted) !important; }

/* ---------- Members ---------- */
.prof-card {
  display: grid; grid-template-columns: 200px 1fr; gap: 32px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; margin-bottom: 48px;
}
.prof-photo { width: 200px; border-radius: 12px; object-fit: cover; }
.prof-info h3 { font-size: 1.4rem; color: var(--navy); }
.prof-bio { margin-top: 14px; font-size: 0.93rem; color: var(--ink); }
.prof-bio ul { padding-left: 1.2em; margin: 6px 0; }
.prof-bio h4 { margin-top: 12px; color: var(--navy); font-size: 0.95rem; }
.member-group-title { margin: 36px 0 18px; color: var(--navy); font-size: 1.2rem; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.member-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; text-align: center; }
.member-card img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; }
.member-placeholder {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--navy); color: #fff; font-size: 2.2rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.member-card h4 { color: var(--navy); font-size: 1.02rem; }
.member-role { color: var(--accent); font-weight: 600; font-size: 0.85rem; margin-top: 2px; }
.member-interests { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.member-email { font-size: 0.83rem; margin-top: 6px; word-break: break-all; }

/* Graduate students: wide cards with more info */
.member-wide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.member-wide-card {
  display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px;
}
.member-wide-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; font-size: 2.4rem; margin: 0; }
.member-wide-info h4 { color: var(--navy); font-size: 1.1rem; }
.member-detail { font-size: 0.9rem; color: var(--ink); margin-top: 8px; }
.member-detail strong { color: var(--navy); }
.member-bio { font-size: 0.88rem; color: var(--muted); margin-top: 8px; }
.member-bio ul { padding-left: 1.2em; }

/* Alumni */
.alumni-list { list-style: none; display: grid; gap: 8px; }
.alumni-item {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 18px; display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline;
}
.alumni-name { font-weight: 700; color: var(--navy); }
.alumni-degree { color: var(--accent); font-weight: 600; font-size: 0.88rem; }
.alumni-current { color: var(--muted); font-size: 0.9rem; }

/* ---------- Publications ---------- */
.pub-filters { display: flex; gap: 8px; margin-bottom: 30px; flex-wrap: wrap; }
.pub-filter {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 18px; font-weight: 600; font-size: 0.88rem; color: var(--muted); cursor: pointer;
}
.pub-filter.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pub-year { color: var(--accent); font-size: 1.05rem; letter-spacing: 0.04em; margin: 26px 0 12px; }
.pub-list { list-style: none; }
.pub-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.pub-badge {
  flex-shrink: 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 3px 10px; border-radius: 999px; margin-top: 3px;
}
.pub-badge-journal { background: #e3ecfa; color: var(--navy); }
.pub-badge-conference { background: #fdeeda; color: #b06810; }
.pub-badge-patent { background: #e6f4ea; color: #1e7a3c; }
.pub-title { font-weight: 600; font-size: 0.98rem; }
.pub-meta { font-size: 0.87rem; color: var(--muted); margin-top: 2px; }

/* ---------- Projects ---------- */
.proj-group { display: flex; align-items: center; gap: 10px; color: var(--navy); margin: 30px 0 16px; font-size: 1.15rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-on { background: #2fa14b; }
.dot-done { background: #9aa3b2; }
.proj-list { display: grid; gap: 14px; }
.proj-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 18px 22px; }
.proj-done { border-left-color: #9aa3b2; }
.proj-card h4 { color: var(--navy); font-size: 1.02rem; }
.proj-meta { font-size: 0.87rem; color: var(--muted); margin-top: 4px; }
.proj-summary { font-size: 0.92rem; margin-top: 8px; }

/* ---------- Board ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 30px; border-bottom: 2px solid var(--line); }
.tab {
  background: none; border: none; cursor: pointer; font-weight: 600; font-size: 1rem; color: var(--muted);
  padding: 10px 20px; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab.active { color: var(--navy); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.empty { color: var(--muted); font-style: italic; }

.news-list { display: grid; gap: 10px; }
.news-item { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.news-item summary {
  cursor: pointer; padding: 16px 20px; display: flex; gap: 16px; align-items: baseline; list-style: none;
}
.news-item summary::-webkit-details-marker { display: none; }
.news-date { color: var(--accent); font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.news-title { font-weight: 600; }
.news-body { padding: 0 20px 20px; font-size: 0.94rem; }
.news-body img { max-height: 340px; border-radius: 10px; margin-bottom: 14px; object-fit: cover; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gallery-item { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; cursor: zoom-in; }
.gallery-item img { height: 200px; width: 100%; object-fit: cover; transition: transform 0.25s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption { padding: 10px 14px; font-size: 0.88rem; font-weight: 600; color: var(--navy); display: flex; justify-content: space-between; gap: 8px; }
.gallery-item figcaption span { color: var(--muted); font-weight: 400; }

.course-list { display: grid; gap: 14px; }
.course-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; }
.course-card h4 { color: var(--navy); }
.course-meta { font-size: 0.87rem; color: var(--accent); font-weight: 600; margin: 2px 0 6px; }
.course-desc { font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.contact-grid h3 { color: #fff; margin-bottom: 10px; }
.contact-grid p { margin-bottom: 10px; font-size: 0.95rem; }
.recruit-box { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); border-radius: 14px; padding: 28px; }
.recruit-box .btn { margin-top: 8px; }
.footer-note { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 24px; font-size: 0.85rem; color: #8fa0c0; }

/* ---------- Lightbox ---------- */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(10,15,30,0.92); align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 18px; right: 30px; color: #fff; font-size: 2.4rem; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner, .prof-card, .contact-grid { grid-template-columns: 1fr; }
  .research-grid, .member-wide-grid { grid-template-columns: 1fr; }
  .member-wide-card { grid-template-columns: 90px 1fr; }
  .member-wide-photo { width: 90px; height: 90px; }
  .hero h1 { font-size: 2rem; }
  .hero-img { display: none; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px 16px;
  }
  .nav-links.open { display: flex; }
  .prof-photo { width: 160px; }
}
