/* 기본 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* 색
   라이트와 다크는 서로 정확히 반대 색입니다. 잉크가 닿은 자리에 반대 테마가 보입니다 */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg:      #ffffff;
  --text:    #111111;
  --sub:     #555555;   /* 본문 보조 */
  --muted:   #6e6e6e;   /* 메타, 라벨 */
  --faint:   #c8c8c8;   /* 구분점 */
  --border:  #dedede;
  --border-strong: #cfcfcf;
  --tile:    #f4f4f4;
  --card:    #ffffff;
  --chip-text: #333333;
  --card-shadow: 0 18px 50px rgba(0, 0, 0, .07);
  --btn-shadow:  0 4px 14px rgba(0, 0, 0, .05);
  --ind-bg:      rgba(255, 255, 255, .8);
  --ind-border:  rgba(0, 0, 0, .07);
  --ind-shadow:  0 8px 28px rgba(0, 0, 0, .08);
  --browser-bar:    #f2f2f2;
  --browser-line:   #e3e3e3;
  --browser-url:    #ffffff;
  --browser-icon:   #9a9a9a;
  --preview-shadow: 0 -6px 28px rgba(0, 0, 0, .05);
  --phone-frame: #141414;
  --phone-ring:  #2e2e2e;
  --phone-screen: #ffffff;
  --phone-status: #111111;
  --browser-screen: #ffffff;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg:      #000000;
  --text:    #eeeeee;
  --sub:     #aaaaaa;
  --muted:   #919191;
  --faint:   #373737;
  --border:  #212121;
  --border-strong: #3a3a3a;
  --tile:    #151515;
  --card:    #0a0a0a;
  --chip-text: #d4d4d4;
  --card-shadow: none;
  --btn-shadow:  none;
  --ind-bg:      rgba(20, 20, 20, .78);
  --ind-border:  rgba(255, 255, 255, .09);
  --ind-shadow:  0 8px 28px rgba(0, 0, 0, .6);
  --browser-bar:    #1b1b1b;
  --browser-line:   #2a2a2a;
  --browser-url:    #2a2a2a;
  --browser-icon:   #7a7a7a;
  --preview-shadow: none;
  --phone-frame: #1e1e1e;
  --phone-ring:  #3a3a3a;
  --phone-screen: #0e0f11;   /* 김먼지 다크 화면 배경 */
  --phone-status: #ffffff;
  --browser-screen: #17191c; /* MediPrice 다크 화면 배경 */
}
:root {
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

/* 테마 전환 */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .45s; animation-timing-function: ease; }
/* 화면 겹치기를 지원하지 않는 브라우저용 */
@media (prefers-reduced-motion: no-preference) {
  html.theme-anim,
  html.theme-anim *,
  html.theme-anim *::before,
  html.theme-anim *::after {
    transition-property: background-color, color, border-color, fill, stroke, box-shadow, opacity, transform, filter !important;
    transition-duration: .45s !important;
    transition-timing-function: ease !important;
  }
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

h1, h2, h3 { font-size: inherit; font-weight: inherit; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--text); color: var(--bg); }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 1000;
  padding: 10px 14px; border-radius: 8px;
  background: var(--text); color: var(--bg); font-size: 15px;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip:focus { transform: none; }

/* 잉크 */
#ink {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: difference;
}
/* 터치 기기에서는 잉크를 쓰지 않습니다 */
@media (hover: none), (pointer: coarse) {
  #ink { display: none; }
}

/* 글자 선택, 사진·링크 끌기 막기 (잉크가 끊기지 않게) */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
img, a { -webkit-user-drag: none; }

/* 레이아웃 */
.w { max-width: 1200px; margin: 0 auto; padding: 0 60px; }

