/* ============ Design Tokens ============ */
:root {
  /* Dark navy palette */
  --bg-0: #0a1020;         /* deepest */
  --bg-1: #0f1628;         /* surface */
  --bg-2: #141d33;         /* card */
  --bg-3: #1b2645;         /* elevated */
  --line: rgba(120, 160, 220, 0.12);
  --line-strong: rgba(120, 160, 220, 0.24);

  /* Foreground */
  --fg-0: #eaf1ff;
  --fg-1: #c4cfe6;
  --fg-2: #8392b0;
  --fg-3: #5a6887;

  /* Accents */
  --accent: #2f81f7;        /* primary blue */
  --accent-2: #5ba9ff;      /* lighter blue */
  --accent-glow: rgba(47, 129, 247, 0.35);
  --accent-soft: rgba(47, 129, 247, 0.12);
  --success: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;

  /* Radii & shadows */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px var(--accent-glow);

  /* Type */
  --font-sans: 'Inter', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Layout */
  --nav-h: 68px;
  --content-max: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--fg-0);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Animated grid background */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(120, 160, 220, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 220, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
}
.bg-glow {
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(47, 129, 247, 0.25), transparent 60%);
  filter: blur(60px);
  top: -200px;
  right: -200px;
  animation: float 14s ease-in-out infinite alternate;
}
.bg-glow.two {
  top: auto;
  bottom: -300px;
  left: -200px;
  right: auto;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle at 50% 50%, rgba(91, 169, 255, 0.18), transparent 60%);
  animation-delay: -5s;
}
@keyframes float {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-40px, 40px, 0); }
}

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  padding: 0 28px;
  backdrop-filter: blur(14px);
  background: rgba(10, 16, 32, 0.7);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  cursor: pointer;
  user-select: none;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  font-size: 13px; color: white;
  box-shadow: 0 0 20px var(--accent-glow);
}
.brand-dot { color: var(--accent); }

.nav-links {
  display: flex; gap: 4px; align-items: center;
}
.nav-link {
  position: relative;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-1);
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: flex; align-items: center; gap: 6px;
  font-family: inherit;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover { color: var(--fg-0); background: var(--accent-soft); }
.nav-link.active { color: var(--accent-2); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.chev {
  width: 10px; height: 10px;
  transition: transform .2s;
}
.nav-link.open .chev { transform: rotate(180deg); }

.lang-toggle {
  display: inline-flex;
  margin-left: 10px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(120, 160, 220, 0.04);
}
.lang-toggle button {
  background: transparent;
  border: 0;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.lang-toggle button:hover { color: var(--fg-0); }
.lang-toggle button.active {
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px var(--accent-glow);
}
.lang-toggle.mobile {
  margin: 20px 0 0;
  align-self: flex-start;
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 340px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 8px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dd-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease;
}
.dd-item:hover { background: var(--accent-soft); }
.dd-item-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--bg-3);
  display: grid; place-items: center;
  color: var(--accent-2);
  flex-shrink: 0;
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 600;
}
.dd-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-0);
}
.dd-item-desc {
  font-size: 12px;
  color: var(--fg-2);
  margin-top: 2px;
}
.dd-footer {
  padding: 10px 14px 6px;
  font-size: 11px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  border-top: 1px solid var(--line);
  margin-top: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Mobile nav */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--fg-0);
  cursor: pointer;
  padding: 8px;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  background: var(--bg-0);
  z-index: 49;
  padding: 24px 20px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.m-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  font-weight: 500;
  color: var(--fg-0);
  background: transparent;
  border-left: 0; border-right: 0; border-top: 0;
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.m-sublist {
  display: none;
  padding: 8px 0 8px 12px;
}
.m-sublist.open { display: block; }
.m-sublist .m-sub {
  display: block;
  padding: 12px 4px;
  font-size: 15px;
  color: var(--fg-1);
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.m-sublist .m-sub:last-child { border-bottom: 0; }
.m-sublist .m-sub:hover { color: var(--accent-2); }

/* ============ Main / Pages ============ */
.main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: var(--nav-h);
}
.page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 28px 80px;
}

