/* Yuna 포트폴리오 — 공개 사이트 */
@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f7f6f2;
  --ink: #141414;
  --muted: #6b6963;
  --line: #e2dfd7;
  --card: #ffffff;
  --accent: #ff5a36;
  --display: "Outfit", "Pretendard Variable", Pretendard, sans-serif;
  --text: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 48px);
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--text);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* ---- 머리 ---------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) max(var(--pad), env(safe-area-inset-right)) 14px max(var(--pad), env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.brand { font: 700 22px/1 var(--display); text-decoration: none; letter-spacing: -0.03em; }
.brand i, .dot { color: var(--accent); font-style: normal; }
.top nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.top nav a { font: 500 15px/1 var(--display); text-decoration: none; opacity: .72; transition: opacity .2s; }
.top nav a:hover { opacity: 1; }
.share-open:not(.link) {
  font: 600 14px/1 var(--display);
  padding: 10px 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ink); color: var(--bg); transition: background .2s, transform .2s;
}
.share-open:not(.link):hover { background: var(--accent); transform: translateY(-1px); }

/* ---- 첫 화면 ------------------------------------------------------- */
.hero {
  min-height: min(calc(100svh - 64px), 920px);
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 8vh, 96px) var(--pad) 40px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.eyebrow {
  margin: 0 0 12px; font-size: clamp(13px, 1.4vw, 16px); color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.hero-name {
  margin: 0;
  font: 700 clamp(104px, 24vw, 340px)/.84 var(--display);
  letter-spacing: -0.055em;
  white-space: nowrap;
  animation: rise .9s cubic-bezier(.2, .7, .1, 1) both;
}
.hero-name .dot { display: inline-block; animation: pop 1.1s .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.hero-row {
  margin-top: clamp(20px, 4vh, 40px);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px;
  border-top: 1.5px solid var(--ink); padding-top: 16px;
  animation: fade .9s .25s both;
}
.hero-line { margin: 0; font: 500 clamp(19px, 2.6vw, 30px)/1.25 var(--display); letter-spacing: -0.02em; }
.hero-ko { margin: 0; color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); }
.scroll {
  position: absolute; left: var(--pad); bottom: 22px;
  font: 500 13px/1 var(--display); text-decoration: none; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase;
}
.scroll span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ---- 작품 목록 ----------------------------------------------------- */
.work-list, .about, .work, .contact { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.work-list { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1.5px solid var(--ink); margin-bottom: clamp(20px, 3vw, 36px); }
.sec-title { margin: 0 0 10px; font: 700 clamp(36px, 6vw, 72px)/1 var(--display); letter-spacing: -0.04em; }
.count { font: 500 15px/1 var(--display); color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px) clamp(16px, 2.4vw, 32px); }
.card { text-decoration: none; display: block; }
.thumb {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px;
  background: var(--line);
}
.thumb img, .thumb .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .1, 1); }
.card:hover .thumb img { transform: scale(1.035); }
.badge {
  position: absolute; left: 12px; bottom: 12px;
  font: 600 12px/1 var(--display); letter-spacing: .02em;
  padding: 7px 10px; border-radius: 999px; background: rgba(20, 20, 20, .72); color: #fff;
  backdrop-filter: blur(6px);
}
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 2px 0; }
.card-meta h3 { margin: 0; font: 600 clamp(18px, 1.8vw, 22px)/1.3 var(--text); letter-spacing: -0.02em; }
.card:hover .card-meta h3 { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card-meta p { margin: 0; flex-shrink: 0; color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); padding: 40px 0; }
.ph { background: linear-gradient(135deg, var(--line), #efece5); }

/* ---- 소개 ---------------------------------------------------------- */
.about {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px);
  padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px);
  border-top: 1.5px solid var(--ink);
}
.about-photo:empty { display: none; }
.about:has(.about-photo:empty) { grid-template-columns: 1fr; }
.avatar-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; }
.bio { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.75; max-width: 40em; }
.bio p { margin: 0 0 1em; }
.facts { margin: 28px 0 0; display: grid; gap: 12px; }
.facts div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.facts dt { font: 500 13px/1.7 var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 0; }