/* 첫 화면 */
#hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 120px 0 64px;
}
.hero-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--muted);
  margin-bottom: 20px;
}
.hero-name {
  font-size: clamp(68px, 14vw, 164px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .95;
}
.hero-bottom { display: flex; justify-content: flex-end; }
.hero-desc {
  max-width: 460px;
  font-size: 20px;
  color: var(--sub);
  line-height: 1.7;
  text-align: right;
  letter-spacing: -.015em;
  word-break: keep-all;
}

/* 첫 화면 물방울: 점이 퐁 생기고 물결이 퍼집니다 */
#hero { position: relative; z-index: 0; }
.drops {
  position: absolute;
  inset: 0 calc(50% - 50vw);        /* 화면 양 끝까지 */
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.drop {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
}
.drop::before,
.drop::after,
.drop i {
  content: '';
  position: absolute;
  border-radius: 50%;
}
.drop::before {
  inset: calc(50% - 4px);
  background: var(--text);
  animation: drop-pop 1.1s var(--ease) both;
}
.drop::after,
.drop i {
  inset: 0;
  border: 1px solid var(--text);
  animation: drop-ring 2.6s cubic-bezier(.15, .6, .3, 1) both;
}
.drop i { inset: 20%; animation-delay: .16s; }
@keyframes drop-pop {
  0%   { transform: scale(0);   opacity: .6; }
  30%  { transform: scale(1.3); opacity: .6; }
  100% { transform: scale(0);   opacity: 0; }
}
@keyframes drop-ring {
  0%   { transform: scale(.04); opacity: .3; }
  100% { transform: scale(1);   opacity: 0; }
}

/* 섹션 */
.sec {
  padding: 112px 0;
  border-top: 1px solid var(--border);
}
.sec-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text);
  margin-bottom: 48px;
}

/* 소개 */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 80px;
  align-items: start;
}
.about-col { max-width: 32em; }
.about-bio {
  font-size: 18px;
  color: var(--sub);
  line-height: 1.8;
  letter-spacing: -.015em;
  word-break: keep-all;
}
.about-bio p + p { margin-top: 22px; }
.about-bio strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
/* 경험 */
.timeline {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--sub);
  line-height: 1.6;
  word-break: keep-all;
}
.timeline li { display: grid; grid-template-columns: 56px minmax(0, 1fr); }
.timeline span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* 자세히 보기 */
.bio-more { display: grid; grid-template-rows: 1fr; }
.bio-more-inner { min-height: 0; overflow: hidden; }
.bio-more-inner p:first-child { margin-top: 22px; }
.js .bio-more {
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .6s var(--ease), opacity .4s ease;
}
.js .bio-more.open { grid-template-rows: 1fr; opacity: 1; }

/* 자세히 보기 버튼 */
.more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin-top: 24px;
  padding: 0 7px 0 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--sub);
  transition: border-color .25s, background .25s, color .25s, box-shadow .25s;
}
.more-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tile);
  color: var(--sub);
  transition: background .25s, color .25s, transform .45s var(--ease);
}
.more-btn[aria-expanded="true"] .more-ico { transform: rotate(180deg); }
@media (hover: hover) {
  .more-btn:hover {
    border-color: var(--border-strong);
    color: var(--text);
    box-shadow: var(--btn-shadow);
  }
  .more-btn:hover .more-ico { background: var(--text); color: var(--bg); }
}
.more-btn:active { transform: scale(.98); }
.more-btn:focus-visible { outline-offset: 3px; border-radius: 100px; }
html:not(.js) .more-btn { display: none; }

/* 기술 태그 */
.tech-col { display: flex; flex-direction: column; gap: 26px; }
.tech-group-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 35px;
  padding: 0 13px 0 11px;
  border-radius: 8px;
  background: var(--tile);
  font-size: 14px;
  font-weight: 500;
  color: var(--chip-text);
  letter-spacing: -.005em;
  white-space: nowrap;
}
.chip img { width: 17px; height: 17px; object-fit: contain; flex: none; }
.chips-sm .chip { height: 31px; padding: 0 11px 0 9px; gap: 6px; font-size: 13px; border-radius: 7px; }
.chips-sm .chip img { width: 15px; height: 15px; }
/* 어두운 아이콘은 다크에서 밝게 */
html[data-theme="dark"] .chip img[src*="hibernate"] { filter: brightness(2.2); }
html[data-theme="dark"] .chip img[src*="webgl"] { filter: brightness(1.8); }

/* 작업물 */
.work-list { display: flex; flex-direction: column; gap: 24px; }

.work-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  transition: border-color .3s, box-shadow .5s var(--ease);
}
/* 카드 전체가 상세 링크, 외부 링크 버튼만 위로 올립니다 */
.work-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 16px;
}
.work-card-link:focus-visible { outline: none; }
.work-card-link:focus-visible::after { outline: 2px solid var(--text); outline-offset: -2px; }
.work-card-visit { position: relative; z-index: 2; }
.work-card-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .25s;
}
.more-arrow { display: inline-block; transition: transform .35s var(--ease); }