/* ============ Hero ============ */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - var(--nav-h));
  padding: 40px 28px 60px;
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
}
.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  background: rgba(20, 29, 51, 0.6);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--fg-0);
  margin-bottom: 22px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.hero-title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  filter: blur(6px);
  animation: wordIn .8s cubic-bezier(.2, .7, .2, 1) forwards;
}
@keyframes wordIn {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hero-role {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent-2);
  margin-bottom: 18px;
  opacity: 0;
  animation: fadeUp .7s ease .9s forwards;
}
.hero-role .bar { width: 28px; height: 1px; background: var(--accent-2); }

.hero-desc {
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-1);
  max-width: 540px;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp .7s ease 1.1s forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .7s ease 1.3s forwards;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px var(--accent-glow);
}
.btn-ghost {
  color: var(--fg-0);
  border-color: var(--line-strong);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.btn-sm { padding: 10px 16px; font-size: 13px; }

.hero-socials {
  position: absolute;
  left: 28px;
  bottom: 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  opacity: 0;
  animation: fadeUp .7s ease 1.5s forwards;
  z-index: 2;
}
.social-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(20, 29, 51, 0.5);
  display: grid; place-items: center;
  color: var(--fg-1);
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}
.social-btn:hover {
  color: var(--accent-2);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.hero-socials .divider {
  width: 1px; height: 24px; background: var(--line);
  margin: 0 4px;
}
.hero-socials .company-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  text-decoration: none;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 29, 51, 0.5);
  transition: all .2s;
}
.hero-socials .company-link:hover { color: var(--accent-2); border-color: var(--accent); }

/* Hero portrait */
.portrait-wrap {
  position: relative;
  aspect-ratio: 1 / 1.1;
  max-width: 460px;
  margin-left: auto;
  opacity: 0;
  transform: scale(0.6);
  animation: portraitIn 1.2s cubic-bezier(.2, .7, .2, 1) 1.2s forwards;
  z-index: 2;
}
@keyframes portraitIn {
  0% { opacity: 0; transform: scale(0.5); filter: blur(20px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
.portrait {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(145deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--line-strong);
}
.portrait::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(91, 169, 255, 0.25), transparent 55%),
    repeating-linear-gradient(135deg, rgba(120, 160, 220, 0.04) 0 2px, transparent 2px 12px);
  z-index: 1;
}
.portrait-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  z-index: 2;
  text-align: center;
  line-height: 1.8;
}
.portrait-placeholder .avatar-glyph {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 48px;
  color: white;
  font-weight: 600;
  margin-bottom: 18px;
  box-shadow: 0 0 40px var(--accent-glow);
}
.portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  z-index: 2;
  animation: portraitReveal 1.2s cubic-bezier(.2,.7,.2,1) .55s both;
  transform-origin: 50% 35%;
}
@keyframes portraitReveal {
  0%   { opacity: 0; transform: scale(0.55); filter: blur(16px) saturate(0.55); }
  55%  { opacity: 1; filter: blur(0) saturate(1); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
.portrait-scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,16,32,0) 55%, rgba(10,16,32,0.55) 100%),
    radial-gradient(circle at 80% 10%, rgba(47,129,247,0.18), transparent 50%);
}
.portrait-frame {
  position: absolute;
  border: 1px solid var(--accent);
  border-radius: var(--r-xl);
  opacity: 0.35;
  pointer-events: none;
}
.portrait-frame.f1 { inset: -12px; animation: frameFloat 6s ease-in-out infinite alternate; }
.portrait-frame.f2 { inset: -24px; opacity: 0.18; animation: frameFloat 8s ease-in-out infinite alternate-reverse; }
@keyframes frameFloat {
  from { transform: translate(0, 0); }
  to   { transform: translate(8px, -8px); }
}

