/* =========================================================
   김우신 포트폴리오 — vinit11portfolio 오마쥬 (1:1 목표)
   실측 토큰: Space Grotesk / #6B46FE / #FFB344 / 카드 radius16·#F8F9FC
             / 버튼 radius8·블랙 / 중앙정렬 타이틀 / 다크 토글
   ========================================================= */

:root, :root[data-theme="light"] {
  --bg:        #ffffff;
  --bg-soft:   #ffffff;
  --card:      #f8f9fc;
  --border:    rgba(0,0,0,.1);
  --text:      #1a1a1a;
  --muted:     #6a6a73;
  --btn-dark:  #1a1a1a;
  --btn-light: rgba(0,0,0,.05);
  --nav-bg:    rgba(255,255,255,.85);
  --shadow:    0 5px 15px rgba(0,0,0,.1);
}
:root[data-theme="dark"] {
  --bg:        #121218;
  --bg-soft:   #16161d;
  --card:      #1c1c25;
  --border:    rgba(255,255,255,.12);
  --text:      #f1f1f4;
  --muted:     #9a9aa6;
  --btn-dark:  #f1f1f4;
  --btn-light: rgba(255,255,255,.07);
  --nav-bg:    rgba(18,18,24,.85);
  --shadow:    0 5px 18px rgba(0,0,0,.5);
}

:root {
  --violet:  #6b46fe;
  --violet-d:#5a37e0;
  --orange:  #ffb344;
  --font: "Space Grotesk", "Pretendard", -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --max: 1140px;
  --r-btn: 8px;
  --r-card: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font);
  color: var(--text); background: var(--bg);
  line-height: 1.7; font-size: 16px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .3s, color .3s;
  /* 한국어: 단어(어절) 단위로만 줄바꿈 → 음절 중간 끊김 방지.
     overflow-wrap로 긴 영문/URL만 예외적으로 강제 줄바꿈해 넘침 방지. */
  word-break: keep-all;
  overflow-wrap: break-word;
}
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
a { color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--violet); color: #fff; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

h1, h2, h3 { margin: 0; color: var(--text); line-height: 1.22; }

/* ===== 섹션 헤더 (중앙 정렬 — 레퍼런스 동일) ===== */
.section { padding: clamp(52px, 7vw, 88px) 0; }
.section__eyebrow {
  margin: 0 0 8px; text-align: center;
  font-size: .74rem; font-weight: 600; letter-spacing: .18em; color: var(--violet);
}
.section__title {
  margin: 0 0 30px; text-align: center; font-weight: 700;
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem); letter-spacing: -.02em;
}
.section__lead {
  max-width: 720px; margin: -14px auto 34px; color: var(--muted); font-size: 1rem;
}
.section__lead--center { text-align: center; }
.section__lead b { color: var(--text); font-weight: 600; }

