:root {
  color-scheme: dark;
  --bg: #050811;
  --bg-elevated: #0b1120;
  --bg-card: rgba(13, 20, 36, 0.72);
  --bg-card-hover: rgba(18, 28, 50, 0.88);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(82, 168, 226, 0.42);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --brand: #489bd4;
  --brand-bright: #67b8f0;
  --brand-deep: #1d3b78;
  --success: #22c55e;
  --danger: #ef4444;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-w: 1180px;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Subtle futuristic ambient grid + aurora */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(60% 45% at 50% -10%, rgba(72, 155, 212, 0.22) 0%, rgba(29, 59, 120, 0.10) 45%, transparent 75%),
    radial-gradient(35% 35% at 88% 22%, rgba(29, 59, 120, 0.16) 0%, transparent 70%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 10%, #000 30%, transparent 90%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ================= HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 8, 17, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 10px rgba(72, 155, 212, 0.25));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.mobile-nav-cta {
  display: none;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 12px;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  font-family: var(--font-body);
  touch-action: manipulation;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #ffffff;
  border-color: rgba(103, 184, 240, 0.35);
  box-shadow: 0 8px 24px -6px rgba(72, 155, 212, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -6px rgba(72, 155, 212, 0.65);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(148, 163, 184, 0.32);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.96rem;
}

/* ================= HERO ================= */
.hero {
  padding: 104px 0 72px;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(72, 155, 212, 0.1);
  border: 1px solid rgba(72, 155, 212, 0.28);
  color: var(--brand-bright);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 28px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  max-width: 820px;
  margin: 0 auto 22px;
  text-wrap: balance;
  background: linear-gradient(180deg, #ffffff 30%, #94b8db 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 38px;
  text-wrap: balance;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ================= CAPABILITIES STRIP ================= */
.capabilities {
  padding: 20px 0 72px;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cap-card {
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.cap-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.cap-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-bright);
  margin-bottom: 10px;
}

.cap-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.cap-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

/* ================= SECTIONS ================= */
.section {
  padding: 72px 0;
  scroll-margin-top: 84px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-bright);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.15;
}

/* ================= FILTER PILLS ================= */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  font-family: var(--font-body);
}

.filter-pill:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.35);
}

.filter-pill.active {
  background: rgba(72, 155, 212, 0.16);
  border-color: var(--brand);
  color: #ffffff;
}

/* ================= PORTFOLIO GRID ================= */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.work-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0d172a 0%, #132548 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.work-card:hover .work-thumb img {
  transform: scale(1.03);
}

.work-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(103, 184, 240, 0.45);
  letter-spacing: -0.03em;
}

.work-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(72, 155, 212, 0.14);
  color: var(--brand-bright);
  border: 1px solid rgba(72, 155, 212, 0.25);
}

.work-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.work-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
}

.work-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
}

.work-link {
  color: var(--brand-bright);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.work-link:hover {
  color: #ffffff;
}

.empty-state {
  padding: 56px 24px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.empty-state h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.empty-state p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.92rem;
}

/* ================= BLOG GRID ================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.post-cover {
  aspect-ratio: 16 / 9;
  background: #0d172a;
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-subtle);
  margin-bottom: 8px;
}

.post-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
}

.post-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= LEAD CAPTURE SECTION ================= */
.lead-panel {
  background: linear-gradient(145deg, rgba(13, 22, 42, 0.9) 0%, rgba(7, 12, 24, 0.95) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  position: relative;
  overflow: hidden;
}

.lead-panel::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72, 155, 212, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.lead-info h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  line-height: 1.12;
}

.lead-info p {
  color: var(--text-muted);
  margin: 0 0 28px;
  font-size: 0.98rem;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.contact-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-meta-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
}

.contact-meta-value {
  font-size: 0.95rem;
  color: var(--text);
}

/* Form Elements */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.input, .textarea {
  width: 100%;
  background: rgba(5, 8, 17, 0.78);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(72, 155, 212, 0.16);
}

.textarea {
  resize: vertical;
  min-height: 108px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-option span {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.16s ease;
}

.chip-option input:checked + span {
  background: rgba(72, 155, 212, 0.18);
  border-color: var(--brand);
  color: #ffffff;
}

.chip-option input:focus-visible + span {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
}

.form-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: none;
}

.form-alert.show { display: block; }
.form-alert.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}
.form-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

/* ================= DETAIL PAGES ================= */
.detail-header {
  padding: 56px 0 32px;
  max-width: 820px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.back-link:hover { color: var(--brand-bright); }

.detail-hero-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 36px;
  background: #0b1120;
}

.detail-hero-img img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
}

.prose {
  max-width: 740px;
  font-size: 1.02rem;
  color: #cbd5e1;
  line-height: 1.75;
}

.prose h2, .prose h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 30px 0 12px;
}

.prose p { margin: 0 0 18px; }
.prose ul { margin: 0 0 18px; padding-left: 20px; }
.prose li { margin-bottom: 8px; }

