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

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --off: #f7f7f5;
  --muted: #6b6b6b;
  --border: #e8e8e4;
  --blue: #2563eb;
  --pink: #ec4899;
  --yellow: #facc15;
  --radius: 16px;
  --font: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.logo {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--black); }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { background: #222; transform: translateY(-1px); }
.btn-primary.full { width: 100%; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

/* HERO */
.hero {
  padding: 5rem 1.5rem 4rem;
  background: var(--black);
  color: white;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}
.hero h1 .yellow { color: var(--yellow); }
.hero-sub {
  max-width: 520px;
  font-size: 1.05rem;
  color: #c0c0c0;
  margin-bottom: 3rem;
  line-height: 1.6;
}
.process-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.process-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  color: white;
}
.process-card .num {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.7;
  display: block;
  margin-bottom: 0.75rem;
}
.process-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}
.process-card p { font-size: 0.9rem; opacity: 0.9; }
.process-card.blue { background: var(--blue); }
.process-card.pink { background: var(--pink); }
.process-card.yellow { background: var(--yellow); color: var(--black); }

/* MARQUEE */
.marquee {
  background: var(--black);
  color: white;
  overflow: hidden;
  padding: 0.85rem 0;
  border-top: 1px solid #222;
}
.marquee-track {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  animation: scroll 28s linear infinite;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.marquee .dot { opacity: 0.4; }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* SECTIONS */
.section {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  gap: 2rem;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.section-header h2 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}
.section-desc {
  color: var(--muted);
  max-width: 220px;
  text-align: right;
  font-size: 0.95rem;
}

/* WORK GRID */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.work-card {
  background: var(--off);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.work-media {
  aspect-ratio: 16/10;
  background: #ddd;
  position: relative;
  overflow: hidden;
}
.work-media.vertical {
  aspect-ratio: 9/16;
  max-height: 420px;
  margin: 0 auto;
  width: 70%;
  border-radius: 24px;
  margin-top: 1rem;
}
.work-media video,
.work-media img,
.work-media iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-media iframe {
  border: 0;
}
.work-info {
  padding: 1.1rem 1.25rem 1.35rem;
}
.work-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.work-meta {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.4;
}
.category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  color: #fff;
  background: #ec4899;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
  pointer-events: none;
}

/* SERVICES */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.service-card {
  background: var(--off);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}
.service-card:hover { transform: translateY(-3px); }
.service-img {
  height: 180px;
  background-size: cover;
  background-position: center;
}
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  padding: 1.1rem 1.25rem 0.35rem;
}
.service-card p {
  padding: 0 1.25rem 1.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ABOUT */
.about-section { background: var(--off); max-width: none; }
.about-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.about-text p {
  margin-bottom: 1rem;
  color: #444;
  font-size: 1.05rem;
}
.contact-email a {
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}
.copy-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 0.5rem;
}

/* STUDIO */
.studio-section { background: #fafafa; max-width: none; }
.studio-inner {
  max-width: 720px;
  margin: 0 auto;
}
.studio-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.muted { color: var(--muted); font-size: 0.95rem; }
.login-form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 360px;
}
.login-form input {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  gap: 1rem;
}
.dash-actions { display: flex; gap: 0.75rem; }
.btn-text {
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  padding: 0.4rem 0.6rem;
}
.btn-text:hover { color: var(--black); }
.btn-text.danger { color: #dc2626; }
.btn-text.danger:hover { color: #b91c1c; }

.owner-list { margin-bottom: 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.work-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.work-item .thumb {
  width: 64px;
  height: 42px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f0f0f0, #ddd);
  flex-shrink: 0;
  overflow: hidden;
}
.work-item .thumb.vertical { width: 32px; height: 52px; }
.work-item .thumb img,
.work-item .thumb video { width: 100%; height: 100%; object-fit: cover; }
.work-item .info { flex: 1; min-width: 0; }
.work-item .info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.work-item .info span { font-size: 0.8rem; color: var(--muted); }
.work-item .actions { display: flex; gap: 0.5rem; }
.btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-weight: 500;
}
.btn-sm.delete { color: #dc2626; border-color: #fecaca; }
.btn-sm.delete:hover { background: #fef2f2; }

.upload-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.upload-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.file-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.15s, background 0.15s;
}
.file-zone:hover, .file-zone.dragover {
  border-color: var(--black);
  background: #fafafa;
}
.file-preview {
  margin-top: 0.75rem;
  border-radius: 10px;
  overflow: hidden;
  max-height: 200px;
}
.file-preview img, .file-preview video {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  background: #f0f0f0;
}
.hidden { display: none !important; }

/* CONTACT */
.contact-section { max-width: none; background: white; }
.contact-inner {
  max-width: 720px;
  margin: 0 auto;
}
.contact-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.contact-lead {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}
.contact-form {
  margin-top: 2rem;
}
.contact-form .btn-primary { margin-top: 0.5rem; }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer p { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* CHAT FAB + PANEL */
.chat-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--blue);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: 0;
  box-shadow: 0 8px 24px rgba(37,99,235,0.35);
  z-index: 90;
  transition: transform 0.15s;
  cursor: pointer;
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab.is-open { display: none; }

.chat-panel {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: min(380px, calc(100vw - 1.5rem));
  height: min(520px, calc(100vh - 3rem));
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  border: 1px solid var(--border);
  z-index: 95;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel[hidden] { display: none !important; }

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  background: #111;
  color: #fff;
}
.chat-header strong { display: block; font-size: 0.95rem; }
.chat-status {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #86efac;
}
.chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #f7f7f5;
}
.chat-bubble {
  max-width: 88%;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.chat-bubble.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  color: #111;
}
.chat-bubble.user {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
}

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: #fff;
}
.chat-quick button {
  border: 1px solid var(--border);
  background: #fff;
  color: #111;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.chat-quick button:hover {
  background: #f0f4ff;
  border-color: #93c5fd;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background: #fff;
}
.chat-input-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
}
.chat-input-row button {
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  padding: 0.65rem 1rem;
  cursor: pointer;
}

