/* ==========================================================================
   정민수 포트폴리오 — portfolio.rpg-hacker.de 의 구성(회색 프레임 + 흰 종이,
   상단 섹션 내비, 원형 궤도 프로필, 연도별 프로젝트 타임라인)을 참고했다.
   ========================================================================== */

:root {
  --frame: #e4e6e8;
  --paper: #ffffff;
  --ink: #4a4f57;
  --ink-strong: #24272c;
  --muted: #8b919a;
  --line: #e7e9ec;
  --line-strong: #d5d9de;
  --surface: #f6f7f8;
  --accent: #2f7ea5;
  --accent-dark: #22617f;
  --accent-soft: #e9f3f8;
  --warn-soft: #fdf3e7;
  --warn: #b26a14;
  --ok-soft: #eaf6ef;
  --ok: #2d8452;
  --code-bg: #1f2329;
  --code-ink: #e6e9ef;

  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-serif: Merriweather, "Noto Serif KR", Georgia, serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, "D2Coding", monospace;

  --paper-w: 1080px;
  --content-w: 860px;
  --gutter: 48px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--frame);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.paper {
  max-width: var(--paper-w);
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .03);
}

/* ---------- 떠 있는 캡슐 메뉴 ---------- */
.dock {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 50;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(20, 24, 31, .14);
}
.dock-home { flex: none; margin-right: 6px; border-radius: 50%; }
.dock-home img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 15%;
}
.dock-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .25s;
}
.dock-link svg { display: none; width: 20px; height: 20px; }
.dock-link:hover { color: var(--accent); text-decoration: none; }
.dock-link.is-active,
.dock-link.is-active:hover { color: #fff; }
.dock-pill {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transition: left .3s cubic-bezier(.3, .8, .3, 1), width .3s cubic-bezier(.3, .8, .3, 1), opacity .2s;
}
.dock-pill.is-ready { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .dock-pill { transition: none; } }

/* ---------- 섹션 공통 ---------- */
.section {
  padding: 72px var(--gutter) 64px;
  border-bottom: 1px solid var(--line);
}
.section:last-child { border-bottom: 0; }
.section-title {
  margin: 0 0 40px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -.01em;
}
.section-lead {
  max-width: var(--content-w);
  margin: -24px auto 36px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- ABOUT (캐릭터 카드형) ---------- */
.hero { padding-top: 112px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: center;
  max-width: 920px;
  margin: 0 auto;
}
.hero-eyebrow {
  margin: 0 0 14px;
  font: 600 12px/1.4 var(--font-mono);
  color: var(--accent);
  letter-spacing: .08em;
}
.hero-name {
  margin: 0;
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink-strong);
  letter-spacing: -.02em;
}
.hero-name small {
  margin-left: 12px;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.hero-headline { margin: 22px 0 10px; font-size: 19px; font-weight: 700; line-height: 1.6; color: var(--ink-strong); }
.hero-headline em { font-style: normal; color: var(--accent); }
.hero-summary { margin: 0 0 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { padding: 10px 16px; }

.player-card {
  position: relative;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(20, 24, 31, .10);
  transform: rotate(1.5deg);
  transition: transform .35s cubic-bezier(.3, .8, .3, 1);
}
.player-card:hover { transform: rotate(0deg) translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .player-card, .player-card:hover { transition: none; } }
.player-photo {
  position: relative;
  aspect-ratio: 4 / 4.3;
  overflow: hidden;
  border-radius: 10px;
  background: #f2f3f6;
}
.player-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
/* 캐릭터 선택 레티클 모서리 */
.player-photo::before,
.player-photo::after,
.player-photo i::before,
.player-photo i::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 22px;
  height: 22px;
  border: 3px solid var(--accent);
}
.player-photo::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.player-photo::after { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.player-photo i::before { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.player-photo i::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.player-tag {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--ink-strong);
  color: #fff;
  font: 700 11px/1.4 var(--font-mono);
  letter-spacing: .12em;
  white-space: nowrap;
}
.player-stats { margin: 12px 2px 2px; }
.player-stats div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px dashed var(--line-strong);
  font-size: 14px;
}
.player-stats div:first-child { border-top: 0; }
.player-stats dt { font: 600 11px/1.9 var(--font-mono); color: var(--muted); letter-spacing: .08em; }
.player-stats dd { margin: 0; color: var(--ink-strong); font-weight: 600; }
.player-stats dd small { color: var(--muted); font-weight: 500; }

.about-text {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 920px;
  margin: 64px auto 0;
}
.about-text article {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.about-text h3 {
  margin: 0 0 6px;
  font: 600 11px/1.6 var(--font-mono);
  color: var(--accent);
  letter-spacing: .12em;
}
.about-text p { margin: 0; font-size: 15px; }

/* ---------- PROJECTS 타임라인 ---------- */
.timeline {
  position: relative;
  max-width: var(--content-w);
  margin: 0 auto;
  padding-left: 96px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 38px;
  width: 2px;
  background: var(--line);
}
.tl-year {
  position: relative;
  margin: 0 0 28px -96px;
  width: 78px;
  text-align: center;
}
.tl-year span {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
}
.tl-end span { background: var(--line-strong); color: var(--ink); }

.card { position: relative; margin: 0 0 64px; }
.card::before {
  content: "";
  position: absolute;
  top: 22px;
  left: -64px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
}
.card-title {
  margin: 20px 0 6px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.35;
}
.card-title a { color: var(--ink-strong); }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}
.card-meta b { color: var(--ink); font-weight: 600; }
.card-summary { margin: 0 0 14px; }
.card-more {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
}

/* ---------- 이미지 슬라이더 ---------- */
.slider {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #15171b;
}
.slider-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-track > * {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
}
.slider-track img { width: 100%; height: 100%; object-fit: cover; }
.slider-track img.contain { object-fit: contain; background: #fff; }
.slider-btns {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
}
.slider-btns button {
  width: 46px;
  height: 46px;
  border: 0;
  border-right: 1px solid rgba(0, 0, 0, .08);
  background: rgba(240, 241, 243, .92);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}
.slider-btns button:hover { background: #fff; color: var(--accent); }
.slider-dots {
  position: absolute;
  right: 12px;
  bottom: 14px;
  display: flex;
  gap: 6px;
}
.slider-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}
.slider-dots span.on { background: #fff; }
.badge-video {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(20, 22, 26, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.badge-video svg { width: 14px; height: 14px; }

/* ---------- RESUME ---------- */
.resume-summary {
  max-width: var(--content-w);
  margin: 0 auto 48px;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
}
.resume { max-width: var(--content-w); margin: 0 auto; }
.resume-block {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.resume-block > h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-strong);
}
.entry + .entry { margin-top: 26px; }
.entry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 16px;
}
.entry-org { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink-strong); }
.entry-period { color: var(--muted); font-size: 14px; white-space: nowrap; }
.entry-role { margin: 2px 0 6px; color: var(--accent); font-size: 14px; font-weight: 600; }
.entry ul { margin: 0; padding-left: 18px; }
.entry li { margin: 2px 0; }
.skill-table { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; }
.skill-table dt { font-weight: 700; color: var(--ink-strong); }
.skill-table dd { margin: 0; }
.cert-list { margin: 0; padding-left: 18px; }

/* ---------- EXPERTISE ---------- */
.expertise {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: var(--content-w);
  margin: 0 auto;
}
.ex-group {
  padding: 24px 24px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ex-group h3 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink-strong);
}
.ex-item { margin-bottom: 18px; }
.ex-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.ex-head b { color: var(--ink-strong); font-weight: 600; }
.ex-head span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ex-bar {
  height: 8px;
  margin: 6px 0 6px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}
.ex-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.expertise.is-visible .ex-bar i { transform: scaleX(var(--w)); }
.ex-projects { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }

/* ---------- CONTACT ---------- */
.contact-title {
  margin: -16px 0 6px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-strong);
}
.contact-status { margin-top: 0; }
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: var(--content-w);
  margin: 0 auto;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.contact-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-card h3 { margin: 0; font-size: 17px; color: var(--ink-strong); }
.contact-value { margin: 2px 0 16px; color: var(--muted); font-size: 14px; word-break: break-all; }
.contact-card .btn { margin-top: auto; padding: 8px 14px; font-size: 14px; }

/* ---------- LAB ---------- */
.lab { max-width: var(--content-w); margin: 72px auto 0; }
.lab-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  color: var(--ink);
}
.lab-lead { margin: 4px 0 24px; color: var(--muted); font-size: 15px; }
.lab-list { display: grid; gap: 20px; }
.lab-item {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  scroll-margin-top: 90px;
}
.lab-media video,
.lab-media .console,
.lab-media .pipe { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; }
.lab-media video { object-fit: cover; background: #15171b; }
.lab-body h4 { margin: 2px 0 0; font-size: 19px; color: var(--ink-strong); }
.lab-meta { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.lab-body p { margin: 0 0 8px; font-size: 15px; }
.lab-body ul { margin: 0; padding-left: 18px; font-size: 14px; }
.lab-body li { margin: 2px 0; }
.lab-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lab-links .btn { padding: 6px 12px; font-size: 13px; }

/* 자동화 파이프라인 다이어그램 (Coin Rush): 앞단·뒷단은 사람, 가운데는 자동 */
.pipe {
  container-type: inline-size;
  display: grid;
  /* .pipe 자신이 컨테이너라 자기 크기에는 cqw 를 쓸 수 없다 → 고정값, 안쪽 요소만 cqw */
  grid-template-columns: 1fr 16px 2.7fr 16px 1fr;
  grid-template-rows: auto 1fr;
  row-gap: 8px;
  padding: 12px;
  background: #10141c;
  border: 1px solid #232a38;
}
.pipe-cap {
  text-align: center;
  font-size: clamp(9px, 2.8cqw, 11px);
  font-weight: 700;
  color: #7b869c;
}
.pipe-cap.is-auto { color: #7cc4f0; }
.pipe-human {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8cqw;
  padding: 2cqw 1cqw;
  border: 1px solid #2e3850;
  border-radius: 10px;
  background: #1b2130;
  text-align: center;
}
.pipe-human svg { width: clamp(16px, 6.5cqw, 26px); height: clamp(16px, 6.5cqw, 26px); color: #9aa6bf; margin-bottom: .6cqw; }
.pipe-human b { font-size: clamp(10px, 3.4cqw, 13px); color: #e6ebf5; }
.pipe-human code { font: 600 clamp(9px, 2.9cqw, 11.5px)/1.35 var(--font-mono); color: #7cc4f0; }
.pipe-link { position: relative; align-self: center; height: 2px; background: #3b4660; }
.pipe-link::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -4px;
  border: 5px solid transparent;
  border-left: 7px solid #3b4660;
  border-right: 0;
}
.pipe-link i {
  position: absolute;
  top: -2px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7cc4f0;
  animation: pipe-travel 1.8s linear infinite;
}
.pipe-auto {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 1.4cqw;
  margin: 0;
  padding: 2.4cqw;
  list-style: none;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(47, 126, 165, .16), rgba(47, 126, 165, .04));
}
.pipe-auto li {
  display: flex;
  align-items: center;
  gap: 2cqw;
  padding: 0 2.4cqw;
  border-radius: 6px;
  background: #172130;
  color: #dfe6f2;
  font-size: clamp(9.5px, 3.1cqw, 12.5px);
  font-weight: 600;
  white-space: nowrap;
  animation: pipe-step 3.6s var(--d) infinite;
}
.pipe-auto li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4b5876;
  animation: pipe-step-dot 3.6s var(--d) infinite;
}
/* 작업이 자동 구간을 위에서 아래로 차례로 지나가는 느낌 */
@keyframes pipe-step { 0%, 20% { background: #1e4560; } 32%, 100% { background: #172130; } }
@keyframes pipe-step-dot { 0%, 20% { background: #7cc4f0; } 32%, 100% { background: #4b5876; } }
@keyframes pipe-travel { from { left: 0; } to { left: calc(100% - 8px); } }
@media (prefers-reduced-motion: reduce) {
  .pipe-auto li, .pipe-auto li::before, .pipe-link i { animation: none; }
}

.console {
  display: flex;
  flex-direction: column;
  background: #0c0c0c;
  border: 1px solid #2a2a2a;
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 7px 7px 0 0;
  background: #1f1f1f;
  color: #9a9a9a;
  font: 500 11px/1.4 var(--font-mono);
}
.console-bar i { width: 9px; height: 9px; border-radius: 50%; background: #444; }
.console-bar span { margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-screen {
  flex: 1;
  display: grid;
  place-items: center;
  margin: 0;
  color: #d4d4d4;
  font: 12px/1.12 var(--font-mono);
  /* Cascadia Code 등은 "***" 를 합자로 바꿔 그려서 블록이 어긋나 보인다 */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
  white-space: pre;
}

.btn { padding: 10px 16px; }

.player-card {
  position: relative;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(20, 24, 31, .10);
  transform: rotate(1.5deg);
  transition: transform .35s cubic-bezier(.3, .8, .3, 1);
}
.player-card:hover { transform: rotate(0deg) translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .player-card, .player-card:hover { transition: none; } }
.player-photo {
  position: relative;
  aspect-ratio: 4 / 4.3;
  overflow: hidden;
  border-radius: 10px;
  background: #f2f3f6;
}
.player-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
/* 캐릭터 선택 레티클 모서리 */
.player-photo::before,
.player-photo::after,
.player-photo i::before,
.player-photo i::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 22px;
  height: 22px;
  border: 3px solid var(--accent);
}
.player-photo::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.player-photo::after { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.player-photo i::before { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.player-photo i::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.player-tag {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--ink-strong);
  color: #fff;
  font: 700 11px/1.4 var(--font-mono);
  letter-spacing: .12em;
  white-space: nowrap;
}
.player-stats { margin: 12px 2px 2px; }
.player-stats div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px dashed var(--line-strong);
  font-size: 14px;
}
.player-stats div:first-child { border-top: 0; }
.player-stats dt { font: 600 11px/1.9 var(--font-mono); color: var(--muted); letter-spacing: .08em; }
.player-stats dd { margin: 0; color: var(--ink-strong); font-weight: 600; }
.player-stats dd small { color: var(--muted); font-weight: 500; }

.about-text {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 920px;
  margin: 64px auto 0;
}
.about-text article {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.about-text h3 {
  margin: 0 0 6px;
  font: 600 11px/1.6 var(--font-mono);
  color: var(--accent);
  letter-spacing: .12em;
}
.about-text p { margin: 0; font-size: 15px; }

/* ---------- PROJECTS 타임라인 ---------- */
.timeline {
  position: relative;
  max-width: var(--content-w);
  margin: 0 auto;
  padding-left: 96px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 38px;
  width: 2px;
  background: var(--line);
}
.tl-year {
  position: relative;
  margin: 0 0 28px -96px;
  width: 78px;
  text-align: center;
}
.tl-year span {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
}
.tl-end span { background: var(--line-strong); color: var(--ink); }

.card { position: relative; margin: 0 0 64px; }
.card::before {
  content: "";
  position: absolute;
  top: 22px;
  left: -64px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
}
.card-title {
  margin: 20px 0 6px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.35;
}
.card-title a { color: var(--ink-strong); }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}
.card-meta b { color: var(--ink); font-weight: 600; }
.card-summary { margin: 0 0 14px; }
.card-more {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
}

/* ---------- 이미지 슬라이더 ---------- */
.slider {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #15171b;
}
.slider-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-track > * {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
}
.slider-track img { width: 100%; height: 100%; object-fit: cover; }
.slider-track img.contain { object-fit: contain; background: #fff; }
.slider-btns {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
}
.slider-btns button {
  width: 46px;
  height: 46px;
  border: 0;
  border-right: 1px solid rgba(0, 0, 0, .08);
  background: rgba(240, 241, 243, .92);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}
.slider-btns button:hover { background: #fff; color: var(--accent); }
.slider-dots {
  position: absolute;
  right: 12px;
  bottom: 14px;
  display: flex;
  gap: 6px;
}
.slider-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}
.slider-dots span.on { background: #fff; }
.badge-video {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(20, 22, 26, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.badge-video svg { width: 14px; height: 14px; }

/* ---------- RESUME ---------- */
.resume-summary {
  max-width: var(--content-w);
  margin: 0 auto 48px;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
}
.resume { max-width: var(--content-w); margin: 0 auto; }
.resume-block {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.resume-block > h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-strong);
}
.entry + .entry { margin-top: 26px; }
.entry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 16px;
}
.entry-org { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink-strong); }
.entry-period { color: var(--muted); font-size: 14px; white-space: nowrap; }
.entry-role { margin: 2px 0 6px; color: var(--accent); font-size: 14px; font-weight: 600; }
.entry ul { margin: 0; padding-left: 18px; }
.entry li { margin: 2px 0; }
.skill-table { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; }
.skill-table dt { font-weight: 700; color: var(--ink-strong); }
.skill-table dd { margin: 0; }
.cert-list { margin: 0; padding-left: 18px; }

/* ---------- EXPERTISE ---------- */
.expertise {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: var(--content-w);
  margin: 0 auto;
}
.ex-group {
  padding: 24px 24px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ex-group h3 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink-strong);
}
.ex-item { margin-bottom: 18px; }
.ex-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.ex-head b { color: var(--ink-strong); font-weight: 600; }
.ex-head span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ex-bar {
  height: 8px;
  margin: 6px 0 6px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}
.ex-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.expertise.is-visible .ex-bar i { transform: scaleX(var(--w)); }
.ex-projects { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }

/* ---------- CONTACT ---------- */
.contact-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}
.contact-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-strong); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 400;
  color: var(--ink-strong);
  background: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.contact-direct { margin: 28px 0 0; text-align: center; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; justify-self: start; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn svg { width: 16px; height: 16px; }

.footer {
  padding: 28px var(--gutter);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(200, 204, 209, .85);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.to-top svg { width: 22px; height: 22px; margin-bottom: -6px; }
.to-top.is-shown { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ==========================================================================
   프로젝트 상세 페이지
   ========================================================================== */
.page-project main.section { padding-top: 104px; }
.post { max-width: var(--content-w); margin: 0 auto; }
.post-head {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 22px;
  align-items: start;
  margin: 26px 0 24px;
}
.date-badge {
  padding: 10px 0 9px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  line-height: 1.15;
}
.date-badge small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.date-badge b { display: block; font-size: 28px; font-family: var(--font-serif); margin: 4px 0 2px; }
.date-badge span { display: block; font-size: 12px; opacity: .85; }
.post-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink-strong);
}
.post-genre { margin: 6px 0 0; color: var(--muted); }
.post-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 28px 0 8px;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; color: var(--ink-strong); }

.post h3.post-section {
  margin: 56px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink-strong);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-strong);
}
.post-intro { font-size: 17px; }

.feature { margin: 0 0 36px; }
.feature h4 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 19px;
  color: var(--ink-strong);
}
.feature h4 .num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-2px);
}
.feature ul { margin: 0; padding-left: 20px; }
.feature li { margin: 4px 0; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 0;
}
.media-grid.single { grid-template-columns: 1fr; }
figure { margin: 0; }
figure img, figure video {
  width: 100%;
  border-radius: var(--radius);
  background: #15171b;
  border: 1px solid var(--line);
}
figure img { cursor: zoom-in; }
figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; }

.main-video { margin: 8px 0 0; }
.main-video video { aspect-ratio: 16 / 9; object-fit: contain; background: #000; }

.achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 10px;
  margin-top: 16px;
  max-width: 560px;
}
.achievements img { width: 100%; border-radius: 4px; border: 1px solid var(--line); }

.issue {
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.issue h4 {
  margin: 0;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  color: var(--ink-strong);
}
.issue-row { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px 20px 0; }
.issue-row:last-child { padding-bottom: 16px; }
.issue-row .label {
  align-self: start;
  margin-top: 3px;
  padding: 1px 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  letter-spacing: .04em;
}
.label--problem { background: var(--warn-soft); color: var(--warn); }
.label--solution { background: var(--accent-soft); color: var(--accent); }
.label--result { background: var(--ok-soft); color: var(--ok); }
.issue-row p { margin: 0; }
.issue pre { margin: 14px 20px 18px; }

pre.code {
  overflow-x: auto;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  word-break: normal;
  overflow-wrap: normal;
  tab-size: 4;
}
.code .c { color: #7f8b99; }
.code .k { color: #c89bf2; }
.code .s { color: #a5d6a7; }
.code .n { color: #f5b97a; }
.code .t { color: #7cc4f0; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: var(--content-w);
  margin: 64px auto 0;
}
.post-nav a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-strong);
}
.post-nav a:hover { border-color: var(--accent); text-decoration: none; }
.post-nav small { display: block; color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.post-nav b { font-family: var(--font-serif); font-weight: 400; font-size: 18px; }
.post-nav .next { text-align: right; grid-column: 2; }
.post-missing { text-align: center; color: var(--muted); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 13, 16, .9);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 92vh; border-radius: 4px; }
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
}

/* ---------- 맵 생성기 데모 (Night Wish) ---------- */
.demo {
  margin: 20px 0 0;
  border: 1px solid #2b2f45;
  border-radius: 8px;
  overflow: hidden;
  background: #12131d;
  color: #d9dcf0;
}
.demo-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #1a1c2b;
  border-bottom: 1px solid #2b2f45;
}
.demo-head strong { font-size: 15px; color: #fff; }
.demo-head small { display: block; color: #9aa0c2; font-size: 12px; }
.demo-body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; }
.demo canvas { width: 100%; height: auto; display: block; background: #12131d; }
.demo-side {
  padding: 14px 16px;
  border-left: 1px solid #2b2f45;
  font-size: 13px;
  line-height: 1.6;
}
.demo-side h5 { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; color: #9aa0c2; }
.demo-legend { display: grid; gap: 4px; margin: 0 0 14px; padding: 0; list-style: none; }
.demo-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 3px;
  vertical-align: -1px;
}
.demo-log { margin: 0; padding: 0; list-style: none; color: #c4c8e4; }
.demo-log li + li { margin-top: 4px; }
.demo-log b { color: #fff; }
.demo-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.demo-controls button {
  padding: 6px 12px;
  border: 1px solid #3a3f5c;
  border-radius: 5px;
  background: #23263a;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.demo-controls button:hover { border-color: #b388ff; }
.demo-controls button.primary { background: #7c4dff; border-color: #7c4dff; }
.demo-controls label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #c4c8e4; }
.demo-controls input[type="range"] { width: 80px; accent-color: #b388ff; }
.demo-foot { padding: 10px 16px; border-top: 1px solid #2b2f45; font-size: 12px; color: #9aa0c2; }

/* ==========================================================================
   반응형
   ========================================================================== */
@media (max-width: 860px) {
  :root { --gutter: 28px; }
  .section-title { font-size: 34px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 36px; }
  .hero-name { font-size: 46px; }
  .about-text { grid-template-columns: 1fr; }
  .lab-item { grid-template-columns: 1fr; gap: 16px; }
  .lab-media { max-width: 460px; }
  .timeline { padding-left: 0; }
  .timeline::before { display: none; }
  .tl-year { margin: 0 0 18px; width: auto; text-align: left; }
  .card::before { display: none; }
  .card-title { font-size: 26px; }
  .resume-block { grid-template-columns: 1fr; gap: 14px; }
  .expertise { grid-template-columns: 1fr; }
  .demo-body { grid-template-columns: 1fr; }
  .demo-side { border-left: 0; border-top: 1px solid #2b2f45; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 15px; }
  /* 캡슐 메뉴 → 화면 아래 탭 바 */
  html { scroll-padding-top: 12px; }
  .dock {
    top: auto;
    bottom: 10px;
    left: 10px;
    right: 10px;
    transform: none;
    padding: 4px;
    border-radius: 18px;
  }
  .dock-home { display: none; }
  .dock-link {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0 5px;
    border-radius: 14px;
    font-size: 10.5px;
  }
  .dock-link svg { display: block; }
  .dock-pill { top: 4px; bottom: 4px; border-radius: 14px; }
  .footer { padding-bottom: 96px; }
  .section { padding: 52px var(--gutter) 48px; }
  .section-title { font-size: 30px; margin-bottom: 28px; }
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .player-card { order: -1; width: 100%; max-width: 280px; margin: 0 auto; }
  .hero-name { font-size: 40px; }
  .hero-name small { display: block; margin: 6px 0 0; font-size: 15px; }
  .hero-headline { font-size: 17px; }
  .about-text { margin-top: 40px; }
  .card { margin-bottom: 48px; }
  .card-title { font-size: 23px; }
  .slider-btns button { width: 40px; height: 40px; }
  .contact-cards { grid-template-columns: 1fr; }
  .lab { margin-top: 52px; }
  .lab-item { grid-template-columns: 1fr; gap: 16px; padding: 14px; }
  .console-screen { padding: 8px 0; font-size: 11px; }
  .skill-table { grid-template-columns: 1fr; gap: 0 0; }
  .skill-table dd { margin-bottom: 10px; }
  .page-project main.section { padding-top: 48px; }
  .post-head { grid-template-columns: 70px 1fr; gap: 14px; }
  .date-badge b { font-size: 22px; }
  .post-title { font-size: 27px; }
  .facts { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr; }
  .issue-row { grid-template-columns: 1fr; gap: 6px; }
  .issue-row .label { justify-self: start; padding: 1px 8px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { grid-column: auto; }
  .to-top { right: 14px; bottom: 84px; width: 44px; height: 44px; }
}
