/* ============================================
   Protein Engineering & Regulation Lab @ KIST
   Shared stylesheet — Option A · Molecular Minimal
   ============================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f8f9fb;
  --bg-paper: #faf7f1;
  --bg-card: #ffffff;
  --ink: #0f1c2e;
  --ink-soft: #4b5563;
  --ink-mute: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #f0f2f5;
  --navy: #1e3a5f;
  --navy-deep: #0f2340;
  --accent: #3b82c4;
  --highlight: #fef3c7;
  --tape: rgba(218, 196, 138, 0.4);
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Lora', Georgia, serif;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --hand: 'Caveat', 'Gaegu', 'Patrick Hand', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
a { color: var(--navy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }

/* ============ Top Header ============ */
header.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 36px;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.2;
  flex-shrink: 0;
}
.brand-mark {
  width: 36px; height: 36px;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; }
.brand-en {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--navy-deep);
  letter-spacing: -0.2px;
}
.brand-en .amp { font-style: italic; color: var(--accent); }
.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}
nav.main-nav {
  display: flex;
  gap: 28px;
  list-style: none;
}
nav.main-nav a {
  font-size: 13.5px;
  color: var(--ink-soft);
  font-weight: 500;
  padding: 6px 0;
  position: relative;
}
nav.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.2s;
}
nav.main-nav a:hover { color: var(--navy); }
nav.main-nav a:hover::after, nav.main-nav a.active::after { width: 100%; }
nav.main-nav a.active { color: var(--navy); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  font-size: 11px;
  background: white;
}
.lang-toggle button {
  padding: 5px 11px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: inherit;
  font-weight: 600;
}
.lang-toggle button.active { background: var(--navy); color: white; }

/* ============ Main wrapper ============ */
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 80px 36px 60px;
}

/* ============ Page header (sub-pages) ============ */
.page-header {
  max-width: 920px;
  margin: 0 auto;
  padding: 64px 36px 32px;
}
.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--ink-soft); }
.page-title {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -0.6px;
}
.page-lede {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.page-header + main { padding-top: 20px; }

/* ============ Section ============ */
section.block { margin-bottom: 70px; scroll-margin-top: 90px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 1.2px;
}
.section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}
.section-action {
  font-size: 12px;
  color: var(--accent);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============ Hero (Home) ============ */
.hero {
  margin-bottom: 70px;
  position: relative;
}
.hero-banner {
  margin: 0 0 40px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}
.helix-svg {
  position: absolute;
  top: -14px;
  right: 0;
  opacity: 0.5;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--serif);
  font-size: 35px;
  line-height: 1.18;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: -0.4px;
}
.hero-title em { color: var(--navy); font-weight: 600; }
.hero-sub {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.hero-sub + .hero-sub {
  margin-top: 14px;
}
.hero-meta {
  margin-top: 22px;
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-mute);
}
.hero-meta strong { color: var(--ink-soft); font-weight: 600; }
.hero-meta a { color: var(--accent); }

