/* =========================================================
   MEFE Lab — Microbial Ecology & Functional Engineering
   Shared stylesheet
   ========================================================= */

:root {
  /* Yonsei University blue palette */
  --teal-900: #001a4d;  /* deep navy */
  --teal-700: #00337a;  /* Yonsei blue */
  --teal-500: #1d5ba6;  /* mid blue */
  --teal-300: #6e9fd4;  /* light blue */
  --teal-050: #eaf1fb;  /* pale blue tint */
  --amber:    #d98a1f;
  --ink:      #15243d;
  --slate:    #46566f;
  --muted:    #7a89a0;
  --line:     #e3e9f2;
  --bg:       #ffffff;
  --bg-soft:  #f5f8fd;
  --max:      1120px;
  --radius:   14px;
  --shadow:   0 10px 30px rgba(10, 61, 58, 0.08);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--teal-900); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.01em; margin-top: 0; }
h3 { font-size: 1.2rem; }

a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-500); text-decoration: underline; }

p { margin: 0 0 1.1rem; }
strong { color: #000; }

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand a { text-decoration: none; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-300));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1rem;
  letter-spacing: 0.5px;
}
.brand .logo-img { height: 60px; width: auto; max-width: 210px; border-radius: 8px; object-fit: contain; flex: none; display: block; }
.brand .brand-text { line-height: 1.15; }
.brand .brand-name { font-weight: 800; color: var(--teal-900); font-size: 1.02rem; }
.brand .brand-sub { font-size: 0.74rem; color: var(--muted); letter-spacing: 0.02em; }

.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a {
  padding: 8px 11px; border-radius: 8px; color: var(--slate);
  font-weight: 500; font-size: 0.9rem; text-decoration: none; white-space: nowrap;
}
.nav-links a:hover { background: var(--teal-050); color: var(--teal-700); }
.nav-links a.active { color: var(--teal-700); background: var(--teal-050); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--teal-900); margin: 5px 0; transition: 0.2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(110,159,212,0.30), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(0,51,122,0.12), transparent 55%),
    var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.hero .container { padding-top: 90px; padding-bottom: 90px; }
.hero .eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal-500); margin-bottom: 18px;
}
.hero h1 { max-width: 18ch; }
.hero .lead { font-size: 1.2rem; color: var(--slate); max-width: 60ch; margin-top: 18px; }
.hero .lead em { color: var(--teal-700); font-style: italic; }

/* decorative cells */
.cells { position: absolute; inset: 0; pointer-events: none; opacity: 0.5; }
.cells span {
  position: absolute; border-radius: 50%;
  border: 1.5px solid var(--teal-300);
}
.cells span::after {
  content:""; position:absolute; inset: 28%; border-radius:50%;
  background: var(--teal-300); opacity: 0.35;
}

/* ---------- Home hero (title overlaid inside the image, Jin-style) ---------- */
.home-hero { padding: 34px 0 6px; background: var(--bg); }
.home-wrap { max-width: 860px; margin: 0 auto; }   /* shared column so hero + text align */
.hero-figure { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 0; }
.hero-figure img { width: 100%; height: clamp(320px, 46vw, 540px); object-fit: cover; display: block; }
.hero-figure .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 32px; text-align: left;
  background: linear-gradient(to top, rgba(0,26,77,0.88), rgba(0,26,77,0.32) 58%, transparent);
  color: #fff;
}
.hero-figure .caption h1 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.7rem); margin: 0 0 6px; letter-spacing: -0.02em; text-shadow: 0 2px 14px rgba(0,0,0,0.4); }
.hero-figure .caption p { color: rgba(255,255,255,0.96); font-size: clamp(0.98rem, 1.6vw, 1.18rem); margin: 0; text-shadow: 0 1px 8px rgba(0,0,0,0.45); }
.home-logo { height: 58px; width: auto; display: block; margin: 22px 0 0; }

