/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #8B1A4A;
  --primary-light: #C2185B;
  --accent: #E8A838;
  --text: #333;
  --text-light: #666;
  --bg: #fff;
  --bg-light: #f8f8f8;
  --border: #e0e0e0;
  --section-header-bg: #5C8A8A;
  --section-header-text: #fff;
  --max-width: 960px;
}

body {
  font-family: 'Noto Sans KR', 'Segoe UI', -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 14px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ===== Faculty Profile Page ===== */

/* -- Header bar -- */
.faculty-header {
  background: linear-gradient(135deg, #f0f6fc 0%, #e4eef8 50%, #f5f0fa 100%);
  color: #333;
  padding: 12px 0;
  border-bottom: 2px solid var(--primary);
}
.faculty-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faculty-header .header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.faculty-header .header-logo {
  height: 28px;
  width: auto;
}
.faculty-header h1 { font-size: 16px; font-weight: 600; color: #1a3a5c; }
.faculty-header nav a {
  color: #555;
  margin-left: 24px;
  font-size: 13px;
}
.faculty-header nav a:hover { color: var(--primary); text-decoration: none; }
.faculty-header nav a.active { color: var(--primary); font-weight: 600; text-decoration: none; }

/* -- Profile Card (top section) -- */
.profile-card {
  padding: 32px 0 24px;
  border-bottom: 3px solid var(--primary);
}

.profile-card .prof-name-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.profile-card .prof-prefix {
  font-size: 14px;
  color: var(--text-light);
}
.profile-card .prof-name {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}
.profile-card .prof-name-kr {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 400;
}
.profile-card .lab-name {
  font-size: 16px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.profile-top {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.profile-photo {
  width: 160px;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  background: #ddd;
  flex-shrink: 0;
}

.profile-info-table {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.info-block {
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.info-block:last-child { border-bottom: none; }

.info-label {
  display: inline-block;
  background: var(--section-header-bg);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 3px;
  min-width: 72px;
  text-align: center;
  margin-right: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-content {
  font-size: 13px;
  line-height: 1.7;
}
.info-content .label {
  font-weight: 600;
  color: var(--text);
  margin-right: 4px;
}
.info-content .value {
  color: var(--text-light);
}

/* -- Research body (2-column) -- */
.research-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  margin-top: 24px;
}

.research-left,
.research-right {
  padding: 0 16px;
}
.research-left { padding-left: 0; border-right: 1px solid var(--border); }
.research-right { padding-right: 0; }

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--section-header-bg);
  margin-bottom: 12px;
  margin-top: 20px;
}
.section-title:first-child { margin-top: 0; }

.research-overview-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  text-align: justify;
}

.area-list, .achievement-list, .award-list {
  list-style: disc;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.8;
}

.pub-list-brochure {
  list-style: disc;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text);
}
.pub-list-brochure li {
  margin-bottom: 10px;
}

/* ===== Faculty List Page ===== */
.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  padding: 32px 0 8px;
  border-bottom: 3px solid var(--primary);
  margin-bottom: 24px;
}

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.faculty-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.faculty-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.faculty-card a { color: inherit; }
.faculty-card a:hover { text-decoration: none; }

.faculty-card-photo-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #ddd;
}
.faculty-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
/* Per-photo zoom: scale up wide shots, scale down tight crops */
.photo-zoom-in-lg  { transform: scale(1.4);  transform-origin: center 30%; }
.photo-zoom-in     { transform: scale(1.2);  transform-origin: center 25%; }
.photo-zoom-out-sm { transform: scale(0.88); transform-origin: center 15%; }
.photo-zoom-out    { transform: scale(0.8);  transform-origin: center 10%; }
.photo-pos-top { object-position: center 0%; }
.photo-contain { object-fit: contain; background: #eee; }

.faculty-card-body {
  padding: 16px;
}
.faculty-card-body h3 {
  font-size: 18px;
  margin-bottom: 2px;
}
.faculty-card-body .card-name-kr,
.faculty-card-body .card-name-sub {
  font-size: 13px;
  color: var(--text-light);
}
.faculty-card-body .card-lab {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 6px;
}
.faculty-card-body .card-areas {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 8px;
}

/* ===== Research Areas Overview Page ===== */
.research-group {
  margin-bottom: 32px;
}
.research-group-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  padding: 8px 16px;
  background: rgba(139, 26, 74, 0.06);
  border-left: 4px solid var(--primary);
  margin-bottom: 16px;
}
.research-group-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
  padding-left: 20px;
}

/* ===== Language Toggle ===== */
.lang-switch {
  display: flex;
  gap: 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-switch button {
  background: transparent;
  color: #999;
  border: none;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-switch button.active {
  background: var(--primary);
  color: #fff;
}
.lang-switch button:hover:not(.active) {
  color: #333;
}

/* Bilingual content: show/hide based on body lang class */
body.lang-en [lang="ko"],
body.lang-ko [lang="en"] {
  display: none !important;
}

/* ===== Footer ===== */
.site-footer {
  background: #333;
  color: rgba(255,255,255,0.7);
  padding: 20px 0;
  margin-top: 40px;
  font-size: 12px;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .faculty-header .container {
    flex-wrap: wrap;
    gap: 8px;
  }
  .faculty-header nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 0;
  }
  .faculty-header nav a {
    margin-left: 0;
    padding: 4px 10px;
    font-size: 12px;
  }
  .faculty-header .lang-switch {
    position: absolute;
    top: 10px;
    right: 12px;
  }
  .faculty-header .header-brand {
    width: 100%;
    justify-content: center;
    padding-right: 60px;
  }
  .faculty-header {
    position: relative;
  }
  .profile-top {
    flex-direction: column;
    align-items: center;
  }
  .profile-photo {
    width: 140px;
    height: 175px;
  }
  .profile-info-table {
    width: 100%;
  }
  .info-block {
    flex-direction: column;
    gap: 6px;
  }
  .info-block .info-label {
    align-self: flex-start;
  }
  .info-block .info-content {
    margin-left: 0 !important;
    word-break: break-all;
  }
  .info-block .info-content a {
    word-break: break-all;
  }
  .profile-card .prof-name-line {
    flex-wrap: wrap;
    gap: 4px;
  }
  .profile-card .prof-name { font-size: 24px; }
  .research-body {
    grid-template-columns: 1fr;
  }
  .research-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0 0 16px 0;
  }
  .research-right {
    padding: 16px 0 0 0;
  }
  .pub-list-brochure {
    font-size: 11px;
    padding-left: 14px;
  }
  .pub-list-brochure li {
    word-break: break-word;
  }
  .research-overview-text {
    font-size: 12px;
  }
  .area-list, .achievement-list, .award-list {
    font-size: 12px;
    padding-left: 14px;
  }
  .faculty-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Print / PDF ===== */
@media print {
  .faculty-header, .site-footer, .lang-switch { display: none; }
  .profile-card { border-bottom: 2px solid #000; }
  body { font-size: 11px; }
  .research-body { gap: 0; }
}
