/* ============================================================
   Construction Materials Lab — Chonnam National University
   ============================================================ */

:root {
  --blue-dark:   #0d2b52;
  --blue-mid:    #1a4a8a;
  --blue-light:  #2e7bd4;
  --accent:      #e8a020;
  --bg:          #f7f9fc;
  --white:       #ffffff;
  --text:        #222;
  --text-muted:  #555;
  --border:      #dde3ee;
  --shadow:      0 2px 12px rgba(0,0,0,0.08);
  --radius:      8px;
  --font:        'Segoe UI', 'Noto Sans KR', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

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

/* ── HEADER ──────────────────────────────────────────────── */
header {
  background: var(--blue-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-text {
  color: var(--white);
}

.logo-text .site-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .3px;
}

.logo-text .site-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  display: block;
}

/* ── NAV ─────────────────────────────────────────────────── */
nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
}

nav a {
  color: rgba(255,255,255,0.82);
  font-size: 0.83rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background .15s, color .15s;
  white-space: nowrap;
  text-decoration: none;
}

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

/* hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: .3s;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 60%, #1e5fa8 100%);
  color: #fff;
  padding: 72px 20px 60px;
  text-align: center;
}

.hero h1 {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -.5px;
}

.hero p {
  font-size: 1.1rem;
  opacity: .82;
  max-width: 640px;
  margin: 0 auto 28px;
}

.hero-chips {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.chip {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
}

/* ── MAIN LAYOUT ─────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ── PAGE HEADER (non-home pages) ────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  color: #fff;
  padding: 40px 20px 36px;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.page-header p {
  opacity: .75;
  font-size: 0.95rem;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.card h3 {
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── INFO BOXES ──────────────────────────────────────────── */
.info-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 28px 32px;
  margin-bottom: 20px;
}

/* ── TABLES ──────────────────────────────────────────────── */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.88rem;
}

.styled-table th {
  background: var(--blue-dark);
  color: #fff;
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
}

.styled-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.styled-table tr:last-child td { border-bottom: none; }
.styled-table tr:hover td { background: #f0f4fb; }

/* ── MEMBER CARDS ────────────────────────────────────────── */
.member-section { margin-bottom: 40px; }

.member-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue-dark);
  padding: 8px 16px;
  background: #edf1fa;
  border-left: 4px solid var(--blue-light);
  border-radius: 0 4px 4px 0;
  margin-bottom: 16px;
}

.member-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.member-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.88rem;
}

.member-item strong { display: block; color: var(--blue-dark); margin-bottom: 4px; }
.member-item .role { color: var(--text-muted); font-size: 0.82rem; }
.member-item .topic { color: var(--text-muted); margin-top: 6px; font-style: italic; }

/* ── PUBLICATIONS ────────────────────────────────────────── */
.pub-list { list-style: none; }

.pub-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  font-size: 0.87rem;
  line-height: 1.6;
  position: relative;
  padding-left: 44px;
}

.pub-item::before {
  content: attr(data-n);
  position: absolute;
  left: 14px;
  top: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 20px;
}

.pub-item .pub-title { font-weight: 600; color: var(--blue-dark); }
.pub-item .pub-journal { color: var(--text-muted); font-style: italic; }
.pub-item .pub-year {
  display: inline-block;
  background: var(--blue-dark);
  color: #fff;
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 10px;
  margin-right: 6px;
  vertical-align: middle;
}

/* ── RESEARCH ────────────────────────────────────────────── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.research-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s;
}

.research-card:hover { transform: translateY(-3px); }

.research-card .rc-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  color: #fff;
  padding: 16px 20px;
}

.research-card .rc-header h3 { font-size: 1.0rem; font-weight: 700; }
.research-card .rc-body { padding: 16px 20px; }
.research-card .rc-body ul { padding-left: 18px; font-size: 0.87rem; color: var(--text-muted); }
.research-card .rc-body li { margin-bottom: 4px; }

/* ── NEWS / MEDIA ────────────────────────────────────────── */
.news-list { list-style: none; }

.news-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.news-item:last-child { border-bottom: none; }

.news-item .news-date {
  flex-shrink: 0;
  background: var(--blue-dark);
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 3px;
}

.news-item a { color: var(--text); font-size: 0.9rem; }
.news-item a:hover { color: var(--blue-light); }

/* ── CONTACT BOX ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-info strong { display: block; color: var(--blue-dark); font-size: 0.85rem; margin-bottom: 3px; }
.contact-info span { color: var(--text-muted); font-size: 0.88rem; }

/* ── PROFESSOR PROFILE ───────────────────────────────────── */
.prof-top {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 36px;
}

.prof-photo {
  width: 180px;
  height: 220px;
  background: linear-gradient(135deg, #c8d8f0, #90b4e0);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--blue-dark);
  overflow: hidden;
}

.prof-photo img { width: 100%; height: 100%; object-fit: cover; }

.prof-info h2 { font-size: 1.5rem; color: var(--blue-dark); margin-bottom: 6px; }
.prof-info .title { color: var(--text-muted); margin-bottom: 14px; }
.prof-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.badge {
  display: inline-block;
  background: #edf1fa;
  color: var(--blue-dark);
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.cv-section { margin-bottom: 32px; }

.cv-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-dark);
  border-bottom: 2px solid var(--blue-light);
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.cv-entry {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.cv-entry .year {
  flex-shrink: 0;
  color: var(--text-muted);
  min-width: 70px;
  font-weight: 600;
}

/* ── LINKS PAGE ──────────────────────────────────────────── */
.links-category { margin-bottom: 32px; }

.links-category h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-dark);
  padding: 8px 14px;
  background: #edf1fa;
  border-left: 4px solid var(--blue-light);
  border-radius: 0 4px 4px 0;
  margin-bottom: 12px;
}

.links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-pill {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: var(--blue-mid);
  transition: background .15s;
}

.link-pill:hover {
  background: #edf1fa;
  text-decoration: none;
}

/* ── ACCORDION (writing page) ────────────────────────────── */
.accordion { margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.accordion summary {
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 600;
  color: var(--blue-dark);
  background: var(--white);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '＋'; font-size: 1.1rem; color: var(--text-muted); }
.accordion[open] summary::after { content: '－'; }
.accordion .acc-body { padding: 14px 18px; background: #fafbfd; border-top: 1px solid var(--border); font-size: 0.88rem; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.7);
  padding: 36px 20px;
  margin-top: 60px;
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.footer-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.82rem; }
.footer-links a:hover { color: #fff; }

/* ── UTILITIES ───────────────────────────────────────────── */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.italic { font-style: italic; }
.bold { font-weight: 700; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: #edf1fa;
  color: var(--blue-mid);
  border: 1px solid var(--border);
  margin-right: 4px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
  .prof-top { flex-direction: column; }
  .prof-photo { width: 140px; height: 170px; }
  .card-grid { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  nav ul { display: none; flex-direction: column; gap: 0; }
  nav ul.open { display: flex; position: absolute; top: 64px; right: 0; background: var(--blue-dark); width: 200px; padding: 8px 0; box-shadow: var(--shadow); }
  nav ul.open li { padding: 0; }
  nav ul.open a { display: block; padding: 10px 20px; border-radius: 0; }
  .nav-toggle { display: block; }
  header { position: relative; }
  .hero h1 { font-size: 1.5rem; }
}
