:root {
  --navy: #071b33;
  --navy-2: #102d4f;
  --red: #a51c30;
  --red-bright: #c62f48;
  --ink: #172033;
  --muted: #607087;
  --line: #dfe6ee;
  --paper: #ffffff;
  --wash: #f4f7fa;
  --shadow: 0 18px 45px rgba(7, 27, 51, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); text-underline-offset: 3px; }
img { max-width: 100%; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  background: rgba(255,255,255,.96);
  border: 0;
  border-bottom: 1px solid rgba(7,27,51,.09);
  box-shadow: 0 4px 24px rgba(7,27,51,.05);
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--navy) !important;
  text-decoration: none;
  letter-spacing: -.02em;
  font-weight: 800;
  line-height: 1.15;
}
.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 11px;
  font-size: 11px;
  letter-spacing: .08em;
}
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 5px; }
.navbar .nav-link, .nav-trigger {
  margin: 0;
  padding: 12px 13px;
  color: #29364a;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.navbar .nav-link:hover, .nav-trigger:hover, .navbar .nav-link.active, .nav-item.active > .nav-trigger {
  color: var(--red);
  background: #f9eef0;
  text-decoration: none;
}
.nav-item { position: relative; }
.nav-trigger::after { content: "⌄"; margin-left: 5px; }
.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  min-width: 180px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -5px);
  transition: .18s ease;
}
.nav-item:hover .submenu, .nav-item:focus-within .submenu, .nav-item.open .submenu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.submenu .nav-link { display: block; white-space: nowrap; }
.nav-toggle { display: none; width: 44px; height: 44px; color: var(--navy); background: #eef2f6; border: 0; border-radius: 10px; font-size: 22px; cursor: pointer; }

.header {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 330px;
  padding: 80px 24px;
  place-content: center;
  overflow: hidden;
  color: #fff;
  background: var(--navy) url("header-image.jpg") center / cover no-repeat;
  text-align: center;
}
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(4,16,34,.9), rgba(7,27,51,.48), rgba(4,16,34,.72)); }
.header::after { content: ""; position: absolute; inset: auto 0 0; z-index: -1; height: 90px; background: linear-gradient(transparent, rgba(4,16,34,.38)); }
.header h1 { margin: 0; max-width: 1000px; font-size: clamp(2.35rem, 5vw, 4.4rem); line-height: 1.06; letter-spacing: -.045em; text-shadow: 0 3px 25px rgba(0,0,0,.28); }
.header p { margin: 17px auto 0; max-width: 760px; color: rgba(255,255,255,.86); font-size: clamp(1rem, 1.7vw, 1.25rem); letter-spacing: .01em; }

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 42px auto;
  padding: clamp(26px, 4.2vw, 54px);
  background: var(--paper);
  border: 1px solid rgba(7,27,51,.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.section h2 { margin: 0 0 27px; padding: 0 0 13px; color: var(--navy); border: 0; border-bottom: 1px solid var(--line); font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.03em; }
.section h2::after { content: ""; display: block; width: 54px; height: 4px; margin-top: 12px; background: var(--red); border-radius: 99px; }
.section h3 { margin-top: 38px; color: var(--navy); letter-spacing: -.02em; }
.section > p { color: #46556b; font-size: 1.04rem; }

.news ul { list-style: none; margin: 0; padding: 0; }
.news li { position: relative; padding: 17px 12px 17px 122px; border-bottom: 1px solid var(--line); color: #354258; }
.news li:last-child { border-bottom: 0; }
.news li::before { content: attr(data-date); position: absolute; left: 10px; top: 17px; color: var(--red); font-weight: 800; }

.research-topic { margin: 0 0 58px; }
.research-topic:last-child { margin-bottom: 0; }
.research-topic h3 { color: var(--navy); font-size: 1.45rem; }
.research-topic p { color: var(--muted); }
.research-topic img { display: block; width: 100%; margin: 24px 0 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }

.members-grid { display: block; }
.member-card { display: grid; grid-template-columns: 180px 1fr; gap: 30px; width: 100%; max-width: none; margin: 0 0 24px; padding: 26px; background: #f8fafc; border: 1px solid var(--line); border-radius: 16px; text-align: left; box-shadow: none; }
.member-left { align-items: flex-start; text-align: left; }
.member-left img, .member-card img { width: 160px !important; height: 195px !important; margin: 0; object-fit: cover; object-position: top center; border-radius: 12px; }
.member-left h4 { margin: 14px 0 0; color: var(--navy); font-size: 1.05rem; }
.member-info p { margin: 5px 0; color: #536176; font-size: .94rem; }
.member-info strong { color: var(--navy); }
.member-list, .former-list { display: grid; gap: 12px; }
.member, .member-row { padding: 19px 22px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; }
.member-row { display: grid; grid-template-columns: 200px 1fr; }
.current-position { color: var(--muted); }

.publication-list { display: grid; gap: 10px; }
.publication-card { padding: 18px 20px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.publication-card p { margin: 0; color: #445168; }

.gallery-grid, .gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.gallery-grid img, .gallery img { width: 100%; height: 340px; object-fit: cover; border-radius: 15px; transition: transform .25s ease, box-shadow .25s ease; }
.gallery-grid img:hover, .gallery img:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gallery-grid > *:first-child, .gallery > *:first-child { grid-column: 1 / -1; }

.contact-info { display: grid; gap: 4px; }
.contact-info p { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-info strong { width: 140px; color: var(--navy); }
.map { margin-top: 32px; border: 1px solid var(--line); border-radius: 15px; box-shadow: none; overflow: hidden; }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }

.member-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.member-choice { position: relative; min-height: 220px; padding: 32px; color: #fff; background: var(--navy); border-radius: 17px; overflow: hidden; text-decoration: none; }
.member-choice:last-child { background: var(--red); }
.member-choice::after { content: "→"; position: absolute; right: 28px; bottom: 22px; font-size: 30px; transition: transform .2s ease; }
.member-choice:hover::after { transform: translateX(5px); }
.member-choice h3 { margin: 0 0 8px; color: #fff; font-size: 1.5rem; }
.member-choice p { color: rgba(255,255,255,.78); }

footer { margin-top: 70px; padding: 38px 24px; color: #aeb9c8; background: var(--navy); border: 0; font-size: .88rem; text-align: center; }
footer a { color: #fff; }

@media (max-width: 900px) {
  .navbar { min-height: 70px; padding: 0 18px; }
  .brand { font-size: 14px; }
  .brand small { display: none; }
  .nav-toggle { display: block; }
  .nav-links { position: absolute; inset: 70px 14px auto; display: none; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .nav-links.open { display: block; }
  .navbar .nav-link, .nav-trigger { display: block; width: 100%; padding: 13px; text-align: left; }
  .submenu { position: static; display: none; margin: 3px 0 5px 14px; padding: 3px 0 3px 8px; border: 0; border-left: 2px solid var(--line); border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .nav-item.open .submenu { display: block; transform: none; }
  .nav-item:hover .submenu:not(.force-open) { display: none; }
  .nav-item.open:hover .submenu { display: block; }
  .header { min-height: 285px; padding: 65px 22px; }
}

@media (max-width: 640px) {
  .section { width: min(100% - 24px, 1120px); margin: 22px auto; padding: 24px 19px; border-radius: 14px; }
  .member-card { grid-template-columns: 1fr; padding: 20px; }
  .member-left { align-items: center; text-align: center; }
  .member-left img, .member-card img { width: 150px !important; height: 185px !important; }
  .member-row { grid-template-columns: 1fr; gap: 5px; }
  .member-choices, .gallery-grid, .gallery { grid-template-columns: 1fr; }
  .gallery-grid > *:first-child, .gallery > *:first-child { grid-column: auto; }
  .gallery-grid img, .gallery img { height: 250px; }
  .news li { padding: 46px 8px 15px; }
  .news li::before { top: 14px; left: 8px; }
  .contact-info strong { display: block; width: auto; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
