/* ============================================================
   스튜디오차곡 — Multi-view marketing site
   Built on 차곡차곡 Design System (dark premium surface)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --canvas: #06060f;
  --surface-1: rgba(255,255,255,0.025);
  --surface-2: rgba(255,255,255,0.05);
  --line-1: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --txt-1: #eef0f3; --txt-2: #b6bcc6; --txt-3: #7c828e;
  --teal: #73ab9c; --teal-mid: #5e9f8f;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px; --nav-h: 68px;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--canvas); color: var(--txt-1); font-weight: 400; line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.grad-text { background: var(--logo-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); }

/* ---- background motion ---- */
.bg-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.mesh { position: absolute; inset: -20%; background: radial-gradient(40% 40% at 20% 18%, rgba(99,102,241,0.16), transparent 70%), radial-gradient(38% 38% at 82% 22%, rgba(217,70,239,0.12), transparent 70%), radial-gradient(45% 45% at 60% 88%, rgba(115,171,156,0.16), transparent 70%); }
.grid-pattern { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%); -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%); }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.orb-1 { width: 460px; height: 460px; background: rgba(99,102,241,0.45); top: -120px; left: -80px; animation: float1 11s var(--ease) infinite; }
.orb-2 { width: 400px; height: 400px; background: rgba(217,70,239,0.30); top: 18%; right: -100px; animation: float2 13s var(--ease) infinite; }
.orb-3 { width: 520px; height: 520px; background: rgba(115,171,156,0.32); bottom: -160px; left: 30%; animation: float1 15s var(--ease) infinite; }
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); opacity:.45; } 50% { transform: translate(40px,-30px) scale(1.12); opacity:.6; } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1.05); opacity:.3; } 50% { transform: translate(-50px,40px) scale(.92); opacity:.5; } }

/* ---- page transition overlay ---- */
.transition { position: fixed; inset: 0; z-index: 90; background: var(--logo-gradient); display: flex; align-items: center; justify-content: center; transform: scaleY(0); transform-origin: bottom; pointer-events: none; }
.transition.cover { animation: wipeIn .45s var(--ease) forwards; }
.transition.reveal-out { animation: wipeOut .5s var(--ease) forwards; }
.transition-mark { font-family: var(--font-display); font-size: 56px; font-weight: 700; color: #fff; opacity: 0; }
.transition.cover .transition-mark { animation: markIn .45s var(--ease) forwards; }
@keyframes wipeIn { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
@keyframes wipeOut { from { transform: scaleY(1); transform-origin: top; } to { transform: scaleY(0); transform-origin: top; } }
@keyframes markIn { 0% { opacity: 0; transform: translateY(14px); } 60%,100% { opacity: 1; transform: none; } }

/* ---- NAV ---- */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--nav-h); display: flex; align-items: center; transition: background .3s var(--ease), backdrop-filter .3s, border-color .3s; border-bottom: 1px solid transparent; }
.navbar.scrolled { background: rgba(6,6,15,0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line-1); }
.nav-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; }
.brand-glyph { width: 26px; height: 26px; }
.brand-word b { background: var(--logo-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 500; color: var(--txt-2); }
.nav-links a { position: relative; transition: color .2s; padding: 4px 0; }
.nav-links a:hover { color: var(--txt-1); }
.nav-links a.active { color: var(--txt-1); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--logo-gradient); border-radius: 2px; }
.nav-cta { padding: 8px 16px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line-1); color: var(--txt-1) !important; font-weight: 600; }
.nav-cta:hover { border-color: var(--teal); }
.nav-cta.active::after { display: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--txt-1); border-radius: 2px; transition: .25s var(--ease); }
.navbar.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar.menu-open .nav-toggle span:nth-child(2) { transform: rotate(-45deg); }

