/* ============================================================
   Claude Code Showcase — hand-written, no framework
   ============================================================ */

:root {
  --bg: #07080c;
  --bg-2: #0b0d14;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-hi: rgba(255, 255, 255, 0.18);
  --text: #eceae6;
  --text-dim: #a5a49e;
  --text-mute: #6b6a66;
  --coral: #ff7a45;
  --coral-soft: #ffb38a;
  --violet: #8b7cf7;
  --teal: #5eead4;
  --green: #7ee787;
  --red: #ff6b6b;
  --yellow: #ffd166;
  --grad: linear-gradient(100deg, var(--coral) 0%, var(--coral-soft) 45%, var(--violet) 100%);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --nav-h: 68px;
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(255, 122, 69, 0.35); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #23242c; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #33343e; }

section { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* ============ ambient background ============ */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  will-change: transform;
}
.blob-a {
  width: 55vw; height: 55vw;
  top: -22vw; right: -12vw;
  background: radial-gradient(circle, rgba(255, 122, 69, 0.32), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.blob-b {
  width: 48vw; height: 48vw;
  bottom: -20vw; left: -14vw;
  background: radial-gradient(circle, rgba(139, 124, 247, 0.26), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
.blob-c {
  width: 34vw; height: 34vw;
  top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.10), transparent 65%);
  animation: drift-c 38s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(-8vw, 10vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(10vw, -8vh) scale(1.1); } }
@keyframes drift-c { to { transform: translate(-12vw, -10vh) scale(0.9); } }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%);
}

/* ============ nav ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(7, 8, 12, 0.62);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.logo-spark {
  color: var(--coral);
  font-size: 22px;
  line-height: 1;
  animation: spark-spin 14s linear infinite;
  display: inline-block;
}
@keyframes spark-spin { to { transform: rotate(360deg); } }
.logo-text b { color: var(--coral); font-weight: 700; }

.nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: var(--surface-2); }

.nav-cta {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 99px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255, 122, 69, 0.25); }

/* ============ reveal animation ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ============ hero ============ */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) clamp(20px, 4vw, 48px) 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 99px;
  margin-bottom: 26px;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(126, 231, 135, 0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(126, 231, 135, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(126, 231, 135, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 231, 135, 0); }
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.2vw, 82px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(16px, 1.4vw, 18.5px);
  color: var(--text-dim);
  max-width: 56ch;
  margin-bottom: 34px;
}
.lede b { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 14px;
  transition: transform 0.2s, box-shadow 0.25s, background 0.2s, border-color 0.2s;
}
.btn-primary {
  color: #1a0d06;
  background: var(--grad);
  box-shadow: 0 8px 32px rgba(255, 122, 69, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 44px rgba(255, 122, 69, 0.4); }
.btn-primary .arr { transition: transform 0.25s; }
.btn-primary:hover .arr { transform: translateY(3px); }
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border-hi);
  background: var(--surface);
}
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }

.hero-facts { display: flex; gap: clamp(24px, 3vw, 44px); }
.fact { display: flex; flex-direction: column; }
.fact span {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fact label { font-size: 12.5px; color: var(--text-mute); margin-top: 2px; }

/* ============ terminal ============ */
.hero-term { position: relative; }
.term-glow {
  position: absolute;
  inset: 12% -6% -8% -6%;
  background: radial-gradient(ellipse, rgba(255, 122, 69, 0.14), transparent 70%);
  z-index: -1;
  filter: blur(30px);
}

.term {
  background: rgba(13, 15, 22, 0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.06);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.term-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  margin-left: 10px;
}
.term-replay {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.term-replay:hover { color: var(--text); border-color: var(--border-hi); }

.term-body {
  padding: 20px 22px 26px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.85;
  min-height: 300px;
}
.term-big .term-body { min-height: 340px; font-size: 14px; }

.t-line { display: block; white-space: pre-wrap; word-break: break-word; }
.t-input { color: var(--text); }
.t-input::before { content: "> "; color: var(--coral); font-weight: 600; }
.t-action { color: var(--text-dim); }
.t-action::before { content: "● "; color: var(--violet); }
.t-ok { color: var(--green); }
.t-ok::before { content: "✓ "; }
.t-out { color: var(--text-mute); }
.t-cursor {
  display: inline-block;
  width: 8px; height: 17px;
  background: var(--coral);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
  margin-left: 1px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============ marquee ============ */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-mute);
  white-space: nowrap;
}
.marquee-track i { color: var(--coral); opacity: 0.6; font-style: normal; font-size: 11px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ sections ============ */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) clamp(20px, 4vw, 48px) 0;
}
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.section-sub { color: var(--text-dim); font-size: 17px; margin-top: 14px; max-width: 58ch; }

/* ============ bento ============ */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.card-lg { grid-column: span 2; grid-row: span 2; }
.card-wide { grid-column: span 2; }

/* mouse spotlight */
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 140, 90, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.spot:hover::before { opacity: 1; }

.card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.card p { font-size: 14.5px; color: var(--text-dim); }
.card-lg h3 { font-size: 24px; }
.card-lg p { font-size: 15.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--coral-soft);
  background: rgba(255, 122, 69, 0.09);
  border: 1px solid rgba(255, 122, 69, 0.18);
  padding: 4px 11px;
  border-radius: 99px;
}

/* card visuals */
.mini-browser {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
  background: var(--bg-2);
}
.mb-bar {
  display: flex; align-items: center; gap: 5px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.mb-bar span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.14); }
