/* =========================================================
   Multi Materials Lab — Prof. Jeoung Han Kim
   Hanbat National University, Dept. of Materials Science & Eng.
   Static site stylesheet
   ========================================================= */

:root {
  --navy:        #14365f;
  --blue:        #1a5fa5;
  --blue-dark:   #123f72;
  --blue-soft:   #e8f1fb;
  --teal:        #0f8c6c;
  --coral:       #c8552b;
  --purple:      #4f46a8;

  --ink:         #1b2430;
  --text:        #34404e;
  --muted:       #6b7785;
  --line:        #e3e8 ;
  --line:        #e4e8ee;
  --bg:          #ffffff;
  --bg-soft:     #f6f8fb;
  --bg-softer:   #fafbfd;
  --surface:     #ffffff;
  --header-bg:   rgba(255,255,255,.85);

  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 1px 2px rgba(20,54,95,.04), 0 8px 24px rgba(20,54,95,.06);
  --maxw:        1080px;
  --font:        "Inter", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif:       "Newsreader", Georgia, "Times New Roman", serif;
}

/* Dark mode — toggled via html[data-theme="dark"] */
html[data-theme="dark"] {
  --navy:      #0c2138;
  --blue:      #4d9bef;
  --blue-dark: #3a86d8;
  --blue-soft: #14304b;
  --ink:       #e9eef4;
  --text:      #bcc7d2;
  --muted:     #8b97a4;
  --line:      #27323f;
  --bg:        #0e1620;
  --bg-soft:   #131e2a;
  --bg-softer: #0e1620;
  --surface:   #18232f;
  --header-bg: rgba(14,22,32,.82);
  --shadow:    0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.4);
}
/* navy-as-text elements become readable accents in dark mode */
html[data-theme="dark"] .subhead,
html[data-theme="dark"] .mpop-head h3,
html[data-theme="dark"] .year-head .y,
html[data-theme="dark"] .stat .num,
html[data-theme="dark"] .timeline .yr,
html[data-theme="dark"] .pub .authors .me,
html[data-theme="dark"] .qnavy { color: var(--blue); }
html[data-theme="dark"] img { filter: none; }
.qnavy { color: var(--navy); }

/* Smooth theme transition */
body, .site-header, .card, .member, .pos-card, .rcard, .proj, .stat, .mpop-panel { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section   { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue); font-weight: 600; margin-bottom: .6rem;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #16304b, #34597f, #aab4bf, #34597f, #16304b);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 44px; width: auto; flex-shrink: 0; display: block; border-radius: 8px; }
.brand-tag { font-size: .72rem; color: var(--muted); font-weight: 500; line-height: 1.25;
  padding-left: 12px; border-left: 1px solid var(--line); max-width: 148px; }
html[data-theme="dark"] .brand-logo { background: rgba(255,255,255,.92); padding: 4px 9px; }
@media (max-width: 720px) { .brand-tag { display: none; } .brand-logo { height: 38px; } }
.brand small { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.theme-li { display: flex; align-items: center; margin-left: 6px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1.05rem;
  display: grid; place-items: center; transition: .15s;
}
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); }
.nav-links a {
  display: inline-block; padding: 8px 14px; border-radius: 8px;
  color: var(--text); font-size: .95rem; font-weight: 500;
}
.nav-links a:hover { background: var(--bg-soft); text-decoration: none; }
.nav-links a.active { color: var(--blue); }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  font-size: 1.5rem; color: var(--ink); padding: 6px;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 85% -10%, var(--blue-soft), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-softer) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: 1.4fr .8fr; gap: 48px; align-items: center;
  padding: 84px 0;
}
.hero h1 { font-size: 2.7rem; letter-spacing: -.02em; }
.hero .lead { font-size: 1.18rem; margin-bottom: 1.8rem; }
.hero-portrait {
  aspect-ratio: 4/5; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #e9eef6, #d8e2f0);
  border: 1px solid var(--line); overflow: hidden;
  display: grid; place-items: center; color: #9fb0c6; font-size: 4rem;
  box-shadow: var(--shadow);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: contain; }
