/* =========================================================
   CV — Apple-스러운 다크 이력서 SPA
   3가지 방향: 1) 미니멀  2) 에디토리얼  3) 인터랙티브
   ========================================================= */

:root {
  --bg: #0a0a0c;
  --bg-1: #100f13;
  --bg-elev: #16151a;
  --bg-elev-2: #1d1c22;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text-2: #a6a6ad;
  --text-3: #6d6d77;
  --accent: #2997ff;
  --accent-2: #6db6ff;
  --accent-soft: rgba(41, 151, 255, 0.14);
  --radius: 18px;
  --side-w: 380px;
  --maxw: 820px;
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "SF Pro Display", "Apple SD Gothic Neo", system-ui, sans-serif;
  /* 모노스페이스 미사용 — 전체를 Pretendard 로 통일 */
  --font-mono: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--accent-soft); color: var(--accent-2); }

/* ambient background glow */
.cv::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 18% -5%, rgba(41, 151, 255, 0.07), transparent 60%),
    radial-gradient(800px 700px at 100% 100%, rgba(109, 182, 255, 0.04), transparent 55%);
  z-index: 0;
}

/* ===================== LAYOUT ===================== */
.cv {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  align-items: start;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.side::-webkit-scrollbar { width: 7px; }
.side::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.side-inner {
  padding: 44px 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100%;
}
.side-head { display: contents; }

.photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.12;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #fff;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.8);
}
.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  transition: transform 0.8s var(--ease), filter 0.6s var(--ease);
}
.photo-wrap:hover img { transform: scale(1.04); }
.photo-ring {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 -60px 60px -40px rgba(10, 10, 12, 0.55);
  pointer-events: none;
}

.name {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.name .name-en {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--text-3);
  margin-top: 10px;
}
.tagline {
  margin: -8px 0 0;
  font-size: 14px;
  color: var(--accent-2);
  font-weight: 500;
  letter-spacing: 0;
}
.summary {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  text-wrap: pretty;
}

.contacts { display: flex; flex-direction: column; gap: 8px; }
.contact {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}
.contact .c-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  width: 64px;
  flex: none;
}
.contact .c-value { color: var(--text); }
a.contact:hover .c-value { color: var(--accent-2); }

/* link groups (npm / git / domains) */
.links { display: flex; flex-direction: column; gap: 18px; margin-top: 4px; }
.link-group { display: flex; flex-direction: column; gap: 8px; }
.link-group-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
    background 0.3s var(--ease);
}
.link-item:hover {
  border-color: var(--line-2);
  transform: translateX(3px);
  background: var(--bg-elev-2);
}
.link-icon {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.link-icon svg { width: 16px; height: 16px; display: block; }
.link-text { display: flex; flex-direction: column; min-width: 0; }
.link-label {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-sub { font-size: 11px; color: var(--text-3); }
.link-arrow {
  margin-left: auto;
  color: var(--text-3);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.link-item:hover .link-arrow { color: var(--accent-2); transform: translate(2px, -2px); }

.print-btn {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(22, 21, 26, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.8);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.print-btn:hover {
  border-color: var(--accent);
  background: rgba(29, 28, 34, 0.85);
  transform: translateY(-1px);
}
.print-btn svg { width: 15px; height: 15px; display: block; }
@media (max-width: 560px) {
  .print-btn { top: 14px; right: 14px; padding: 8px 12px; font-size: 12px; }
}

.side-foot {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

/* ---------- Main ---------- */
.main { padding: 0 64px; }
.main-inner { max-width: var(--maxw); margin: 0 auto; padding: 96px 0 140px; }

.block { padding-top: 88px; }
.block:first-child { padding-top: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 22px;
}
.eyebrow .num { color: var(--accent); }
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--line-2);
}

/* hero */
.hero h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}
.hero h2 em {
  font-style: normal;
  color: var(--text-3);
}
.hero .lede {
  margin: 26px 0 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 60ch;
  text-wrap: pretty;
}

/* skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.skill {
  background: var(--bg);
  padding: 22px 24px;
  transition: background 0.3s var(--ease);
}
.skill:hover { background: var(--bg-elev); }
.skill .s-name {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.skill .s-note { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }

/* highlights */
.hl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.hl {
  padding: 4px 2px;
  border-top: 1px solid var(--line-2);
}
.hl .hl-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.hl .hl-label { font-size: 12px; color: var(--text-3); margin-top: 10px; }

/* ===================== PROJECTS ===================== */
.proj-list { display: flex; flex-direction: column; }

.proj {
  position: relative;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.proj:last-child { border-bottom: 1px solid var(--line); }

.proj-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.proj-title {
  margin: 0;
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.proj-org {
  font-size: 13px;
  color: var(--accent-2);
  margin-top: 6px;
  font-weight: 500;
}
.proj-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  letter-spacing: 0.02em;
  padding-top: 4px;
}

.proj-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-2);
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
}

.proj-summary {
  margin: 18px 0 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: none; /* 카드 너비를 가득 채우도록(이전 62ch 제한 해제) */
  text-wrap: pretty;
}

.proj-blocks {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}
.pb-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 9px;
}
.pb-items { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.pb-items li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}
.pb-items li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-3);
}

