/* ═══════════════════════════════════════════
   Light Premium — AI Orchestration Portfolio
   Ref: Balindar + Channel A (PlusX)
   ═══════════════════════════════════════════ */

:root {
  --bg: #fafafa;
  --bg-card: rgba(0,0,0,0.02);
  --bg-card-hover: rgba(0,0,0,0.04);
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --text: #111113;
  --text-secondary: rgba(0,0,0,0.55);
  --text-muted: rgba(0,0,0,0.32);
  --accent: #2563eb;
  --accent-cyan: #0891b2;
  --accent-violet: #7c3aed;
  --accent-rose: #e11d48;
  --font-sans: 'Pretendard', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "ss02";
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
}
::selection { background: var(--accent); color: #ffffff; }

/* ─── Typography ─── */
h1, h2, h3 {
  font-weight: 600;
  color: var(--text);
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}
h1 { font-size: 52px; line-height: 1.05; letter-spacing: 0; }
h2 { font-size: 32px; line-height: 1.25; letter-spacing: 0; }
h3 { font-size: 18px; line-height: 1.5; letter-spacing: 0; }
p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}
strong { font-weight: 500; color: var(--text); }
a { color: inherit; text-decoration: none; }

/* ─── Layout ─── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.section + .section { border-top: 1px solid var(--border); }
.section-header { margin-bottom: 48px; }
.section-header-center { text-align: center; }
.section-header-center .section-lead { max-width: 520px; margin-left: auto; margin-right: auto; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 16px; padding: 4px 12px;
  background: rgba(37,99,235,0.06); border: 1px solid rgba(37,99,235,0.1);
  border-radius: var(--r-pill); font-family: var(--font-mono);
  font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0;
}
.section-eyebrow::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
.section-lead { margin-top: 12px; font-size: 17px; line-height: 1.65; }

/* ─── Nav ─── */
.nav {
  position: sticky; top: 0; z-index: 100; height: 64px;
  background: rgba(250,250,250,0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent; transition: border-color 0.25s;
}
.nav-scrolled { border-bottom-color: var(--border); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; max-width: 1100px; height: 100%; margin: 0 auto; padding: 0 24px;
}
.nav-brand { font-size: 15px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }

/* Language Switcher */
.lang-switch {
  display: flex; align-items: center; gap: 2px;
  padding: 3px; border: 1px solid var(--border); border-radius: var(--r-pill);
}
.lang-btn {
  padding: 3px 8px; border: none; border-radius: var(--r-pill);
  background: transparent; font-family: var(--font-mono); font-size: 10px;
  font-weight: 400; color: var(--text-muted); cursor: pointer;
  transition: all 0.15s; letter-spacing: 0;
}
.lang-btn:hover { color: var(--text-secondary); }
.lang-btn.active { background: var(--text); color: #ffffff; }
.nav-pills {
  display: none; align-items: center; gap: 2px; padding: 4px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
}
.nav-pill {
  padding: 5px 14px; border: none; border-radius: var(--r-pill); background: transparent;
  font-family: var(--font-sans); font-size: 13px; font-weight: 450;
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.nav-pill:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.nav-pill.active { color: #ffffff; background: var(--text); }
.nav-actions { display: none; align-items: center; gap: 8px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: 500; white-space: nowrap;
  gap: 6px; cursor: pointer; transition: all 0.2s; border: none; text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  height: 44px; padding: 0 24px; background: var(--text); color: #ffffff;
  font-size: 15px; border-radius: var(--r-pill);
}
.btn-primary:hover { opacity: 0.9; box-shadow: 0 0 24px rgba(0,0,0,0.1); }
.btn-secondary {
  height: 44px; padding: 0 24px; background: transparent; color: var(--text);
  font-size: 15px; border-radius: var(--r-pill);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); background: rgba(0,0,0,0.02); }
.btn-sm {
  height: 32px; padding: 0 16px; font-size: 13px; border-radius: var(--r-pill);
}
.btn-sm.btn-primary { background: var(--text); color: #ffffff; }
.btn-sm.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-sm.btn-primary:hover { opacity: 0.9; }
.btn-sm.btn-secondary:hover { border-color: var(--border-hover); }

/* ─── Hero ─── */
.hero {
  position: relative; overflow: hidden;
  padding: 120px 0 80px; border-bottom: 1px solid var(--border);
}
.hero-glow {
  position: absolute; pointer-events: none; inset: 0;
}
.hero-glow::before {
  content: ''; position: absolute;
  width: 800px; height: 600px; right: -10%; top: -20%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(37,99,235,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 70%, rgba(124,58,237,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(8,145,178,0.05) 0%, transparent 45%);
  filter: blur(60px);
  animation: glowDrift 20s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 20px) scale(1.05); }
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 48px; align-items: center; }
.hero-text { max-width: 600px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 28px; padding: 6px 16px;
  background: rgba(37,99,235,0.06); border: 1px solid rgba(37,99,235,0.12);
  border-radius: var(--r-pill); font-family: var(--font-mono);
  font-size: 12px; color: var(--accent);
}
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(37,99,235,0.4); } 50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(37,99,235,0); } }
.hero h1 { margin-bottom: 20px; }
.hero-lead { font-size: 17px; line-height: 1.7; margin-bottom: 36px; max-width: 520px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero Visual — Orchestration Diagram */
.hero-visual {
  position: relative; width: 100%; max-width: 420px;
  aspect-ratio: 1; margin: 0 auto;
}
.hero-visual svg { width: 100%; height: 100%; }
.orbit { animation: spin 40s linear infinite; transform-origin: center; }
.orbit-reverse { animation: spin 50s linear infinite reverse; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.node-pulse { animation: nodePulse 3s ease-in-out infinite; }
@keyframes nodePulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

/* Capability Chips */
.status-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 64px;
}
.status-item {
  padding: 20px 22px;
  min-height: 132px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(37,99,235,0.12);
  border-radius: var(--r-md);
  box-shadow: 0 14px 38px rgba(0,0,0,0.04);
}
.status-label {
  display: block; font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0; margin-bottom: 10px;
}
.status-value {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text);
  word-break: keep-all;
  line-break: strict;
}