/* ============ Research preview (Home) ============ */
.research-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.r-mini {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 20px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.r-mini:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(30,58,95,0.05); }
.r-mini-icon {
  width: 44px; height: 44px;
  background: var(--bg-alt);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.r-mini h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 8px;
  line-height: 1.3;
}
.r-mini p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}
.r-mini-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* ============ Research full (Research page) ============ */
.research-grid { display: grid; gap: 22px; }
.research-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  transition: all 0.2s;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: center;
}
.research-card:hover { border-color: var(--accent); box-shadow: 0 6px 24px rgba(30,58,95,0.06); }
.research-icon {
  width: 64px; height: 64px;
  background: var(--bg-alt);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.research-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
}
.research-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.research-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 10px;
}
.research-card .sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}
.research-card p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 14px;
  line-height: 1.7;
}
.research-card .approach {
  margin: 16px 0;
  padding: 14px 18px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.research-card .approach strong { color: var(--ink); }
.keywords { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.kw {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 3px 9px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  border-radius: 12px;
  border: 1px solid var(--line);
}

/* ============ Featured publication card (Home) ============ */
.featured-card {
  border: 1px solid #f4d97e;
  background: linear-gradient(135deg, rgba(254,243,199,0.4), transparent 70%);
  border-radius: 10px;
  padding: 28px 30px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}
.featured-card::before {
  content: '★ Featured publication';
  position: absolute;
  top: -10px; left: 24px;
  background: var(--navy-deep);
  color: var(--highlight);
  padding: 4px 12px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.featured-card .pub-year {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--navy-deep);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 1px;
}
.featured-card .pub-title {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--navy-deep);
  line-height: 1.35;
  font-weight: 600;
  margin-bottom: 8px;
}
.featured-card .pub-authors { font-size: 13px; color: var(--ink-soft); margin-bottom: 5px; }
.featured-card .pub-journal { font-size: 13px; color: var(--accent); font-style: italic; font-family: var(--serif); }
.featured-card .pub-cite {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 4px;
}
.featured-card .stat-side {
  text-align: center;
  padding-left: 28px;
  border-left: 1px solid #e5d8a8;
  flex-shrink: 0;
}
.featured-card .stat-side .num {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 600;
  color: var(--navy-deep);
  line-height: 1;
}
.featured-card .stat-side .lbl {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-top: 6px;
}
.featured-card .stat-side a {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============ Publications full list ============ */
.pub-list { display: flex; flex-direction: column; gap: 12px; }
.pub-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px dashed var(--line);
}
.pub-item:last-child { border-bottom: none; }
.pub-year-block {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-mute);
  padding-top: 3px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.pub-title {
  font-family: var(--serif);
  font-size: 15.5px;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 5px;
  font-weight: 500;
}
.pub-authors { font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
.pub-journal { font-size: 12.5px; color: var(--accent); font-style: italic; font-family: var(--serif); }
.pub-cite {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 3px;
}
.pub-highlight { background: linear-gradient(transparent 60%, var(--highlight) 60%); padding: 0 2px; }

/* Press chips inside a publication */
.press-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dotted var(--line);
}
.press-chips-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  align-self: center;
  margin-right: 4px;
}
.press-chip {
  font-size: 11.5px;
  padding: 3px 10px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: all 0.15s;
}
.press-chip:hover { border-color: var(--accent); color: var(--accent); background: white; }

/* Featured publication highlight inside list */
.pub-item.featured {
  background: linear-gradient(135deg, rgba(254,243,199,0.4), transparent 60%);
  padding: 22px;
  border: 1px solid #f4d97e;
  border-radius: 8px;
  position: relative;
  margin-top: 14px;
}
.pub-item.featured::before {
  content: '★ Featured';
  position: absolute;
  top: -10px; left: 22px;
  background: var(--navy-deep);
  color: var(--highlight);
  padding: 3px 10px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.pub-item.featured .pub-year-block { color: var(--navy-deep); font-weight: 600; }
.pub-item.featured .pub-title { font-size: 17px; color: var(--navy-deep); font-weight: 600; }

.pub-footer {
  margin-top: 28px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border-radius: 5px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}

.year-anchor {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--navy);
  font-weight: 600;
  margin: 30px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
}
.year-anchor:first-of-type { margin-top: 0; }

/* External profiles */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: all 0.15s;
}
.profile-card:hover { border-color: var(--accent); background: white; }
.profile-icon {
  width: 36px; height: 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
}
.profile-card .lbl { font-size: 11px; color: var(--ink-mute); font-family: var(--mono); letter-spacing: 1px; text-transform: uppercase; }
.profile-card .ttl { font-size: 14px; color: var(--ink); font-weight: 600; }

/* Press section grouped */
.press-group { margin-bottom: 32px; }
.press-group-title {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 4px;
}
.press-group-sub {
  font-size: 12.5px;
  color: var(--ink-mute);
  font-style: italic;
  margin-bottom: 14px;
}
.press-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.press-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.15s;
}
.press-link:hover { border-color: var(--accent); transform: translateX(2px); }
.press-link .outlet {
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  flex: 1;
}
.press-link .arrow {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}
.press-link .outlet small {
  display: block;
  font-weight: 400;
  color: var(--ink-mute);
  font-size: 11px;
  margin-top: 1px;
}