.proj-meta {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--text);
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(41, 151, 255, 0.18);
  border-radius: 12px;
  line-height: 1.55;
}
.proj-meta::before {
  content: "성과";
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  flex: none;
  padding-top: 3px;
}

.proj-photo { margin-top: 22px; }
.proj-photo image-slot { width: 100%; height: 240px; }
.photo-cap {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-top: 8px;
}

/* ===================== SWITCHER ===================== */
.switcher {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(22, 21, 26, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.8);
}
.sw-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 10px 0 12px;
}
.sw-btn {
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.sw-btn:hover { color: var(--text); }
.sw-btn.active {
  color: #fff;
  background: var(--accent);
}

/* ===================== REVEAL ANIMATION ===================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===================== WORK PHOTO GALLERY ===================== */
.gallery { margin-top: 26px; }
.gallery-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.gallery-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.gallery-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
}
.gallery-nav { margin-left: auto; display: flex; gap: 7px; }
.gallery-nav button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg-elev);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease), transform 0.25s var(--ease);
}
.gallery-nav button svg { width: 17px; height: 17px; }
.gallery-nav button:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent-soft);
}
.gallery-nav button:active { transform: scale(0.92); }

.gallery-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* 하단 가로 스크롤바 숨김 — ◀▶ 버튼/스와이프로 이동 */
}
.gallery-track::-webkit-scrollbar { display: none; }

/* 높이 고정 + 너비는 사진 원본 비율대로(JS가 aspect-ratio 주입).
   칸 비율 = 사진 비율 → cover 로 꽉 채워도 여백/잘림이 거의 없음. */
.gallery-item {
  flex: 0 0 auto;
  height: 240px;
  aspect-ratio: 4 / 3; /* 기본값 — 사진 로드되면 실제 비율로 덮어씀 */
  margin: 0;
  scroll-snap-align: start;
}
.gallery-item image-slot {
  width: 100%;
  height: 100%;
  display: block;
}

/* 사진이 1장뿐일 때: 더 크게 */
.gallery--single .gallery-item { height: 360px; }

/* ===================== SIDE PROJECTS ===================== */
.sp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.sp-grid > .reveal { display: flex; } /* reveal 래퍼가 카드 높이를 채우도록 */
.sp-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(29, 28, 34, 0.5), rgba(16, 15, 19, 0.3));
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}
.sp-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.9);
}
.sp-top { display: flex; align-items: center; gap: 11px; }
.sp-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--accent-2);
}
.sp-icon svg { width: 17px; height: 17px; display: block; }
.sp-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-card .link-arrow { margin-left: auto; color: var(--text-3); }
.sp-card:hover .link-arrow { color: var(--accent-2); transform: translate(2px, -2px); }
.sp-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
  text-wrap: pretty;
}
.sp-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
@media (max-width: 880px) {
  .sp-grid { grid-template-columns: 1fr; }
}

