:root {
  --bg: #050505;
  --bg2: #0d0d0d;
  --bg3: #101010;
  --accent: #4A8CF7;
  --white: #F2F2F2;
  --gray: #A0A0A0;
  --gray-dim: #3a3a3a;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-display);
  overflow-x: hidden;
}

/* ── Grid Background ── */
#grid-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* opacity controlled entirely by JS via tweaks.gridOpacity */
}

/* ── App container ── */
#app {
  position: relative;
  z-index: 1;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, backdrop-filter 0.3s;
}
nav.scrolled {
  background: var(--bg);
  border-bottom-color: var(--gray-dim);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gray);
  z-index: 101;
  position: relative;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gray);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--accent); }

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
  position: relative;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--gray);
  transition: transform 0.3s cubic-bezier(0.23,1,0.32,1), opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--white); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--white); }

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 120px 48px 80px;
  gap: 40px;
  position: relative;
}
.hero-left { position: relative; }
.hero-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(160, 160, 160, 0.55);
  text-transform: lowercase;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-tag::before {
  content: '';
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.6);
  animation: availPulse 1.8s cubic-bezier(0.66, 0, 0, 1) infinite;
}
.hero-tag.unavailable::before {
  background: var(--gray);
  box-shadow: none;
  animation: none;
}
@keyframes availPulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 255, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}
.hero-name {
  font-size: clamp(52px, 7vw, 100px);
  font-weight: 700;
  line-height: 0.93;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 24px;
}
.hero-name em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1px var(--gray-dim);
}
.hero-role {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--gray);
  margin-bottom: 12px;
  line-height: 1.3;
}
.hero-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 48px;
  padding-left: 16px;
  border-left: 1px solid var(--gray-dim);
}
.hero-sub span { color: var(--accent); }

/* ── Buttons — unified angular language ── */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid var(--accent);
  background: transparent;
  padding: 10px 24px;
  border-radius: 100px;
  text-decoration: none;
  position: relative;
  transition: background 0.25s ease, color 0.25s ease, transform 0.3s cubic-bezier(0.23,1,0.32,1);
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 50%, transparent), 0 0 36px color-mix(in srgb, var(--accent) 20%, transparent);
}
.btn-outline span { position: relative; z-index: 1; }

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
}
.hero-stat { text-align: right; }
.hero-stat-num {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
}
.hero-stat-num span { color: var(--accent); }
.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.hero-divider {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--gray-dim), transparent);
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray);
}
.scroll-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.scroll-arrows svg {
  width: 14px; height: 8px;
  color: var(--accent);
  animation: scroll-arrow 1.6s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.scroll-arrows svg:nth-child(2) { animation-delay: 0.2s; opacity: 0.55; }
.scroll-arrows svg:nth-child(3) { animation-delay: 0.4s; opacity: 0.25; }
@keyframes scroll-arrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ── Pitch ── */
#pitch {
  padding: 100px 48px;
  border-top: 1px solid var(--gray-dim);
}
.pitch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.pitch-body { /* left column */ }
.pitch-grid .terminal-window {
  margin-top: 0;
  height: 380px;
  display: flex;
  flex-direction: column;
}
.pitch-terminal-body {
  flex: 1;
  overflow: hidden;
}
.pt-code {
  margin-bottom: 16px;
}
.pt-output {
  border-top: 1px solid #252525;
  padding-top: 12px;
}
.pt-line {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  white-space: pre;
}
.pt-cursor {
  color: var(--accent);
  font-weight: 300;
}
.pitch-quote {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--white);
  letter-spacing: -0.025em;
  margin: 0 0 44px;
}
.pitch-quote strong { color: var(--accent); font-weight: 400; }
.pitch-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  color: var(--gray);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.25s;
  cursor: pointer;
  width: fit-content;
  margin: 0 auto;
}
.pitch-cta:hover { color: var(--accent); }
.pitch-cta svg { width: 13px; height: 13px; opacity: 0.6; transition: opacity 0.25s, transform 0.25s; }
.pitch-cta:hover svg { opacity: 1; transform: translateY(3px); }