/* ============ Members at a glance (Home) ============ */
.members-glance {
  background: var(--bg-alt);
  padding: 32px;
  border-radius: 8px;
}
.mg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.mg-head h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.mg-head a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.mg-row {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.mg-pi {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 24px;
  border-right: 1px solid var(--line);
}
.mg-pi-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--accent));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.mg-pi-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.mg-pi-role {
  font-size: 11.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}
.mg-others { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.mg-bubble {
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 6px 14px 6px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  transition: all 0.2s;
}
.mg-bubble:hover { border-color: var(--accent); }
.mg-bubble-photo {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.mg-bubble-role {
  font-size: 10.5px;
  color: var(--ink-mute);
  margin-left: 2px;
}

/* ============ PI hero (Members) ============ */
.pi-hero {
  background: linear-gradient(135deg, var(--bg-alt), white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: 10px;
  padding: 32px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 60px;
}
.pi-photo {
  width: 240px;
  aspect-ratio: 4/5;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--navy), var(--accent));
  background-size: cover;
  background-position: center;
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 60px;
  font-weight: 500;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 18px rgba(15,35,64,0.18);
}
/* Filename label removed from page — photo upload guide is in README. */
/* When a photo loads (set by photos.js), hide placeholder initials. */
.member-photo.has-photo,
.pi-photo.has-photo,
.mg-pi-photo.has-photo,
.mg-bubble-photo.has-photo,
.former-avatar.has-photo {
  color: transparent;
}
.pi-info .pi-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--bg);
  background: var(--navy);
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}
.pi-info h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  color: var(--navy-deep);
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.4px;
}
.pi-info .pi-name-ko {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.pi-info .pi-title {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.pi-quote {
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.55;
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  background: rgba(59,130,196,0.04);
  margin-bottom: 22px;
}
.pi-quote .ko { font-family: var(--sans); font-style: normal; color: var(--ink); font-weight: 500; }
.pi-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 22px;
  font-size: 13px;
  color: var(--ink-soft);
}
.pi-meta dt {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding-top: 2px;
}
.pi-meta dd a { color: var(--accent); }

/* ============ PI bio tables (Members) ============ */
.bio-section { margin-bottom: 50px; }
.bio-heading {
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 600;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 18px;
}
.bio-table {
  display: grid;
  gap: 0;
}
.bio-row {
  display: grid;
  grid-template-columns: 130px 220px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.bio-row:last-child { border-bottom: none; }
.bio-year {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--navy);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.bio-role {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  font-weight: 600;
}
.bio-role .degree {
  font-family: var(--mono);
  background: var(--navy);
  color: white;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  margin-right: 8px;
  letter-spacing: 0.5px;
  vertical-align: 1px;
}
.bio-place {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.bio-place .place-en { display: block; }

/* ============ Member grid (Members) ============ */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.member {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
}
.member:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(30,58,95,0.06);
  transform: translateY(-2px);
}
.member-photo {
  width: 70%;
  aspect-ratio: 4/5;
  margin: 24px auto 0;
  border-radius: 8px;
  background-image: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.member-photo.warm { background-image: linear-gradient(135deg, #e8d5c4, #d4b9a3); }
.member-photo.green { background-image: linear-gradient(135deg, #c8d6c8, #a4b9a4); }
.member-photo.cool { background-image: linear-gradient(135deg, #c8d4e0, #a8b8c8); }
.member-photo.dusk { background-image: linear-gradient(135deg, #d8c8d4, #b8a4b4); }
.member-photo.gold { background-image: linear-gradient(135deg, #e8dcb4, #c8b888); }
.member-photo .filename {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.9);
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 4px 8px;
  letter-spacing: 0.3px;
  text-align: center;
  pointer-events: none;
}
.member-body { padding: 18px 18px 20px; }
.member-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.member-name-ko {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.member-role {
  font-size: 11.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  font-weight: 600;
}
.member-since {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.member-interests {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-style: italic;
}
.member-email {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  word-break: break-all;
}
.member-email a { color: var(--accent); }

/* ============ Photo upload guide (Members) ============ */
.photo-guide {
  margin-top: 36px;
  padding: 24px 28px;
  background: var(--bg-alt);
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  align-items: start;
}
.photo-guide-icon {
  width: 60px; height: 60px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.photo-guide h4 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 8px;
}
.photo-guide p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 10px;
}
.photo-guide code {
  font-family: var(--mono);
  font-size: 12px;
  background: white;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--navy);
}
.photo-guide ul { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.photo-guide li {
  font-size: 12.5px;
  color: var(--ink-soft);
  padding-left: 18px;
  position: relative;
}
.photo-guide li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
}

/* ============ Former members (Members page) ============ */
.former-section {
  background: var(--bg-alt);
  padding: 32px;
  border-radius: 8px;
  border-left: 3px solid var(--ink-mute);
}
.former-intro {
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 22px;
  line-height: 1.55;
  max-width: 580px;
}
.former-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.former-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.former-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  background-size: cover;
  background-position: center;
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}
.former-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.former-now {
  font-size: 11.5px;
  color: var(--ink-mute);
  font-style: italic;
}
.former-pending {
  background: white;
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 12.5px;
  color: var(--ink-mute);
  font-style: italic;
  margin-top: 14px;
  text-align: center;
}

/* ============ Hiring banner ============ */
.hiring {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: white;
  padding: 26px 32px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.hiring-text {
  font-family: var(--serif);
  font-size: 16.5px;
  font-style: italic;
  line-height: 1.45;
}
.hiring-cta {
  background: white;
  color: var(--navy-deep);
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.hiring-cta:hover { background: #f8f9fb; }

/* ============ Lab Life (polaroid board) ============ */
.lab-life-intro {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  max-width: 580px;
  margin: 0 auto 50px;
  line-height: 1.55;
}
.polaroid-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 26px;
  padding: 30px 0;
  position: relative;
  background: var(--bg-paper);
  margin: 0 -36px;
  padding-left: 36px;
  padding-right: 36px;
  border-radius: 8px;
}
.polaroid {
  background: white;
  padding: 12px 12px 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}
.polaroid:nth-child(1) { transform: rotate(-2.5deg); }
.polaroid:nth-child(2) { transform: rotate(1.5deg) translateY(8px); }
.polaroid:nth-child(3) { transform: rotate(-0.8deg); }
.polaroid:nth-child(4) { transform: rotate(2.2deg); }
.polaroid:nth-child(5) { transform: rotate(-1.8deg) translateY(-6px); }
.polaroid:nth-child(6) { transform: rotate(0.6deg); }
.polaroid:nth-child(7) { transform: rotate(-2deg) translateY(4px); }
.polaroid:nth-child(8) { transform: rotate(1.2deg); }
.polaroid:nth-child(9) { transform: rotate(-1.2deg); }
.polaroid:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.04);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  z-index: 10;
}
.polaroid::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 50px;
  height: 16px;
  background: var(--tape);
  border: 1px solid rgba(180, 150, 90, 0.2);
  opacity: 0.85;
}
.polaroid:nth-child(2)::before { transform: translateX(-30%) rotate(8deg); }
.polaroid:nth-child(4)::before { transform: translateX(-65%) rotate(-7deg); }
.polaroid:nth-child(6)::before { transform: translateX(-50%) rotate(4deg); width: 40px; }
.polaroid:nth-child(7)::before { transform: translateX(-40%) rotate(-5deg); }
.polaroid:nth-child(9)::before { transform: translateX(-55%) rotate(6deg); }
.polaroid-photo {
  aspect-ratio: 1;
  background-image: linear-gradient(135deg, #d4dde6, #b8c5d4);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.polaroid-photo svg { width: 60%; height: 60%; opacity: 0.7; }
.polaroid-photo.warm { background-image: linear-gradient(135deg, #e8d5c4, #d4b9a3); }
.polaroid-photo.green { background-image: linear-gradient(135deg, #c8d6c8, #a4b9a4); }
.polaroid-photo.cool { background-image: linear-gradient(135deg, #c8d4e0, #a8b8c8); }
.polaroid-photo.dusk { background-image: linear-gradient(135deg, #d8c8d4, #b8a4b4); }
.polaroid-photo.gold { background-image: linear-gradient(135deg, #e8dcb4, #c8b888); }
.polaroid-photo .pic-fname {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.9);
  font-family: var(--mono);
  font-size: 8.5px;
  padding: 3px 6px;
  letter-spacing: 0.3px;
  text-align: center;
  pointer-events: none;
}
.polaroid-caption {
  font-family: var(--hand);
  font-size: 19px;
  color: var(--ink);
  text-align: center;
  line-height: 1.15;
  padding: 0 6px;
}
.polaroid-date {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-mute);
  text-align: center;
  margin-top: 4px;
  letter-spacing: 1px;
}
.lab-life-footer {
  text-align: center;
  margin-top: 30px;
  font-family: var(--hand);
  font-size: 22px;
  color: var(--ink-mute);
  transform: rotate(-1deg);
}

/* ============ Contact ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.contact-block {
  padding: 26px 28px;
  background: var(--bg-alt);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.contact-block h4 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 600;
}
.contact-block p {
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.7;
}
.contact-block .ko {
  display: inline-block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-mute);
}
.contact-block .mono { font-family: var(--mono); font-size: 13.5px; }

.map-block {
  margin-top: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-alt);
  position: relative;
}
.map-block iframe {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}
.map-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 18px;
}
.map-actions a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============ Footer ============ */
footer.foot {
  margin-top: 80px;
  padding: 40px 0 28px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}
.foot-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 36px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.foot-brand h4 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 8px;
}
.foot-brand p {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.foot-col h5 {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink-mute);
  margin-bottom: 14px;
  font-weight: 500;
}
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.foot-col a { font-size: 13px; color: var(--ink-soft); }
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  max-width: 1100px;
  margin: 28px auto 0;
  padding: 22px 36px 0;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-mute);
  text-align: center;
}

/* ============ Responsive ============ */
@media (max-width: 920px) {
  main, .page-header { padding-left: 24px; padding-right: 24px; }
  main { padding-top: 50px; padding-bottom: 50px; }
  .page-title { font-size: 30px; }
  .hero-title { font-size: 26px; }
  .helix-svg { display: none; }
  .hiring { grid-template-columns: 1fr; text-align: center; }
  nav.main-nav { display: none; }
  .nav-inner { gap: 16px; }
  .research-preview, .featured-card, .pi-hero, .contact-grid { grid-template-columns: 1fr; }
  .featured-card .stat-side { padding-left: 0; padding-top: 18px; border-left: none; border-top: 1px solid #e5d8a8; }
  .pi-hero { padding: 24px; }
  .pi-photo { width: 160px; margin: 0 auto; }
  .photo-guide { grid-template-columns: 1fr; }
  .photo-guide-icon { display: none; }
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .mg-pi { padding-right: 0; border-right: none; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .research-card { grid-template-columns: 1fr; gap: 18px; padding: 24px; }
  .research-image { max-width: 320px; margin: 0 auto; }
  .bio-row { grid-template-columns: 110px 1fr; gap: 14px 18px; }
  .bio-place { grid-column: 1 / -1; padding-left: 0; }
  .pub-item { grid-template-columns: 1fr; gap: 6px; }
  .pub-year-block { font-size: 12px; }
  .polaroid-board { grid-template-columns: repeat(2, 1fr); gap: 24px 18px; margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .profiles-grid, .press-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .polaroid-board { grid-template-columns: 1fr; }
  .polaroid:nth-child(n) { transform: rotate(0deg); }
}