.hero-metal-frame { position: relative; padding: 0; overflow: hidden; }
.hero-metal { width: 100%; height: 100%; display: block; }
.hero-metal-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: .72rem; color: #eef4fb; background: rgba(10, 24, 40, .55);
  padding: 8px 12px; text-align: center; letter-spacing: .02em;
}

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 9px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-align: center;
}
.stat .num { font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat .label { font-size: .85rem; color: var(--muted); margin-top: 6px; }

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

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: .18s; height: 100%;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #d4dded; }
.card .icon {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  font-size: 1.4rem; margin-bottom: 16px;
}
.icon--blue   { background: var(--blue-soft); color: var(--blue); }
.icon--teal   { background: #e2f4ef; color: var(--teal); }
.icon--coral  { background: #fbeae2; color: var(--coral); }
.icon--purple { background: #ecebf8; color: var(--purple); }
.card h3 { margin-bottom: .4rem; }
.card p  { color: var(--muted); font-size: .95rem; margin: 0; }
.card .tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .76rem; padding: 4px 10px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--line);
}

/* ---------- Page header ---------- */
.page-head {
  background: linear-gradient(180deg, var(--bg-softer), var(--bg));
  border-bottom: 1px solid var(--line); padding: 56px 0 44px;
}
.page-head h1 { margin-bottom: .3rem; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: .8rem; }
.breadcrumb a { color: var(--muted); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.5fr; gap: 48px; align-items: start; }
.profile-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 90px;
}
.profile-card .photo {
  min-height: 120px; background: linear-gradient(160deg,#e9eef6,#d8e2f0);
  display: grid; place-items: center; color: #9fb0c6; font-size: 3.4rem;
}
.profile-card .photo img { width: 100%; height: auto; display: block; }
.profile-card .body { padding: 22px; }
.profile-card .body h3 { margin-bottom: 2px; }
.profile-card .role { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.profile-list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.profile-list li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); color: var(--text); }
.profile-list li i { color: var(--blue); width: 18px; text-align: center; margin-top: 3px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 26px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid #fff;
}
.timeline .yr { font-weight: 600; color: var(--navy); font-size: .9rem; }

.prose h3 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }

