/* ══════════════════════════════════════
   KHY02 — style.css  2026
══════════════════════════════════════ */
:root {
  --font:    "Pretendard", -apple-system, sans-serif;
  --black:   #0a0a0a;
  --white:   #ffffff;
  --gray:    #6b6b6b;
  --line:    #e4e4e4;
  --bg:      #f9f9f9;
  --ease:    cubic-bezier(.16,1,.3,1);
  --max:     1160px;
  --px:      clamp(20px, 5vw, 64px);
  --hh:      56px;

  /* ── 타입 스케일 ── */
  --t-xs:   13px;   /* 레이블·넘버·태그 (최소) */
  --t-sm:   13px;   /* 보조 텍스트·nav */
  --t-md:   16px;   /* 본문 */
  --t-h3:   18px;   /* 카드 제목·row 제목 */
  --t-h2:   clamp(28px, 3vw, 40px); /* 섹션 헤딩 */
  --t-h1:   clamp(72px, 10vw, 140px); /* 인트로 이름 */
  --t-contact: clamp(48px, 6.5vw, 96px); /* Contact 대형 */
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--black); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; cursor: pointer; font: inherit; }
ul, ol { list-style: none; }

/* ── reveal ── */
[data-reveal], [data-reveal="right"] {
  opacity: 0; transform: translateY(24px);
}
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal].is-visible, [data-reveal="right"].is-visible {
  opacity: 1 !important; transform: none !important;
  transition: opacity .85s var(--ease), transform .85s var(--ease);
}