.work-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 30px;
}
.work-card-title { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.work-card-meta { font-size: 14px; color: var(--muted); margin-top: 2px; }

.work-card-visit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 35px;
  padding: 0 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--sub);
  transition: background .25s, color .25s, border-color .25s;
}
.work-card-visit svg { transition: transform .35s var(--ease); }

/* 미리보기 */
.work-card-preview { background: var(--tile); padding: 30px 30px 0; }

.viewport {
  position: relative;
  height: 380px;
  overflow: hidden;
  transition: height .8s var(--ease);
}
.viewport img { width: 100%; height: auto; }

/* 브라우저 */
.browser-chrome {
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  border: 1px solid var(--browser-line);
  border-bottom: 0;
  background: var(--browser-screen);
  box-shadow: var(--preview-shadow);
}
.browser-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  background: var(--browser-bar);
  border-bottom: 1px solid var(--browser-line);
}
.browser-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.browser-url {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: min(360px, 55%);
  height: 24px;
  border-radius: 6px;
  background: var(--browser-url);
  font-size: 12.5px;
  color: var(--muted);
}
.browser-url svg { color: var(--browser-icon); }

/* 휴대폰 */
.preview-phone {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  padding-top: 40px;
}
.phone {
  flex: 0 1 290px;
  min-width: 0;
  border: 9px solid var(--phone-frame);
  border-bottom: 0;
  border-radius: 48px 48px 0 0;
  overflow: hidden;
  background: var(--phone-screen);
  box-shadow: 0 0 0 1px var(--phone-ring), var(--preview-shadow);
}
/* 상태바: 시간 | 아일랜드 | 아이콘 */
.phone-status {
  height: 38px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 8px;
  padding: 0 14px;
  color: var(--phone-status);
}
.phone-time {
  justify-self: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.phone-island {
  width: 66px;
  height: 20px;
  border-radius: 12px;
  background: #000;
}
.phone-icons { justify-self: center; display: flex; align-items: center; gap: 4px; }
.phone-icons svg { fill: currentColor; height: 10px; width: auto; }
.phone-icons svg:last-child { height: 11px; }
.phone .viewport { height: 320px; }
/* 다크에서는 다크 스크린샷으로 바꿉니다 */
.shot-dark {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
  transition: opacity .4s ease;
}
html[data-theme="dark"] .shot-dark { opacity: 1; }

/* 이 사이트 미리보기 (스크린샷처럼 폭에 맞춰 줄어들게 cqw로) */
.mini-site {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  aspect-ratio: 1920 / 1080;
  overflow: hidden;
  padding: 0 7%;
  background: var(--bg);
  color: var(--text);
}
.viewport:has(> .mini-site) { background: var(--bg); }
.mini-hero {
  display: flex;
  flex-direction: column;
  height: 37cqw;
  padding: 7cqw 0 5cqw;
}
.mini-label {
  margin-bottom: 1.6cqw;
  font-size: max(8px, 1.5cqw);
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--muted);
}
.mini-name {
  font-size: 12cqw;
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .95;
}
.mini-desc {
  align-self: flex-end;
  max-width: 48cqw;
  margin-top: auto;
  font-size: max(8px, 1.8cqw);
  color: var(--sub);
  line-height: 1.7;
  text-align: right;
  letter-spacing: -.015em;
  word-break: keep-all;
}
.mini-sec { padding-top: 4.5cqw; border-top: 1px solid var(--border); }
.mini-sec-label { margin-bottom: 3cqw; font-size: max(8px, 1.3cqw); font-weight: 600; }
.mini-bio {
  max-width: 52cqw;
  font-size: max(8px, 1.6cqw);
  color: var(--sub);
  line-height: 1.8;
  word-break: keep-all;
}
.mini-bio p + p { margin-top: 2cqw; }
.mini-bio strong { display: block; color: var(--text); font-weight: 600; }
/* 미리보기 속 잉크 */
.mini-ink {
  position: absolute;
  left: 25cqw;
  top: 6cqw;
  width: 24cqw;
  aspect-ratio: 1;
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  animation: mini-ink 10s ease-in-out infinite alternate;
}
@keyframes mini-ink {
  0%   { transform: translate(0, 0) rotate(0deg);         border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%; }
  50%  { transform: translate(7cqw, 2cqw) rotate(25deg);   border-radius: 54% 46% 47% 53% / 46% 55% 45% 54%; }
  100% { transform: translate(14cqw, -1cqw) rotate(50deg); border-radius: 49% 51% 55% 45% / 55% 49% 51% 45%; }
}
html.panel-open #page .mini-ink { animation-play-state: paused; }

