/* ------------- Custom Properties ------------- */
:root {
  /* Colors */
  --bg-color: #030712; /* Very dark blue/gray */
  --bg-surface: #111827;
  --bg-surface-glass: rgba(17, 24, 39, 0.6);
  --bg-surface-border: rgba(255, 255, 255, 0.08);
  
  --primary-color: #8b5cf6; /* Vibrant violet */
  --primary-color-hover: #7c3aed;
  --secondary-color: #06b6d4; /* Cyan */
  --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Syntax Highlighting */
  --kw-color: #f472b6;
  --fn-color: #38bdf8;
  --str-color: #a3e635;
  --cm-color: #64748b;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Spacing & Layout */
  --nav-height: 80px;
  --section-padding: 100px 0;
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------- Reset & Base Styles ------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
}

/* ------------- Background Effects ------------- */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -2;
  opacity: 0.4;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-primary {
  width: 50vw;
  height: 50vw;
  background: var(--primary-color);
  top: -25vw;
  right: -25vw;
  max-width: 600px;
  max-height: 600px;
}

.orb-secondary {
  width: 40vw;
  height: 40vw;
  background: var(--secondary-color);
  bottom: -20vw;
  left: -20vw;
  max-width: 500px;
  max-height: 500px;
  animation-delay: -10s;
}

.noise-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
  100% { transform: translateY(20px) scale(0.95); }
}

/* ------------- Layout & Utilities ------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding);
}

.bg-darker {
  background-color: rgba(0, 0, 0, 0.2);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.glass-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-surface-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ------------- Typography Components ------------- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 700px;
  margin-inline: auto;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* ------------- Buttons ------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--bg-surface-border);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
}

.btn-outline:hover {
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.125rem;
}

/* ------------- Navigation ------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-surface-border);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

.nav-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-normal);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.menu-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-normal);
  transform-origin: left center;
}

/* ------------- Hero Section ------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + 40px);
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-subtitle strong {
  color: var(--text-primary);
}

.hero-actions {
  display: flex;
  gap: 16px;
}

/* Code Window Visual */
.visual-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.visual-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.code-window {
  font-family: 'Fira Code', monospace, sans-serif;
  font-size: 0.9rem;
  line-height: 1.7;
}

.window-headers {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.code-window pre {
  margin: 0;
  white-space: pre-wrap;
}

.kw { color: var(--kw-color); }
.fn { color: var(--fn-color); }
.str { color: var(--str-color); }
.cm { color: var(--cm-color); }

/* ------------- Services Section ------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.service-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex-grow: 1;
}

/* ------------- About Section ------------- */
.about-container {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.profile-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 400px;
  margin: 0 auto;
}

.profile-glow {
  position: absolute;
  inset: -20px;
  background: var(--accent-gradient);
  border-radius: 30%;
  filter: blur(40px);
  opacity: 0.2;
}

.profile-inner {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid var(--bg-surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.about-text {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.about-text strong {
  color: var(--text-primary);
}

.manifesto {
  margin-top: 32px;
  padding: 24px;
  font-style: italic;
  font-size: 1.125rem;
  border-left: 4px solid var(--primary-color);
  position: relative;
}

.quote-icon {
  position: absolute;
  top: 16px;
  right: 24px;
  color: rgba(255,255,255,0.05);
  width: 48px;
  height: 48px;
}

.manifesto .text-sm {
  display: block;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ------------- Contact Section ------------- */
.contact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.8), rgba(8, 14, 26, 0.9));
  border-top: 1px solid rgba(139, 92, 246, 0.3);
}

.contact-text {
  max-width: 600px;
}

.contact-text p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-top: 16px;
}

/* ------------- Footer ------------- */
.footer {
  background-color: #02040a;
  padding: 60px 0 24px;
  border-top: 1px solid var(--bg-surface-border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

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

.footer-link {
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ------------- Animations ------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay { transition-delay: 0.1s; }
.reveal-delay-1 { transition-delay: 0.2s; }
.reveal-delay-2 { transition-delay: 0.3s; }

/* ------------- Responsive Design ------------- */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-subtitle {
    margin-inline: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .about-container {
    grid-template-columns: 1fr;
  }
  
  .about-visual {
    order: -1;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .contact-box {
    flex-direction: column;
    text-align: center;
    gap: 32px;
    padding: 40px 24px;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 40px;
    transition: var(--transition-normal);
    gap: 32px;
    border-left: 1px solid var(--bg-surface-border);
  }
  
  .nav-links.active {
    right: 0;
  }

  .nav-cta {
    right: -100%;
    top: auto;
    bottom: 0;
    height: auto;
    width: 280px;
    background: transparent;
    padding-bottom: 80px;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.05);
  }
  
  .nav-links.active ~ .nav-cta {
    right: 0;
  }

  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
  }
  
  .mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section-padding {
    padding: 60px 0;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}