/* ── Section headers ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 56px;
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.section-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray-dim);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

/* ── Projects ── */
#projects { padding: 100px 48px; border-top: 1px solid var(--gray-dim); }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 320px;
  gap: 12px;
}

/* Alternating 2-col featured / 1-col cards */
.proj-0 { grid-column: span 2; }
.proj-1 { grid-column: span 1; }
.proj-2 { grid-column: span 3; }

.project-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gray-dim);
  background: var(--bg2);
  transition: border-color 0.3s;
  cursor: pointer;
}
.project-card:hover { border-color: var(--accent); }

.card-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), filter 0.4s;
}
.project-card:hover .card-bg {
  transform: scale(1.06);
  filter: blur(2px) brightness(0.35);
}

.card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(to top, oklch(5% 0 0 / 0.92) 0%, transparent 55%);
  transition: background 0.4s;
  z-index: 2;
}
.project-card:hover .card-content {
  background: linear-gradient(to top, oklch(5% 0 0 / 0.95) 0%, oklch(5% 0 0 / 0.1) 100%);
}

.card-reveal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 80px; /* clears the persistent card-content title */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s, transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 3;
}
.project-card:hover .card-reveal {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.card-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.card-inline-link {
  display: none;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}
.card-inline-link:hover { color: var(--white); }

.card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.card-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.card-visit-btn {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: none;
  padding: 8px 16px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}
.card-visit-btn:hover { background: var(--white); color: var(--bg); }

/* ── Skills ── */
#skills {
  padding: 100px 48px;
  border-top: 1px solid var(--gray-dim);
}

/* Terminal window */
.terminal-window {
  margin-top: 40px;
  max-width: 640px;
  border: 1px solid #252525;
  background: #0b0b0b;
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: #141414;
  border-bottom: 1px solid #252525;
  user-select: none;
}
.terminal-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red    { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green  { background: #28C840; }
.terminal-wintitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #555;
  letter-spacing: 0.04em;
}
.terminal-body {
  padding: 22px 24px 28px;
  font-family: var(--font-mono);
}
.terminal-prompt {
  margin-bottom: 16px;
  font-size: 13px;
}
.terminal-ps  { color: #28C840; }
.terminal-cmd { color: #555; }

/* Tree inside terminal */
.stack-tree { font-family: var(--font-mono); }
.tree-branch { margin-bottom: 2px; }
.tree-row {
  display: flex;
  align-items: center;
  line-height: 1.9;
}
.tree-conn {
  color: #3a3a3a;
  font-size: 13px;
  margin-right: 8px;
  user-select: none;
  flex-shrink: 0;
}
.tree-pipe {
  color: #3a3a3a;
  font-size: 13px;
  user-select: none;
  flex-shrink: 0;
}
.tree-dir {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.tree-file {
  font-size: 13px;
  color: #606060;
  cursor: default;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.tree-file.featured { color: var(--white); }
.tree-file:hover { color: var(--accent); }

/* ── Process / Timeline ── */
#process {
  padding: 100px 48px;
  border-top: 1px solid var(--gray-dim);
}
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 48px;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0; right: 0;
  height: 1px;
  background: var(--gray-dim);
  z-index: 0;
}
.timeline::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  height: 1px;
  width: 0;
  background: var(--accent);
  z-index: 1;
  transition: width 2s cubic-bezier(0.23, 1, 0.32, 1);
  transition-delay: 0.3s;
}
.timeline.visible::after {
  width: 100%;
}
.timeline-step {
  position: relative;
  padding-top: 44px;
  padding-right: 20px;
  z-index: 2;
}
.timeline-step::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  width: 1px;
  height: 18px;
  background: var(--gray-dim);
  transition: background 0.3s;
}
.timeline-step:hover::before { background: var(--accent); }
.timeline-num {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.timeline-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  transition: color 0.2s;
}
.timeline-step:hover .timeline-label { color: var(--accent); }
.timeline-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  line-height: 1.65;
}

