@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ============================
   RESET & VARIABLES
   ============================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --red: #d93324;
  --red-dark: #b22a1d;
  --red-light: #e85d52;
  --red-glow: rgba(217, 51, 36, 0.12);

  --bg-deep: #06060a;
  --bg-primary: #0a0a0f;
  --bg-secondary: #0e0e14;
  --bg-elevated: #16161f;
  --bg-card: #111118;

  --text-primary: #f0ece6;
  --text-secondary: #9d9dae;
  --text-muted: #5c5c6e;
  --text-dim: #3a3a4a;

  --border: #1e1e2c;
  --border-light: #2a2a3a;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --nav-h: 72px;
  --max-w: 1120px;
  --section-pad: clamp(5rem, 8vw, 7rem);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

::selection {
  background: var(--red);
  color: white;
}


/* ============================
   CANVAS & OVERLAYS
   ============================ */

.hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}


/* ============================
   NAVIGATION
   ============================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-hex {
  width: 36px;
  height: 36px;
  background: var(--red);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-logo:hover .nav-hex {
  transform: rotate(30deg) scale(1.05);
}

.nav-hex span {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  letter-spacing: 0.02em;
}

.nav-wordmark {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color 0.25s;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link-cta {
  color: var(--red);
  border: 1px solid var(--red);
  padding: 0.4rem 0.9rem;
  transition: background 0.25s, color 0.25s;
}

.nav-link-cta:hover {
  background: var(--red);
  color: white;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle.active span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}


/* ============================
   HERO
   ============================ */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) 2rem 4rem;
  text-align: center;
}

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.hero-fade {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content > :nth-child(1) { animation-delay: 0.15s; }
.hero-content > :nth-child(2) { animation-delay: 0.3s; }
.hero-content > :nth-child(3) { animation-delay: 0.45s; }
.hero-content > :nth-child(4) { animation-delay: 0.6s; }

.hero-content > :first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.hero-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 12px var(--red-glow);
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-title em {
  font-style: italic;
  color: var(--red);
}

.hero-desc {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
}

.btn-primary {
  background: var(--red);
  color: white;
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--red-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero-scroll span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}


/* ============================
   METRICS STRIP
   ============================ */

.metrics {
  position: relative;
  z-index: 1;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.metrics-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric {
  text-align: center;
  flex: 1;
}

.metric-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--red);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.45;
}

.metric-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  flex-shrink: 0;
}


/* ============================
   SECTIONS (shared)
   ============================ */

.section {
  position: relative;
  z-index: 1;
  padding: var(--section-pad) 0;
  background: var(--bg-primary);
}

.section-alt {
  background: var(--bg-secondary);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.section-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 300;
}


/* ============================
   SERVICES
   ============================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.svc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  padding: 2rem;
  transition: border-color 0.35s, transform 0.35s, box-shadow 0.35s;
}

.svc-card:hover {
  border-left-color: var(--red);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.svc-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 1rem;
  color: var(--red);
}

.svc-icon svg {
  width: 100%;
  height: 100%;
}

.svc-card h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.svc-card p {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.65;
}


/* ============================
   PROJECTS
   ============================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.proj-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.35s, box-shadow 0.35s;
}

.proj-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.proj-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-dot.live {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-dot.active {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.proj-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.proj-card > p {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  flex: 1;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.proj-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.proj-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.25s;
}

.proj-link svg {
  width: 14px;
  height: 14px;
}

.proj-link:hover {
  gap: 0.6rem;
}


/* ============================
   TECH STACK
   ============================ */

.stack-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.stack-cat h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-pills span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: border-color 0.25s, color 0.25s;
}

.stack-pills span:hover {
  border-color: var(--red);
  color: var(--text-primary);
}


/* ============================
   CONTACT
   ============================ */

.contact-center {
  text-align: center;
}