.hero-spawn {
  position: absolute;
  right: 28px;
  bottom: 24px;
  width: 50%;
  max-width: 700px;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.72);
  filter: drop-shadow(0 10px 22px rgba(8, 12, 24, 0.45));
  animation: spawnIn .9s cubic-bezier(.2, .7, .2, 1) 1.55s forwards;
}
.hero-spawn img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
@keyframes spawnIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.68);
    filter: blur(8px) drop-shadow(0 0 0 rgba(8, 12, 24, 0));
  }
  65% {
    opacity: 1;
    filter: blur(0) drop-shadow(0 12px 24px rgba(8, 12, 24, 0.4));
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0) drop-shadow(0 10px 22px rgba(8, 12, 24, 0.45));
  }
}

/* Ticker of tech */
.hero-ticker {
  position: absolute;
  right: 28px;
  bottom: 24px;
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  opacity: 0;
  animation: fadeUp .7s ease 1.6s forwards;
  z-index: 2;
}
.hero-ticker span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }

/* ============ Project Detail ============ */
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}
.crumbs a, .crumbs button {
  color: var(--fg-2);
  text-decoration: none;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.crumbs a:hover, .crumbs button:hover { color: var(--accent-2); }
.crumbs .sep { opacity: 0.5; }

.pd-header {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  padding: 28px 0 44px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 44px;
}
.pd-header h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  font-weight: 600;
}
.pd-tagline {
  font-size: 17px;
  color: var(--fg-1);
  line-height: 1.6;
  max-width: 560px;
}
.pd-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-content: start;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--bg-1);
  border: 1px solid var(--line);
  min-height: 160px;
}
.pd-meta .mi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  margin-bottom: 6px;
}
.pd-meta .mi-value {
  font-size: 14px;
  color: var(--fg-0);
  font-weight: 500;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.24);
}
.status-chip .d { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.status-chip.beta { background: rgba(251, 191, 36, 0.12); color: var(--warn); border-color: rgba(251, 191, 36, 0.24); }
.status-chip.beta .d { background: var(--warn); }
.status-chip.dev { background: rgba(91, 169, 255, 0.12); color: var(--accent-2); border-color: rgba(91, 169, 255, 0.24); }
.status-chip.dev .d { background: var(--accent-2); }

.pd-sections {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}
.pd-section h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-3);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-section h3::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.pd-section p { color: var(--fg-1); margin-bottom: 14px; }
.pd-section ul {
  list-style: none;
}
.pd-section li {
  padding: 10px 0;
  padding-left: 26px;
  position: relative;
  color: var(--fg-1);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.pd-section li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-family: var(--font-mono);
}
.pd-section li:last-child { border-bottom: 0; }

.effect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.effect-card {
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--bg-1);
  border: 1px solid var(--line);
}
.effect-card .metric {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.effect-card .metric-label {
  font-size: 12px;
  color: var(--fg-2);
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stack-chip {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--fg-1);
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.pd-cta-row {
  margin-top: 48px;
  padding: 28px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.pd-cta-row .cta-text strong {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--fg-0);
  display: block;
  margin-bottom: 4px;
}
.pd-cta-row .cta-text span {
  font-size: 14px;
  color: var(--fg-2);
}

/* AX-01 showcase */
.project-showcase {
  margin-top: 48px;
  display: grid;
  gap: 18px;
}
.showcase-hero {
  padding: 26px;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, rgba(47, 129, 247, 0.16), rgba(20, 29, 51, 0.9));
  border: 1px solid var(--line-strong);
}
.showcase-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.showcase-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.showcase-desc {
  margin-top: 10px;
  color: var(--fg-1);
  font-size: 15px;
}
.automation-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.flow-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
}
.flow-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.flow-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--fg-3);
}
.flow-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.flow-desc {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.5;
}
.showcase-story {
  margin-top: 4px;
}
.showcase-scroll-track {
  position: relative;
  min-height: 340vh;
}
.story-left {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  align-self: start;
}
.story-preview {
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(20, 29, 51, 0.96), rgba(10, 16, 32, 0.96));
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.story-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.story-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
}
.story-step {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-2);
  letter-spacing: 0.1em;
}
.story-media {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(10, 16, 32, 0.7);
  padding: 10px;
}
.story-media img {
  display: block;
  width: 70%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}