/* ---- view dots ---- */
.dots { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 55; display: flex; flex-direction: column; gap: 13px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; padding: 0; transition: .25s var(--ease); }
.dots button:hover { border-color: var(--teal); }
.dots button.active { background: var(--logo-gradient); border-color: transparent; transform: scale(1.25); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: 15px; font-weight: 600; padding: 13px 24px; border-radius: var(--r-pill); border: 1px solid transparent; cursor: pointer; transition: transform .2s var(--ease), filter .2s, background .2s, border-color .2s; }
.ico-inline { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.btn-ghost .ico-inline { filter: brightness(0) invert(0.85); }
.btn-primary { background: var(--logo-gradient); color: #fff; box-shadow: 0 8px 28px rgba(124,58,237,0.35); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-ghost { background: var(--surface-1); border-color: var(--line-1); color: var(--txt-1); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-2); transform: translateY(-2px); }
.btn-lg { font-size: 16px; padding: 16px 30px; }

/* ---- VIEW system ---- */
.views { position: relative; z-index: 1; }
.view { display: none; min-height: 100vh; }
.view.active { display: block; }
.view-pad { padding-top: calc(var(--nav-h) + 56px); padding-bottom: 80px; }

/* ---- doodle icon (no box, simple, top-left) ---- */
.dood { display: flex; align-items: center; justify-content: flex-start; flex-shrink: 0; align-self: flex-start; margin-bottom: 18px; }
.dood img { width: 58px; height: 58px; filter: brightness(0) invert(1); opacity: 0.92; transition: transform .25s var(--ease), opacity .25s; }
.dood.sm img { width: 50px; height: 50px; }
.bento-card:hover .dood img, .lecture-card:hover .dood img { transform: translateY(-3px) scale(1.06); opacity: 1; }

/* ---- reveal ---- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ============ HOME ============ */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--nav-h) 24px 40px; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.34; filter: saturate(0.95); }
.hero-veil { position: absolute; inset: 0; background: radial-gradient(80% 70% at 50% 40%, rgba(6,6,15,0.4), rgba(6,6,15,0.86) 80%), linear-gradient(180deg, rgba(6,6,15,0.7), var(--canvas)); }
.hero-inner { position: relative; max-width: 880px; }
.hero .eyebrow { margin-bottom: 22px; }
.hero-title { font-size: clamp(36px, 7vw, 66px); font-weight: 800; line-height: 1.12; letter-spacing: -0.025em; margin-bottom: 24px; }
.hero-sub { font-size: clamp(15px, 2.2vw, 19px); color: var(--txt-2); line-height: 1.75; margin-bottom: 36px; }
.hero-sub b { color: var(--txt-1); font-weight: 700; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: -40px auto 0; position: relative; z-index: 2; }
.stat-tile { background: var(--surface-1); border: 1px solid var(--line-1); border-radius: var(--r-lg); padding: 26px 20px; text-align: center; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; backdrop-filter: blur(8px); }
.stat-tile:hover { transform: translateY(-3px); border-color: var(--teal); box-shadow: 0 12px 32px rgba(115,171,156,0.12); }
.stat-num { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; background: var(--logo-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { margin-top: 6px; font-size: 13px; color: var(--txt-3); font-weight: 600; }
.view-next { display: block; width: fit-content; margin: 56px auto 0; font-size: 15px; font-weight: 600; color: var(--txt-2); padding: 11px 22px; border: 1px solid var(--line-1); border-radius: var(--r-pill); transition: .25s var(--ease); }
.view-next:hover { color: var(--txt-1); border-color: var(--teal); transform: translateY(-2px); }
.vn-arrow { display: inline-block; transition: transform .25s var(--ease); }
.view-next:hover .vn-arrow { transform: translateX(4px); }

/* ---- section heads ---- */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; margin: 12px 0 12px; }
.section-desc { color: var(--txt-2); font-size: 16px; }
.section-desc b { color: var(--txt-1); }

/* ============ SERVICES ============ */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bento-card { position: relative; background: var(--surface-1); border: 1px solid var(--line-1); border-radius: var(--r-lg); overflow: hidden; min-height: 230px; display: flex; flex-direction: column; padding: 26px 24px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.bento-card:hover { transform: translateY(-4px); border-color: var(--teal); box-shadow: 0 18px 44px rgba(0,0,0,0.4), 0 4px 30px rgba(115,171,156,0.14); }
.bento-lg { grid-column: span 1; grid-row: span 2; padding: 0; }
.bento-wide { grid-column: span 2; }
.bento-photo { width: 100%; height: 240px; background-size: cover; background-position: center; }
.bento-lg .bento-body { padding: 24px; }
.bento-lg .bento-body { margin-top: auto; }
.dood + .bento-body { margin-top: 0; }
.bento-body h3 { font-size: 22px; font-weight: 800; margin: 8px 0 8px; }
.bento-body p { font-size: 14px; color: var(--txt-2); line-height: 1.65; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line-1); color: var(--txt-2); }
.chip-live { color: var(--teal); border-color: rgba(115,171,156,0.35); background: rgba(115,171,156,0.08); }

/* ============ LECTURES ============ */
.lectures-hero { position: relative; border-radius: var(--r-xl); overflow: hidden; padding: 56px 40px; margin-bottom: 36px; background-size: cover; background-position: center; }
.lh-veil { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(6,6,15,0.92) 30%, rgba(6,6,15,0.55)); }
.lh-text { position: relative; max-width: 620px; }
.lectures-hero .section-title { text-align: left; margin-top: 10px; }
.lectures-hero .section-desc { margin-top: 8px; }
.lecture-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 16px; }
.lecture-card { background: var(--surface-1); border: 1px solid var(--line-1); border-radius: var(--r-lg); padding: 22px 20px; transition: transform .25s var(--ease), border-color .25s, background .25s; }
.lecture-card:hover { transform: translateY(-3px); border-color: var(--teal); background: var(--surface-2); }
.lecture-card .dood { margin-bottom: 14px; }
.lecture-card h4 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.lecture-card p { font-size: 13.5px; color: var(--txt-2); line-height: 1.6; min-height: 42px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.tags span { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); background: rgba(115,171,156,0.1); color: var(--teal); border: 1px solid rgba(115,171,156,0.25); }
.lecture-cta { text-align: center; margin-top: 40px; }