/* ===================== THANKS (05~06 사이 한 줄) ===================== */
.thanks {
  margin: 0;
  padding-top: 110px;
  text-align: center;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--text);
  background: linear-gradient(180deg, #fff, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}
.thanks::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin: 0 auto 26px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* ===================== PATENTS ===================== */
.pat-list { display: flex; flex-direction: column; gap: 14px; }
.pat {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(29, 28, 34, 0.5), rgba(16, 15, 19, 0.3));
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.pat:hover { transform: translateY(-3px); border-color: var(--line-2); }
.pat-badge {
  flex: none;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(41, 151, 255, 0.18);
}
.pat-body { min-width: 0; }
.pat-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.45;
  text-wrap: pretty;
}
.pat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

/* ===================== SECTION NAVIGATOR (dots) ===================== */
.secnav {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.secnav-dot {
  position: relative;
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--text-3);
  background: transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}
.secnav-dot::after {
  /* larger invisible hit area */
  content: "";
  position: absolute;
  inset: -9px;
}
.secnav-dot:hover {
  border-color: var(--text);
  transform: scale(1.18);
}
.secnav-dot.active {
  border-color: var(--accent);
  background: var(--accent);
  transform: scale(1.25);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* hover label */
.secnav-tip {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translate(8px, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(22, 21, 26, 0.86);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line-2);
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.secnav-tip-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--accent-2);
}
.secnav-dot:hover .secnav-tip,
.secnav-dot.active .secnav-tip {
  opacity: 1;
  transform: translate(0, -50%);
}
.secnav-dot.active .secnav-tip { opacity: 0; }
.secnav-dot.active:hover .secnav-tip { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .secnav-dot, .secnav-tip { transition: none; }
}

/* =========================================================
   DIRECTION 2 — EDITORIAL
   큰 넘버링 · 카드형 프로젝트 · 대담한 타이포
   ========================================================= */
.cv[data-direction="2"] { --maxw: 880px; }
.cv[data-direction="2"] .hero h2 { font-size: clamp(40px, 6vw, 68px); }
.cv[data-direction="2"] .eyebrow { font-size: 12px; }
.cv[data-direction="2"] .proj-list { gap: 22px; }
.cv[data-direction="2"] .proj {
  padding: 34px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.cv[data-direction="2"] .proj:last-child { border-bottom: 1px solid var(--line); }
.cv[data-direction="2"] .proj-title { font-size: 28px; }
.cv[data-direction="2"] .proj-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.cv[data-direction="2"] .skills-grid { border-radius: var(--radius); }
.cv[data-direction="2"] .skill { background: var(--bg-elev); }
.cv[data-direction="2"] .skill:hover { background: var(--bg-elev-2); }
.cv[data-direction="2"] .hl {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px;
  background: var(--bg-elev);
}

/* =========================================================
   DIRECTION 3 — INTERACTIVE / SPATIAL
   글래스 카드 · 호버 리프트 + 글로우 · 그라데이션 헤어라인
   ========================================================= */
.cv[data-direction="3"] { --radius: 22px; }
.cv[data-direction="3"] .proj-list { gap: 20px; }
.cv[data-direction="3"] .proj {
  padding: 34px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(29, 28, 34, 0.55), rgba(16, 15, 19, 0.55));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}