/* ══ HEADER ══ */
.hd {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--hh);
  display: flex; align-items: center;
  padding: 0 var(--px);
  background: rgba(249,249,249,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.hd.scrolled { border-color: var(--line); }
.hd__logo {
  font-size: 15px; font-weight: 900; letter-spacing: -.02em; color: var(--black);
}
.hd__nav {
  display: flex; align-items: center; gap: 28px; margin-left: auto;
}
.hd__nav a {
  font-size: 15px; font-weight: 500; color: var(--gray);
  transition: color .2s;
}
.hd__nav a:hover, .hd__nav a.active { color: var(--black); }
.hd__cta {
  margin-left: 28px; font-size: 15px; font-weight: 700;
  color: var(--black); border-bottom: 1.5px solid var(--black);
  padding-bottom: 1px; transition: opacity .2s;
}
.hd__cta:hover { opacity: .5; }
.hd__menu {
  display: none; flex-direction: column; gap: 5px;
  width: 28px; height: 28px; align-items: center; justify-content: center;
  margin-left: auto;
}
.hd__menu span {
  display: block; width: 18px; height: 1.5px;
  background: var(--black); border-radius: 2px;
  transition: transform .3s;
}
.mobile-nav {
  position: fixed; inset: 0; z-index: 190;
  background: var(--black); display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav nav { display: flex; flex-direction: column; gap: 16px; }
.mobile-nav nav a {
  font-size: clamp(28px, 7vw, 48px); font-weight: 800;
  letter-spacing: -.05em; color: rgba(255,255,255,.75);
}
.mobile-nav nav a:hover { color: #fff; }

/* ══ INTRO ══ */
.s-intro__bg {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none; z-index: 0;
  transition: opacity .6s ease;
}
.s-intro {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
}

/* 중앙 타이틀 */
.s-intro__center {
  position: relative; z-index: 1;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.s-intro__copy {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 900; letter-spacing: -.04em;
  line-height: 1.1; color: var(--black);
}
.s-intro__copy .char { display: inline-block; opacity: 0; transform: translateY(40px); }
.i-hl {
  background: var(--black); color: var(--white);
  padding: 0 2px;
}
.i-hl2 {
  background: #f87171; color: var(--white);
  padding: 0 2px;
}
.s-intro__sub {
  font-size: 13px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gray);
  opacity: 0;
}

/* 흩어진 태그 */
.s-intro__float {
  position: absolute; z-index: 2;
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  padding: 10px 20px; border-radius: 6px;
  white-space: nowrap;
  animation: floatDrift 6s ease-in-out infinite;
}
.s-intro__float--1 {
  top: 24%; left: 18%;
  background: #e8e4ff; color: #5b4fcf;
  --r: -6deg; animation-delay: 0s;
}
.s-intro__float--2 {
  top: 24%; right: 18%;
  background: #fef3c7; color: #92600a;
  --r: 4deg; animation-delay: -1.5s;
}
.s-intro__float--3 {
  bottom: 30%; left: 16%;
  background: #d1fae5; color: #065f46;
  --r: 3deg; animation-delay: -3s;
}
.s-intro__float--4 {
  bottom: 28%; right: 16%;
  background: #fce7f3; color: #9d174d;
  --r: -4deg; animation-delay: -4.5s;
}
.s-intro__float--5 {
  top: 50%; right: 14%;
  background: #e0f2fe; color: #0c4a6e;
  --r: 5deg; animation-delay: -2s;
}
@keyframes floatDrift {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%       { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}
.s-intro__float--1 { --r: -6deg; }
.s-intro__float--2 { --r:  4deg; }
.s-intro__float--3 { --r:  3deg; }
.s-intro__float--4 { --r: -4deg; }
.s-intro__float--5 { --r:  5deg; }

/* 스크롤 힌트 */
.s-intro__scroll {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 12px;
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gray);
  z-index: 2;
}
.s-intro__scroll-line {
  display: block; width: 32px; height: 1px;
  background: currentColor; flex-shrink: 0;
}

/* ══ 섹션 공통 ══ */
.sec-label {
  display: flex; align-items: center; gap: 10px;
  max-width: calc(var(--max) + var(--px) * 2); margin: 0 auto;
  padding: clamp(56px, 8vw, 100px) var(--px) 32px;
  border-top: 1px solid var(--line);
}
.sec-label__num {
  font-size: var(--t-xs); font-weight: 700;
  color: var(--gray); letter-spacing: .12em;
}
.sec-label__name {
  font-size: var(--t-xs); font-weight: 700;
  color: var(--black); letter-spacing: .1em; text-transform: uppercase;
}
.sec-label--light { border-top-color: rgba(255,255,255,.1); }
.sec-label--light .sec-label__num  { color: rgba(255,255,255,.35); }
.sec-label--light .sec-label__name { color: rgba(255,255,255,.6); }

/* ══ ABOUT ══ */
.s-about { background: var(--white); }
.s-about__inner {
  max-width: calc(var(--max) + var(--px) * 2); margin: 0 auto;
  padding: 0 var(--px) clamp(72px, 10vw, 120px);
  display: grid; grid-template-columns: 340px 1fr; gap: 0 64px; align-items: start;
}

/* 사진 컬럼 */
.s-about__photos {
  display: flex; flex-direction: column; gap: 12px;
  position: sticky; top: calc(var(--hh) + 24px);
}
.s-about__photo { overflow: hidden; border-radius: 3px; margin: 0; }
.s-about__photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  display: block; transition: transform .6s var(--ease), filter .6s var(--ease);
}
.s-about__photo--main img { filter: grayscale(100%); }
.s-about__photo:hover img { transform: scale(1.04); }
.s-about__photo--main:hover img { filter: grayscale(0%); }
.s-about__photo--main { aspect-ratio: 3/4; }
.s-about__photo--sub  { aspect-ratio: 4/3; }

/* 콘텐츠 컬럼 */
.s-about__heading {
  font-size: var(--t-h2); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.35;
  margin-bottom: 28px;
}
.s-about__text { margin-bottom: 36px; }
.s-about__text p { font-size: var(--t-md); line-height: 1.9; color: var(--gray); }
.s-about__text p + p { margin-top: 14px; }

/* 스탯 */
.s-about__stats {
  display: flex; margin-bottom: 36px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat {
  flex: 1; padding: 20px 0;
  display: flex; flex-direction: column; gap: 5px;
  border-right: 1px solid var(--line);
}
.stat:not(:first-child) { padding-left: 20px; }
.stat:last-child { border-right: none; }
.stat__num {
  font-size: clamp(28px, 3vw, 44px); font-weight: 900;
  letter-spacing: -.04em; color: var(--black); line-height: 1;
}
.stat__label { font-size: var(--t-xs); color: var(--gray); line-height: 1.55; }

/* 정보 리스트 */
.s-about__info li {
  display: flex; gap: 16px; align-items: baseline;
  padding: 13px 0; border-top: 1px solid var(--line); font-size: var(--t-sm);
}
.s-about__info li:last-child { border-bottom: 1px solid var(--line); }
.s-about__info b {
  flex-shrink: 0; width: 64px;
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gray);
}
.s-about__info span { color: var(--black); line-height: 1.7; }

/* ══ WORK ══ */
.s-work { background: var(--bg); }
.s-work__inner {
  max-width: calc(var(--max) + var(--px) * 2); margin: 0 auto;
  padding: 0 var(--px) clamp(72px, 10vw, 120px);
}
.work-feed {
  display: flex; flex-direction: column;
}

.work-feed__item {
  display: grid;
  grid-template-columns: 48px 96px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none;
  transition: background .25s var(--ease), padding-left .25s var(--ease);
}
.work-feed__item:first-child { border-top: 1px solid var(--line); }
.work-feed__item:hover { background: var(--white); padding-left: 14px; }

.work-feed__num {
  font-size: 12px; font-weight: 700; color: var(--gray); letter-spacing: .08em;
}

.work-feed__thumb {
  margin: 0; overflow: hidden; border-radius: 6px;
  aspect-ratio: 4/3; background: var(--line);
}
.work-feed__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.work-feed__item:hover .work-feed__thumb img { transform: scale(1.08); }

.work-feed__info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.work-feed__name { font-size: var(--t-h3); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.work-feed__desc {
  font-size: var(--t-xs); color: var(--gray); margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.work-feed__type { font-size: 11px; color: var(--gray); margin-top: 2px; }

.work-feed__arrow {
  font-size: 18px; color: var(--gray);
  transition: transform .3s var(--ease), color .3s var(--ease);
}
.work-feed__item:hover .work-feed__arrow { color: var(--black); transform: translate(3px,-3px); }

/* ══ SKILLS ══ */
.s-skills { background: var(--black); color: var(--white); }
.s-skills .sec-label { max-width: calc(var(--max) + var(--px) * 2); margin: 0 auto; padding-left: var(--px); padding-right: var(--px); border-top-color: rgba(255,255,255,.1); }
.s-skills__inner {
  max-width: calc(var(--max) + var(--px) * 2); margin: 0 auto;
  padding: 0 var(--px) clamp(72px, 10vw, 120px);
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,.08);
}
.sk-group {
  padding: 40px 40px 40px 0;
  border-right: 1px solid rgba(255,255,255,.08);
}
.sk-group + .sk-group { padding-left: 40px; }
.sk-group:last-child { border-right: none; }
.sk-group__title {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.35); margin-bottom: 28px;
}
.sk-icons {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 8px;
}
.sk-icon {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.sk-icon img {
  width: 40px; height: 40px; object-fit: contain;
  filter: brightness(.82) saturate(.9);
  transition: filter .2s, transform .25s var(--ease);
}
.sk-icon:hover img { filter: brightness(1) saturate(1); transform: translateY(-3px); }
.sk-icon span {
  font-size: 10px; color: rgba(255,255,255,.45); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; width: 100%;
}

/* ══ EXPERIENCE ══ */
.s-exp { background: var(--white); }
.s-exp .sec-label { max-width: calc(var(--max) + var(--px) * 2); margin: 0 auto; padding-left: var(--px); padding-right: var(--px); }
.s-exp__inner {
  max-width: calc(var(--max) + var(--px) * 2); margin: 0 auto;
  padding: 0 var(--px) clamp(72px, 10vw, 120px);
}
.exp-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr 120px;
  gap: 0 32px; padding: 22px 0; border-top: 1px solid var(--line);
  align-items: start;
  transition: background .18s, padding .18s;
}
.exp-row:last-of-type { border-bottom: 1px solid var(--line); }
.exp-row:hover {
  background: var(--bg);
  padding-left: 20px; padding-right: 20px;
  margin-left: -20px; margin-right: -20px;
}
.exp-row__num { font-size: var(--t-xs); color: var(--line); font-weight: 400; padding-top: 2px; }
.exp-row__info { min-width: 0; }
.exp-row__co { font-size: var(--t-h3); font-weight: 800; letter-spacing: -.03em; margin: 0 0 3px; }
.exp-row__role { font-size: var(--t-xs); color: var(--gray); margin: 0; }
.exp-row__tasks { display: flex; flex-direction: column; gap: 5px; }
.exp-row__tasks li {
  font-size: var(--t-xs); line-height: 1.7; color: var(--gray);
  padding-left: 12px; position: relative;
}
.exp-row__tasks li::before {
  content: ""; position: absolute; left: 0; top: .65em;
  width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .3;
}
.exp-row__period { font-size: var(--t-xs); color: var(--gray); text-align: right; padding-top: 2px; }
.s-exp__cred {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: 56px;
}
.cred-item {
  border: 1px solid var(--line); border-radius: 6px;
  padding: 28px 32px;
}
.cred-item__title {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gray);
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.cred-item__title i { font-size: 15px; }
.cred-item__list { display: flex; flex-direction: column; gap: 14px; }
.cred-item__list li { display: flex; flex-direction: column; gap: 3px; }
.cred-item__name { font-size: var(--t-sm); font-weight: 600; color: var(--black); }
.cred-item__sub { font-size: 12px; color: var(--gray); }

/* ══ CONTACT ══ */
.s-contact { background: var(--bg); }
.s-contact .sec-label { max-width: calc(var(--max) + var(--px) * 2); margin: 0 auto; padding-left: var(--px); padding-right: var(--px); }
.s-contact__inner {
  max-width: calc(var(--max) + var(--px) * 2); margin: 0 auto;
  padding: 0 var(--px) clamp(80px, 12vw, 140px);
}
.s-contact__top { margin-bottom: 48px; }
.s-contact__heading {
  font-size: var(--t-contact); font-weight: 900;
  letter-spacing: -.05em; line-height: .92;
}
.s-contact__bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
  padding-top: 36px; border-top: 1px solid var(--line);
}
.s-contact__bottom > p { font-size: var(--t-md); color: var(--gray); }
.s-contact__links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.s-contact__email {
  font-size: var(--t-h3); font-weight: 700; color: var(--black);
  border-bottom: 1.5px solid var(--black); padding-bottom: 2px; transition: opacity .2s;
}
.s-contact__email:hover { opacity: .5; }
.s-contact__portfolio {
  font-size: var(--t-sm); font-weight: 700; color: var(--gray);
  border: 1px solid var(--line); padding: 10px 20px; border-radius: 4px;
  transition: border-color .2s, color .2s;
}
.s-contact__portfolio:hover { border-color: var(--black); color: var(--black); }

/* ══ FOOTER ══ */
.ft {
  border-top: 1px solid var(--line); padding: 20px var(--px);
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--t-xs); color: var(--gray);
}
.ft a { font-weight: 700; color: var(--black); transition: opacity .2s; }
.ft a:hover { opacity: .5; }

