/* =========================================================
   Energy Mechatronics Lab. — 국립순천대학교 전기공학과
   Layout: dark masthead + sticky profile sidebar + content column
   (academic-homepage style). 이전 디자인: style.prev.css
   색을 바꾸려면 --accent / --accent-2 만 수정하세요.
   ========================================================= */
:root {
  --accent: #b3121b;        /* primary accent (crimson) */
  --accent-2: #e2575d;      /* light accent for dark surfaces */
  --accent-ink: #8e1016;    /* accent text on light surfaces */
  --red: var(--accent);     /* legacy alias (inline styles) */
  --red-dark: var(--accent-ink);
  --ink: #1b1b19;           /* text + masthead */
  --ink-2: #1b1b19;
  --muted: #5b5e63;
  --line: #ece8df;
  --line-2: #d9d3c6;
  --bg: #ffffff;
  --surface: #faf8f4;       /* warm card surface */
  --tint: #f6e6e6;          /* accent tint */
  --on-dark: #f4f1e9;
  --radius: 8px;
  --maxw: 1280px;
  --grad: linear-gradient(90deg, var(--accent), var(--accent-2) 45%, var(--ink) 95%);
  --grad-h2: linear-gradient(90deg, var(--ink), var(--accent) 55%, var(--accent-2));
  --font-body: "Noto Sans KR", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Archivo", "Noto Sans KR", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.7;
  word-break: keep-all; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent); }