/* ─── Demo ─── */
.demo-tabs {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; margin-bottom: 36px; padding: 4px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  width: fit-content; margin-left: auto; margin-right: auto;
}
.demo-tab {
  padding: 6px 16px; border: none; border-radius: var(--r-pill);
  background: transparent; font-family: var(--font-mono); font-size: 12px;
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.demo-tab:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.demo-tab.active { background: var(--text); color: #ffffff; }
.demo-stage { max-width: 840px; margin: 0 auto; }
.demo-panel { display: none; animation: panelIn 0.3s ease; }
.demo-panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.demo-frame {
  position: relative; aspect-ratio: 16/9;
  background: linear-gradient(145deg, rgba(0,0,0,0.015), rgba(0,0,0,0.005));
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
}
.demo-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
}
.demo-play-btn {
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1); background: rgba(0,0,0,0.03);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.demo-play-btn:hover { border-color: var(--accent); background: rgba(37,99,235,0.06); }
.demo-play-btn svg path { fill: rgba(0,0,0,0.3); }
.demo-play-btn svg { margin-left: 3px; }
.demo-placeholder span { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.demo-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.demo-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 16px; }
.demo-meta strong { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.demo-meta span { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* ─── Grids ─── */
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }
.grid-4 { display: grid; gap: 16px; }
.grid-bento { display: grid; gap: 16px; grid-template-columns: 1fr; }

/* ─── Cards ─── */
.card {
  padding: 28px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: border-color 0.25s, background 0.25s;
}
.card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.card-badge {
  display: inline-flex; align-items: center; margin-bottom: 16px;
  padding: 3px 10px; border: 1px solid var(--border); border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  line-height: 1;
  white-space: nowrap;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 14px; line-height: 1.55; }

/* Case Cards */
.case-card {
  padding: 32px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  transition: border-color 0.25s;
}
.case-card:hover { border-color: var(--border-hover); }
.case-card .card-badge { margin-bottom: 20px; }
.case-card h3 { font-size: 22px; letter-spacing: 0; margin-bottom: 12px; }
.case-card > p { font-size: 15px; margin-bottom: 16px; }
.case-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.case-card li {
  font-size: 14px; line-height: 1.5; color: var(--text-secondary);
  padding-left: 16px; position: relative;
}
.case-card li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Evidence Blocks */
.evidence-stack {
  display: grid;
  gap: 20px;
}
.evidence-card {
  display: grid;
  gap: 28px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: border-color 0.25s, background 0.25s;
}
.evidence-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.case-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.case-kicker .card-badge {
  height: 24px;
  margin-bottom: 0;
  padding: 0 10px;
}
.portfolio-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: rgba(8,145,178,0.07);
  border: 1px solid rgba(8,145,178,0.14);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--accent-cyan);
  white-space: nowrap;
}
.evidence-card h3 {
  margin-bottom: 22px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0;
}
.evidence-points {
  display: grid;
  gap: 14px;
}
.evidence-point {
  display: grid;
  gap: 5px;
  padding-left: 14px;
  border-left: 2px solid rgba(37,99,235,0.14);
}
.evidence-point strong {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}
.evidence-point p {
  font-size: 14px;
  line-height: 1.65;
}
.case-note {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(8,145,178,0.12);
  border-radius: var(--r-md);
  background: rgba(8,145,178,0.045);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}