@media (max-width: 480px) {
  .chat-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: 0.75rem;
  }
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--black);
  color: white;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  z-index: 200;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  grid-column: 1 / -1;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .process-cards { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .section-desc { text-align: left; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .form-row { grid-template-columns: 1fr; }
  .dash-header { flex-direction: column; }
}


/* Video controls on portfolio cards */
.work-media .play-btn,
.work-media .sound-btn {
  position: absolute;
  z-index: 3;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: background 0.2s ease, transform 0.15s ease;
}
.work-media .play-btn {
  bottom: 12px;
  left: 12px;
}
.work-media .sound-btn {
  bottom: 12px;
  right: 12px;
}
.work-media .play-btn:hover,
.work-media .sound-btn:hover {
  background: rgba(0, 0, 0, 0.88);
  transform: translateY(-1px);
}
.work-media .sound-btn.on {
  background: rgba(16, 185, 129, 0.92);
  color: #06281d;
}
.work-media .play-btn.playing {
  background: rgba(37, 99, 235, 0.9);
}
.work-media video {
  cursor: pointer;
  background: #111;
}
.work-card {
  cursor: default;
}


/* ABOUT / BIO PAGE */
.about-section {
  background: var(--off);
  max-width: none;
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.about-page {
  max-width: 1100px;
  margin: 0 auto;
}
.about-hero-row {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
}
.portrait-frame {
  aspect-ratio: 4/5;
  border-radius: 28px;
  background:
    radial-gradient(circle at 30% 20%, #ffe566 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, #ff8fab 0%, transparent 50%),
    linear-gradient(145deg, #1a1a1a 0%, #3d2c6e 55%, #111 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  position: relative;
  overflow: hidden;
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.35));
  pointer-events: none;
}
.portrait-initials {
  font-size: clamp(4rem, 10vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  z-index: 1;
}
.portrait-label {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  z-index: 1;
}
.about-intro .eyebrow {
  margin-bottom: 0.75rem;
}
.about-intro h2 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.about-role {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}
.about-lede {
  font-size: 1.15rem;
  line-height: 1.55;
  color: #333;
  margin-bottom: 1.25rem;
  max-width: 34ch;
}
.about-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid #111;
  color: #111;
  background: transparent;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-ghost:hover {
  background: #111;
  color: #fff;
}
.about-body-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.25rem;
}
.about-card {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
}
.about-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}
.about-card p {
  color: #444;
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 0.85rem;
}
.about-card p:last-child { margin-bottom: 0; }
.about-card.highlight {
  background: linear-gradient(160deg, #111 0%, #2a1f4a 100%);
  color: #fff;
  border: 0;
}
.about-card.highlight h3 { color: #fff; }
.about-card.highlight p { color: rgba(255,255,255,0.88); }
.about-card.highlight .contact-email a {
  color: #ffe566;
}
.about-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}
.about-list li {
  position: relative;
  padding-left: 1.15rem;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.45;
}
.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4d8d;
}
@media (max-width: 900px) {
  .about-hero-row { grid-template-columns: 1fr; gap: 2rem; }
  .portrait-frame { max-width: 320px; }
  .about-body-grid { grid-template-columns: 1fr; }
  .about-lede { max-width: none; }
}


/* Kim portrait photo */
.portrait-frame.has-photo {
  background: #f4f4f4;
  padding: 0;
  justify-content: flex-end;
}
.portrait-frame.has-photo::after {
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.55));
}
.portrait-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}
.portrait-frame.has-photo .portrait-label {
  position: relative;
  z-index: 2;
  margin: 0 0 1.1rem;
  padding: 0 1rem;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.45);
  font-weight: 600;
}
