/* 첫 규칙: 어떤 경우에도 흰 화면이 번쩍이지 않게 */
html, body { background: #000000 !important; color: #ffffff; }

/* Agent Wave 구조: 검은 바탕, 은색 금속 버튼, 회색 보조 글자. 내용 패널은 어두운 유리. */
:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #9a9a9a;
  --stat: #d8d8d8;
  --border: rgba(255, 255, 255, 0.16);
  --border-soft: rgba(255, 255, 255, 0.1);
  --panel: rgba(10, 10, 11, 0.86);
  --panel-2: rgba(255, 255, 255, 0.04);
  --glow: rgba(186, 208, 255, 0.35);

  --logo: 15.5px;
  --nav: 14px;
  --nav-h: 40px;
  --btn: 13.5px;
  --btn-h: 40px;
  --hero-btn-h: 44px;
  --h1: clamp(34px, 4.4vw, 76px);
  --lede: clamp(15.5px, 1.05vw, 20px);
  --badge: 12.5px;
  --stat-size: clamp(13.5px, 0.85vw, 16px);
  --header-y: 22px;
  --header-x: clamp(16px, 2.8vw, 80px);
  --stats-x: clamp(20px, 5vw, 120px);

  --margin: clamp(14px, 2.8vw, 48px);
  --h2: clamp(28px, 3vw, 46px);
  --h3: 21px;
  --body: 16.5px;
  --small: 14px;
  --panel-pad: clamp(36px, 5vw, 88px) clamp(20px, 3.4vw, 56px);
  --panel-gap: clamp(64px, 11vh, 130px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --wave-bg: #0b0d0f;
  --wave-line: #3ddc84;
  --wave-dim: #3a4046;
  --wave-text: #d6dde3;
  --wave-cursor: #ffcc4d;
}
html, body { background: #000000; background: var(--bg, #000000); color: #ffffff; color: var(--text, #ffffff); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  position: relative;
  overflow-x: hidden;
  font-family: "Inter", "Pretendard Variable", Pretendard, "Malgun Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--body);
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
figcaption { margin-top: 14px; font-size: var(--small); color: var(--muted); max-width: 62ch; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: var(--h2); font-weight: 500; line-height: 1.12; letter-spacing: -0.04em; }
h3 { font-size: var(--h3); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid #dfe7ff; outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
em { font-style: normal; }

/* 필름 그레인 */
.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 배경: 화면에 고정된 칩 이미지 */
/* 배경 층은 z-index 0, 내용은 그 위 1 (body의 검은 바탕이 그림을 덮지 않도록) */
main, .close { position: relative; z-index: 1; }
.backdrop {
  position: fixed; inset: 0; z-index: 0;
  background: #000 url("assets/bg-chip-stack-1920.jpg") 50% 38% / cover no-repeat;
}
@media (max-width: 900px) { .backdrop { background-image: url("assets/bg-chip-stack.webp"); } }
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.05) 22%, rgba(0,0,0,0.1) 48%, rgba(0,0,0,0.86) 82%, #000 100%),
    rgba(0, 0, 0, var(--shade, 0.12));
}

/* 머리말: 3열 그리드 */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: var(--header-y) var(--header-x) 12px;
  transition: background 0.35s ease;
}
.header.scrolled { background: rgba(0, 0, 0, 0.72); }
.logo { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-size: var(--logo); font-weight: 600; letter-spacing: -0.03em; text-decoration: none; color: #fff; }
.logo-mark { width: 22px; height: 22px; }
.logo-suffix { font-weight: 400; color: var(--muted); }
#site-nav { display: flex; align-items: center; gap: 8px; justify-self: center; }
.pill {
  position: relative; overflow: hidden; display: inline-flex; align-items: center;
  height: var(--nav-h); padding: 0 18px; border-radius: 7px;
  border: 1px solid rgba(198, 198, 198, 0.55);
  background: linear-gradient(105deg, #050505 0%, #2a2a2a 48%, #4a4a4a 100%);
  color: #f3f3f3; font-size: var(--nav); letter-spacing: -0.01em; white-space: nowrap; text-decoration: none;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.pill::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.16) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.6s ease;
}
.pill:hover { border-color: rgba(235,235,235,0.9); background: linear-gradient(105deg, #111 0%, #3a3a3a 45%, #6a6a6a 100%); box-shadow: 0 0 18px rgba(200,210,230,0.18); }
.pill:hover::before { transform: translateX(120%); }
.header-end { justify-self: end; display: flex; align-items: center; gap: 8px; }
.burger { display: none; width: 42px; height: 42px; border-radius: 6px; border: 1px solid var(--border); background: rgba(8,8,8,0.55); place-content: center; gap: 5px; cursor: pointer; }
.burger span { display: block; width: 16px; height: 1.5px; background: #fff; border-radius: 1px; transition: transform 0.25s, opacity 0.2s; }
.burger:hover { border-color: rgba(255,255,255,0.32); background: rgba(255,255,255,0.05); }
body.menu-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.menu-backdrop { display: none; }

/* 버튼: 금속 광택 */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--btn-h); padding: 0 16px; border-radius: 6px;
  font-size: var(--btn); font-weight: 500; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s, color 0.35s, transform 0.2s;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.45) 48%, transparent 76%);
  transform: translateX(-130%); transition: transform 0.65s ease;
}
.btn:hover::after { transform: translateX(130%); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-solid { background: linear-gradient(180deg, #ffffff 0%, #e7e7e7 48%, #cfcfcf 100%); color: #111; border: 1px solid #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.95); }
.btn-solid:hover { background: linear-gradient(180deg, #fff 0%, #f3f6ff 42%, #d5def2 100%); border-color: #f2f6ff; box-shadow: inset 0 1px 0 #fff, 0 0 22px var(--glow), 0 8px 18px rgba(255,255,255,0.12); }
.btn-ghost {
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(0,0,0,0.5) 46%, rgba(150,170,200,0.1));
  color: #fff; border: 1px solid rgba(198,198,198,0.55); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.btn-ghost:hover { border-color: rgba(220,230,255,0.8); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 0 24px rgba(170,200,255,0.28); }
.hero-btn { height: var(--hero-btn-h); padding: 0 20px; font-size: 14.5px; }

/* 첫 화면: 아래쪽 가운데 정렬 + 맨 아래 수치 세 개 */
.front {
  position: relative;
  display: grid; grid-template-rows: 1fr auto;
  min-height: 100svh;
  padding: 96px 24px 0;
  overflow-x: clip;
}
.hero-copy {
  align-self: end; justify-self: center;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  width: 100%; max-width: 1040px;
  padding-bottom: clamp(40px, 7vh, 88px);
}
.hero-copy { position: relative; }
.hero-copy::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 52%;
  width: 135%; height: 150%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(0,0,0,0.72), rgba(0,0,0,0.45) 55%, rgba(0,0,0,0));
  pointer-events: none;
}
.badge {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px;
  padding: 9px 15px; border-radius: 5px;
  background: linear-gradient(90deg, #7d7d7d 0%, #2a2a2a 52%, #0a0a0a 100%);
  color: #f2f2f2; font-size: var(--badge); letter-spacing: -0.01em;
}
.badge-edge { width: 24px; height: 12px; color: #fff; filter: drop-shadow(0 0 3px rgba(255,255,255,0.45)); }
.front h1 {
  display: flex; flex-direction: column; align-items: center;
  font-size: var(--h1); font-weight: 500; line-height: 1.14; letter-spacing: -0.045em; color: #fff;
}
.headline-line { display: block; overflow: hidden; padding: 0.06em 0.15em 0.14em; }
.headline-line > span { display: inline-block; white-space: nowrap; }
.t-narrow { display: none; }
@media (max-width: 700px) {
  .t-wide { display: none; }
  .t-narrow { display: inline; }
  :root { --h1: clamp(24px, 7.4vw, 34px); }
}
.front h1 em {
  font-family: "Instrument Serif", "Times New Roman", Times, serif; font-style: italic; font-weight: 400;
  font-size: 1.12em; letter-spacing: -0.02em; color: var(--muted);
  animation: in-em 1.2s var(--ease) 0.72s both;
}
.lede { max-width: 620px; margin-top: 20px; color: #b4b4b4; font-size: var(--lede); line-height: 1.6; letter-spacing: -0.015em; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.hero-stats {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--stats-x) max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-soft);
  color: var(--stat);
}
.stat { display: inline-flex; align-items: center; gap: 14px; font-size: var(--stat-size); letter-spacing: -0.015em; white-space: nowrap; }
.stat b { color: #fff; font-weight: 600; margin-right: 4px; }
.stat-icon { width: 22px; height: 22px; color: #e8e8e8; flex: none; }

/* 등장 움직임 (Agent Wave): 쉬는 상태는 불투명, 애니메이션이 돌 때만 숨겼다 나타남 */
.appear { opacity: 1; animation-duration: 1.05s; animation-fill-mode: both; animation-timing-function: var(--ease); animation-delay: var(--d, 0.08s); }
.appear--scale { animation-name: in-scale; }
.appear--soft { animation-name: in-soft; }
.appear--mask { animation-name: in-mask; }
.appear--pop { animation-name: in-pop; }
.appear--btn { animation-name: in-btn; }
.appear--side { animation-name: in-side; }
.appear--stat { animation-name: in-stat; }
.lede.appear { animation-duration: 1.25s; }
.appear.is-in { animation: none; opacity: 1; transform: none; filter: none; }
@keyframes in-scale { from { opacity: 0; transform: scale(0.84); } to { opacity: 1; transform: none; } }
@keyframes in-soft { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes in-mask { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }
@keyframes in-pop { 0% { opacity: 0; transform: scale(0.9); } 70% { opacity: 1; transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes in-btn { from { opacity: 0; transform: translateY(18px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes in-side { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes in-stat { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes in-em { from { opacity: 0.35; filter: blur(4px); } to { opacity: 1; filter: none; } }

/* 내용 패널: 배경 위로 올라오는 어두운 유리 */
.panel {
  margin: 0 max(var(--margin), calc((100% - 1600px) / 2)) var(--panel-gap);
  padding: var(--panel-pad);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  will-change: transform;
}
.front + .panel { margin-top: clamp(48px, 10vh, 120px); }
.panel p, .panel li, .panel td { color: #d2d2d2; }
.panel .muted, .panel .team, .panel .tags { color: var(--muted); }
.panel a:hover { color: #fff; text-shadow: 0 0 12px var(--glow); }
.section-lede { color: var(--muted) !important; }

/* 특징 + 블록도 */
.spec { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 48px; align-items: start; }
.spec-text { grid-column: 1 / span 4; }
.spec-figure { grid-column: 5 / span 8; }
.spec-figure img, .work-media figure img { background: #fff; padding: clamp(8px, 1.4vw, 18px); border-radius: 8px; }
.features { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.features li { padding-left: 22px; position: relative; }
.features li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 8px; height: 8px; border-radius: 2px; background: linear-gradient(180deg, #fff, #9a9a9a); }
.spec-text h3 { margin-top: 40px; color: var(--muted); font-weight: 500; font-size: 15px; }
.spec-text h3 + p { margin-top: 6px; font-size: 20px; font-weight: 600; color: #fff; }

/* 타이밍도 */
.timing-head, .boards-head, .labs-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; }
.timing-head h2, .boards-head h2, .labs-head h2 { grid-column: 1 / span 6; }
.timing-head p, .boards-head p, .labs-head p { grid-column: 8 / span 5; color: var(--muted); }
.history {
  position: relative; list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: 1.35fr repeat(5, 1fr); column-gap: 20px;
}
/* 시간축 선: 보이면 왼쪽에서 오른쪽으로 그어짐 */
.history::before {
  content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.55), rgba(255,255,255,0.18) 40%, rgba(255,255,255,0.18) 80%, rgba(255,255,255,0.6));
  transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease);
}
.history.in::before, html:not(.js) .history::before { transform: none; }
.step { position: relative; padding-top: 34px; }
.step .dot {
  position: absolute; left: 0; top: 0; width: 14px; height: 14px; border-radius: 50%;
  background: #000; border: 2px solid #8f8f8f;
}
.step.now .dot { background: #fff; border-color: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,0.1), 0 0 22px var(--glow); animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 50% { box-shadow: 0 0 0 10px rgba(255,255,255,0.04), 0 0 30px var(--glow); } }
.step .when { font-size: 13px; color: var(--muted) !important; letter-spacing: 0; }
.now-tag {
  display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 4px; vertical-align: 1px;
  background: linear-gradient(180deg, #fff, #cfcfcf); color: #111; font-size: 11px; font-weight: 600;
}
.step .tag {
  display: inline-block; margin-top: 12px; padding: 3px 8px; border-radius: 4px;
  border: 1px solid var(--border); color: #cfcfcf !important; font-size: 12px; line-height: 1.4;
}
.step h3 { margin-top: 10px; font-size: 18px; font-weight: 600; color: #fff; letter-spacing: -0.025em; }
.step .detail { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: #b8b8b8 !important; }
.step:first-child h3 { font-size: 20px; }
.step.now h3 { text-shadow: 0 0 18px rgba(186,208,255,0.35); }
/* 경력 */
.career { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 32px; align-items: start; }
.career-head { grid-column: 1 / span 4; position: sticky; top: 110px; }
.career-company { margin-top: 20px; font-size: 18px; line-height: 1.55; color: var(--muted) !important; }
.career-company strong { display: block; font-size: 22px; color: #fff; font-weight: 600; }
.career-table { grid-column: 5 / span 8; }

/* 표 */
.sheet { width: 100%; border-collapse: collapse; background: var(--panel-2); border-radius: 10px; overflow: hidden; }
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.sheet thead th { background: rgba(255,255,255,0.07); color: var(--muted); font-size: 13px; font-weight: 500; }
.sheet tbody th { font-weight: 600; width: 30%; color: #fff; }
.sheet tr:last-child th, .sheet tr:last-child td { border-bottom: 0; }
.sheet tbody tr { transition: background 0.25s; }
.sheet tbody tr:hover { background: rgba(255,255,255,0.03); }

/* 설계와 검증 */
.work { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 32px; margin-top: clamp(56px, 7vw, 104px); align-items: start; }
.work-text { grid-column: 1 / span 5; }
.work-media { grid-column: 6 / span 7; }
.work:nth-child(even) .work-text { grid-column: 8 / span 5; grid-row: 1; }
.work:nth-child(even) .work-media { grid-column: 1 / span 7; grid-row: 1; }
.work h3 { font-size: clamp(22px, 2vw, 30px); font-weight: 500; letter-spacing: -0.035em; color: #fff; }
.work .team { margin-top: 10px; font-size: var(--small); }
.work .summary { margin-top: 18px; }
.work ul { margin: 16px 0 0; padding-left: 18px; display: grid; gap: 8px; }
.work li::marker { color: var(--muted); }
.work .tags { margin-top: 18px; font-size: var(--small); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.links a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 6px; text-decoration: none; font-size: 13.5px; font-weight: 500;
  border: 1px solid rgba(198,198,198,0.45);
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(0,0,0,0.45) 50%, rgba(160,175,200,0.08));
  transition: border-color 0.3s, box-shadow 0.3s;
}
.links a:hover { border-color: rgba(220,230,255,0.75); box-shadow: 0 0 20px rgba(170,200,255,0.22); text-shadow: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px 0 0; background: var(--border-soft); border-radius: 10px; overflow: hidden; }
.stats div { background: #0e0e0f; padding: 14px 16px; }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: #fff; }
.work-media figure { overflow: hidden; }
.work-media img { transition: transform 0.6s var(--ease); }
.work-media figure:hover img { transform: scale(1.015); }
.video { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: pointer; border-radius: 8px; overflow: hidden; }
.video img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.85; padding: 0 !important; background: #000 !important; transition: opacity 0.3s, transform 0.6s var(--ease); }
.video:hover img { opacity: 1; }
.video span {
  position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #e7e7e7 48%, #cfcfcf 100%); color: #111; font-size: 13.5px; font-weight: 600;
}
.video:hover span { box-shadow: 0 0 22px var(--glow); }
.video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }

/* 보드 사진 */
.board-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 64px; margin-top: 56px; }
.board { grid-column: span 6; }
.board:nth-child(4n + 1) { grid-column: 1 / span 7; }
.board:nth-child(4n + 2) { grid-column: 8 / span 5; }
.board:nth-child(4n + 3) { grid-column: 1 / span 5; }
.board:nth-child(4n + 4) { grid-column: 6 / span 7; }
.board .photo { overflow: hidden; border-radius: 10px; background: #000; }
.board img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.8s var(--ease); }
.board:nth-child(4n + 2) img, .board:nth-child(4n + 3) img { aspect-ratio: 1 / 1; }
.board:hover img { transform: scale(1.03); }
.board .video img { opacity: 1; }
.board h3 { margin-top: 20px; color: #fff; }
.board .team { margin-top: 6px; font-size: var(--small); }
.board p.text { margin-top: 12px; max-width: 40em; }
.board .tags { margin-top: 12px; font-size: var(--small); }

/* 실습 기록 */
.lab-group { margin-top: 48px; }
.lab-group h3 { margin-bottom: 16px; color: #fff; }
.labs .sheet tbody th { width: 24%; }
.labs .sheet td:nth-child(3) { color: var(--muted); }
.labs .sheet td:last-child { width: 120px; }
.row-links { white-space: nowrap; }
.row-links a { font-weight: 500; }
.row-links a + a { margin-left: 14px; }

/* 연락처 */
.contact { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 48px; align-items: center; margin-bottom: clamp(48px, 8vh, 96px); }
.contact-text { grid-column: 1 / span 6; }
.contact-lede { margin-top: 16px; font-size: 18px; color: var(--muted) !important; }
.contact-mail { display: inline-block; margin-top: 26px; font-size: clamp(26px, 3vw, 44px); font-weight: 500; letter-spacing: -0.04em; text-decoration: none; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.35); transition: border-color 0.3s, text-shadow 0.3s; }
.contact-mail:hover { border-color: #fff; }
.pins { margin-top: 36px; table-layout: fixed; }
.pins thead th:first-child, .pins tbody th { width: 30%; }
.pins a { word-break: break-all; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.25); }
.contact-figure { grid-column: 8 / span 5; }
.contact-figure img { border-radius: 10px; }

/* 맺음 */
.close { padding: clamp(48px, 7vw, 96px) var(--header-x) 40px; background: linear-gradient(180deg, rgba(0,0,0,0.6), #000 40%); border-top: 1px solid var(--border-soft); }
.close-name { font-size: clamp(32px, 4vw, 60px); font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.close-role { margin-top: 10px; font-size: 18px; color: var(--muted); }
.close-role + .close-meta { margin-top: 40px; }
.close-meta { margin-top: 10px; font-size: 13.5px; color: #777; max-width: 72ch; }

/* 패널 속 요소: 차례로 올라옴 */
.js [data-reveal] > *, .js [data-reveal].solo { opacity: 0; transform: translateY(48px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js [data-reveal].in > *, .js [data-reveal].in.solo { opacity: 1; transform: none; }
.js [data-reveal].in > *:nth-child(2) { transition-delay: 0.09s; }
.js [data-reveal].in > *:nth-child(3) { transition-delay: 0.18s; }
.js [data-reveal].in > *:nth-child(4) { transition-delay: 0.27s; }
.js [data-reveal].in > *:nth-child(n + 5) { transition-delay: 0.34s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .appear, .front h1 em { animation: none !important; opacity: 1; transform: none; filter: none; }
  .js [data-reveal] > *, .js [data-reveal].solo { transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .work-media img, .board img, .pill::before, .btn::after { transition: none; }
  .step.now .dot { animation: none; }
}

/* 큰 화면 */
@media (min-width: 1920px) {
  :root { --nav: 16px; --nav-h: 48px; --btn: 16px; --btn-h: 48px; --hero-btn-h: 52px; --badge: 14.5px; --logo: 18px; }
  .hero-btn { font-size: 16px; padding: 0 24px; }
}

/* 태블릿 */
@media (max-width: 1100px) {
  .spec-text, .spec-figure, .career-head, .career-table, .contact-text, .contact-figure { grid-column: 1 / -1; }
  .career-head { position: static; }
  .work-text, .work-media, .work:nth-child(even) .work-text, .work:nth-child(even) .work-media { grid-column: 1 / -1; grid-row: auto; }
  .timing-head h2, .timing-head p, .boards-head h2, .boards-head p, .labs-head h2, .labs-head p { grid-column: 1 / -1; }
  .timing-head p, .boards-head p, .labs-head p { margin-top: 14px; }
  .contact-figure { max-width: 520px; }
  .hero-stats { flex-wrap: wrap; justify-content: center; gap: 14px 32px; }
  .history { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .history::before { display: none; }
}

/* 휴대폰: 메뉴는 햄버거 안으로 */
@media (max-width: 900px) {
  .header { grid-template-columns: 1fr auto; padding: 14px var(--margin) 10px; }
  .header-cta { display: none; }
  .burger { display: grid; position: relative; z-index: 80; }
  .logo { position: relative; z-index: 80; }
  .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(8,8,8,0.42); opacity: 0; visibility: hidden; transition: opacity 0.28s, visibility 0.28s; }
  body.menu-open .menu-backdrop { opacity: 1; visibility: visible; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
  #site-nav {
    position: fixed; inset: 0; z-index: 45; flex-direction: column; justify-content: center; gap: 12px;
    padding: max(96px, calc(env(safe-area-inset-top) + 88px)) 22px 32px;
    opacity: 0; visibility: hidden; transition: opacity 0.28s, visibility 0.28s;
  }
  body.menu-open #site-nav { opacity: 1; visibility: visible; }
  body.menu-open { overflow: hidden; }
  #site-nav .pill { width: 100%; height: 56px; justify-content: center; font-size: 19px; border-radius: 10px; }
  .front { padding: 84px 20px 0; }
  .hero-copy { padding-bottom: 36px; }
  .hero-stats { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 20px 28px; }
  .stat { white-space: normal; }
}
@media (max-width: 700px) {
  :root { --body: 16px; }
  .panel { margin-left: 10px; margin-right: 10px; border-radius: 12px; }
  .history { grid-template-columns: 1fr; row-gap: 28px; padding-left: 4px; }
  .history::before { display: block; left: 10px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; transform: scaleY(0); transform-origin: top; background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.15) 70%, rgba(255,255,255,0.6)); }
  .history.in::before { transform: none; }
  .step { padding: 0 0 0 34px; }
  .step .dot { top: 3px; left: 0; }
  .step .tag { margin-top: 8px; }
  .stats { grid-template-columns: 1fr; }
  .board, .board:nth-child(n) { grid-column: 1 / -1; }
  .board:nth-child(n) img { aspect-ratio: 4 / 3; }
  .sheet th, .sheet td { padding: 12px 14px; }
  .pins thead th:first-child, .pins tbody th { width: 34%; white-space: nowrap; font-size: 13px; }
  .labs .sheet thead { display: none; }
  .labs .sheet tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
  .labs .sheet tbody th, .labs .sheet td { display: block; width: auto; padding: 0; border: 0; }
  .labs .sheet td:nth-child(2), .labs .sheet td:nth-child(3) { grid-column: 1 / -1; margin-top: 4px; }
  .labs .sheet td:last-child { grid-row: 1; grid-column: 2; width: auto; }
}
@media (max-width: 560px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}