.story-copy {
  margin-top: 14px;
}
.story-copy h4 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.story-copy p {
  margin-top: 8px;
  color: var(--fg-1);
  font-size: 14px;
  line-height: 1.7;
}
.story-progress {
  margin-top: 14px;
  height: 4px;
  border-radius: 999px;
  background: rgba(120, 160, 220, 0.14);
  overflow: hidden;
}
.story-progress .fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .35s ease;
}
.story-copy h4 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.story-copy p {
  margin-top: 8px;
  color: var(--fg-1);
  font-size: 14px;
  line-height: 1.7;
}
.story-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.story-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-1);
  background: rgba(120, 160, 220, 0.08);
  border: 1px solid var(--line);
}

/* ============ Project List on Home / AX page ============ */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  gap: 20px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section-head .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.proj-card {
  position: relative;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--bg-1);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}
.proj-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity .25s;
}
.proj-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.proj-card:hover::before { opacity: 1; }
.proj-card .pc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  position: relative;
}
.proj-card .pc-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.08em;
}
.proj-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  position: relative;
}
.proj-card p {
  color: var(--fg-2);
  font-size: 14px;
  flex: 1;
  position: relative;
}
.proj-card .pc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  position: relative;
}
.proj-card .pc-stack {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
}
.arrow-ico {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--fg-1);
  transition: all .2s;
}
.proj-card:hover .arrow-ico {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translate(2px, -2px);
}

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 28px;
}
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 4px; bottom: 0;
  width: 1px;
  background: var(--line);
}
.tl-item {
  position: relative;
  padding-left: 36px;
  padding-bottom: 28px;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 2px solid var(--accent);
}
.tl-item.current::before {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.tl-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.tl-role {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.tl-company { color: var(--accent-2); font-size: 14px; margin-bottom: 8px; }
.tl-desc { color: var(--fg-2); font-size: 14px; line-height: 1.6; }

.stack-cats {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.stack-cat h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-3);
  margin-bottom: 12px;
}
.contact-card {
  margin-top: 32px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--bg-1);
  border: 1px solid var(--line);
}
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.contact-row:last-child { border-bottom: 0; }
.contact-row .c-key { color: var(--fg-2); font-family: var(--font-mono); font-size: 12px; }
.contact-row .c-val { color: var(--fg-0); }
.contact-row a { color: var(--accent-2); text-decoration: none; }

/* ============ Dashboard ============ */
.dash-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px 28px 60px;
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-radius: var(--r-lg);
  background: var(--bg-1);
  border: 1px solid var(--line);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dash-title .dash-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-mono);
  font-weight: 600;
  box-shadow: 0 0 20px var(--accent-glow);
}
.dash-title h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}
.dash-title .sub {
  font-size: 12px;
  color: var(--fg-2);
  font-family: var(--font-mono);
}
.dash-controls { display: flex; gap: 8px; align-items: center; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.kpi {
  padding: 20px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin-bottom: 10px;
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-0);
  margin-bottom: 6px;
}
.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--success);
}
.kpi-trend.down { color: var(--danger); }
.kpi-spark {
  position: absolute;
  bottom: 10px; right: 12px;
  width: 70px; height: 30px;
  opacity: 0.5;
}

.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.panel {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.panel-head h3 {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-display);
}
.panel-head .pill-set {
  display: flex; gap: 4px;
}
.pill {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fg-2);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}
.pill.active { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent); }

.chart { width: 100%; height: 360px; }

/* 누적 차트 로딩/에러/빈 상태 플레이스홀더 */
.chart-placeholder {
  width: 100%;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
}
.chart-placeholder.chart-error { color: var(--danger); border-color: rgba(248, 113, 113, 0.3); }

/* 발전원 범례 */
.fuel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.fuel-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-2);
}
.fuel-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.agent-list { display: flex; flex-direction: column; gap: 10px; }
.agent {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.agent .a-ico {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--accent-2);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.agent .a-name { font-size: 13px; font-weight: 600; color: var(--fg-0); }
.agent .a-status { font-size: 11px; color: var(--fg-2); font-family: var(--font-mono); }
.agent .a-value { margin-left: auto; font-family: var(--font-mono); font-size: 13px; color: var(--accent-2); }

.table-wrap { overflow-x: auto; }
table.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.log-table th, table.log-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
table.log-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  font-weight: 500;
}
table.log-table td { color: var(--fg-1); }
table.log-table tr:last-child td { border-bottom: 0; }
.badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.badge.ok { background: rgba(52, 211, 153, 0.12); color: var(--success); }
.badge.warn { background: rgba(251, 191, 36, 0.12); color: var(--warn); }
.badge.err { background: rgba(248, 113, 113, 0.12); color: var(--danger); }

