:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #23303a;
  --muted: #6b7a86;
  --line: #e7ecef;
  --mint: #3fb3aa;
  --mint-soft: #e6f6f4;
  --pink: #f2a5ba;
  --pink-soft: #fdeef2;
  --shadow: 0 10px 30px rgba(35, 60, 70, .08);
  /* 그림 카드 그림자: 흰 배경과 그림을 나눠 줌 */
  --shadow-art: 0 1px 3px rgba(20, 35, 45, .10), 0 10px 28px rgba(20, 35, 45, .16);
  --radius: 18px;
  --wrap: 1200px;
  --header-height: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y mandatory; scroll-padding-top: 0; }
html.has-lightbox { overflow: hidden; scroll-snap-type: none; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px; line-height: 1.65; word-break: keep-all; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }

/* header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.site-header.is-at-top { background: transparent; backdrop-filter: none; border-color: transparent; }
.site-header.is-at-top .logo,
.site-header.is-at-top .logo span,
.site-header.is-at-top .nav a { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .65); }
.site-header.is-at-top .nav a:hover,
.site-header.is-at-top .nav .nav-cta { background: rgba(15, 28, 34, .34); }
.site-header.is-at-top .lang { border-color: rgba(255, 255, 255, .4); background: rgba(15, 28, 34, .28); }
.site-header.is-at-top .lang button { color: #fff; }
.site-header.is-at-top .lang button.is-active { background: #fff; color: var(--ink); }
.header-inner { display: flex; align-items: center; gap: 12px; height: 64px; }
.header-inner .nav { margin-left: auto; }
/* 언어 버튼 */
.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.lang button {
  font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer;
  border: 0; background: none; padding: 5px 10px; border-radius: 999px;
}
.lang button:hover { color: var(--ink); }
.lang button.is-active { background: var(--ink); color: #fff; }
.logo { font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.logo span { color: var(--mint); font-weight: 700; font-size: 14px; letter-spacing: .08em; margin-left: 4px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 999px; color: var(--muted); }
.nav a:hover { color: var(--ink); background: var(--mint-soft); }
.nav .nav-cta { color: var(--ink); background: var(--mint-soft); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }

/* First page: artwork and profile share one viewport; tall content can still grow. */
.intro { position: relative; isolation: isolate; min-height: 100svh; display: flex; flex-direction: column; }
.page-section, main > .section, .site-footer { scroll-snap-align: start; scroll-snap-stop: always; }
.cover { position: absolute; inset: 0 0 auto; height: 80%; z-index: -1; }
.cover-art {
  display: block; width: 100%; height: 100%; padding: 0; border: 0;
  background: var(--bg); cursor: zoom-in; position: relative; overflow: hidden;
}
.cover-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.cover-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(12, 22, 28, .32), transparent 24%, rgba(255, 255, 255, 0) 36%, rgba(255, 255, 255, .85) 78%, #fff 100%);
}

/* profile: 커버 위로 살짝 겹침 */
.profile { position: relative; z-index: 2; margin-top: auto; padding-top: clamp(180px, 39svh, 480px); padding-bottom: clamp(24px, 4svh, 48px); pointer-events: none; }
.profile a { pointer-events: auto; }
.avatar {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
  border: 4px solid #fff; box-shadow: var(--shadow-art); margin-bottom: 14px;
}
.name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.profile h1 { margin: 0; font-size: clamp(40px, 6vw, 68px); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.profile h1 span { font-size: .42em; font-weight: 700; letter-spacing: .08em; color: var(--mint); margin-left: 4px; vertical-align: middle; }
.status {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border-radius: 999px;
  background: var(--mint-soft); font-size: 14px; font-weight: 700; color: var(--ink);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #5ccf6b; box-shadow: 0 0 0 3px rgba(92, 207, 107, .25); }
.role { margin: 8px 0 4px; font-size: 17px; font-weight: 600; color: var(--muted); }
.lead { margin: 0 0 20px; font-size: 16px; color: var(--muted); max-width: 40em; }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.social-link {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none;
  font-size: 14px; font-weight: 700; box-shadow: 0 1px 2px rgba(20, 35, 45, .06); transition: transform .15s, box-shadow .15s;
}
.social-link:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.social-link svg { width: 18px; height: 18px; margin-left: 2px; fill: var(--ink); }
.glyph {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 900; color: #fff; line-height: 1;
}
.glyph-pixiv { background: #0096fa; }
.glyph-artmug { background: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* sections */
.section { min-height: 100svh; padding: calc(var(--header-height) + 40px) 0 56px; border-top: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
#works { justify-content: flex-start; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section h2 { margin: 0; font-size: 32px; letter-spacing: -.02em; font-weight: 800; }
.section-head p { margin: 0; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted);
}
.chip .count { font-size: 12px; opacity: .7; margin-left: 2px; }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* grid (masonry): main.js가 작품을 왼쪽→오른쪽 순서로 각 열에 나눠 담음 → 가로로 읽어도 최신순 */
.grid { display: flex; gap: 16px; align-items: flex-start; }
.grid-col { flex: 1 1 0; min-width: 0; }
.tile {
  break-inside: avoid; margin: 0 0 16px; position: relative; display: block; width: 100%;
  padding: 0; border: 0; background: var(--surface); cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-art); text-align: left;
  transition: box-shadow .2s, transform .2s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 6px rgba(20, 35, 45, .12), 0 16px 36px rgba(20, 35, 45, .22); }
.tile img { width: 100%; transition: transform .4s; }
.tile:hover img { transform: scale(1.03); }
.tile-info {
  position: absolute; inset: auto 0 0 0; padding: 32px 14px 12px; color: #fff;
  background: linear-gradient(transparent, rgba(20, 30, 36, .72));
  opacity: 0; transition: opacity .2s; font-size: 14px; line-height: 1.4;
}
.tile-info strong { display: block; font-size: 15px; }
.tile:hover .tile-info, .tile:focus-visible .tile-info { opacity: 1; }
.badge {
  position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; background: var(--pink-soft); color: var(--ink);
}
.pages-badge {
  position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; background: rgba(20, 30, 36, .6); color: #fff;
}

/* services */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card-no { font-size: 13px; font-weight: 800; color: var(--mint); letter-spacing: .08em; }
.card h3 { margin: 8px 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* commission */
.commission { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: start; }
.price-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 24px; }
.price-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px dashed var(--line); font-weight: 600; }
.price-row:last-child { border-bottom: 0; }
.price { color: var(--mint); font-weight: 800; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 10px; }
.steps li {
  counter-increment: step; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px;
}
.steps li::before {
  content: counter(step); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--mint-soft); color: var(--ink); font-weight: 800; font-size: 14px;
}
.steps span { color: var(--muted); font-size: 15px; }

/* about / contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.about, .contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.about h2, .contact-box h2 { margin-bottom: 12px; }
.history { list-style: none; padding: 0; margin: 20px 0 0; }
.history li { display: flex; gap: 14px; font-size: 15px; }
.history span { color: var(--mint); font-weight: 800; flex-shrink: 0; }
.mail-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 14px;
  border-radius: 999px; background: var(--mint-soft);
}

/* footer */
.site-footer { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 13px; }
.site-footer p { margin: 0 0 4px; }

/* lightbox */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(12, 18, 22, .94); color: #fff;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: calc(100vw - 140px); }
.lb-figure img { max-height: calc(100dvh - 120px); width: auto; border-radius: 10px; }
.lb-figure figcaption { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; font-size: 14px; flex-wrap: wrap; }
.lb-figure figcaption .muted { color: #a9b6bf; margin-left: 8px; }
.lb-figure a { color: #bfeee9; font-weight: 600; text-decoration: none; }
.lb-pages { display: flex; gap: 6px; }
.lb-pages button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: #56636b; cursor: pointer; }
.lb-pages button.is-active { background: #fff; }
.lb-close, .lb-nav {
  position: absolute; border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .1);
  border-radius: 50%; display: grid; place-items: center; font: inherit;
}
.lb-close { top: 16px; right: 16px; width: 44px; height: 44px; font-size: 18px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 30px; line-height: 1; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .2); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; transition: .25s; pointer-events: none; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* responsive */
@media (max-width: 900px) {
  .commission, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .header-inner .lang { margin-left: auto; }
  .avatar { width: 88px; height: 88px; }
  .header-inner { gap: 8px; }
  .logo { font-size: 18px; line-height: 1.3; }
  .logo span { display: block; margin-left: 0; font-size: 12px; letter-spacing: .04em; }
  .lang button { padding-inline: 8px; }
  .cover { height: 66%; }
  .profile { padding-top: clamp(160px, 26svh, 280px); padding-bottom: 24px; }
  .profile .avatar { width: 72px; height: 72px; margin-bottom: 10px; }
  .profile h1 { font-size: clamp(36px, 10vw, 44px); }
  .profile .lead { margin-bottom: 12px; }
  .profile .social { gap: 6px; margin-bottom: 14px; }
  .profile .social-link { gap: 6px; padding-right: 12px; }
  .grid { gap: 10px; }
  .tile { margin-bottom: 10px; border-radius: 12px; }
  .tile-info { display: none; }
  .section { padding: calc(var(--header-height) + 24px) 0 40px; }
  .section h2 { font-size: 26px; }
  .about, .contact-box { padding: 24px; }
  .lb-figure { max-width: 100vw; padding: 0 12px; }
  .lb-figure img { max-height: calc(100dvh - 140px); }
  .lb-nav { top: auto; bottom: 16px; transform: none; width: 44px; height: 44px; }
}
@media (max-height: 760px) {
  .profile { padding-top: max(144px, 28svh); padding-bottom: 24px; }
  .avatar { width: 72px; height: 72px; margin-bottom: 8px; }
  .profile h1 { font-size: clamp(36px, 5vw, 52px); }
  .lead { margin-bottom: 12px; }
  .social { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
