/* ---------- tokens ---------- */
:root {
  --bg: #f4f7fa;
  --surface: #ffffff;
  --ink: #18222e;
  --ink-2: #4a5868;
  --ink-3: #7d8a99;
  --line: #dde5ee;
  --sky: #8fbde6;        /* pastel sky */
  --sky-deep: #2f5f8f;   /* readable blue for text */
  --clover: #a9d39a;     /* pastel clover green */
  --clover-deep: #3f7a3a;
  --lilac: #cfcaf0;
  --sand: #f1e6c8;
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: 3px; border-radius: 6px; }

/* ---------- pointer glow ---------- */
.glow {
  position: fixed; left: 0; top: 0; z-index: -1;
  width: 620px; height: 620px; margin: -310px 0 0 -310px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(143,189,230,.55), rgba(143,189,230,0) 70%),
    radial-gradient(closest-side at 65% 60%, rgba(169,211,154,.45), rgba(169,211,154,0) 70%);
  filter: blur(30px);
  pointer-events: none;
  will-change: transform;
}
.glow.static { transform: translate(75vw, 20vh); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: rgba(244,247,250,.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 20px; letter-spacing: -.02em; }
.clover { width: 28px; height: 28px; fill: var(--clover); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.clover circle:nth-child(odd) { fill: var(--sky); }
.brand:hover .clover { transform: rotate(90deg); }
.nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.lang {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font: 600 13px/1 var(--font); cursor: pointer;
}
.lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang:hover { border-color: var(--sky); color: var(--ink); }

/* ---------- layout ---------- */
main > section { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
h2 { margin: 0; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.03em; line-height: 1.2; }

/* ---------- intro ---------- */
.intro { padding-top: clamp(56px, 10vw, 120px) !important; padding-bottom: clamp(48px, 7vw, 88px) !important; }
.eyebrow { margin: 0 0 18px; font: 600 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sky-deep); }
.intro-title { margin: 0; font-size: clamp(44px, 8.4vw, 104px); line-height: 1.04; letter-spacing: -.045em; font-weight: 780; }
.intro-title em { font-style: normal; color: var(--sky-deep); }
.intro-lead { max-width: 34em; margin: 26px 0 0; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); }
.counts { display: flex; flex-wrap: wrap; gap: 10px; margin: 36px 0 0; }
.counts div { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.6); }
.counts dt { order: 2; color: var(--ink-3); font-size: 14px; }
.counts dd { margin: 0; font-weight: 750; font-size: 18px; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cats { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #e7edf3; }
.cat {
  padding: 8px 16px; border: 0; border-radius: 999px; background: transparent;
  font: 600 14px/1 var(--font); color: var(--ink-2); cursor: pointer;
  transition: background .2s, color .2s;
}
.cat[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(24,34,46,.12); }
.tag-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: 600 14px/1 var(--font); color: var(--ink-2); cursor: pointer;
}
.tag-toggle .dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-3); transition: all .2s; }
.tag-toggle[aria-pressed="true"] { border-color: var(--lilac); color: var(--ink); background: #f1effc; }
.tag-toggle[aria-pressed="true"] .dot { border-color: #6c62b8; background: #6c62b8; }

/* ---------- grid ---------- */
.work { padding-bottom: clamp(64px, 9vw, 120px) !important; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.card a {
  display: flex; flex-direction: column; height: 100%;
  text-decoration: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
}
.card a:hover { transform: translateY(-4px); border-color: #c9d6e3; box-shadow: 0 14px 34px -18px rgba(47,95,143,.35); }
.card { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } .card a, .clover { transition: none; } }
@media (min-width: 900px) { .card.is-featured:first-child { grid-column: span 2; } }

.cover { aspect-ratio: 16 / 10; background: #e8eef4; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.card a:hover .cover img { transform: scale(1.03); }

.ph { position: relative; width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 18px; overflow: hidden; }
.ph::before { content: ""; position: absolute; left: var(--x); top: var(--y); width: calc(var(--r) * 2.2); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: rgba(255,255,255,.55); }
.ph::after { content: ""; position: absolute; right: -10%; bottom: -30%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.25); }
.ph-game { background: linear-gradient(135deg, #cfe2f4, #a9cbea); }
.ph-video { background: linear-gradient(135deg, #dcefd6, #b5dba8); }
.ph-design { background: linear-gradient(135deg, #e9e6f8, #cfcaf0); }
.ph-title { position: relative; z-index: 1; font-weight: 760; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.03em; line-height: 1.15; color: rgba(24,34,46,.82); }

.meta { padding: 16px 18px 20px; }
.meta h3 { margin: 10px 0 4px; font-size: 18px; letter-spacing: -.02em; line-height: 1.35; }
.meta p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 9px; border-radius: 999px; font: 600 12px/1.5 var(--font); }
.tag-game { background: #e3eefa; color: var(--sky-deep); }
.tag-video { background: #e5f2e1; color: var(--clover-deep); }
.tag-design { background: #efedfb; color: #5a50a6; }
.tag-ai { background: var(--ink); color: #fff; letter-spacing: .04em; }
.tag-star { background: var(--sand); color: #7a5a12; }
.empty { color: var(--ink-3); padding: 40px 0; text-align: center; }

/* ---------- tools ---------- */
.tools { padding-bottom: clamp(64px, 9vw, 120px) !important; }
.tool-groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.tool-group { padding: 22px; border-radius: var(--radius); background: rgba(255,255,255,.7); border: 1px solid var(--line); }
.tool-group h3 { margin: 0 0 14px; font: 600 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sky-deep); }
.tool-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tool-group li { display: grid; gap: 2px; }
.tool-group strong { font-size: 15.5px; }
.tool-group span { color: var(--ink-2); font-size: 14px; }

/* ---------- about ---------- */
.about { padding-bottom: clamp(64px, 9vw, 120px) !important; }
.about-body { display: grid; gap: clamp(28px, 5vw, 72px); grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 820px) { .about-body { grid-template-columns: 1fr; } }
.about-text p { margin: 0 0 14px; font-size: 17px; color: var(--ink-2); }
.about-text .about-name { font-size: 22px; font-weight: 750; color: var(--ink); letter-spacing: -.02em; }
.about-name span { color: var(--sky-deep); }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 20px 20px; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--sky); }
.timeline time { font: 600 13px/1.4 var(--mono); color: var(--ink-3); }
.about-side h3 { margin: 0 0 14px; font: 600 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sky-deep); }
.about-side .timeline { margin-bottom: 32px; }
.creds { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.creds li { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.7); border: 1px solid var(--line); }
.creds time { font: 600 12px/1.4 var(--mono); color: var(--ink-3); }
.cred-kind { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.cred-award { background: var(--sand); color: #7a5a12; }
.cred-cert { background: #e3eefa; color: var(--sky-deep); }

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(72px, 10vw, 140px) !important; text-align: left; }
.contact h2 { font-size: clamp(34px, 6vw, 72px); letter-spacing: -.045em; }
.contact p { margin: 14px 0 28px; color: var(--ink-2); font-size: 17px; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.links a, .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; text-decoration: none;
  background: var(--ink); color: #fff; font-weight: 650; font-size: 15px;
  transition: background .2s, transform .2s;
}
.links a:hover, .btn:hover { background: var(--sky-deep); transform: translateY(-1px); }

/* ---------- detail ---------- */
.detail { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.detail[hidden] { display: none; }
.detail-backdrop { position: absolute; inset: 0; background: rgba(24,34,46,.42); backdrop-filter: blur(4px); animation: fade .25s both; }
.detail-panel {
  position: relative; width: min(820px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--surface); border-radius: 22px; padding: clamp(18px, 3vw, 32px);
  box-shadow: 0 30px 80px -30px rgba(24,34,46,.5); outline: none;
  animation: pop .35s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .detail-backdrop, .detail-panel { animation: none; } }
.detail-close {
  position: sticky; top: 0; float: right; z-index: 2;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: #eef2f6; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer;
}
.detail-close:hover { background: #e1e8ef; }
.detail-content .cover-lg, .detail-content .video { border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.detail-content h2 { margin: 12px 0 6px; }
.detail-summary { margin: 0 0 20px; color: var(--ink-2); font-size: 17px; }
.facts { display: grid; gap: 10px; margin: 0 0 22px; padding: 16px 18px; border-radius: 14px; background: var(--bg); }
.facts div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; }
.facts dt { color: var(--ink-3); font-size: 14px; }
.facts dd { margin: 0; font-size: 15px; }
.detail-content h3 { margin: 0 0 10px; font-size: 16px; }
.points { margin: 0 0 22px; padding-left: 20px; color: var(--ink-2); }
.points li { margin-bottom: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.soon { color: var(--ink-3); font-size: 14px; margin: 0; }

/* ---------- photo ---------- */
[hidden] { display: none !important; }
.tag-photo { background: #fbf1dc; color: #7a5a12; }
.ph-photo { background: linear-gradient(135deg, #f6eed9, #ecdcb4); flex-wrap: wrap; align-content: flex-end; gap: 6px; }
.cam-chip { position: relative; z-index: 1; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.75); font: 600 12px/1.4 var(--mono); color: #6b5520; }
.gallery { display: grid; gap: clamp(32px, 5vw, 56px); }
.cam-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; }
.cam-head h3 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.cam-head p { margin: 0; color: var(--ink-3); font-size: 14px; }
.photos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.photo { display: block; padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; background: #e8eef4; cursor: zoom-in; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.photo:hover img { transform: scale(1.04); }
.photo video { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-ph { cursor: default; display: grid; place-items: center; background: linear-gradient(160deg, #eef2f6, #e2e9f0); color: var(--ink-3); font-size: 13px; }
.photo-ph:nth-child(2n) { background: linear-gradient(160deg, #eef5ec, #e1ecdc); }
.photo-full { width: 100%; max-height: 74vh; object-fit: contain; border-radius: 12px; background: #0f151c; }
.photo-cap { margin: 12px 0 0; color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn.is-disabled { color: var(--ink-3); border-style: dashed; cursor: not-allowed; }
.btn.is-disabled:hover { background: transparent; color: var(--ink-3); transform: none; }
.links .mail { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--ink); }
.links .mail a { background: var(--sky-deep); }
.links .mail a:hover { background: #3b74ad; }
.copy-mail { padding: 8px 14px; border: 0; border-radius: 999px; background: transparent; color: #c9d4df; font: 600 13px/1 var(--font); cursor: pointer; }
.copy-mail:hover { color: #fff; }

/* ---------- footer ---------- */
.foot {
  display: flex; justify-content: space-between; gap: 16px;
  max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 40px;
  border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px;
}
.foot a { text-decoration: none; }

@media (max-width: 560px) {
  .nav a { display: none; }
  .section-head { align-items: start; }
  .cats { width: 100%; justify-content: space-between; overflow-x: auto; }
  .cat { padding: 8px 10px; flex: none; }
}