.work-card-body {
  padding: 26px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-top: 1px solid var(--border);
}
.work-card-note {
  margin-top: -8px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  word-break: keep-all;
}
.work-card-desc {
  max-width: 44em;
  font-size: 16px;
  color: var(--sub);
  line-height: 1.75;
  letter-spacing: -.015em;
  word-break: keep-all;
}

/* 마우스를 올리거나 키보드로 왔을 때 */
@media (hover: hover) {
  .work-card:hover .viewport { height: var(--h-full, 380px); }
  .work-card.is-link:hover { border-color: var(--border-strong); box-shadow: var(--card-shadow); }
  .work-card:hover .work-card-more { color: var(--text); }
  .work-card:hover .more-arrow { transform: translateX(3px); }
  .work-card-visit:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
  .work-card-visit:hover svg { transform: translate(2px, -2px); }
}
.work-card:focus-within .viewport { height: var(--h-full, 380px); }
.work-card-visit:focus-visible { background: var(--text); border-color: var(--text); color: var(--bg); }

/* 푸터 */
#footer {
  padding: 56px 0 128px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  font-size: 15px;
  color: var(--sub);
}
.contact-line a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}
.contact-line a:hover { color: var(--text); text-decoration-color: currentColor; }
.copyright { font-size: 14px; color: var(--muted); }

/* 하단 내비게이션 */
#indicator {
  position: fixed;
  left: 50%;
  bottom: 28px;
  bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 10px 0 22px;
  border-radius: 100px;
  border: 1px solid var(--ind-border);
  background: var(--ind-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--ind-shadow);
}
.ind-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: max-width .5s var(--ease), margin .5s var(--ease), opacity .25s, visibility .5s;
}
.ind-nav.visible { max-width: 220px; margin-right: 14px; opacity: 1; visibility: visible; }
.ind-btn, .lang-option {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 6px;
  transition: color .2s;
}
.ind-btn:hover, .lang-option:hover { color: var(--text); }
/* 굵기 대신 색만 바꿔서 글자 폭이 흔들리지 않게 */
.ind-btn.active, .lang-option[aria-pressed="true"] { color: var(--text); }
.ind-sep, .lang-sep { color: var(--faint); font-size: 13px; user-select: none; }
.lang-picker { display: flex; align-items: center; gap: 8px; }
.lang-option { padding: 2px 0; letter-spacing: .02em; }
.ind-divider {
  width: 1px;
  height: 14px;
  margin: 0 6px 0 14px;
  background: var(--faint);
}

/* 독 버튼 (잉크, 테마) */
.dock-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.dock-btn:hover { color: var(--text); background: var(--tile); }
.dock-btn svg { width: 17px; height: 17px; }
.dock-btn[hidden] { display: none; }
.ink-btn { margin-right: 2px; }
/* 잉크 버튼: 켜짐은 채운 방울, 꺼짐은 빗금 */
.ink-btn .ico-drop { fill: currentColor; fill-opacity: .85; transition: fill-opacity .25s; }
.ink-btn .ico-slash { opacity: 0; transition: opacity .25s; }
.ink-btn[aria-pressed="false"] .ico-drop { fill-opacity: 0; }
.ink-btn[aria-pressed="false"] .ico-slash { opacity: 1; }

/* 테마 버튼: 라이트는 달, 다크는 해 */
.theme-btn svg {
  position: absolute;
  transition: opacity .3s ease, transform .5s var(--ease);
}
.theme-btn .ico-sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
html[data-theme="dark"] .theme-btn .ico-moon { opacity: 0; transform: rotate(90deg) scale(.6); }
html[data-theme="dark"] .theme-btn .ico-sun { opacity: 1; transform: none; }
html:not(.js) .dock-btn, html:not(.js) .ind-divider { display: none; }