main p a, main li a:not(.btn):not(.chip) { border-bottom: 1px solid rgba(179,18,27,.3); }
main p a:hover, main li a:not(.btn):not(.chip):hover { border-bottom-color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.3; margin: 0 0 .6em; color: var(--ink); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
figure { margin: 0; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- language (EN/KO) : 현재 언어가 아닌 쪽 숨김 ---------- */
html[data-lang="en"] body [lang="ko"],
html[data-lang="ko"] body [lang="en"] { display: none !important; }
html[data-lang="en"] body { word-break: normal; overflow-wrap: break-word; }

/* ---------- scroll progress + back to top ---------- */
#scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); z-index: 200; }
#back-to-top { position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--accent-2); font-size: 22px; line-height: 1; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 90; }
#back-to-top.show { opacity: 1; pointer-events: auto; transform: none; }
#back-to-top:hover { background: var(--accent); color: #fff; }
.reveal-init { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal-init.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal-init { opacity: 1; transform: none; transition: none; } }

/* ---------- masthead ---------- */
.site-header { background: radial-gradient(55% 300% at 90% 0%, rgba(226,87,93,.45), transparent 70%), linear-gradient(100deg, var(--ink) 35%, #3a1517 100%), var(--ink); position: sticky; top: 0; z-index: 50; }
.site-header::after { content: ""; display: block; height: 3px; background: var(--grad); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0; }
.brand:hover { color: #fff; }
.brand img { height: 38px; width: auto; background: #fff; border-radius: 6px; padding: 3px 4px; }
.brand > span { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.brand > span br { display: none; }
.brand-title { white-space: nowrap; font: 800 19px/1.1 var(--font-head); color: #fff; letter-spacing: -.01em; }
.brand-sub { white-space: nowrap; font-size: 12px; line-height: 1.2; color: #b9b5ab; margin-top: 3px; }
.main-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.main-nav a { position: relative; display: block; padding: 8px 14px; color: #fff; font: 600 15px var(--font-head); }
.main-nav a::before { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; background: var(--accent); transform: scaleX(0); transition: transform .2s ease; }
.main-nav a:hover { color: var(--accent-2); }
.main-nav a:hover::before { transform: scaleX(1); }
.main-nav a.active { color: var(--accent-2); }
.main-nav a.active::before { background: var(--accent-2); transform: scaleX(1); }
.header-tools { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; border: 1px solid #4a4944; border-radius: 999px; padding: 2px; flex: none; }
.lang-switch button { background: none; border: 0; color: #b9b5ab; font: 700 12px var(--font-head); padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.lang-switch button:hover { color: #fff; }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: var(--accent-2); font-size: 26px; line-height: 1; padding: 6px 8px; cursor: pointer; }

/* ---------- layout: sidebar + content ---------- */
.layout { max-width: var(--maxw); margin: 0 auto; padding: 36px 24px 64px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.layout > main { min-width: 0; }
.layout main .container { max-width: none; padding: 0; }

.sidebar { position: sticky; top: 96px; font-size: 13.5px; line-height: 1.5; }
.author__avatar { width: 100%; max-width: 180px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 3px solid var(--accent); padding: 4px; background: #fff; }
.author__name { font: 700 18px/1.25 var(--font-head); margin: 16px 0 2px; }
.author__name small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.author__bio { color: var(--muted); margin: 8px 0 16px; font-size: 13px; }
.author__urls { list-style: none; margin: 0; padding: 0; }
.author__urls li { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--ink); }
.author__urls a { color: var(--ink); border: 0; }
.author__urls a:hover { color: var(--accent); text-decoration: underline; }
.author__urls svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.ico-scnu { width: 15px; height: 15px; flex: none; background: var(--accent);
  -webkit-mask: url(../img/emblem.png) center / contain no-repeat; mask: url(../img/emblem.png) center / contain no-repeat; }
.sidebar .side-cta { display: inline-block; margin-top: 16px; background: var(--ink); color: var(--accent-2); font: 700 13px var(--font-head); padding: 7px 14px; border-radius: 6px; }
.sidebar .side-cta:hover { background: var(--accent); color: #fff; }

/* ---------- page title (sub pages) ---------- */
.page-banner { margin-bottom: 8px; }
.page-banner h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 800; margin: 0 0 6px; line-height: 1.1; }
.page-banner p { color: var(--muted); margin: 0; }
.crumb { font: 600 12px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.crumb a { color: var(--accent-ink); border: 0 !important; }

/* ---------- home hero (dark vision card) ---------- */
.hero { position: relative; background: var(--ink); color: var(--on-dark); border-radius: var(--radius); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 90% 10%, rgba(226,87,93,.28), transparent 45%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); }
.hero .container { position: relative; z-index: 1; padding: 40px 34px 38px !important; display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; }
.hero-eyebrow { display: inline-block; background: rgba(226,87,93,.16); color: var(--accent-2); border: 1px solid rgba(226,87,93,.5); font: 700 11.5px var(--font-head); letter-spacing: .1em; text-transform: uppercase; padding: 3px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 12px; letter-spacing: -.015em; }
.hero p.lead { color: #d9d5cc; font-size: 15.5px; }
.hero-figure { background: #fff; border-radius: 6px; padding: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.35); }

/* buttons */
.btn { display: inline-block; padding: 9px 18px; border-radius: 4px; font: 700 14px var(--font-head); border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn.ghost { background: transparent; border-color: rgba(226,87,93,.6); color: var(--accent-2); }
.btn.ghost:hover { border-color: var(--accent-2); color: #fff; }
.btn.outline { background: transparent; color: var(--accent); }
.btn.outline:hover { background: var(--accent); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- sections ---------- */
section.block { padding: 36px 0 8px; }
section.block.soft { background: none; }
.section-title { position: relative; font-size: clamp(22px, 2.6vw, 27px); font-weight: 800; padding-bottom: 10px; margin-bottom: 14px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 3px; border-radius: 2px; background: var(--grad-h2); }
.section-title.center { text-align: center; }
.section-title.center::after { left: 50%; transform: translateX(-50%); }
.section-desc { color: var(--muted); max-width: 760px; margin-bottom: 24px; font-size: 15px; }
.section-desc.center { text-align: center; margin-left: auto; margin-right: auto; }
.more-link { font: 700 14px var(--font-head); color: var(--accent-ink); border: 0 !important; }
.more-link::after { content: " →"; }

/* ---------- grid / cards ---------- */
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(27,27,25,.1); }
.card .thumb { aspect-ratio: 16 / 10; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 16.5px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.card .num { font: 800 12px var(--font-head); color: var(--accent); letter-spacing: .1em; margin-bottom: 4px; }
.card .more-link { margin-top: auto; }
a.card, a.card:hover { color: inherit; }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }

.course .term { margin-top: auto; align-self: flex-start; background: var(--tint); color: var(--accent-ink); font: 600 12.5px var(--font-head); padding: 3px 12px; border-radius: 999px; }
.course.linked { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.course.linked:hover { border-color: var(--accent-2); }
.course.linked .more-link { margin: 6px 0 12px; }

/* Capstone projects */
.cap-list { display: grid; gap: 22px; margin-top: 24px; }
.cap { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 18px; }
.cap-video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 6px; overflow: hidden; background: #000; cursor: pointer; }
.cap-video img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease, opacity .2s; opacity: .92; }
.cap-video:hover img { transform: scale(1.03); opacity: 1; }
.cap-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.cap-play { position: absolute; left: 50%; top: 50%; width: 62px; height: 44px; margin: -22px 0 0 -31px; border-radius: 12px; background: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: transform .15s; }
.cap-play::after { content: ""; position: absolute; left: 25px; top: 13px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.cap-video:hover .cap-play { transform: scale(1.08); }
.cap-body { display: flex; flex-direction: column; min-width: 0; }
.cap-year { align-self: flex-start; background: var(--ink); color: #fff; font: 700 12.5px var(--font-head); letter-spacing: .05em; padding: 3px 12px; border-radius: 999px; margin-bottom: 10px; }
.cap h3 { font-size: 18px; line-height: 1.45; margin-bottom: 12px; }
.cap-awards { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cap-awards li { background: var(--tint); color: var(--accent-ink); font: 600 12.5px/1.4 var(--font-head); padding: 4px 11px; border-radius: 999px; }
.cap .more-link { margin-top: auto; align-self: flex-start; }
@media (max-width: 760px) { .cap { grid-template-columns: 1fr; gap: 16px; padding: 14px; } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 12px 16px; text-align: center; }
.stat b { display: block; font: 800 32px/1 var(--font-head); color: var(--accent); margin-bottom: 8px; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 500; line-height: 1.4; display: block; }

/* news */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.55; }
.news-list li .news-date { flex: 0 0 58px; }
.news-list li .tag { flex: 0 0 auto; min-width: 84px; }
.news-list li > span:last-child { flex: 1 1 240px; }
.news-list li:last-child { border-bottom: 0; }
.news-date { font: 700 13px var(--font-head); color: var(--muted); }
.tag { display: inline-block; text-align: center; font: 700 11px var(--font-head); letter-spacing: .04em; padding: 2px 10px; border-radius: 999px; background: var(--line); color: #4b4b45; white-space: nowrap; }
.tag.publication { background: var(--tint); color: var(--accent-ink); }
.tag.award { background: var(--accent); color: #fff; }
.tag.people { background: #dee6ee; color: #33506b; }
.tag.grant { background: #e2ead9; color: #3f5d34; }
.tag.patent { background: #e9dfea; color: #5c3f5e; }
.news-filter, .research-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { background: #fff; border: 1px solid var(--line-2); color: #4b4b45; font: 600 13px var(--font-head); padding: 5px 14px; border-radius: 999px; cursor: pointer; transition: border-color .12s, background .12s; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--accent-2); }

/* join → dark hiring card */
.join { background: radial-gradient(60% 120% at 100% 0%, rgba(226,87,93,.38), transparent 70%), linear-gradient(115deg, var(--ink) 35%, #3a1517 100%), var(--ink); color: var(--on-dark); border-radius: var(--radius); margin-top: 36px; padding: 0 !important; position: relative; overflow: hidden; }
.join::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); }
.join .container { padding: 28px 28px 26px !important; }
.join h2, .join h3 { color: #fff; }
.join .section-title::after { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.join p { color: #d9d5cc; font-size: 14.5px; }
.join h3 { font-size: 16px; }
.join .grid > div { border-top: 1px solid rgba(255,255,255,.18); padding-top: 14px; }

/* ---------- members / profile ---------- */
.profile { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 24px; }
.profile-photo { border-radius: 6px; border: 1px solid var(--line); background: #fff; padding: 6px; }
.profile h2 { font-size: 26px; margin-bottom: 2px; }
.profile .en { color: var(--muted); font-size: 16px; font-weight: 500; }
.profile .role { color: var(--accent-ink); font: 600 13px var(--font-head); letter-spacing: .04em; text-transform: uppercase; margin: 6px 0 16px; }
.profile ul { padding-left: 18px; }
.contact-list { list-style: none; padding: 0 !important; margin: 14px 0 0; font-size: 14px; }
.contact-list li { padding: 3px 0; }
.contact-list b { display: inline-block; min-width: 60px; }
.timeline { list-style: none; margin: 0 0 20px; padding: 0 !important; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 14.5px; }
.timeline .when { font: 700 13.5px var(--font-head); color: var(--accent-ink); }
.subhead { font-size: 18px; margin: 28px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.subhead:first-child { margin-top: 0; }
.person { text-align: center; padding: 22px 16px 16px; }
.avatar { width: 132px; aspect-ratio: 3 / 4; border-radius: var(--radius); margin: 0 auto 14px; background: var(--tint); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font: 800 36px var(--font-head); color: var(--accent); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
/* 사진이 없을 때: 연구실 로고(푸터와 같은 모양) */
.avatar.no-photo { flex-direction: column; gap: 12px; padding: 12px; text-align: center; border-color: transparent; background: radial-gradient(90% 60% at 100% 0%, rgba(226,87,93,.4), transparent 70%), linear-gradient(160deg, var(--ink) 40%, #3a1517 100%), var(--ink); }
.avatar.no-photo img { width: auto; height: 44px; object-fit: contain; padding: 4px 5px; border-radius: 6px; background: #fff; }
.avatar.no-photo b { color: #fff; font: 800 14px/1.25 var(--font-head); }
.person h3 { font-size: 17px; margin-bottom: 0; }
.person .alt-name { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.person .pos { font: 600 12px var(--font-head); letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); margin-top: 4px; }
.person .edu { list-style: none; padding: 10px 0 0; margin: 10px 0 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-2); text-align: left; }
.person .edu li + li { margin-top: 3px; }
.person .work { font-size: 13px; color: var(--ink-2); margin-top: 6px; text-align: left; font-weight: 600; }
.person .topic { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: left; }
.person .edu + .topic, .person .work + .topic { padding-top: 6px; border-top: 1px dashed var(--line); }
.empty-note { padding: 20px; border: 1px dashed var(--line-2); text-align: center; color: var(--muted); border-radius: var(--radius); }

/* ---------- research ---------- */
.research-area { padding: 36px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.research-area:last-child { border-bottom: 0; }
.ra-head { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; margin-bottom: 22px; }
.ra-head .num { display: inline-block; font: 700 11.5px var(--font-head); color: var(--accent-ink); background: var(--tint); letter-spacing: .1em; padding: 2px 12px; border-radius: 999px; margin-bottom: 10px; }
.ra-head h2 { font-size: clamp(21px, 2.4vw, 25px); }
.ra-head p, .ra-head li { font-size: 15px; }
.ra-head ul { padding-left: 20px; margin: 0; }
.ra-head ul li { margin-bottom: 3px; }
.ra-hero { background: #fff; }
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.figs.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fig { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; cursor: zoom-in; transition: box-shadow .15s; }
.fig:hover { box-shadow: 0 6px 18px rgba(27,27,25,.1); }
.fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.fig figcaption { font-size: 12.5px; color: var(--muted); padding-top: 6px; line-height: 1.45; }
.ref { margin-top: 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; font-size: 14px; }
.ref b { color: var(--accent-ink); font-family: var(--font-head); }

/* ---------- publications ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tab { background: #fff; border: 1px solid var(--line-2); padding: 6px 14px; border-radius: 999px; font: 600 13.5px var(--font-head); color: #4b4b45; cursor: pointer; }
.tab:hover { border-color: var(--accent); color: var(--accent-ink); }
.tab.on { background: var(--ink); border-color: var(--ink); color: var(--accent-2); }
.tab .cnt { font-size: 11.5px; background: var(--line); color: #4b4b45; padding: 0 7px; border-radius: 99px; margin-left: 6px; }
.tab.on .cnt { background: var(--accent); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { font: 14.5px var(--font-body); padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; color: var(--ink); }
.toolbar input { flex: 1; min-width: 200px; }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.toolbar .result { color: var(--muted); font-size: 13.5px; }
.year-group h3 { display: inline-block; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .08em; padding: 2px 14px; border-radius: 3px; margin: 26px 0 4px; }
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pub::before { content: "[" attr(data-n) "]"; font: 700 13px var(--font-head); color: var(--muted); padding-top: 2px; }
.pub-title { font-weight: 600; font-size: 15px; line-height: 1.5; }
.pub-title a { color: inherit; }
/* 본문 링크 밑줄(main li a)을 특허 제목·KIPRIS 배지에서는 뺌 */
main ol li.pub .pub-title a, main ol li.pub a.badge { border-bottom: 0; text-decoration: none; }
.pub-title a:hover { color: var(--accent-ink); }
.badge.link { background: var(--accent); color: #fff; text-decoration: none; }
.badge.link:hover { background: var(--accent-ink); color: #fff; text-decoration: none; }
.pub-meta { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.pub-meta i { color: var(--accent-ink); }
#recent-pubs { border-top: 0 !important; }
.badge { display: inline-block; font: 700 11px var(--font-head); padding: 1px 9px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; background: var(--tint); color: var(--accent-ink); }
.badge.solid { background: var(--accent); color: #fff; }
.badge.gray { background: var(--line); color: var(--muted); }
.pub-meta.transfer { color: var(--accent-ink); font-weight: 700; }
/* 기술이전(특허양도) 배지 — 글자가 흰색에서 회색으로 왼쪽부터 퍼졌다가 다시 흰색으로 돌아옴 */
.badge.transfer-badge { margin: 4px 0 0; padding: 3px 11px; font-size: 12px; background: var(--accent); color: #fff; }
.badge.transfer-badge .tb-text {
  background: linear-gradient(90deg, #9a9a9a 0 45%, #fff 55% 100%) 100% 0 / 220% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: transfer-sweep 2.4s ease-in-out infinite alternate;
}
@keyframes transfer-sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }
/* '동작 줄이기' 설정 사용자에게는 같은 효과를 더 천천히 */
@media (prefers-reduced-motion: reduce) { .badge.transfer-badge .tb-text { animation-duration: 4s; } }
.updated { font-size: 12.5px; color: var(--muted); margin-top: 22px; }

/* ---------- projects ---------- */
.proj-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.proj-table th { text-align: left; font: 700 12.5px var(--font-head); letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--ink); padding: 10px 12px; }
.proj-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.proj-table tr:last-child td { border-bottom: 0; }
.proj-table tr:hover td { background: var(--surface); }
.proj-table .period { white-space: nowrap; font: 600 13.5px var(--font-head); color: var(--muted); }
.proj-table .t { font-weight: 600; }

/* awards */
.award-list { list-style: none; padding: 0; margin: 0; border-top: 0 !important; }
.award-list li { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.award-list .yr { font: 800 14px var(--font-head); color: var(--accent); }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(27,27,25,.92); display: none; align-items: center; justify-content: center; z-index: 300; padding: 30px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 92vh; max-width: 96vw; background: #fff; padding: 8px; border-radius: 6px; }

/* ---------- footer ---------- */
.site-footer { background: radial-gradient(45% 140% at 90% 0%, rgba(226,87,93,.32), transparent 70%), linear-gradient(100deg, var(--ink) 35%, #3a1517 100%), var(--ink); color: #a9a59b; font-size: 14px; padding: 0 0 22px; }
.site-footer::before { content: ""; display: block; height: 3px; background: var(--grad); margin-bottom: 44px; }
.site-footer h3 { color: #fff; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer a { color: var(--accent-2); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.footer-brand img { height: 40px; width: auto; padding: 4px 5px; border-radius: 6px; background: #fff; }
.footer-brand b { color: #fff; font: 800 18px var(--font-head); }
.footer-bottom { border-top: 1px solid #3a3a36; margin-top: 34px; padding-top: 16px; font-size: 12.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); gap: 34px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-figure { max-width: 520px; }
}
@media (max-width: 1240px) {
  .brand-sub { display: none; }
}
@media (min-width: 641px) { .brand { flex: none; } }
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--ink); display: none; border-top: 1px solid #333; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 6px 16px 14px; }
  .main-nav a { padding: 11px 6px; border-bottom: 1px solid #2e2e2b; }
  .main-nav a::before { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; transform: scaleY(0); }
  .main-nav a.active::before { transform: scaleY(1); }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
  .sidebar { position: static; display: grid; grid-template-columns: 96px 1fr; gap: 6px 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
  .author__avatar { grid-row: span 2; max-width: 96px; }
  .author__name { margin-top: 0; }
  .author__bio { margin: 2px 0 0; }
  .author__urls, .sidebar .side-cta { grid-column: 1 / -1; }
  .author__urls { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
  .sidebar .side-cta { justify-self: start; margin-top: 6px; }
  .profile, .ra-head, .footer-grid { grid-template-columns: 1fr; }
  .profile-photo { max-width: 240px; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .container, .layout { padding-left: 16px; padding-right: 16px; }
  .brand-sub { display: none; }
  .brand-title { font-size: 14.5px; }
  .brand img { height: 30px; }
  .brand { gap: 8px; }
  .brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-header .container { gap: 10px; }
  .header-tools { gap: 6px; }
  .lang-switch button { padding: 3px 7px; font-size: 11px; }
  .nav-toggle { padding: 4px; }
  .hero .container { padding: 28px 20px 26px !important; }
  .hero-eyebrow { font-size: 10.5px; letter-spacing: .05em; border-radius: 6px; }
  .join .container { padding: 24px 20px !important; }
  .grid.c2, .grid.c3, .figs, .figs.c2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat b { font-size: 27px; }
  .timeline li, .award-list li { grid-template-columns: 1fr; gap: 2px; }
  .proj-table thead { display: none; }
  .proj-table, .proj-table tbody, .proj-table tr { display: block; }
  .proj-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .proj-table td { display: block; border: 0; padding: 2px 12px; }
  .profile { padding: 18px; }
}

/* ---------- Patents tab: flagship cards, view toggle, field groups ---------- */
.pf-grid { margin-bottom: 8px; }
.section-title a.pf-title-link { color: inherit; border-bottom: 0; }
.section-title a.pf-title-link:hover { color: var(--accent-ink); }
.pf-pdf-ico { font: 700 12px var(--font-head); color: #fff; background: var(--accent); border-radius: 4px; padding: 2px 7px; vertical-align: 4px; margin-left: 4px; }
.pf-pdf-row { margin: -2px 0 18px; }
.pf-size { font-weight: 500; font-size: 12px; opacity: .8; margin-left: 4px; }
.pf-grid .thumb.fig { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; }
.pf-grid .thumb.fig img { aspect-ratio: auto; }
.pf-grid .card h3 { font-size: 16px; line-height: 1.45; }
.pf-meta { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pf-no { font: 600 12.5px var(--font-head); color: var(--muted); }
.tag.trl { background: var(--accent); color: #fff; }
.pt-view { display: flex; gap: 6px; }
.pt-view[hidden] { display: none; }
.field-group h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 28px 0 2px; }
.field-group h3 .cnt { font: 700 12px var(--font-head); background: var(--tint); color: var(--accent-ink); border-radius: 999px; padding: 1px 9px; }
.field-group h4 { font-size: 14px; color: var(--accent-ink); margin: 14px 0 0; padding-left: 10px; border-left: 3px solid var(--accent); }
.pf-coop { text-align: left; padding: 18px 18px 16px; }
.pf-coop b { font-size: 22px; }
.pf-coop span { font-size: 14px; color: var(--ink); }