/* ── Funnel ── */
#funnel {
  padding: 100px 48px;
  border-top: 1px solid var(--gray-dim);
}
.funnel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.funnel-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.funnel-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.funnel-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.funnel-btns {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* ── Contact Form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
}
.form-input,
.form-textarea {
  background: var(--bg2);
  border: 1px solid var(--gray-dim);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 10px 14px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.form-input:focus,
.form-textarea:focus { border-color: var(--accent); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--gray-dim); }
.form-textarea { min-height: 110px; resize: vertical; }
.form-submit {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: none;
  padding: 12px 24px;
  border-radius: 100px;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.2s;
}
.form-submit:hover:not(:disabled) { opacity: 0.82; }
.form-submit:disabled { opacity: 0.45; cursor: not-allowed; }
.form-status {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  padding: 10px 14px;
  border: 1px solid;
}
.form-status.success { color: #4ade80; border-color: rgba(74,222,128,0.25); background: rgba(74,222,128,0.05); }
.form-status.error   { color: #f87171; border-color: rgba(248,113,113,0.25); background: rgba(248,113,113,0.05); }

/* ── Response badge ── */
.response-badge {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-dim);
  display: flex;
  align-items: center;
  gap: 16px;
}
.response-time {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
}
.response-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray);
  letter-spacing: 0.1em;
  line-height: 1.7;
  text-transform: uppercase;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(22, 90, 50, 0.35);
  border: 1px solid #2D8F58;
  padding: 16px 32px;
  border-radius: 100px;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(22, 90, 50, 0.25);
  transition: box-shadow 0.3s, background 0.3s;
}
.btn-primary:hover {
  background: rgba(22, 90, 50, 0.55);
  box-shadow: 0 0 44px rgba(22, 90, 50, 0.45);
}
.btn-secondary {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  background: none;
  border: 1px solid var(--gray-dim);
  padding: 14px 28px;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  transition: color 0.2s, border-color 0.2s;
}
.btn-secondary:hover { color: var(--white); border-color: var(--gray); }
.btn-tertiary {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray-dim);
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.2s;
}
.btn-tertiary:hover { color: var(--gray); }

/* ── Footer ── */
footer {
  padding: 32px 48px;
  border-top: 1px solid var(--gray-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray-dim);
  letter-spacing: 0.08em;
}
.footer-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray-dim);
  letter-spacing: 0.06em;
}
.footer-cta a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s;
  border-bottom: 1px solid var(--gray-dim);
}
.footer-cta a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer-socials {
  display: flex;
  gap: 20px;
  align-items: center;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--gray-dim);
  color: var(--gray);
  text-decoration: none;
  transition: border-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px oklch(30% 0.35 270 / 0.3);
}
.social-link svg { width: 16px; height: 16px; fill: currentColor; }

/* ── Scroll-triggered fade ── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1), transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up.d1 { transition-delay: 0.1s; }
.fade-up.d2 { transition-delay: 0.2s; }
.fade-up.d3 { transition-delay: 0.35s; }
.fade-up.d4 { transition-delay: 0.5s; }

/* ── Hero entrance ── */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.hero-anim { animation: heroIn 0.9s cubic-bezier(0.23, 1, 0.32, 1) both; }
.hero-anim.d1 { animation-delay: 0.05s; }
.hero-anim.d2 { animation-delay: 0.18s; }
.hero-anim.d3 { animation-delay: 0.32s; }
.hero-anim.d4 { animation-delay: 0.46s; }

/* ── Glow text hover ── */
.glitch-wrap {
  position: relative;
  display: inline-block;
  transition: text-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1), color 0.4s ease;
}
.glitch-wrap:hover {
  color: var(--accent);
  -webkit-text-stroke: 0;
  text-shadow:
    0 0 8px color-mix(in srgb, var(--accent) 70%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ── Noise overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.025;
}

/* ── Shimmer skeleton ── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(5% 0 0 / 0.9);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  width: min(760px, 90vw);
  background: var(--bg3);
  border: 1px solid var(--gray-dim);
  padding: 48px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: 1px solid var(--gray-dim);
  color: var(--gray);
  width: 32px; height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-close svg { width: 12px; height: 12px; }

.methodology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.method-item {
  border-left: 2px solid var(--accent);
  padding: 16px 20px;
  background: var(--bg2);
}
.method-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.method-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.method-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  line-height: 1.7;
}

/* ── Particle Canvas ── */
.particle-canvas {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--gray-dim);
  display: block;
  cursor: crosshair;
}