.contact-center .section-header {
  text-align: center;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.contact-pill {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--border);
  background: rgba(20, 20, 30, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  cursor: pointer;
}

.contact-pill svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.contact-pill:hover {
  border-color: var(--red);
  color: var(--text-primary);
  background: rgba(217, 51, 36, 0.06);
}

.contact-pill-cta {
  border-color: var(--red);
  color: var(--red);
}

.contact-pill-cta:hover {
  background: var(--red);
  color: white;
}

.contact-location {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.contact-coords {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.contact-place {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* ============================
   FOOTER
   ============================ */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.footer-sep {
  color: var(--border-light);
}


/* ============================
   CHAT WIDGET
   ============================ */

.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
}

.chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(217, 51, 36, 0.4);
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  z-index: 2;
}

.chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(217, 51, 36, 0.5);
}

.chat-toggle svg {
  width: 24px;
  height: 24px;
  color: white;
  transition: opacity 0.2s, transform 0.2s;
}

.chat-toggle-close {
  position: absolute;
  opacity: 0;
  transform: rotate(-90deg);
}

.chat-widget.open .chat-toggle-icon {
  opacity: 0;
  transform: rotate(90deg);
}

.chat-widget.open .chat-toggle-close {
  opacity: 1;
  transform: rotate(0deg);
}

.chat-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
}

.chat-widget.open .chat-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-header {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.chat-header-text::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.chat-minimize {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.2s;
  line-height: 1;
}

.chat-minimize:hover {
  color: var(--text-primary);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 300px;
  max-height: 380px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.chat-msg {
  display: flex;
  max-width: 85%;
}

.chat-msg-bot { align-self: flex-start; }
.chat-msg-user { align-self: flex-end; }

.chat-msg-bubble {
  font-size: 0.875rem;
  line-height: 1.55;
  padding: 0.65rem 0.9rem;
  word-break: break-word;
}

.chat-msg-bot .chat-msg-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.chat-msg-user .chat-msg-bubble {
  background: var(--red);
  color: white;
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.65rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  align-self: flex-start;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingDot 1.4s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

.chat-input-form {
  display: flex;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-send {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.chat-send:hover {
  color: var(--red);
}

.chat-send svg {
  width: 18px;
  height: 18px;
}


/* ============================
   SCROLL ANIMATIONS
   ============================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.services-grid .reveal:nth-child(2) { transition-delay: 0.07s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.14s; }
.services-grid .reveal:nth-child(4) { transition-delay: 0.21s; }
.services-grid .reveal:nth-child(5) { transition-delay: 0.28s; }

.projects-grid .reveal:nth-child(2) { transition-delay: 0.07s; }
.projects-grid .reveal:nth-child(3) { transition-delay: 0.14s; }
.projects-grid .reveal:nth-child(4) { transition-delay: 0.21s; }

.stack-categories .reveal:nth-child(2) { transition-delay: 0.07s; }
.stack-categories .reveal:nth-child(3) { transition-delay: 0.14s; }
.stack-categories .reveal:nth-child(4) { transition-delay: 0.21s; }

.metrics-inner .reveal:nth-child(1) { transition-delay: 0s; }
.metrics-inner .reveal:nth-child(3) { transition-delay: 0.1s; }
.metrics-inner .reveal:nth-child(5) { transition-delay: 0.2s; }
.metrics-inner .reveal:nth-child(7) { transition-delay: 0.3s; }


/* ============================
   KEYFRAMES
   ============================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--red-glow); }
  50% { opacity: 0.4; box-shadow: 0 0 4px transparent; }
}

@keyframes scrollLine {
  0% {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}


/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.mobile-open .nav-link {
    font-size: 0.95rem;
  }

  .nav-links.mobile-open .nav-link-cta {
    text-align: center;
    padding: 0.65rem 1.2rem;
  }

  .hero {
    padding: calc(var(--nav-h) + 1rem) 1.5rem 3rem;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .hero-scroll {
    display: none;
  }

  .metrics-inner {
    flex-wrap: wrap;
    gap: 2rem 1rem;
    justify-content: center;
  }

  .metric {
    min-width: 120px;
    flex: 0 0 40%;
  }

  .metric-divider {
    display: none;
  }

  .services-grid,
  .projects-grid,
  .stack-categories {
    grid-template-columns: 1fr;
  }

  .section-inner {
    padding: 0 1.5rem;
  }

  .contact-actions {
    flex-direction: column;
    align-items: center;
  }

  .chat-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 100%;
    border: none;
  }

  .chat-messages {
    min-height: 0;
    max-height: none;
    flex: 1;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .nav-wordmark {
    display: none;
  }
}