.cv[data-direction="3"] .proj:last-child { border-bottom: 1px solid var(--line); }
.cv[data-direction="3"] .proj::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.cv[data-direction="3"] .proj:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(41, 151, 255, 0.08);
}
.cv[data-direction="3"] .proj:hover::before { opacity: 1; }
.cv[data-direction="3"] .proj-title { font-size: 26px; }
.cv[data-direction="3"] .skills-grid {
  background: transparent;
  border: none;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
.cv[data-direction="3"] .skill {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(29, 28, 34, 0.5), rgba(16, 15, 19, 0.4));
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.cv[data-direction="3"] .skill:hover {
  transform: translateY(-3px);
  border-color: rgba(41, 151, 255, 0.3);
  background: linear-gradient(180deg, rgba(29, 28, 34, 0.7), rgba(16, 15, 19, 0.5));
}
.cv[data-direction="3"] .hl {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
  background: linear-gradient(180deg, rgba(29, 28, 34, 0.5), rgba(16, 15, 19, 0.3));
  transition: transform 0.4s var(--ease);
}
.cv[data-direction="3"] .hl:hover { transform: translateY(-3px); }
.cv[data-direction="3"] .hl .hl-value {
  background: linear-gradient(180deg, #fff, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1080px) {
  :root { --side-w: 320px; }
  .main { padding: 0 40px; }
}
@media (max-width: 880px) {
  .cv { grid-template-columns: 1fr; }
  .side {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .side-inner {
    padding: 34px 24px 30px;
    max-width: 640px;
    margin: 0 auto;
    gap: 18px;
  }
  /* photo + name side by side */
  .photo-wrap {
    max-width: 116px;
    aspect-ratio: 1 / 1.12;
    margin: 0;
  }
  .side-head {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .side-head .photo-wrap { flex: none; }
  .side-head .name { font-size: 27px; }
  .links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
  }

  .main { padding: 0 24px; }
  .main-inner { padding: 52px 0 130px; }
  .hl-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .cv[data-direction="3"] .skills-grid { grid-template-columns: 1fr 1fr; }
  .cv[data-direction="2"] .proj,
  .cv[data-direction="3"] .proj { padding: 26px 22px; }

  .gallery-item { height: 210px; max-width: 86vw; }
  .gallery--single .gallery-item { height: 280px; }

  .secnav { right: 16px; bottom: 18px; top: auto; transform: none; }
}
@media (max-width: 560px) {
  .side-head { gap: 16px; }
  .photo-wrap { max-width: 92px; }
  .side-head .name { font-size: 22px; }
  .links { grid-template-columns: 1fr; }
  .hl-grid { grid-template-columns: 1fr 1fr; }
  .cv[data-direction="3"] .skills-grid { grid-template-columns: 1fr; }
  .hero .lede { font-size: 15.5px; }
}

/* ===================== PRINT / PDF =====================
   인쇄·PDF 저장 시: 라이트 톤 + 떠다니는 UI 숨김 + 카드 펼침.
   브라우저 인쇄(Ctrl/Cmd+P) → "PDF로 저장" 으로 깔끔한 이력서가 나옵니다. */
@media print {
  :root {
    --bg: #fff; --bg-1: #fff; --bg-elev: #fff; --bg-elev-2: #fff;
    --line: #e3e3e8; --line-2: #d0d0d6;
    --text: #111; --text-2: #333; --text-3: #666;
    --accent: #1769c2; --accent-2: #1769c2; --accent-soft: #eef4fb;
  }
  html { scroll-behavior: auto; }
  body { background: #fff; color: #111; }

  /* 떠다니는/장식 요소 제거 */
  .cv::before, .secnav, #admin-badge, .gallery-nav, .print-btn { display: none !important; }
  /* 인쇄/PDF 에서는 사진 영역 제외 — 업무 사진 갤러리 + 06 일상 갤러리 섹션 */
  .gallery, #sec-06 { display: none !important; }

  /* 화면 분할 → 한 컬럼으로, 사이드바 sticky 해제 */
  .cv { display: block; }
  .side {
    position: static; height: auto; border-right: none;
    border-bottom: 1px solid var(--line); background: #fff;
  }
  .side-inner { max-width: none; padding: 0 0 18px; }
  .main { padding: 0; }
  .main-inner { max-width: none; padding: 18px 0 0; }

  /* 등장 애니메이션 무력화(인쇄 시 빈 화면 방지) */
  .reveal { opacity: 1 !important; transform: none !important; }

  /* 카드 글래스/그림자 제거, 페이지 넘김 정리 */
  .cv[data-direction="3"] .proj,
  .cv[data-direction="3"] .skill,
  .cv[data-direction="3"] .hl {
    background: #fff !important; box-shadow: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  .proj { break-inside: avoid; page-break-inside: avoid; }
  .gallery-track { overflow: visible; flex-wrap: wrap; }
  .photo-wrap { max-width: 150px; }
  .cv[data-direction="3"] .hl .hl-value,
  .thanks { -webkit-text-fill-color: currentColor; color: #111; background: none; }
  .thanks { padding-top: 28px; }
}