/* SMP 시뮬레이터 */
.sim-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
}
.sim-constants {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.sim-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sim-field label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fg-3);
}
.sim-field input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg-0);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
.sim-subtitle {
  font-size: 11px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  margin: 8px 0;
  white-space: pre-line;
}
.admin-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.admin-toggle-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fg-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.admin-pw-input {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--fg-0);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 13px;
  font-family: var(--font-mono);
  width: 110px;
  transition: border-color .15s;
  outline: none;
}
.admin-pw-input:focus { border-color: var(--accent); }
.admin-pw-input.error { border-color: var(--danger); }
.admin-pw-error {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--danger);
}
.admin-chevron-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  color: var(--fg-2);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.admin-chevron-btn:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }
.admin-chevron-btn svg {
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.admin-chevron-btn.open svg { transform: rotate(90deg); }
.admin-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  pointer-events: none;
}
.admin-panel.open {
  max-height: 200px;
  opacity: 1;
  pointer-events: auto;
}
.admin-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.admin-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-file-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  color: var(--fg-1);
  font-size: 12px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}
.admin-file-label:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.admin-file-label input[type="file"] { display: none; }
.admin-file-name {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fg-3);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-upload-msg {
  font-size: 11px;
  font-family: var(--font-mono);
  margin-top: 2px;
}
.sim-chart-block {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
.sim-chart-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--fg-2);
}
.sim-chart-title span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
}
.sim-input-chart {
  width: 100%;
  height: 150px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.sim-result-chart {
  width: 100%;
  height: 340px;
}
.sim-tip {
  margin-top: 6px;
  font-size: 11px;
  color: var(--fg-3);
  font-family: var(--font-mono);
}
.sim-result-table {
  margin-top: 10px;
  max-height: 210px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table.smp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.smp-table th, table.smp-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
table.smp-table th {
  position: sticky;
  top: 0;
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
table.smp-table tr:last-child td { border-bottom: 0; }
table.smp-table td:nth-child(2), table.smp-table td:nth-child(3) {
  font-family: var(--font-mono);
}

/* Page enter animation */
.page-enter {
  animation: pageIn .45s ease forwards;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; }
  .portrait-wrap { max-width: 320px; margin: 0 auto; }
  .hero-socials { position: static; margin-top: 28px; justify-content: center; flex-wrap: wrap; }
  .hero-ticker { position: static; margin-top: 20px; justify-content: center; flex-wrap: wrap; }
  .pd-header, .pd-sections, .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .proj-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .sim-grid { grid-template-columns: 1fr; }
  .sim-constants { grid-template-columns: 1fr; }
  .automation-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-scroll-track { min-height: 320vh; }
  .hero-spawn {
    right: 18px;
    bottom: 18px;
    width: 50%;
  }
}
@media (max-width: 640px) {
  .nav { padding: 0 18px; }
  .nav-links { display: none; }
  .mobile-toggle { display: inline-grid; place-items: center; }
  .mobile-menu { display: block; }
  .page { padding: 28px 18px 60px; }
  .hero { padding: 28px 18px 40px; }
  .dash-shell { padding: 20px 18px 60px; }
  .effect-grid { grid-template-columns: 1fr; }
  .pd-cta-row { flex-direction: column; align-items: stretch; }
  .pd-meta { grid-template-columns: 1fr; gap: 14px; }
  .showcase-hero { padding: 20px; }
  .automation-flow { grid-template-columns: 1fr; }
  .story-preview { padding: 14px; }
  .showcase-scroll-track { min-height: 270vh; }
  .story-copy h4 { font-size: 18px; }
}