/* Home News and Announcements */
.news-lead { color: var(--slate); margin: 0 0 28px; }
.news-lead b { color: var(--ink); }
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.news-card p { color: #000; margin: 0 0 14px; font-size: 0.98rem; }
.news-card p b { color: var(--ink); }
.news-card .n-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.news-card .n-ph {
  width: 100%; aspect-ratio: 16/10; border: 2px dashed var(--teal-300); border-radius: var(--radius);
  background: var(--bg-soft); color: var(--muted); display: grid; place-items: center; text-align: center; padding: 12px; font-size: 0.82rem;
}
@media (max-width: 700px){ .news-grid { grid-template-columns: 1fr; gap: 26px; } }

/* MEFE Lab intro: big logo + title, then description below */
.mefe-intro { display: flex; align-items: center; justify-content: center; gap: 30px; margin-bottom: 20px; }
.mefe-logo { width: 38%; max-width: 340px; height: auto; flex: none; display: block; }
.mefe-intro h2 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
@media (max-width: 640px){ .mefe-intro { gap: 18px; } .mefe-logo { width: 40%; } }

/* Carousel */
.carousel { position: relative; }
.carousel-window { position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.carousel-track { display: flex; transition: transform 0.45s ease; }
.carousel-slide { min-width: 100%; }
.car-img { width: 100%; height: clamp(320px, 46vw, 540px); object-fit: cover; display: block; }
.car-ph {
  width: 100%; height: clamp(320px, 46vw, 540px); background: var(--bg-soft); color: var(--muted);
  display: grid; place-items: center; text-align: center; padding: 16px; font-size: 0.9rem;
  border: 2px dashed var(--teal-300);
}
.carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 32px; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(0,26,77,0.88), rgba(0,26,77,0.32) 58%, transparent);
  color: #fff;
}
.carousel-caption h1 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.7rem); margin: 0 0 6px; letter-spacing: -0.02em; text-shadow: 0 2px 14px rgba(0,0,0,0.4); }
.carousel-caption p { color: rgba(255,255,255,0.96); font-size: clamp(0.98rem, 1.6vw, 1.18rem); margin: 0; text-shadow: 0 1px 8px rgba(0,0,0,0.45); }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.carousel-dot {
  width: 10px; height: 10px; padding: 0; border-radius: 50%; background: #fff;
  border: 1.5px solid var(--teal-300); cursor: pointer;
}
.carousel-dot.active { background: var(--teal-700); border-color: var(--teal-700); }
.carousel-arrow {
  position: absolute; top: 45%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,0.92); color: var(--teal-700); font-size: 1.4rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* COR values cards */