/* ================= FOOTER ================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 48px;
  background: linear-gradient(180deg, rgba(11, 17, 32, 0.35) 0%, rgba(5, 8, 17, 0.9) 100%);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-tagline {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-subtle);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-nav a {
  transition: color 0.18s ease;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.social-icon-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
  border-color: var(--brand);
  background: rgba(72, 155, 212, 0.16);
  box-shadow: 0 8px 20px -6px rgba(72, 155, 212, 0.55);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.footer-admin-link {
  font-size: 0.8rem;
  color: var(--text-subtle);
  transition: color 0.18s ease;
}

.footer-admin-link:hover {
  color: var(--text-muted);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 960px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .lead-panel { grid-template-columns: 1fr; padding: 32px; gap: 32px; }
}

@media (max-width: 680px) {
  .container {
    padding: 0 18px;
  }
  .site-header {
    padding-top: env(safe-area-inset-top);
  }
  .nav-inner {
    height: 64px;
    gap: 12px;
  }
  .brand-link {
    font-size: 1rem;
    gap: 9px;
  }
  .brand-logo {
    height: 30px;
  }
  .nav-actions {
    display: flex;
  }
  .mobile-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5, 8, 17, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 18px 18px 22px;
    gap: 6px;
    align-items: stretch;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 0.98rem;
  }
  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.04);
  }
  .mobile-nav-cta {
    display: inline-flex;
    margin-top: 8px;
    width: 100%;
    padding: 13px 20px !important;
    text-align: center;
  }

  .hero {
    padding: 52px 0 40px;
  }
  .status-pill {
    margin-bottom: 20px;
    font-size: 0.78rem;
  }
  .hero-title {
    font-size: clamp(2.15rem, 9.5vw, 2.9rem);
    margin-bottom: 16px;
  }
  .hero-sub {
    font-size: 0.98rem;
    margin-bottom: 28px;
  }
  .hero-cta {
    gap: 10px;
  }
  .hero-cta .btn-lg {
    padding: 13px 22px;
    font-size: 0.92rem;
    min-height: 46px;
  }

  .capabilities {
    padding: 8px 0 48px;
  }
  .section {
    padding: 52px 0;
  }
  .section-head {
    margin-bottom: 24px;
    gap: 16px;
  }

  /* Horizontal swipeable filter bar on mobile */
  .filter-bar {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .filter-bar::-webkit-scrollbar {
    display: none;
  }
  .filter-pill {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 15px;
  }

  .cap-grid, .work-grid, .blog-grid, .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cap-card {
    padding: 18px 20px;
  }
  .work-body {
    padding: 18px;
  }

  .lead-panel {
    padding: 24px 20px;
    border-radius: 20px;
    gap: 24px;
  }
  .input, .textarea {
    font-size: 16px; /* Prevents iOS Safari auto-zoom on focus */
    padding: 12px 14px;
  }
  .chip-option span {
    padding: 8px 13px;
    font-size: 0.84rem;
  }

  .detail-header {
    padding: 36px 0 24px;
  }
  .detail-hero-img {
    border-radius: 16px;
    margin-bottom: 24px;
  }

  .site-footer {
    padding: 36px 0 calc(28px + env(safe-area-inset-bottom));
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .footer-nav {
    gap: 14px 20px;
  }
}

@media (max-width: 400px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  .hero-cta .btn {
    width: 100%;
  }
}

/* ================= PREMIUM ANIMATIONS & GLASS SWIPE ================= */
@keyframes pulseRing {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.55), 0 0 10px #38bdf8;
  }
  60% {
    box-shadow: 0 0 0 7px rgba(56, 189, 248, 0), 0 0 14px #67b8f0;
  }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes subtleBtnSheen {
  0%, 72% {
    transform: translateX(-160%) skewX(-24deg);
  }
  100% {
    transform: translateX(260%) skewX(-24deg);
  }
}

.site-header {
  transition: background-color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.site-header.scrolled {
  background: rgba(5, 8, 17, 0.88);
  border-bottom-color: rgba(103, 184, 240, 0.22);
  box-shadow: 0 14px 36px -12px rgba(0, 0, 0, 0.7);
}

.status-dot {
  animation: pulseRing 2.6s ease-in-out infinite;
}

/* Hero Staggered Entrance */
.hero .status-pill {
  animation: heroFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero .hero-title {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
.hero .hero-sub {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}
.hero .hero-cta {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}

/* Glass Swipe Effect on Buttons */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn::before {
  content: "";
  position: absolute;
  inset: -4px auto -4px 0;
  width: 48%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 100%
  );
  transform: translateX(-160%) skewX(-24deg);
  pointer-events: none;
  z-index: 1;
}

.btn-primary::before {
  animation: subtleBtnSheen 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.btn:hover::before {
  animation: none;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(260%) skewX(-24deg);
}

.btn:active {
  transform: scale(0.98);
}

/* Glass Swipe + Specular Cursor Spotlight on Cards & Lead Panel */
.cap-card,
.work-card,
.post-card,
.lead-panel {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 32px -16px rgba(0, 0, 0, 0.65);
}

/* Diagonal Glass Swipe Sheen across cards on hover */
.cap-card::after,
.work-card::after,
.post-card::after,
.lead-panel::after {
  content: "";
  position: absolute;
  top: -15%;
  left: -95%;
  width: 58%;
  height: 130%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 36%,
    rgba(103, 184, 240, 0.14) 50%,
    rgba(255, 255, 255, 0.04) 64%,
    transparent 100%
  );
  transform: skewX(-22deg) translateX(0);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.cap-card:hover::after,
.work-card:hover::after,
.post-card:hover::after,
.lead-panel:hover::after {
  opacity: 1;
  transform: skewX(-22deg) translateX(360%);
}

/* Interactive Pointer Spotlight Glow */
.cap-card::before,
.work-card::before,
.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(103, 184, 240, 0.13),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.cap-card:hover::before,
.work-card:hover::before,
.post-card:hover::before {
  opacity: 1;
}

.work-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(103, 184, 240, 0.22),
    0 24px 48px -18px rgba(5, 12, 28, 0.9),
    0 0 28px -10px rgba(72, 155, 212, 0.25);
}

.work-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 8, 17, 0.65) 100%);
  pointer-events: none;
}

/* Scroll Reveal Choreography */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Smooth Portfolio Filter Transitions */
.work-card.is-filtering-out {
  opacity: 0;
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