/* =========================================================
   내비게이션
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 12px; }
.nav__brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; letter-spacing: -.01em; }
.nav__brand span { color: var(--violet); }
.nav__links { display: flex; gap: 2px; }
.nav__links a {
  padding: 8px 13px; border-radius: var(--r-btn);
  font-size: .95rem; font-weight: 500; color: var(--text);
  text-decoration: none; white-space: nowrap; opacity: .82;
  transition: opacity .16s, background .16s;
}
.nav__links a:hover, .nav__links a:focus-visible { opacity: 1; background: var(--btn-light); }
.nav__links a.is-active { color: var(--violet); opacity: 1; }
.nav__right { display: flex; align-items: center; gap: 8px; }

/* 테마 토글 (해/달) */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--btn-light); border: 1px solid var(--border);
  cursor: pointer; display: grid; place-items: center; color: var(--text);
  transition: transform .2s, background .2s;
}
.theme-toggle:hover { transform: rotate(25deg); }
.theme-toggle__icon { width: 18px; height: 18px; position: relative; display: block; }
.theme-toggle__icon::before { /* 해 */
  content: "☀"; position: absolute; inset: 0; text-align: center;
  line-height: 18px; font-size: 16px; color: var(--orange);
}
:root[data-theme="dark"] .theme-toggle__icon::before { content: "☾"; color: #cbd3ff; }

/* 햄버거 */
.nav__toggle {
  display: none; width: 40px; height: 40px; padding: 0; position: relative;
  background: var(--btn-light); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav__toggle span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .25s, opacity .2s;
}
.nav__toggle span:nth-child(1){ top: 13px; } .nav__toggle span:nth-child(2){ top: 19px; } .nav__toggle span:nth-child(3){ top: 25px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

/* 탭(뷰) */
.js .view { display: none; }
.js .view.is-active { display: block; animation: viewIn .5s cubic-bezier(.2,.75,.25,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* =========================================================
   버튼
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-btn);
  font-family: var(--font); font-size: .95rem; font-weight: 500;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .16s, box-shadow .16s, background .16s, opacity .16s;
}
.btn__ic { font-size: .95em; }
.btn--dark { background: var(--btn-dark); color: var(--bg); }
.btn--dark:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--light { background: var(--btn-light); color: var(--text); border-color: var(--border); }
.btn--light:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }

/* =========================================================
   히어로
   ========================================================= */
.hero { padding: clamp(20px, 3vw, 44px) 0 clamp(10px, 1.8vw, 22px); }
.hero__inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(14px, 2vw, 22px);
}
/* 홈 첫 화면이 한눈에 들어오게 ABOUT 섹션을 위로 */
#home .section { padding-top: clamp(16px, 2.4vw, 34px); }
.hero__avatar {
  position: relative; flex: 0 0 auto;
  width: clamp(120px, 15vw, 170px); height: clamp(120px, 15vw, 170px);
  display: grid; place-items: center; border-radius: 50%; overflow: hidden;
  background: linear-gradient(150deg, #8a6bff, var(--violet) 55%, var(--orange));
  color: #fff; font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: .04em;
  box-shadow: 0 20px 46px -20px rgba(107,70,254,.7);
}
.hero__avatar-mono { position: relative; z-index: 0; }
.hero__avatar-img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; object-position: center 22%; border-radius: 50%;
}
.hero__body { min-width: 0; }
.hero__hi { margin: 0 0 8px; font-size: 1.1rem; font-weight: 500; color: var(--muted); }
/* 노란(오렌지) 강조 → 코럴→골드 그라데이션 텍스트 */
.hero__role {
  font-weight: 700;
  background: linear-gradient(90deg, #f0664f 0%, #ff9147 50%, #ffc24d 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__role::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px;
  vertical-align: -3px; background: #ff9147; animation: caret 1s step-end infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.hero__name {
  font-weight: 700; font-size: clamp(2.6rem, 1.8rem + 4vw, 4.6rem);
  letter-spacing: -.03em; line-height: 1.02; margin: 0 0 16px;
}
.hero__name-en { display: block; margin-top: 8px; font-size: .28em; font-weight: 500; letter-spacing: .12em; color: var(--muted); }
.hero__tagline {
  max-width: 640px; margin: 0 auto 22px; font-size: 1.05rem; color: var(--muted);
  word-break: keep-all; /* 한국어 자연 줄바꿈 (단어 중간 끊김 방지) */
}
.hero__tagline b { color: var(--text); font-weight: 600; }
.hero__br { display: inline; }   /* 데스크톱: 지정 위치에서 2줄 */
.hero__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.hero__social { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.hero__social a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .92rem; transition: color .16s; }
.hero__social a:hover { color: var(--violet); }
.hero__social span { color: var(--violet); }

/* =========================================================
   핵심 스탯
   ========================================================= */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.stat {
  padding: 26px 16px; text-align: center; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow);
}
.stat__num {
  display: block; font-family: "Space Grotesk", var(--font);
  font-weight: 700; font-size: clamp(2rem, 1.5rem + 1.6vw, 2.9rem);
  letter-spacing: -.035em; color: var(--violet); line-height: 1; margin-bottom: 10px;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.stat__label { display: block; font-size: .78rem; color: var(--muted); line-height: 1.5; }

/* =========================================================
   핵심 역량 카드
   ========================================================= */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; padding: 26px 24px 22px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow);
  transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s;
}
.card__index { font-weight: 700; font-size: 1rem; color: var(--violet); opacity: .5; }
.card__title { font-size: 1.1rem; font-weight: 700; margin: 6px 0 12px; letter-spacing: -.01em; }
.card__desc { margin: 0 0 16px; font-size: .92rem; color: var(--muted); }
.card__proof { margin: 0; padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; font-size: .86rem; color: var(--muted); }
.card__proof b { color: var(--violet); font-weight: 700; }