.mb-bar i {
  font-family: var(--font-mono); font-style: normal;
  font-size: 10.5px; color: var(--text-mute);
  background: var(--surface); border-radius: 6px;
  padding: 2px 10px; margin-left: 8px;
}
.mb-body { padding: 14px; }
.sk { border-radius: 6px; background: linear-gradient(100deg, rgba(255,255,255,0.05) 40%, rgba(255,255,255,0.11) 50%, rgba(255,255,255,0.05) 60%); background-size: 200% 100%; animation: shimmer 2.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-nav { height: 10px; width: 45%; margin-bottom: 12px; }
.sk-hero { height: 54px; margin-bottom: 12px; background: linear-gradient(100deg, rgba(255,122,69,0.16) 40%, rgba(139,124,247,0.2) 50%, rgba(255,122,69,0.16) 60%); background-size: 200% 100%; animation: shimmer 2.4s linear infinite; }
.sk-row { display: flex; gap: 10px; }
.sk-card { height: 38px; flex: 1; }

.diff {
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-2);
}
.d-line { padding: 5px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-line.del { color: var(--red); background: rgba(255, 107, 107, 0.08); }
.d-line.add { color: var(--green); background: rgba(126, 231, 135, 0.07); }

.code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-dim);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.code-sm { font-size: 12px; }
.c-k { color: var(--violet); }
.c-s { color: var(--coral-soft); }
.c-c { color: var(--text-mute); }

.dbviz {
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-2);
}
.db-row { display: flex; gap: 12px; padding: 6px 12px; border-bottom: 1px solid rgba(255,255,255,0.045); }
.db-row:last-child { border-bottom: 0; }
.db-key { color: var(--violet); width: 46px; }
.db-row span:nth-child(2) { color: var(--text-dim); flex: 1; }
.db-ok { color: var(--green); }

.cronviz {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 13px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; margin-bottom: 20px;
  background: var(--bg-2);
}
.cron-time { color: var(--yellow); }
.cron-arrow { color: var(--text-mute); }
.cron-job { color: var(--green); }

.memviz {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 20px;
  background: var(--bg-2);
}
.mem-file { font-family: var(--font-mono); font-size: 11.5px; color: var(--coral-soft); margin-bottom: 2px; }
.mem-line { height: 7px; border-radius: 4px; background: rgba(255,255,255,0.08); }

.swatches { display: flex; gap: 10px; margin-bottom: 20px; }
.swatches span {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--sw);
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform 0.25s;
}
.card:hover .swatches span { transform: translateY(-3px); }
.card:hover .swatches span:nth-child(2) { transition-delay: 0.04s; }
.card:hover .swatches span:nth-child(3) { transition-delay: 0.08s; }
.card:hover .swatches span:nth-child(4) { transition-delay: 0.12s; }
.card:hover .swatches span:nth-child(5) { transition-delay: 0.16s; }

/* ============ theater ============ */
.theater { max-width: 900px; margin: 0 auto; }
.theater-tabs { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 20px;
  cursor: pointer;
  transition: all 0.25s;
}
.tab:hover { color: var(--text); border-color: var(--border-hi); }
.tab.is-active {
  color: #1a0d06;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(255, 122, 69, 0.25);
}

/* ============ projects ============ */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.proj {
  position: relative;
  display: flex;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s;
}
.proj:hover { transform: translateY(-4px); border-color: var(--border-hi); }

.proj-art {
  flex: 0 0 92px;
  height: 92px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 34px;
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.1);
}
.art-trade { background: linear-gradient(135deg, #1e40b8, #00c896); }
.art-ske   { background: linear-gradient(135deg, #3a2d5c, #8b7cf7); }
.art-lone  { background: linear-gradient(135deg, #7a3010, #ff8c28); }
.art-lab   { background: linear-gradient(135deg, #0e3b3a, #5eead4); }

.proj-body h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.proj-body p { font-size: 14.5px; color: var(--text-dim); }

/* ============ process ============ */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: transform 0.3s, border-color 0.3s;
}
.step:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.step-n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--coral);
  display: block;
  margin-bottom: 14px;
}
.step h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 13.5px; color: var(--text-dim); }

/* staggered reveal for steps */
.step:nth-child(2) { transition-delay: 0.06s; }
.step:nth-child(3) { transition-delay: 0.12s; }
.step:nth-child(4) { transition-delay: 0.18s; }
.step:nth-child(5) { transition-delay: 0.24s; }

/* ============ closing ============ */
.closing {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(100px, 12vw, 170px) clamp(20px, 4vw, 48px);
}
.closing-spark {
  font-size: 44px;
  color: var(--coral);
  margin-bottom: 24px;
  animation: spark-spin 14s linear infinite;
  display: inline-block;
}
.closing h2 { margin-bottom: 20px; }
.closing .lede { margin: 0 auto 36px; }

/* ============ footer ============ */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px clamp(20px, 4vw, 48px) 40px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mute);
}

/* ============ responsive ============ */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card-lg { grid-column: span 2; grid-row: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(5) { grid-column: span 2; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: calc(var(--nav-h) + 36px); min-height: 0; }
  .nav-links { display: none; }
  .projects { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .card-lg, .card-wide { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
  .step:nth-child(5) { grid-column: span 1; }
  .proj { flex-direction: column; }
  .hero-facts { gap: 22px; }
  .fact span { font-size: 26px; }
  .term-body { font-size: 12.5px; min-height: 260px; }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .marquee-track, .logo-spark, .closing-spark, .sk, .sk-hero, .pulse-dot { animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .card, .proj, .step, .btn { transition: none; }
}