/* ══ WORK POPUP ══ */
.wp-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10,10,10,.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.wp-overlay.is-open { opacity: 1; pointer-events: auto; }
.wp-modal {
  width: min(1100px, 92vw); height: 88vh; background: var(--white);
  border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(24px); transition: transform .35s var(--ease);
  box-shadow: 0 32px 80px rgba(0,0,0,.28);
}
.wp-overlay.is-open .wp-modal { transform: translateY(0); }
.wp-modal__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 48px; flex-shrink: 0;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.wp-modal__title { font-size: var(--t-sm); font-weight: 700; color: var(--black); }
.wp-modal__actions { display: flex; align-items: center; gap: 16px; }
.wp-modal__open { font-size: var(--t-xs); font-weight: 600; color: var(--gray); transition: color .2s; }
.wp-modal__open:hover { color: var(--black); }
.wp-modal__close { font-size: 16px; color: var(--gray); transition: color .2s; }
.wp-modal__close:hover { color: var(--black); }
.wp-modal__frame { width: 100%; flex: 1; border: none; }

/* ══ 반응형 — 태블릿 (≤900px) ══ */
@media (max-width: 900px) {
  /* 헤더 */
  .hd__nav, .hd__cta { display: none; }
  .hd__menu { display: flex; }

  /* 인트로 */
  .s-intro__float--2, .s-intro__float--5 { display: none; }
  .s-intro__name { font-size: clamp(60px, 16vw, 100px); }

  /* 섹션 레이블 */
  .sec-label { padding-top: clamp(48px, 7vw, 80px); padding-bottom: 28px; }

  /* About */
  .s-about__inner { grid-template-columns: 1fr; gap: 0; }
  .s-about__photos {
    position: static; flex-direction: row; gap: 12px; margin-bottom: 40px;
  }
  .s-about__photo--main { flex: 3; aspect-ratio: 3/4; }
  .s-about__photo--sub  { flex: 2; aspect-ratio: 2/3; }
  .s-about__heading { font-size: clamp(22px, 4vw, 32px); }

  /* Skills */
  .s-skills__inner { grid-template-columns: 1fr; }
  .sk-group {
    padding: 32px 0;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .sk-group + .sk-group { padding-left: 0; }
  .sk-group:last-child { border-bottom: none; }
  .sk-icons { grid-template-columns: repeat(4, 1fr); gap: 20px 12px; }

  /* Experience */
  .exp-row { grid-template-columns: 32px 1fr 80px; gap: 0 16px; }
  .exp-row__tasks { display: none; }
  .exp-row:hover { padding-left: 12px; padding-right: 12px; margin-left: -12px; margin-right: -12px; }
  .s-exp__cred { grid-template-columns: 1fr; gap: 16px; }

  /* Contact */
  .s-contact__heading { font-size: clamp(40px, 10vw, 72px); }
  .s-contact__top { margin-bottom: 36px; }
  .s-contact__bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
  .s-contact__links { flex-direction: column; align-items: flex-start; gap: 12px; }
  .s-contact__email { font-size: var(--t-h3); }
}

/* ══ 반응형 — 모바일 (≤480px) ══ */
@media (max-width: 480px) {
  :root { --px: 20px; }

  /* 인트로 */
  .s-intro__float { font-size: 11px; padding: 5px 10px; }
  .s-intro__float--3, .s-intro__float--4 { display: none; }
  .s-intro__name { font-size: clamp(52px, 18vw, 80px); }
  .s-intro__desc { font-size: 15px; }
  .s-intro__meta span { font-size: 12px; padding: 4px 8px; }

  /* 섹션 레이블 */
  .sec-label { padding-top: 40px; padding-bottom: 20px; }

  /* About */
  .s-about__photos { flex-direction: column; }
  .s-about__photo--main { aspect-ratio: 4/3; }
  .s-about__photo--sub  { display: none; }
  .s-about__heading { font-size: clamp(20px, 5.5vw, 28px); line-height: 1.4; }
  .s-about__text p { font-size: 15px; }
  .s-about__stats { }
  .stat__num { font-size: clamp(24px, 8vw, 36px); }
  .s-about__info li { flex-wrap: wrap; gap: 4px 12px; }
  .s-about__info b { width: auto; }

  /* Work */
  .work-feed__item { grid-template-columns: 32px 64px 1fr auto; gap: 14px; padding: 16px 4px; }
  .work-feed__name { font-size: 16px; }
  .work-feed__desc { white-space: normal; }
  .work-feed__type { display: none; }

  /* Skills */
  .sk-icon img { width: 34px; height: 34px; }
  .sk-icon span { font-size: 9px; }

  /* Experience */
  .exp-row { grid-template-columns: 28px 1fr 60px; padding: 16px 0; }
  .exp-row__co { font-size: 16px; }
  .s-exp__cred { margin-top: 40px; padding-top: 32px; }
  .cred-item__name { font-size: 13px; }

  /* Contact */
  .s-contact__heading { font-size: clamp(36px, 13vw, 56px); letter-spacing: -.04em; }
  .s-contact__bottom > p { font-size: 15px; }
  .s-contact__email { font-size: 16px; }
  .wp-modal { width: 100vw; height: 100svh; border-radius: 0; }
}