.cor-list { display: grid; gap: 16px; margin-top: 10px; }
.cor-card {
  display: grid; grid-template-columns: 62px 1fr; gap: 20px; align-items: start;
  border: 1px solid var(--line); border-left: 4px solid var(--teal-500); border-radius: 12px; padding: 20px 24px;
}
.cor-card .cor-letter { font-size: 2.4rem; font-weight: 800; color: var(--teal-700); line-height: 1; }
.cor-card h4 { margin: 0 0 6px; color: var(--teal-900); font-size: 1.05rem; }
.cor-card p { margin: 0; color: #000; font-size: 0.96rem; }
@media (max-width: 560px){ .cor-card { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Compact page header (inner pages) ---------- */
.page-head { padding: 52px 0 18px; }
.page-head h1 { margin: 0 0 8px; }
.page-head .sub { margin: 0; color: var(--slate); font-size: 1.08rem; max-width: 64ch; }

/* ---------- Sections ---------- */
section { padding: 48px 0; }
.section-soft { background: var(--bg); }   /* single white background, no alternating tint */
.section-head { max-width: 70ch; margin-bottom: 24px; }
.section-head .eyebrow {
  display:block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal-500); margin-bottom: 10px;
}
.lead-text { font-size: 1rem; color: #000; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 0.98rem; text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover { background: var(--teal-900); color:#fff; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { border: 1.5px solid var(--teal-300); color: var(--teal-700); background: transparent; }
.btn-ghost:hover { background: var(--teal-050); text-decoration:none; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .num {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--teal-050); color: var(--teal-700); font-weight: 800; margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; }
.card p { color: var(--slate); margin: 0; font-size: 0.98rem; }

/* approach steps */
.steps { counter-reset: step; }
.step {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start;
  padding: 22px 0; border-bottom: 1px dashed var(--line);
}
.step:last-child { border-bottom: 0; }
.step .badge {
  width: 48px; height: 48px; border-radius: 12px; background: var(--teal-700); color:#fff;
  display:grid; place-items:center; font-weight:800; font-size:1.1rem;
}
.step h3 { margin: 4px 0 6px; }
.step p { margin: 0; color: var(--slate); }

/* feature split */
.split { display:grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items:center; }
.split .visual {
  aspect-ratio: 4/3; border-radius: var(--radius); border:1px solid var(--line);
  background: linear-gradient(135deg, var(--teal-050), #fff);
  display:grid; place-items:center; overflow:hidden;
}

/* stats */
.stats { display:flex; gap: 40px; flex-wrap: wrap; margin-top: 10px; }
.stat .n { font-size: 2rem; font-weight: 800; color: var(--teal-700); }
.stat .l { font-size: 0.9rem; color: var(--muted); }

/* tags */
.tags { display:flex; flex-wrap:wrap; gap:8px; margin-top: 14px; }
.tag {
  font-size: 0.82rem; padding: 5px 12px; border-radius: 999px;
  background: var(--teal-050); color: var(--teal-700); font-weight: 500;
}

/* ---------- News list ---------- */
.news { display:grid; gap: 4px; }
.news-item {
  display:grid; grid-template-columns: 130px 1fr; gap: 18px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.news-item .date { color: var(--teal-500); font-weight: 600; font-size: 0.9rem; }
.news-item p { margin: 0; color: var(--slate); }

/* ---------- Publications ---------- */
.pub-filter { display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 28px; }
.pub {
  padding: 22px 0; border-bottom: 1px solid var(--line);
  display:grid; grid-template-columns: 64px 1fr; gap: 20px;
}
.pub .year {
  font-weight: 800; color: var(--teal-700); font-size: 0.95rem;
}
.pub .title { font-weight: 600; color: var(--ink); }
.pub .authors { color: var(--slate); font-size: 0.95rem; margin: 4px 0; }
.pub .authors .me { color: var(--teal-700); font-weight: 700; }
.pub .venue { color: var(--muted); font-size: 0.92rem; font-style: italic; }
.pub .meta { display:flex; gap: 10px; flex-wrap:wrap; margin-top: 8px; }
.pub .chip {
  font-size: 0.78rem; padding: 3px 10px; border-radius: 6px;
  background: var(--bg-soft); border:1px solid var(--line); color: var(--slate);
}
.pub .chip.hot { background: #fff7ec; border-color:#f3dcb3; color: var(--amber); font-weight:600; }

/* ---------- People ---------- */
.profile { display:grid; grid-template-columns: 190px 1fr; gap: 40px; align-items:start; }
.avatar {
  width: 100%; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow:hidden;
  object-fit: cover; object-position: center top;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-300));
  display:grid; place-items:center; color:#fff; font-size: 3.4rem; font-weight: 800;
}
.role { color: var(--teal-500); font-weight:600; margin: 2px 0 16px; }
.cv-list { list-style:none; padding:0; margin: 0; }
.cv-list li { padding: 8px 0; border-bottom:1px solid var(--line); color: #000; }
.cv-list li b { color: var(--ink); }

.open-roles { display:grid; gap: 18px; }
.role-card {
  border:1px solid var(--line); border-left: 4px solid var(--teal-500);
  border-radius: 10px; padding: 22px 26px;
}
.role-card h3 { margin: 0 0 6px; }
.role-card p { margin: 0; color: var(--slate); }

/* contact */
.contact-grid { display:grid; grid-template-columns: 1.2fr 1fr; gap: 48px; }
.info-row { display:flex; gap:14px; padding: 14px 0; border-bottom:1px solid var(--line); }
.info-row .k { width: 110px; color: var(--muted); font-size: 0.9rem; flex:none; }
.info-row .v { color: var(--ink); }
.map-box {
  border-radius: var(--radius); border:1px solid var(--line); overflow:hidden;
  background: var(--bg-soft); min-height: 280px; display:grid; place-items:center; color: var(--muted);
}

/* callout */
.callout {
  background: var(--teal-900); color: #dde8f7; border-radius: var(--radius);
  padding: 44px; position: relative; overflow:hidden;
}
.callout h2 { color: #fff; }
.callout p { color: #c6d6ee; }
.callout .btn-primary { background:#fff; color: var(--teal-900); }
.callout .btn-primary:hover { background: var(--teal-050); }

/* ---------- Slim footer ---------- */
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.footer-inner .f-name { font-weight: 700; color: #fff; }
.footer-inner .f-sub { color: #8fa3c8; font-size: 0.85rem; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: #dbe6f7; font-size: 0.92rem; }

/* ---------- Footer (legacy grid, kept for any page still using it) ---------- */
.site-footer {
  background: var(--teal-900); color: #b9c8e2; padding: 34px 0 26px; margin-top: 0;
}
.site-footer a { color: #dbe6f7; }
.footer-grid { display:grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand .logo {
  width: 40px; height:40px; border-radius:10px; display:grid; place-items:center;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-300)); color:#fff; font-weight:800;
}
.footer-grid h4 { color:#fff; font-size: 0.95rem; margin: 0 0 12px; }
.footer-grid ul { list-style:none; padding:0; margin:0; }
.footer-grid li { padding: 4px 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 36px; padding-top: 20px;
  font-size: 0.85rem; color: #8fa3c8; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .profile { grid-template-columns: 1fr; }
  .avatar { max-width: 220px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px; gap: 2px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border-radius: 8px; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .pub { grid-template-columns: 1fr; gap: 6px; }
  .news-item { grid-template-columns: 1fr; gap: 2px; }
  .info-row { flex-direction: column; gap: 2px; }
  .info-row .k { width: auto; }
}

/* ---------- Home intro: logo left, text right ---------- */
.intro-row { display: flex; gap: 30px; align-items: center; }
.intro-row .home-logo { margin: 0; flex: none; }
.intro-row .intro-text { margin: 0; }
@media (max-width: 600px){ .intro-row { flex-direction: column; align-items: flex-start; gap: 16px; } }

/* ---------- Image placeholder (dashed) ---------- */
.img-placeholder {
  border: 2px dashed var(--teal-300); border-radius: var(--radius); background: var(--bg-soft);
  color: var(--muted); padding: 52px 20px; text-align: center; font-size: 0.92rem;
}

/* ---------- Featured publication card ---------- */
.pub-feature {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.pub-feature .thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; display: block; }
.pub-feature .thumb-ph {
  width: 100%; aspect-ratio: 4/3; border: 2px dashed var(--teal-300); border-radius: 10px;
  background: var(--bg-soft); color: var(--muted); display: grid; place-items: center; text-align: center; font-size: 0.78rem; padding: 10px;
}
.pub-feature .cite { font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.pub-feature .cite .me { color: var(--teal-700); }
.pub-feature .desc { color: var(--slate); font-size: 0.95rem; margin: 6px 0 0; }
@media (max-width: 640px){ .pub-feature { grid-template-columns: 1fr; } }

/* ---------- Full publication list ---------- */
.pub-list { max-width: 840px; }
.pub-list .item { padding: 14px 0; border-bottom: 1px solid var(--line); color: #000; font-size: 0.96rem; line-height: 1.55; }
.pub-list .item b { color: var(--ink); }
.pub-list .item .me { color: var(--teal-700); font-weight: 700; }

/* ---------- Gallery: yearly, one photo at a time ---------- */
.gal-year { margin: 36px 0 16px; padding-bottom: 6px; border-bottom: 2px solid var(--teal-050); color: var(--teal-700); }
.gal-photo { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display: block; margin: 0 0 20px; }
.gal-ph {
  width: 100%; aspect-ratio: 3/2; border: 2px dashed var(--teal-300); border-radius: var(--radius);
  background: var(--bg-soft); color: var(--muted); display: grid; place-items: center; text-align: center; padding: 16px; margin: 0 0 20px; font-size: 0.9rem;
}
