/* ===== Base & variables ===== */

:root {
  --color-bg: #030712;
  --color-bg-elevated: #0a1628;
  --color-primary: #0f172a;
  --color-primary-soft: #1e293b;
  --color-accent: #22d3ee;
  --color-accent-secondary: #a855f7;
  --color-accent-tertiary: #f472b6;
  --color-text: #f8fafc;
  --color-muted: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-soft: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px -12px rgba(34, 211, 238, 0.4);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --gradient-primary: linear-gradient(135deg, #22d3ee 0%, #a855f7 50%, #f472b6 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  --noise-opacity: 0.03;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  padding: 0;
  margin: 0;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

main {
  background: #ffffff;
  color: #020617;
}

/* Noise texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  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: var(--noise-opacity);
  pointer-events: none;
  z-index: 1000;
}

/* Selection styling */
::selection {
  background: rgba(34, 211, 238, 0.3);
  color: var(--color-text);
}

/* Smooth focus states */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== Layout helpers ===== */

.container {
  width: min(1200px, 100% - 3rem);
  margin: 0 auto;
}

.section {
  padding: 8rem 0;
  position: relative;
}

/* Contained sections (homepage content blocks) */
.section-contained {
  width: min(1200px, 100% - 3rem);
  margin: 0 auto;
  padding: 4.5rem 3rem;
  border-radius: 0;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: none;
  position: relative;
  overflow: visible;
}

.section-contained::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

.section-contained .container {
  width: 100%;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* Homepage sections: alternating static backgrounds (white / light blue) */
.home-section {
  background: #ffffff;
}

.home-section-2,
.home-section-4,
.home-section-6 {
  background: #e6f3ff;
}

/* Improve contrast for cards and text inside light homepage sections */
.home-section .feature-card,
.home-section .metric-card,
.home-section .process-step,
.home-section .portfolio-card,
.home-section .testimonial-card,
.home-section .portfolio-footer-note {
  background: #ffffff;
  border-color: #e2e8f0;
}

.home-section .feature-card h3,
.home-section .process-step h3,
.home-section .portfolio-body h2,
.home-section .testimonial-name {
  color: #020617;
}

.home-section .feature-card p,
.home-section .process-step p,
.home-section .metric-label,
.home-section .portfolio-meta,
.home-section .portfolio-body p,
.home-section .testimonial-quote,
.home-section .portfolio-footer-note {
  color: #475569;
}

.home-section .btn-ghost {
  background: transparent;
  border-color: #cbd5f5;
  color: #0f172a;
}

.home-section .btn-ghost:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: #94a3b8;
  color: #020617;
}

/* Section backgrounds */
.bg-dark {
  background: var(--color-bg);
}

.bg-elevated {
  background: var(--color-bg-elevated);
}

.bg-gradient {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-elevated) 100%);
}

.section-title {
  font-family: "Press Start 2P", system-ui, monospace;
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 600px;
  margin: 0 0 3rem;
  line-height: 1.7;
}

/* Tighter spacing under intro copy in first home section (Our Expertise) */
.home-section-1 .section-subtitle {
  margin-bottom: 1rem;
}

.section-split .section-inner {
  display: grid;
  gap: 4rem;
}

.section-cta {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: none;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  padding: 5.5rem 3rem;
  margin-bottom: 3rem;
  color: var(--color-text);
}

.section-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 50%);
  animation: pulse-glow 8s ease-in-out infinite;
}

.section-cta p {
	color: #e2f3ff;
}

@keyframes pulse-glow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(10%, 10%) scale(1.1); opacity: 0.8; }
}

/* Animated gradient border effect */
.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-primary);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.gradient-border:hover::before {
  opacity: 1;
}

/* ===== Header & nav ===== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.site-header.scrolled {
  background: rgba(3, 7, 18, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text);
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.02);
}

.logo img {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.3));
  transition: filter var(--transition-fast);
}

.logo:hover img {
  filter: drop-shadow(0 0 30px rgba(34, 211, 238, 0.5));
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  font-family: "Press Start 2P", system-ui, monospace;
  font-size: 0.75rem;
  color: var(--color-bg);
}

.logo-text {
  font-family: "Press Start 2P", system-ui, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.nav-link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  color: var(--color-muted);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-accent);
}

.nav-cta {
  background: var(--gradient-primary);
  color: var(--color-bg);
  font-weight: 600;
}

.nav-cta:hover {
  opacity: 0.9;
  background: var(--gradient-primary);
}

/* ===== Hero ===== */

.hero {
  min-height: auto;
  padding: 8.25rem 0 4.4rem;
  background: var(--color-bg);
  color: var(--color-text);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Animated gradient orbs */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.hero::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.hero::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-accent-secondary) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 30px) scale(1.02); }
}

/* Grid pattern overlay */
.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 70%, transparent 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-copy {
  animation: fadeInUp 0.8s ease-out;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.7;
  margin: 0 0 2rem;
  color: var(--color-muted);
  max-width: 500px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.hero-compact {
  min-height: auto;
  padding: 6.6rem 0 3.6rem;
}

.hero-compact .hero-inner {
  grid-template-columns: 1fr;
}

/* Pixel showcase */
.hero-showcase {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.pixel-frame {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  padding: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.pixel-frame:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-soft), 0 0 80px -12px rgba(34, 211, 238, 0.5);
}

.pixel-frame img,
.pixel-frame video.hero-media {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

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

.pixel {
  width: 100%;
  padding-top: 100%;
  position: relative;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.2);
}

.pixel::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.5), transparent 60%);
  opacity: 0.7;
}

.pixel-2,
.pixel-3,
.pixel-5,
.pixel-6,
.pixel-7 {
  background: var(--color-primary-soft);
}