.evidence-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.evidence-video {
  order: -1;
  align-self: start;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,0.07);
}

/* Tags */
.tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
}

/* Progress Cards */
.progress-card {
  padding: 24px; background: rgba(37,99,235,0.025);
  border: 1px solid rgba(37,99,235,0.08); border-radius: var(--r-md);
  transition: border-color 0.2s, background 0.2s;
}
.progress-card:hover { border-color: rgba(37,99,235,0.18); background: rgba(37,99,235,0.05); }
.progress-card h3 {
  font-family: var(--font-mono); font-size: 14px; font-weight: 400;
  color: var(--accent); margin-bottom: 10px;
}
.progress-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 4px 10px;
  border: 1px solid rgba(37,99,235,0.13);
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.64);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
}
.progress-card p { font-size: 13px; line-height: 1.55; }

/* ─── Footer ─── */
.footer {
  padding: 32px 0; border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-brand { font-size: 13px; font-weight: 500; }
.footer-copy { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* ─── Mobile Bar ─── */
.mobile-bar {
  position: fixed; right: 0; bottom: 0; left: 0; z-index: 100;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(250,250,250,0.92); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
.mobile-bar a {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  transition: all 0.15s;
}
.mobile-bar a:hover, .mobile-bar a:active { background: rgba(0,0,0,0.04); color: var(--text); }

/* ─── Responsive ─── */

/* ─── About / Philosophy ─── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.about-intro {
  grid-column: 1 / -1; padding: 32px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-xl);
}
.about-intro p { font-size: 16px; line-height: 1.75; max-width: 720px; }
.about-intro p + p { margin-top: 12px; }
.about-card {
  padding: 28px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: border-color 0.25s;
}
.about-card:hover { border-color: var(--border-hover); }
.about-card-icon {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600;
}
.about-card h3 { font-size: 16px; margin-bottom: 8px; letter-spacing: 0; }
.about-card p { font-size: 13px; line-height: 1.6; }

/* ─── Card Thumbnail ─── */
.card-thumb {
  aspect-ratio: 16 / 9; margin-bottom: 20px; border-radius: var(--r-md);
  overflow: hidden; position: relative;
  background: linear-gradient(135deg, rgba(0,0,0,0.02), rgba(0,0,0,0.04));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.card-thumb-label {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  text-align: center; padding: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.card-thumb-label svg { opacity: 0.3; }
.card-thumb-video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── Tech Stack Tags ─── */
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tech-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: 6px; font-family: var(--font-mono); font-size: 10px;
  font-weight: 500; letter-spacing: 0;
  background: rgba(37,99,235,0.06); color: var(--accent);
  border: 1px solid rgba(37,99,235,0.1);
}
.tech-tag.llm { background: rgba(124,58,237,0.06); color: var(--accent-violet); border-color: rgba(124,58,237,0.1); }
.tech-tag.infra { background: rgba(0,0,0,0.03); color: var(--text-muted); border-color: var(--border); }

/* ─── Back to Top ─── */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--text); color: var(--bg); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  transform: translateY(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { opacity: 0.85; }

@media (max-width: 639px) {
  .back-to-top { bottom: 80px; right: 16px; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 140px 0 96px; }
  .hero-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (min-width: 768px) {
  .nav-pills { display: flex; }
  .nav-actions { display: flex; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .mobile-bar { display: none; }
  .demo-tabs { gap: 4px; }
}
@media (min-width: 1024px) {
    h1 { font-size: 56px; letter-spacing: 0; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .evidence-card { grid-template-columns: minmax(520px, 1.2fr) minmax(340px, 0.8fr); align-items: center; }
  .hero { padding: 160px 0 112px; }
  .section { padding: 112px 0; }
}
@media (max-width: 639px) {
  h1 { font-size: 34px; line-height: 1.1; letter-spacing: 0; }
  h2 { font-size: 26px; letter-spacing: 0; }
  .hero { padding: 100px 0 56px; }
  .hero-lead { font-size: 15px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .hero-visual { max-width: 280px; margin-top: 20px; }
  .status-strip { grid-template-columns: 1fr; }
  .status-item { min-height: auto; }
  .demo-tabs { padding: 3px; }
  .demo-tab { font-size: 11px; padding: 5px 10px; }
  .demo-meta { flex-direction: column; gap: 4px; }
  .section { padding: 64px 0; }
  .case-card { padding: 24px; }
  .case-card h3 { font-size: 18px; }
  .evidence-card { padding: 22px; }
  .evidence-card h3 { font-size: 20px; }
  .evidence-video { min-height: 220px; }
  body { padding-bottom: 72px; }
}

@media (max-width: 900px) and (min-width: 640px) {
  h1 { font-size: 44px; letter-spacing: 0; }
}
