:root {
  /* Color Palette - Premium Dark/Navy Theme */
  --bg-deep: #05070a;
  --bg-dark: #0a0c10;
  --bg-card: rgba(16, 20, 26, 0.7);
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --accent: #60a5fa;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.05);
  
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eyebrow {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 1rem;
}

.eyebrow.center {
  text-align: center;
}

.center {
  text-align: center;
}

/* ── NAVIGATION ─────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(5, 7, 10, 0.8);
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  display: flex;
  align-items: center;
}

.logo-k {
  color: var(--primary);
  margin-right: 2px;
}

.logo-dot {
  color: var(--primary);
  margin: 0 2px;
}

.logo-sub {
  font-weight: 400;
  font-size: 0.9rem;
  opacity: 0.8;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--transition);
  opacity: 0.8;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--primary);
}

.btn-nav {
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  border-radius: 6px;
  color: #fff !important;
  opacity: 1 !important;
}

.btn-nav:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* ── HERO ───────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black, transparent 80%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: var(--primary);
  top: -100px;
  right: -100px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: #312e81;
  bottom: -100px;
  left: -100px;
}

.hero-inner {
  text-align: center;
  max-width: 900px;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1.2s ease-out 0.4s backwards;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 5rem;
  animation: fadeInUp 1.4s ease-out 0.6s backwards;
}

.btn-primary {
  padding: 1rem 2rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-ghost {
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: var(--transition);
}

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

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  animation: fadeInUp 1.6s ease-out 0.8s backwards;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ── SECTIONS ───────────────────────────────────────────── */

.section {
  padding: 8rem 0;
}

.section-intro {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 4rem;
}

/* Section About */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.section-text p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.section-visual {
  position: relative;
}

.card-stack {
  position: relative;
  height: 400px;
}

.card {
  position: absolute;
  width: 320px;
  padding: 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transition: var(--transition);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card-text strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.card-text span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.card-1 { top: 0; left: 0; z-index: 3; }
.card-2 { top: 100px; left: 80px; z-index: 2; opacity: 0.8; }
.card-3 { top: 200px; left: 40px; z-index: 1; opacity: 0.6; }

.card:hover {
  transform: translateX(10px) translateY(-5px);
  opacity: 1;
  border-color: var(--primary);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.service-card {
  padding: 3rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-8px);
  background: rgba(16, 20, 26, 0.9);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-muted);
}

/* Technology / Terminal */
.section-tech {
  background: radial-gradient(circle at 70% 30%, rgba(59, 130, 246, 0.05), transparent 50%);
}

.tech-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.tech-list {
  list-style: none;
  margin-top: 2rem;
}

.tech-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.check {
  color: var(--primary);
  font-weight: 700;
}

.terminal {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.terminal-bar {
  background: #161b22;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  font-family: monospace;
}

.terminal-body {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875rem;
  min-height: 300px;
}

.line {
  margin-bottom: 0.5rem;
  height: 1.2rem;
}

.prompt { color: var(--primary); margin-right: 0.5rem; }
.muted { color: #6e7681; }
.success { color: #3fb950; }
.warn { color: #d29922; }

.blink {
  display: inline-block;
}

.cursor {
  background: var(--primary);
  color: var(--primary);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.contact-card {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
}

.contact-icon {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.contact-card a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.badge-private {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ── SECTION BACKGROUNDS ────────────────────────────────── */

.section-about {
  background: var(--bg-deep);
}

.section-services {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-contact {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
}

.contact-card h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: var(--font-main);
}

/* ── FOOTER ─────────────────────────────────────────────── */

.footer {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-dark);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: var(--transition);
}

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

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-top: 2rem;
  text-align: center;
  width: 100%;
}

/* ── ANIMATIONS ─────────────────────────────────────────── */

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

/* ── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 992px) {
  .section-grid, .tech-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .section-visual, .tech-visual {
    order: -1;
  }
  
  .card-stack {
    display: flex;
    justify-content: center;
    height: auto;
    position: static;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .card {
    position: static;
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .stat-divider {
    display: none;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
}