/* 작업물 상세 페이지 */
.case-head { padding-top: 160px; padding-bottom: 96px; }   /* 좌우는 .w */
.case-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--muted);
  margin-bottom: 18px;
}
.case-title {
  font-size: clamp(52px, 8.5vw, 104px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
}
.case-sub {
  max-width: 30em;
  margin-top: 22px;
  font-size: 21px;
  color: var(--sub);
  line-height: 1.7;
  letter-spacing: -.015em;
  word-break: keep-all;
}
.case-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 32px 56px;
  margin-top: 72px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.case-facts dt { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.case-facts dd { font-size: 16px; color: var(--text); line-height: 1.6; word-break: keep-all; }
.case-facts a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
  transition: text-decoration-color .2s;
}
.case-facts a:hover { text-decoration-color: currentColor; }

/* 큰 스크린샷 (자르지 않음) */
.case-shot {
  margin-bottom: 64px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.case-shot .work-card-preview { padding-bottom: 0; }
.case-shot .viewport,
.case-shot .phone .viewport { height: auto; }

.case-sec {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 72px;
  padding: 88px 0;
  border-top: 1px solid var(--border);
}
.case-sec:first-child { border-top: 0; }
.case-sec h2 { font-size: 14px; font-weight: 600; letter-spacing: .02em; padding-top: 5px; }
.case-text {
  max-width: 34em;
  font-size: 18px;
  color: var(--sub);
  line-height: 1.7;
  letter-spacing: -.015em;
  word-break: keep-all;
}
.case-text p + p { margin-top: 16px; }
.case-text strong { color: var(--text); font-weight: 600; }
.case-tech-note { margin-top: 20px; }
.case-list { max-width: 34em; }
.case-list li { padding: 22px 0; border-top: 1px solid var(--border); }
.case-list li:first-child { border-top: 0; padding-top: 0; }
.case-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.015em;
}
.case-list p {
  font-size: 17px;
  color: var(--sub);
  line-height: 1.65;
  word-break: keep-all;
}
/* 단독 페이지 아래 작업물 목록 */
.case-works {
  padding: 56px 0 120px;
  border-top: 1px solid var(--border);
}
.case-works-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 20px;
}
.work-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.work-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 16px;
  font-weight: 500;
  color: var(--sub);
  transition: background .25s, color .25s, border-color .25s;
}
.work-pill small { font-size: 13px; color: var(--muted); transition: color .25s; }
.work-pill-home { gap: 6px; }
.pill-arrow { display: inline-block; transition: transform .35s var(--ease); }
.work-pill.is-current { background: var(--text); border-color: var(--text); color: var(--bg); cursor: default; }
.work-pill.is-current small { color: var(--bg); opacity: .6; }
@media (hover: hover) {
  .work-pill:not(.is-current):hover { border-color: var(--border-strong); color: var(--text); background: var(--tile); }
  .work-pill-home:hover .pill-arrow { transform: translateX(-3px); }
}

/* 작업물 상세 패널 */
/* 본문만 쓰는 값이라 물려주지 않게 해서, 바꿀 때 본문 안쪽까지 다시 계산하지 않습니다 */
@property --page-shift  { syntax: '*'; inherits: false; }
@property --page-scale  { syntax: '*'; inherits: false; }
@property --page-origin { syntax: '*'; inherits: false; }
html { scrollbar-gutter: stable; }
html.panel-lock { overflow: hidden; }
#page {
  transform-origin: var(--page-origin, 50% 0);
  transition: transform .7s var(--ease), opacity .5s ease;
}
/* 첫 열기가 버벅이지 않게 미리 층을 올려 둡니다 */
html.panel-warm #page,
html.panel-warm .panel { will-change: transform; }
html.panel-open #page {
  transform: translateX(var(--page-shift, 0)) scale(var(--page-scale, 1));
  opacity: .55;
}
.panel-scrim {
  position: fixed;
  inset: 0;
  z-index: 550;
  visibility: hidden;
}
html.panel-open .panel-scrim { visibility: visible; cursor: pointer; }
.panel {
  --panel-w: min(820px, 58vw);
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 600;
  width: var(--panel-w);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 60px rgba(0, 0, 0, .08);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .7s var(--ease), visibility .7s;
  outline: none;
}
html.panel-open .panel { transform: none; visibility: visible; }
html[data-theme="dark"] .panel { box-shadow: -24px 0 60px rgba(0, 0, 0, .6); }
.panel-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  padding: 20px 24px;
}
/* 아래로 갈수록 투명한 배경 (마스크로 해야 테마 전환이 부드럽습니다) */
.panel-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--sub);
  transition: color .2s, border-color .2s, background .2s;
}
.panel-close:hover { color: var(--text); border-color: var(--border-strong); }
/* 패널 안 */
.panel .w { max-width: none; padding: 0 80px; }
.panel .case-head { padding-top: 24px; padding-bottom: 80px; }
.panel .case-title { font-size: clamp(44px, 5.4vw, 70px); outline: none; }
.panel .case-sub { font-size: 18px; }
.panel .case-sec { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 64px 0; }
/* 패널이 열려도 하단 메뉴는 가운데 그대로, 패널 위에 둡니다 */
html.panel-open #indicator { z-index: 620; }
.panel-body { padding-bottom: 104px; }