.pixel-4,
.pixel-8 {
  background: var(--color-bg);
}

.pixel-label {
  margin-top: 0.8rem;
  font-family: "Press Start 2P", system-ui, monospace;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-muted);
}

.hero-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-note::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--color-border);
}

/* ===== Buttons, chips, links ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--color-text);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 20px rgba(34, 211, 238, 0.3);
}

.btn-primary::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 8px 30px rgba(34, 211, 238, 0.4);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* Icon in button */
.btn-icon {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-icon {
  transform: translateX(3px);
}

.btn[disabled],
.btn.btn-loading {
  cursor: default;
  opacity: 0.8;
  pointer-events: none;
}

.btn-label {
  display: inline-flex;
  align-items: center;
}

.btn-spinner {
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(248, 250, 252, 0.4);
  border-top-color: rgba(248, 250, 252, 1);
  margin-left: 0.5rem;
  animation: btn-spin 0.7s linear infinite;
  opacity: 0;
}

.btn-loading .btn-icon {
  display: none;
}

.btn-loading .btn-spinner {
  opacity: 1;
}

@keyframes btn-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  transition: all var(--transition-fast);
}

.chip:hover {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.3);
}

.link-inline {
  color: var(--color-accent);
  text-decoration: none;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent)) no-repeat right bottom / 0 1px;
  padding-bottom: 2px;
  transition: background-size var(--transition-fast);
}

.link-inline:hover {
  background-size: 100% 1px;
  background-position: left bottom;
}

/* ===== Homepage extras: metrics, process, tech stack ===== */

.kicker {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.metric-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  text-align: center;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-subtle);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.metric-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateY(-4px);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-number {
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.metric-label {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-muted);
  position: relative;
  z-index: 1;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.process-step {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--transition-smooth);
  position: relative;
}

.process-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2rem;
  right: 2rem;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.process-step:hover {
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateY(-4px);
}

.process-step:hover::before {
  opacity: 1;
}

.process-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  color: var(--color-bg);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.process-step h3 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.process-step p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.tech-pill {
  padding: 0.5rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8125rem;
  color: var(--color-muted);
  transition: all var(--transition-fast);
}

.tech-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ===== Features & cards ===== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-smooth);
}

.feature-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.04);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--gradient-subtle);
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

/* Media block for expertise images */
.feature-card-media {
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.feature-card-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.feature-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.6;
}

/* ===== Portfolio grid ===== */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.portfolio-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all var(--transition-smooth);
  position: relative;
}

.portfolio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-subtle);
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 0;
}

.portfolio-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5), var(--shadow-glow);
}

.portfolio-card:hover::before {
  opacity: 1;
}

.portfolio-card-large {
  grid-column: 1 / -1;
}

.portfolio-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.placeholder-thumb {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-bg-elevated) 100%);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-thumb.wide {
  min-height: 240px;
}

.placeholder-thumb .label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-family: "Press Start 2P", system-ui, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  background: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
}

.scanline,
.crt-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scanline {
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
}

.crt-glow {
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.1) 0, transparent 60%);
}

.portfolio-body {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.portfolio-body h2 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #020617;
}

.portfolio-meta {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.portfolio-body p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-muted);
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.75rem;
  color: var(--color-muted);
  transition: all var(--transition-fast);
}

.tag-list li:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.portfolio-footer-note {
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-muted);
  font-size: 1rem;
  text-align: center;
}

/* ===== Testimonials ===== */

.testimonial-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  position: relative;
}

.testimonial-card::before {
  content: "\201C";
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  font-size: 5rem;
  font-family: Georgia, serif;
  line-height: 1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.3;
}

.testimonial-quote {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--color-text);
  margin: 0 0 2rem;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-bg);
}

.testimonial-name {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.125rem;
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ===== Contact ===== */

.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
}

.contact-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.contact-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.contact-form {
  margin-top: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
}

input,
select,
textarea {
  font: inherit;
  font-size: 0.9375rem;
  color: #0f172a;
  background: #f9fafb;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
  padding: 0.875rem 1rem;
  outline: none;
  transition: all var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.form-note {
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.contact-info {
  font-size: 0.9375rem;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 1.25rem;
}

.info-list li {
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.info-list li:hover {
  border-color: rgba(34, 211, 238, 0.3);
}

.info-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 0.375rem;
}

.info-list a {
  color: #0f172a;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.info-list a:hover {
  color: var(--color-accent);
}

.info-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: #020617;
}

.bullet-list {
  padding-left: 1.25rem;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.bullet-list li {
  margin-bottom: 0.5rem;
}

.bullet-list li::marker {
  color: var(--color-accent);
}

/* ===== CTA ===== */

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.cta-inner .section-title {
  font-size: clamp(0.875rem, 2vw, 1.25rem);
}

.cta-inner p {
  margin: 0.75rem 0 0;
  color: var(--color-muted);
  font-size: 1.0625rem;
}

/* ===== Footer ===== */

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  padding: 3rem 0;
  margin-top: 6rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.footer-inner p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.footer-note {
  color: rgba(148, 163, 184, 0.6);
}

/* ===== Scroll animations ===== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children animations */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 500ms; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* ===== Responsive ===== */

@media (max-width: 1024px) {
  .feature-grid,
  .metrics-grid,
  .process-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .portfolio-card-large {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: 6rem 0 3.5rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-showcase {
    order: -1;
  }

  .hero-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .section-contained {
    padding: 3rem 2rem;
    border-radius: 0;
  }
}

@media (max-width: 700px) {
  .site-header {
    padding: 0 1rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem 0;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding-top: 6rem;
  }

  .feature-grid,
  .metrics-grid,
  .process-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 5rem 0;
  }

  .section-contained {
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    border-radius: 0;
  }
}

@media (max-width: 540px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