/* ---- 연락 / 바닥 --------------------------------------------------- */
.contact {
  padding-top: clamp(56px, 10vw, 120px); padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px));
  border-top: 1.5px solid var(--ink);
}
.contact.slim { padding-top: 0; border-top: 0; }
.cta { margin: 0 0 24px; font: 700 clamp(44px, 8vw, 112px)/.95 var(--display); letter-spacing: -0.045em; }
.cta em { font-style: normal; color: var(--accent); }
.mail { font: 500 clamp(18px, 2.4vw, 28px)/1.3 var(--display); text-decoration-thickness: 1.5px; text-underline-offset: 6px; word-break: break-all; }
.mail:hover { color: var(--accent); }
.links { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  display: inline-block; padding: 9px 16px; border: 1.5px solid var(--ink); border-radius: 999px;
  font: 500 14px/1 var(--display); text-decoration: none; transition: background .2s, color .2s;
}
.links a:hover { background: var(--ink); color: var(--bg); }
.foot {
  margin-top: clamp(48px, 8vw, 96px); padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px;
}
.link { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.link:hover { color: var(--ink); }

/* ---- 작품 페이지 --------------------------------------------------- */
.preview-bar { background: var(--accent); color: #fff; text-align: center; font-size: 14px; padding: 8px 16px; }
.work { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(40px, 6vw, 80px); }
.back { display: inline-block; font: 500 14px/1 var(--display); color: var(--muted); text-decoration: none; margin-bottom: clamp(24px, 4vw, 48px); }
.back:hover { color: var(--ink); }
.work-head h1 { margin: 0; font: 700 clamp(40px, 7vw, 96px)/1.02 var(--text); letter-spacing: -0.045em; word-break: keep-all; }
.work-head .sub { margin: 14px 0 0; font-size: clamp(18px, 2vw, 24px); color: var(--muted); word-break: keep-all; }
.tags { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 7px 13px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font: 500 13px/1 var(--display); }
.desc { margin-top: clamp(28px, 4vw, 48px); max-width: 44em; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.8; word-break: keep-all; }
.desc p { margin: 0 0 1em; }
.media-list { margin-top: clamp(32px, 5vw, 64px); display: grid; gap: clamp(24px, 4vw, 48px); }
.m { margin: 0; }
.m img, .frame { width: 100%; border-radius: 14px; background: var(--line); }
.m img { height: auto; }
.frame { overflow: hidden; background: #000; }
.frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.m figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pn { margin-top: clamp(48px, 8vw, 96px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1.5px solid var(--ink); padding-top: 20px; }
.pn a { text-decoration: none; font: 600 clamp(17px, 2vw, 24px)/1.3 var(--text); letter-spacing: -0.02em; }
.pn a span { display: block; font: 500 13px/1 var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.pn a:hover { color: var(--accent); }
.pn-next { grid-column: 2; text-align: right; }

/* ---- 404 ----------------------------------------------------------- */
.nf { min-height: 70svh; display: grid; place-content: center; text-align: center; padding: var(--pad); }
.nf h1 { margin: 0; font: 700 clamp(96px, 20vw, 220px)/1 var(--display); letter-spacing: -0.05em; }
.nf p { color: var(--muted); }

/* ---- 버튼 ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 20px; border-radius: 12px; border: 1.5px solid var(--ink); background: transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }

/* ---- 공유 창 ------------------------------------------------------- */
dialog { border: 0; padding: 0; background: none; color: inherit; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(20, 20, 20, .55); backdrop-filter: blur(4px); }
.share[open] { display: grid; place-items: center; width: 100%; height: 100%; }
.share-card {
  position: relative; width: min(400px, calc(100vw - 32px));
  background: var(--card); border-radius: 24px; padding: 28px 24px 22px; text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
  animation: rise .35s cubic-bezier(.2, .7, .1, 1) both;
}
.share-card h2 { margin: 0 0 16px; font: 700 28px/1 var(--display); letter-spacing: -0.03em; }
.share-close, .lb-close {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--bg); font-size: 24px; line-height: 1; cursor: pointer;
}
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 10px; }
.qr-img { width: 100%; height: auto; aspect-ratio: 1; }
.share-url { margin: 14px 0; font: 500 14px/1.4 var(--display); color: var(--muted); word-break: break-all; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-actions .btn[hidden] { display: none; }
.share-actions:has([hidden]) { grid-template-columns: 1fr; }
.share-dl { margin-top: 14px; font-size: 13px; color: var(--muted); }
.share-dl a { color: var(--ink); font-weight: 600; cursor: pointer; }

.lightbox[open] { display: grid; place-items: center; width: 100vw; height: 100vh; padding: 16px; }
.lightbox::backdrop { background: rgba(10, 10, 10, .92); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 32px); object-fit: contain; border-radius: 8px; }
.lb-close { position: fixed; background: rgba(255, 255, 255, .14); color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 14px;
  z-index: 100; animation: fade .2s both;
}

/* ---- 좁은 화면 ----------------------------------------------------- */
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; }
  .top nav a { display: none; }
  .hero { min-height: min(calc(78svh - 64px), 680px); padding-top: 32px; padding-bottom: 64px; }
  /* 휴대폰(QR 로 들어온 사람)에서 이름이 화면 가로를 꽉 채우게 */
  .hero-name { font-size: clamp(88px, 34vw, 220px); }
  .hero-row { flex-direction: column; gap: 4px; }
  .card-meta { flex-direction: column; gap: 2px; }
  .pn { grid-template-columns: 1fr; }
  .pn-next { grid-column: 1; text-align: left; }
  .share-open:not(.link) { padding: 10px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