/* 첫 화면은 폰트가 준비된 뒤에 보여줍니다 (늦어도 2초) */
.js:not(.ready) #hero { opacity: 0; animation: show 0s linear 2s forwards; }
.js.ready #hero { opacity: 1; transition: opacity .6s ease; }
@keyframes show { to { opacity: 1; } }

/* 등장 효과 (카드 transition과 겹치지 않게 animation으로) */
.js .rv { opacity: 0; }
.js .rv.in { animation: reveal .8s var(--ease) both; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* 모바일 */
@media (max-width: 768px) {
  .w { padding: 0 22px; }

  #hero { padding: 96px 0 72px; gap: 28px; }
  .hero-name { font-size: clamp(56px, 18vw, 104px); }
  .hero-bottom { justify-content: flex-start; }
  .hero-desc { text-align: left; font-size: 17px; }

  .sec { padding: 72px 0; }
  .sec-label { margin-bottom: 32px; }

  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .about-bio { font-size: 17px; }

  .work-card-head { padding: 18px 20px; }
  .work-card-visit span:first-child { display: none; }      /* 화살표만 */
  .work-card-visit { width: 35px; padding: 0; justify-content: center; }
  .work-card-preview { padding: 18px 18px 0; }
  .viewport { height: 230px; }
  .browser-url { display: none; }
  /* 폰 두 대를 나란히 */
  .preview-phone { padding-top: 24px; gap: 12px; }
  .phone { flex: 0 1 170px; border-width: 5px; border-radius: 28px 28px 0 0; }
  .phone-status { height: 24px; padding: 0 8px; column-gap: 4px; }
  .phone-time { font-size: 9px; }
  .phone-island { width: 40px; height: 12px; border-radius: 8px; }
  .phone-icons { gap: 2px; }
  .phone-icons svg { height: 7px; }
  .phone-icons svg:last-child { height: 8px; }
  .phone .viewport { height: 215px; }
  .work-card-body { padding: 20px; }
  .work-card-desc { font-size: 15px; }

  #footer { flex-direction: column; align-items: flex-start; padding: 48px 0 120px; }
  .contact-line { flex-direction: column; align-items: flex-start; gap: 12px; }

  #indicator { bottom: calc(18px + env(safe-area-inset-bottom)); padding: 0 8px 0 18px; }

  .case-head { padding-top: 88px; padding-bottom: 56px; }
  .case-sub { font-size: 18px; }
  .case-facts { margin-top: 48px; }
  .case-shot { margin-bottom: 24px; }
  .case-sec { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 56px 0; }
  .case-text { font-size: 17px; }

  .panel { --panel-w: 100vw; border-left: 0; }
  .panel .w { padding: 0 24px; }
  .panel .case-head { padding-top: 0; padding-bottom: 48px; }
  .panel .case-sec { padding: 52px 0; }
  /* 패널이 화면을 다 덮어서, 긴 본문 전체를 움직이지 않고 그 위를 어둡게만 합니다 */
  html.panel-warm #page { will-change: auto; }
  html.panel-open #page { transform: none; opacity: 1; }
  .panel-scrim {
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    transition: opacity .5s ease, visibility .5s;
  }
  html.panel-open .panel-scrim { opacity: 1; }
  /* 움직이는 패널 위에서 흐림 효과를 매번 다시 계산하지 않게 */
  html.panel-open #indicator { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
}

/* 움직임 줄이기 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv, .js #hero { opacity: 1; }
  .drops { display: none; }
}

/* 인쇄는 라이트로 */
@media print {
  html[data-theme] {
    color-scheme: light;
    --bg: #ffffff; --text: #111111; --sub: #555555; --muted: #6e6e6e;
    --border: #dedede; --tile: #f4f4f4; --card: #ffffff; --chip-text: #333333;
    --phone-screen: #ffffff; --phone-status: #111111; --browser-screen: #ffffff;
  }
  .shot-dark { display: none; }
  .js .rv, .js #hero { opacity: 1; animation: none; }
  #indicator, .skip, #ink, .panel, .panel-scrim, .drops { display: none; }
  #hero { min-height: auto; padding: 0 0 40px; }
  .viewport { height: auto; }
}