/* ── Touch devices: always show card-reveal ── */
@media (hover: none) {
  .card-reveal {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    justify-content: flex-start;
    padding-top: 20px;
    overflow: hidden;
  }
  .project-card .card-bg {
    transform: scale(1.06);
    filter: blur(2px) brightness(0.35);
  }
  /* hide tech chips — already faded but still faintly visible */
  .project-card .card-bg > div {
    opacity: 0;
  }
  .project-card .card-content {
    background: linear-gradient(to top, oklch(5% 0 0 / 0.95) 0%, oklch(5% 0 0 / 0.1) 100%);
  }
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */

@media (max-width: 768px) {
  nav { padding: 16px 24px; }
  .nav-hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: oklch(4% 0 0 / 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.23,1,0.32,1);
    z-index: 99;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: 20px; letter-spacing: 0.15em; }

  #hero {
    grid-template-columns: 1fr;
    padding: 100px 24px 100px;
    gap: 48px;
  }
  .hero-right {
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 24px;
  }
  .hero-stat { text-align: center; }
  .hero-stat-num { font-size: 36px; }
  .hero-divider { width: 1px; height: 40px; }

  #pitch   { padding: 72px 24px; }
  #projects { padding: 72px 24px; }
  #skills  { padding: 72px 24px; }
  #funnel  { padding: 72px 24px; }
  footer   { padding: 28px 24px; flex-wrap: wrap; gap: 16px; justify-content: center; }

  .section-header { flex-direction: column; gap: 8px; margin-bottom: 40px; }
  .section-count  { display: none; }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 300px;
  }
  .proj-0 { grid-column: span 2; }
  .proj-1 { grid-column: span 2; }
  .proj-2 { grid-column: span 2; }

  /* Cards: always show reveal, hide background chips */
  .project-card .card-bg > div { opacity: 0 !important; }
  .project-card .card-bg {
    transform: scale(1.06);
    filter: blur(2px) brightness(0.35);
  }
  .project-card .card-content {
    background: linear-gradient(to top, oklch(5% 0 0 / 0.95) 0%, oklch(5% 0 0 / 0.1) 100%);
  }
  .card-reveal {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    justify-content: flex-start;
    padding-top: 14px;
    gap: 8px;
    overflow: hidden;
    bottom: 68px;
  }
  /* hide metric chips and visit button — link is in card-content instead */
  .card-reveal > div:nth-child(3) { display: none !important; }
  .card-visit-btn { display: none !important; }
  .card-inline-link { display: inline; }

  .pitch-grid { grid-template-columns: 1fr; gap: 40px; }

  .stack-tree { font-size: 12px; }

  #process  { padding: 72px 24px; }
  .timeline {
    grid-template-columns: 1fr 1fr;
    row-gap: 40px;
  }
  .timeline::before, .timeline::after { display: none; }
  .timeline-step { padding-top: 28px; }
  .timeline-step::before { display: none; }

  #funnel { padding: 72px 24px; }
  .funnel-grid { grid-template-columns: 1fr; gap: 48px; }
  .funnel-title { text-align: left; }
  .funnel-sub   { text-align: left; margin-left: 0; margin-right: 0; }

  .funnel-panel { padding: 40px 28px; }
  .methodology-grid { grid-template-columns: 1fr; }

  .pitch-quote { font-size: 20px; }
}

@media (max-width: 480px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
  }
  .proj-0, .proj-1, .proj-2 { grid-column: span 1; }

  .hero-right { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-stat  { text-align: left; }
  .hero-divider { width: 40px; height: 1px; }

  .timeline { grid-template-columns: 1fr; }
  .timeline-step { padding-top: 24px; }

  footer { flex-direction: column; text-align: center; }
}