/* ============ PORTFOLIO ============ */
.pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.pf-timeline, .pf-projects, .pf-record { background: var(--surface-1); border: 1px solid var(--line-1); border-radius: var(--r-lg); padding: 28px; }
.pf-photo { width: calc(100% + 56px); height: 150px; margin: -28px -28px 22px; background-size: cover; background-position: center; opacity: 0.85; }
.pf-h { font-size: 18px; font-weight: 800; margin-bottom: 18px; display: flex; align-items: baseline; gap: 10px; }
.pf-h-sub { font-size: 12px; font-weight: 600; color: var(--txt-3); }
.tl-item { position: relative; padding-left: 22px; padding-bottom: 20px; border-left: 1px solid var(--line-2); }
.tl-item:last-of-type { border-left: 1px solid transparent; padding-bottom: 0; }
.tl-dot { position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(115,171,156,0.18); }
.tl-period { font-size: 12px; color: var(--teal); font-weight: 700; }
.tl-org { font-size: 15px; font-weight: 700; margin: 3px 0; }
.tl-desc { font-size: 13px; color: var(--txt-2); }
.proj { padding: 15px 0; border-bottom: 1px solid var(--line-1); }
.proj:last-child { border-bottom: none; padding-bottom: 0; }
.proj h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.proj p { font-size: 13.5px; color: var(--txt-2); line-height: 1.6; }
.record-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 20px; }
.rec { text-align: center; background: var(--surface-2); border: 1px solid var(--line-1); border-radius: var(--r-md); padding: 16px 8px; }
.rec-num { font-size: 26px; font-weight: 800; color: var(--teal); font-variant-numeric: tabular-nums; }
.rec-cat { font-size: 11.5px; color: var(--txt-2); margin-top: 4px; }
.record-orgs { font-size: 13px; color: var(--txt-3); line-height: 1.8; }
.record-orgs b { color: var(--teal); }

/* ============ CONTACT ============ */
.contact-card { position: relative; text-align: center; border-radius: var(--r-xl); padding: 80px 40px; overflow: hidden; }
.contact-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.3; }
.contact-veil { position: absolute; inset: 0; background: radial-gradient(70% 90% at 50% 30%, rgba(124,58,237,0.22), transparent 70%), linear-gradient(180deg, rgba(6,6,15,0.7), rgba(6,6,15,0.92)); }
.contact-inner { position: relative; }
.contact-title { font-size: clamp(26px, 4.5vw, 44px); font-weight: 800; letter-spacing: -0.02em; margin: 14px 0 16px; line-height: 1.2; }
.contact-desc { color: var(--txt-2); font-size: 16px; max-width: 540px; margin: 0 auto 32px; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line-1); padding: 36px 0 10px; margin-top: 60px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 800; }
.footer-brand .brand-glyph { width: 22px; height: 22px; }
.footer-brand b { background: var(--logo-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.footer-copy { font-size: 13px; color: var(--txt-3); }

/* ---- responsive ---- */
.br-d { display: inline; }
@media (max-width: 900px) {
  .pf-cols { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-lg { grid-row: span 1; }
  .record-grid { grid-template-columns: repeat(3, 1fr); }
  .dots { display: none; }
}
@media (max-width: 640px) {
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(6,6,15,0.985); backdrop-filter: blur(20px); border-bottom: 1px solid var(--line-1); box-shadow: 0 24px 48px rgba(0,0,0,0.6); padding: 8px 0; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s var(--ease); }
  .nav-links a { border-bottom: 1px solid var(--line-1); }
  .nav-links a:last-child { border-bottom: none; }
  .navbar.menu-open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 24px; width: 100%; }
  .nav-toggle { display: flex; }
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .record-grid { grid-template-columns: repeat(2, 1fr); }
  .br-d { display: none; }
  .contact-card { padding: 56px 22px; }
  .lectures-hero { padding: 40px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .orb { animation: none; }
  .transition { display: none; }
  html { scroll-behavior: auto; }
}