/* =========================================================
   경력 · 프로젝트
   ========================================================= */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 30px; }
.filter {
  padding: 8px 18px; border-radius: var(--r-btn); font-family: var(--font);
  font-size: .82rem; font-weight: 600; color: var(--text); background: var(--card);
  border: 1px solid var(--border); cursor: pointer; transition: background .16s, color .16s, transform .12s;
}
.filter:hover { transform: translateY(-1px); }
.filter.is-active { background: var(--violet); color: #fff; border-color: var(--violet); }
.filter:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: var(--shadow); padding: 12px;
  transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s, opacity .25s;
}
.project.is-hidden { display: none; }
.project__cover {
  position: relative; border-radius: 12px; aspect-ratio: 16 / 10; margin-bottom: 14px;
  display: flex; flex-direction: column; justify-content: space-between; padding: 14px; color: #fff; overflow: hidden;
}
.project__cover-tag { align-self: flex-start; font-size: .72rem; font-weight: 600; background: rgba(255,255,255,.22); padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.project__cover-metric { font-size: 2.1rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.project__cover-metric small { display: block; margin-top: 6px; font-size: .72rem; font-weight: 500; opacity: .92; letter-spacing: 0; }
/* 프로젝트 이미지 갤러리 — 가로 스크롤 스트립 (mobile.html .shots 구성 그대로) */
.project__gallery {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 0 8px; margin-bottom: 14px; scrollbar-width: none;
}
.project__gallery::-webkit-scrollbar { display: none; }
.project__shot { flex: 0 0 86%; scroll-snap-align: start; margin: 0; position: relative; }
.project__shot:only-child { flex-basis: 100%; }
.project__shot img {
  display: block; width: 100%; height: 190px; object-fit: cover; object-position: top center;
  border-radius: 12px; border: 1px solid var(--border); background: #0d0d12;
}
.project__shot figcaption { margin-top: 8px; font-size: .74rem; color: var(--muted); line-height: 1.45; text-align: center; }
.project__shot a { display: block; }
/* 영상 썸네일: 재생 배지 */
.project__shot--video a::after {
  content: ""; position: absolute; left: 50%; top: 95px; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(10,12,18,.55); border: 2px solid rgba(255,255,255,.85);
}
.project__shot--video a::before {
  content: ""; position: absolute; left: calc(50% + 3px); top: 95px; transform: translate(-50%, -50%);
  z-index: 1; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}

.project__tags { margin: 0 0 10px; font-size: .8rem; font-weight: 600; color: var(--violet); }
.project__desc { margin: 0 0 14px; font-size: .9rem; color: var(--muted); line-height: 1.7; }
.project__stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.project__stats li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; font-size: .82rem;
}
.project__stats .k { color: var(--muted); }
.project__stats b { color: var(--violet); font-weight: 700; text-align: right; white-space: nowrap; }

.project__cover--a { background: linear-gradient(140deg, #6b46fe, #9b7bff); }
.project__cover--b { background: linear-gradient(140deg, #ff8c42, #ffb344); }
.project__cover--c { background: linear-gradient(140deg, #2f9e78, #46c79a); }
.project__cover--d { background: linear-gradient(140deg, #e0466b, #ff7aa0); }
.project__cover--e { background: linear-gradient(140deg, #6b46fe, #b34bd6); }
.project__cover--f { background: linear-gradient(140deg, #d99a1c, #f5c451); }
.project__cover--g { background: linear-gradient(140deg, #3763d9, #5aa0f5); }
.project__body { padding: 4px 8px 8px; }
.project__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.project__period { font-size: .78rem; color: var(--muted); font-weight: 500; }
.project__title { font-size: 1.1rem; font-weight: 700; margin: 0 0 10px; letter-spacing: -.01em; }
.project__metric { margin: 0 0 12px; font-size: .82rem; font-weight: 600; color: var(--orange); }
.project__list { margin: 0; padding-left: 17px; }
.project__list li { margin-bottom: 7px; font-size: .86rem; color: var(--muted); }
.project__list li::marker { color: var(--violet); }
.project__list b { color: var(--text); font-weight: 700; }

/* =========================================================
   학력 · 스킬
   ========================================================= */
.edu-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 46px; align-items: start; text-align: left; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 8px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--violet), rgba(107,70,254,.25)); }
.timeline li { position: relative; padding: 0 0 22px 28px; }
.timeline li::before {
  content: ""; position: absolute; left: 1px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 3px solid var(--violet); box-sizing: border-box;
  box-shadow: 0 0 0 3px var(--bg);   /* 라인과 겹치는 부분을 덮어 원이 라인 위에 깔끔히 얹히게 */
}
.timeline__school { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline__badge { font-size: .66rem; font-weight: 600; color: #fff; background: var(--violet); padding: 2px 10px; border-radius: 999px; }
.timeline__detail { margin: 4px 0 0; font-size: .86rem; color: var(--muted); }
.skill-label { margin: 24px 0 8px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; color: var(--violet); text-transform: uppercase; }
.skill-label:first-of-type { margin-top: 0; }
.skill-text { margin: 0; color: var(--muted); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: .82rem; font-weight: 500; color: var(--muted); background: var(--card); border: 1px solid var(--border); padding: 6px 13px; border-radius: var(--r-btn); transition: color .14s, border-color .14s; }
.tags li:hover { color: var(--violet); border-color: var(--violet); }
.award { display: inline-block; margin: 0; padding: 12px 18px; background: rgba(255,179,68,.12); border: 1px solid rgba(255,179,68,.4); border-radius: 12px; color: #c07d15; font-weight: 600; font-size: .9rem; }
:root[data-theme="dark"] .award { color: var(--orange); }

/* =========================================================
   툴
   ========================================================= */
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.tool { position: relative; padding: 24px 22px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s; }
.tool--featured { border-color: var(--violet); }
.tool__ic { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); font-size: 1.3rem; }
.tool__name { font-size: 1rem; font-weight: 700; margin: 0 0 8px; }
.tool__desc { margin: 0; font-size: .85rem; color: var(--muted); }
.tool__stat { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: .8rem; font-weight: 600; color: var(--violet); }
.tools__cta { margin: 0; text-align: center; }

/* =========================================================
   연락처 · 푸터
   ========================================================= */
.contact__inner { text-align: center; }
.contact__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.footer { padding: 30px 0; text-align: center; border-top: 1px solid var(--border); }
.footer p { margin: 0; font-size: .85rem; color: var(--muted); }

/* =========================================================
   플로팅 버튼 (레퍼런스: CV 좌하단 / 챗 우하단)
   ========================================================= */
.fab { position: fixed; bottom: 22px; z-index: 90; text-decoration: none; }

/* 좌하단: PDF 다운로드 플로팅 배너 (허밍 + 말풍선) */
.fab--pdf {
  left: 22px; display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 20px 13px 16px; border-radius: 999px;
  border: none; cursor: pointer; font-family: inherit;
  background: var(--violet); color: #fff; font-weight: 700; font-size: .9rem;
  box-shadow: 0 10px 30px -8px rgba(107,70,254,.55);
  animation: hum 2.4s ease-in-out infinite;
}
.fab--pdf:hover { animation-play-state: paused; transform: translateY(-3px) scale(1.05); box-shadow: 0 18px 40px -6px rgba(107,70,254,.85); }
.fab--pdf__ic { font-size: 1.05em; }
.fab--pdf__txt { line-height: 1; }
.fab--pdf__dot {
  width: 9px; height: 9px; border-radius: 50%; background: #34e29b; flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(52,226,155,.7); animation: pulseDot 1.8s ease-out infinite;
}
/* 말풍선 안내 */
.fab--pdf__bubble {
  position: absolute; bottom: calc(100% + 11px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; background: var(--text); color: var(--bg);
  font-size: .76rem; font-weight: 700; padding: 7px 13px; border-radius: 9px;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,.5); animation: bubbleBob 2.2s ease-in-out infinite;
}
.fab--pdf__bubble::after {
  content: ""; position: absolute; top: 100%; left: 26px;
  border: 6px solid transparent; border-top-color: var(--text);
}
@keyframes bubbleBob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }
@keyframes hum {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 10px 30px -8px rgba(107,70,254,.5); }
  50%      { transform: translateY(-3px) scale(1.035); box-shadow: 0 18px 40px -6px rgba(107,70,254,.85); }
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(52,226,155,.7); }
  70%  { box-shadow: 0 0 0 9px rgba(52,226,155,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,226,155,0); }
}

/* 우하단: 포트폴리오 버블 */
.fab--portfolio {
  right: 22px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--btn-dark); color: var(--bg); font-size: 1.2rem;
  display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(0,0,0,.5);
  transition: transform .18s;
}
.fab--portfolio:hover { transform: translateY(-3px) scale(1.08); }

/* =========================================================
   리치 모션
   ========================================================= */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--violet), var(--orange)); z-index: 150; pointer-events: none; }

.js .reveal { opacity: 0; transform: translateY(26px) scale(.986); }
.js .reveal.is-visible { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.75,.25,1); transition-delay: calc(var(--i, 0) * 80ms); }

.card, .project, .tool { transform-style: preserve-3d; will-change: transform; }
.card::after, .project::after, .tool::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(240px circle at var(--mx,50%) var(--my,50%), rgba(107,70,254,.14), transparent 62%);
}
.card.is-tilting::after, .project.is-tilting::after, .tool.is-tilting::after { opacity: 1; }
.card:hover, .tool:hover { box-shadow: 0 16px 36px -18px rgba(0,0,0,.3); }

.btn, .filter { position: relative; overflow: hidden; }
.fab { position: fixed; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.5); pointer-events: none; animation: ripple .6s ease-out forwards; }
.btn--light .ripple, .filter .ripple { background: rgba(107,70,254,.25); }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

.project.is-appearing { animation: pop .42s cubic-bezier(.2,.7,.3,1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

.hero__avatar.is-visible { animation: float 5.5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* =========================================================
   반응형
   ========================================================= */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .tools { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; gap: 2px;
    padding: 10px 16px 16px; background: var(--nav-bg); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: transform .22s, opacity .22s;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 12px 14px; font-size: 1rem; }
  .cards { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .project__gallery { grid-template-columns: 1fr; }
  .hero__br { display: none; }   /* 모바일: 강제 줄바꿈 해제 → 자연 줄바꿈 */
  .fab--contact { font-size: .82rem; padding: 11px 16px; }
}
@media (max-width: 460px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tools { grid-template-columns: 1fr; }
  .fab--contact { font-size: .78rem; padding: 10px 14px; }
  .fab--portfolio { width: 46px; height: 46px; }
}

/* =========================================================
   인쇄 / PDF 저장 — 깔끔한 한 벌 이력서로 출력
   ========================================================= */
@media print {
  :root, :root[data-theme="dark"] {
    --bg: #fff; --bg-soft: #fff; --card: #fff; --border: #d5d5dd;
    --text: #111; --muted: #444; --btn-dark: #111; --btn-light: #f1f1f4; --nav-bg: #fff; --shadow: none;
  }
  body { background: #fff !important; color: #111 !important; }
  /* 화면 전용 크롬 숨김 */
  .nav, .fab, .scroll-progress, .theme-toggle, .nav__toggle, .filters, .hero__actions { display: none !important; }
  /* 탭 뷰 전부 펼쳐서 완전한 이력서로 */
  .js .view { display: block !important; animation: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .hero__role::after { display: none; }
  .section { padding: 16px 0 !important; }
  .hero { padding: 10px 0 20px !important; }
  h2.section__title { font-size: 1.5rem !important; }
  /* 카드가 페이지 경계에서 잘리지 않게 */
  .card, .project, .tool, .stat, .skillcard, .timeline li { break-inside: avoid; box-shadow: none !important; }
  .card::after, .project::after, .tool::after { display: none !important; }
  /* 갤러리: 가로 스크롤 대신 전부 표시 */
  .project__gallery { overflow: visible !important; flex-wrap: wrap; scroll-snap-type: none; }
  .project__shot { flex: 0 0 31%; }
  .project__shot img { height: 110px; }
  .project__shot--video a::before, .project__shot--video a::after { display: none; }
  .projects, .cards, .tools { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
  a { color: #111 !important; text-decoration: none; }
}

/* 모션 최소화 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero__role::after, .hero__avatar.is-visible, .project.is-appearing,
  .fab--pdf, .fab--pdf__dot, .fab--pdf__bubble { animation: none; }
  .scroll-progress, .card::after, .project::after, .tool::after, .ripple { display: none; }
  * { transition: none !important; }
}