/* CV blocks (education / appointments / awards) */
.cv { margin: 6px 0 4px; }
.cv-row { display: grid; grid-template-columns: 120px 1fr; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.cv-row:first-child { border-top: 0; padding-top: 4px; }
.cv-when { font-weight: 600; color: var(--blue); font-size: .9rem; padding-top: 1px; }
.cv-what strong { color: var(--ink); font-weight: 600; }
.cv-what .sub { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.award-list { list-style: none; padding: 0; margin: 6px 0 4px; }
.award-list li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); }
.award-list li:first-child { border-top: 0; }
.aw-year { flex-shrink: 0; font-weight: 600; color: var(--blue); font-size: .85rem; min-width: 40px; }
@media (max-width: 560px) { .cv-row { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Publications ---------- */
.pub-toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-bottom: 26px; padding: 16px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 72px; z-index: 20;
}
.pub-search {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px;
}
.pub-search i { color: var(--muted); }
.pub-search input { flex: 1; border: 0; outline: none; padding: 10px 0; font-size: .95rem; font-family: inherit; background: transparent; color: var(--ink); }
.pub-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: .85rem; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 500;
}
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.year-block { margin-bottom: 34px; }
.year-head {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--line);
}
.year-head .y { font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.year-head .c { font-size: .85rem; color: var(--muted); }

.pub { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub .idx { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; min-width: 26px; text-align: right; padding-top: 2px; }
.pub .meta { flex: 1; }
.pub .title { color: var(--ink); font-weight: 600; font-size: .98rem; margin-bottom: 3px; }
.pub .title a.tlink { color: inherit; text-decoration: none; }
.pub .title a.tlink:hover { color: var(--blue); text-decoration: underline; }
.pub .title a.tlink .ti { font-size: .8em; color: var(--muted); }
.pub .title a.tlink:hover .ti { color: var(--blue); }
.pub .authors { font-size: .88rem; color: var(--muted); }
.pub .authors .me { color: var(--navy); font-weight: 600; }
.pub .venue { font-size: .88rem; }
.pub .venue em { color: var(--coral); font-style: italic; }
.pub .badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 5px;
  text-transform: uppercase; vertical-align: middle; margin-left: 6px;
}
.badge-sci { background: var(--blue-soft); color: var(--blue); }
.badge-intl { background: #e2f4ef; color: var(--teal); }
.badge-domestic { background: #fbeae2; color: var(--coral); }
.pub-empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------- Members ---------- */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.member {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-align: center; transition: .18s;
}
.member:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
/* Uniform 4:5 portrait (photos pre-standardized to 560x700, head-to-shoulders) */
.m-photo {
  width: 100%; aspect-ratio: 4 / 5; overflow: hidden;
  background: linear-gradient(160deg, #eef2f7, #dde6f1);
  display: grid; place-items: center;
}
.m-photo img { width: 100%; height: 100%; object-fit: cover; }
.m-photo.is-initials { color: #fff; font-weight: 700; font-size: 2.2rem; }
.m-info { padding: 13px 14px 16px; }
.member--alum .m-info { padding: 11px 12px 14px; }
.member--alum h4 { font-size: .95rem; }
.member--alum .pos { margin-bottom: 4px; }
.member-grid--alumni { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.member h4 { margin: 0 0 2px; font-size: 1.05rem; }
.member .pos { font-size: .85rem; color: var(--blue); font-weight: 600; margin-bottom: 8px; }
.member .topic { font-size: .85rem; color: var(--muted); margin-bottom: 12px; min-height: 38px; }
.member .mail { font-size: .82rem; color: var(--muted); word-break: break-all; }
.member .mail:hover { color: var(--blue); }
.subhead { font-size: 1.05rem; color: var(--navy); font-weight: 700; margin: 36px 0 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

/* ---------- Position cards (Members landing) ---------- */
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.pos-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; cursor: pointer; text-align: left; width: 100%;
  font-family: inherit; transition: .18s;
}
.pos-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--blue); }
.pos-card .pos-icon {
  width: 50px; height: 50px; border-radius: 13px; margin-bottom: 12px;
  background: linear-gradient(160deg, var(--blue-soft), #d7e6f7); color: var(--blue);
  display: grid; place-items: center; font-size: 1.55rem;
}
.pos-card .pos-name { font-size: 1.12rem; font-weight: 600; color: var(--ink); }
.pos-card .pos-count { font-size: .9rem; color: var(--muted); }
.pos-card .pos-go { margin-top: 10px; font-size: .85rem; color: var(--blue); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.pos-card:hover .pos-go { gap: 9px; }

/* ---------- Member popup modal ---------- */
.mpop-overlay {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(16, 30, 54, .55); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s ease;
}
.mpop-overlay.show { opacity: 1; }
.mpop-panel {
  background: var(--bg-soft); border-radius: var(--radius-lg);
  width: 100%; max-width: 920px; max-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(16px) scale(.98); opacity: 0; transition: .35s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 24px 70px rgba(16, 30, 54, .4);
}
.mpop-overlay.show .mpop-panel { transform: none; opacity: 1; }
.mpop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; background: var(--surface); border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.mpop-head h3 { margin: 0; color: var(--navy); font-size: 1.2rem; }
.mpop-close {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 1.1rem; cursor: pointer;
  display: grid; place-items: center; transition: .15s;
}
.mpop-close:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--blue); }
.mpop-body { padding: 24px; overflow-y: auto; }
.mpop-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
@media (max-width: 640px) { .mpop-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Research area cards ---------- */
.rgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .rgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .rgrid { grid-template-columns: 1fr; } }
.rcard {
  position: relative; display: flex; flex-direction: column; align-items: stretch;
  background: #0e1c2e; border: 1px solid #1c2c40; border-radius: 16px;
  padding: 0; cursor: pointer; text-align: left; width: 100%; color: #eaf0f7;
  font-family: inherit; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rcard:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(6, 14, 26, .5); border-color: #33507a; }
.rcard-media { position: relative; height: 190px; overflow: hidden; background: #0a1420; }
.rcard-media img, .rcard-media svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcard-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 18, 30, 0) 45%, rgba(10, 18, 30, .75) 100%);
}
.rcard-num {
  position: absolute; top: 14px; left: 18px; z-index: 2;
  font-size: 2rem; font-weight: 700; line-height: 1; letter-spacing: -.02em;
  color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
}
.rcard-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.rcard h3 { font-size: 1.16rem; margin: 0 0 8px; color: #fff; }
.rcard p { color: #9fb0c4; font-size: .93rem; margin: 0 0 15px; line-height: 1.55; }
.rcard .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.rcard .tag { background: rgba(255, 255, 255, .04); border: 1px solid #2b3d55; color: #b9c6d6; }
.rcard-more { margin-top: auto; font-size: .88rem; color: #5aa2e6; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.rcard:hover .rcard-more { gap: 9px; }

/* ---------- Project cards ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.proj {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: var(--radius); padding: 20px 22px; transition: .18s;
}
.proj:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.proj-cat {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--blue); background: var(--blue-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.proj-title { font-size: .98rem; color: var(--ink); font-weight: 500; line-height: 1.5; }
.proj-ko { font-size: .85rem; color: var(--muted); line-height: 1.55; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.proj-fund { display: flex; gap: 7px; font-size: .78rem; color: var(--muted); line-height: 1.5; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.proj-fund .ti { color: var(--blue); font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.proj-fund b { color: var(--ink); font-weight: 600; }
.proj--teal .proj-fund .ti { color: var(--teal); }
.proj--coral .proj-fund .ti { color: var(--coral); }
.proj--purple .proj-fund .ti { color: var(--purple); }
.proj-period { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.proj-period .ti { color: var(--muted); font-size: .95rem; flex-shrink: 0; }
.proj--blue   { border-left-color: var(--blue); }
.proj--teal   { border-left-color: var(--teal); }
.proj--coral  { border-left-color: var(--coral); }
.proj--purple { border-left-color: var(--purple); }
.proj--teal   .proj-cat { color: var(--teal); background: #e2f4ef; }
.proj--coral  .proj-cat { color: var(--coral); background: #fbeae2; }
.proj--purple .proj-cat { color: var(--purple); background: #ecebf8; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list .ic {
  width: 42px; height: 42px; border-radius: 10px; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0;
}
.contact-list .k { font-size: .8rem; color: var(--muted); }
.contact-list .v { font-weight: 500; color: var(--ink); }
.map-frame { width: 100%; aspect-ratio: 4/3; border: 0; border-radius: var(--radius); }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff; border-radius: var(--radius-lg); padding: 48px; text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.85); max-width: 50ch; margin: 0 auto 1.6rem; }
.cta .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
.cta .btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,.75); padding: 48px 0 28px; margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; margin-bottom: 32px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; font-size: .9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px;
  font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Birthday popup ---------- */
.bday-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(16, 30, 54, .55); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .4s ease;
}
.bday-overlay.show { opacity: 1; }
.bday-card {
  position: relative; width: 100%; max-width: 440px; background: var(--surface);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 24px 60px rgba(16, 30, 54, .35);
  transform: translateY(20px) scale(.96); opacity: 0;
  transition: .45s cubic-bezier(.2, .8, .2, 1);
}
.bday-overlay.show .bday-card { transform: none; opacity: 1; }
.bday-head {
  position: relative; padding: 36px 24px 26px; text-align: center; overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff;
}
.bday-emblem {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  display: grid; place-items: center; font-size: 2.3rem; color: #fff;
  animation: bdayPop .6s .2s both;
}
.bday-head h2 { color: #fff; font-size: 1.7rem; margin: 0 0 4px; letter-spacing: -.01em; }
.bday-head .en { color: rgba(255, 255, 255, .85); font-size: .95rem; font-weight: 500; }
.bday-balloon { position: absolute; font-size: 1.4rem; color: #fff; opacity: .45; }
.bday-body { padding: 24px 26px 28px; text-align: center; }
.bday-body p { color: var(--text); margin: 0 0 8px; font-size: 1.02rem; line-height: 1.7; }
.bday-body .sign { color: var(--muted); font-size: .9rem; margin-top: 14px; }
.bday-actions { margin-top: 22px; }
.bday-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-size: 1.1rem; cursor: pointer;
  display: grid; place-items: center; transition: .15s; z-index: 2;
}
.bday-close:hover { background: rgba(255, 255, 255, .34); }
@keyframes bdayPop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

/* Confetti */
.bday-confetti { position: fixed; inset: 0; z-index: 201; pointer-events: none; overflow: hidden; }
.bday-piece {
  position: absolute; top: -16px; width: 9px; height: 14px; opacity: .9;
  will-change: transform; animation: bdayFall linear forwards;
}
@keyframes bdayFall {
  0%   { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(102vh) rotate(720deg); opacity: .9; }
}
@media (max-width: 480px) { .bday-head h2 { font-size: 1.45rem; } }

/* =========================================================
   Kakao-style home (index)
   ========================================================= */
.k-hero {
  position: relative; min-height: 88vh; display: flex; align-items: center;
  padding: 130px 0 90px; overflow: hidden;
  background: radial-gradient(1100px 620px at 82% 24%, var(--blue-soft), transparent 62%), var(--bg);
}
.k-hero-canvas { position: absolute; inset: 0; z-index: 1; pointer-events: none; display: block; }
.k-hero .container { position: relative; z-index: 2; max-width: var(--maxw); }
.k-hero-label { font-size: .88rem; font-weight: 600; letter-spacing: .05em; color: var(--blue); text-transform: uppercase; margin-bottom: 22px; }
.k-hero-title { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 700; line-height: 1.04; letter-spacing: -.025em; color: var(--ink); margin: 0 0 26px; }
.k-hero-sub { font-size: clamp(1.05rem, 1.9vw, 1.32rem); color: var(--muted); max-width: 40ch; line-height: 1.65; margin: 0 0 34px; }
.k-hero-sub:empty { display: none; margin: 0; }
.k-hero-visual { position: absolute; right: -2%; bottom: -8%; width: min(44vw, 560px); z-index: 1; opacity: .96; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.k-hero-visual svg { width: 100%; height: auto; display: block; }

/* Minimal, typography-led hero */
.k-hero--center {
  text-align: center; min-height: 92vh; justify-content: center;
  background:
    radial-gradient(ellipse 66% 60% at 50% 42%, rgba(247,249,252,.72), rgba(247,249,252,0) 72%),
    url('../assets/hero-bg.jpg') center / cover no-repeat,
    var(--bg);
}
html[data-theme="dark"] .k-hero--center {
  background:
    linear-gradient(rgba(9,14,23,.82), rgba(9,14,23,.90)),
    url('../assets/hero-bg.jpg') center / cover no-repeat,
    #0b1220;
}
.k-hero--center::before { display: none; }
.k-hero--center .container { max-width: 940px; }
.k-hero--center .k-hero-title { font-size: clamp(2.8rem, 8.4vw, 5.8rem); margin: 0 auto 26px; }
.k-hero--center .k-hero-sub { max-width: 52ch; margin-left: auto; margin-right: auto; }
.k-hero--center .btn-row { justify-content: center; }

.k-band { padding: clamp(60px, 11vh, 130px) 0; }
.k-band--soft { background: var(--bg-soft); }
.k-band--dark { background: var(--navy); }
.k-eyebrow { font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; }
.k-title { font-size: clamp(1.9rem, 4.3vw, 3.2rem); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); margin: 0 0 20px; }
.k-lead { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 54ch; line-height: 1.7; margin: 0 0 28px; }
.k-band--dark .k-eyebrow { color: #8fc0ee; }
.k-band--dark .k-title { color: #fff; }
.k-band--dark .k-lead { color: rgba(255,255,255,.72); }

.k-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 6vw, 84px); align-items: center; }
.k-reveal { opacity: 0; transform: translateY(40px); transition: .8s cubic-bezier(.2,.7,.2,1); }
.k-reveal.in { opacity: 1; transform: none; }

.k-areas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.k-area { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; transition: .18s; }
.k-area:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.k-area-media { height: 118px; overflow: hidden; background: #0a1420; }
.k-area-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k-area .ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 1.35rem; margin: 22px 22px 12px; }
.k-area h4 { font-size: 1.02rem; margin: 0 0 4px; padding: 14px 18px 0; }
.k-area p { font-size: .88rem; color: var(--muted); margin: 0; line-height: 1.5; padding: 0 18px 16px; }

.k-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.k-stat .k-num { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700; color: #fff; line-height: 1; letter-spacing: -.02em; }
.k-stat .k-lbl { color: rgba(255,255,255,.66); margin-top: 10px; font-size: 1rem; }

.k-visual-panel {
  aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.k-visual-panel svg { width: 100%; height: 100%; display: block; }
.k-visual-panel img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 860px) {
  .k-split { grid-template-columns: 1fr; }
  .k-hero-visual { display: none; }
  .k-hero { min-height: auto; padding: 100px 0 64px; }
  .k-stat-grid { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
}
@media (max-width: 520px) { .k-areas { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; }
  .hero-portrait { max-width: 280px; }
  .about-grid { grid-template-columns: 1fr; }
  .profile-card { position: static; max-width: 360px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  h1 { font-size: 1.8rem; } .hero h1 { font-size: 2.1rem; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 8px; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .pub-toolbar { position: static; }
  .cta { padding: 32px 20px; }
}
