/* -------------------------------------------------------------------------- */
/*                                Design System                               */
/* -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-elevated: #1A1A1A;
  --accent-primary: #00D9FF;
  --accent-secondary: #6366F1;
  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-tertiary: #52525B;
  --border-subtle: rgba(255, 255, 255, 0.08);

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  --gradient-glow: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(0, 0, 0, 0) 70%);

  /* Spacing */
  --space-xs: 0.5rem;
  /* 8px */
  --space-sm: 1rem;
  /* 16px */
  --space-md: 2rem;
  /* 32px */
  --space-lg: 4rem;
  /* 64px */
  --space-xl: 8rem;
  /* 128px */

  /* Typography */
  --font-display: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s var(--ease-smooth);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* -------------------------------------------------------------------------- */
/*                                  Utilities                                 */
/* -------------------------------------------------------------------------- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

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

.section {
  padding: var(--space-xl) 0;
}

.section-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/*                                   Navbar                                   */
/* -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.4s var(--ease-smooth);
}

.navbar.scrolled {
  padding: 1rem 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Modern Logo Styles */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.logo-inner {
  width: 16px;
  height: 16px;
  background: #fff;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  /* Triangle/Star shape foundation */
  transform: translateY(-2px);
}

.logo-text {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.logo-text .highlight {
  font-weight: 400;
  color: var(--text-secondary);
}

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

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  margin-bottom: 6px;
  transition: 0.3s;
}

/* -------------------------------------------------------------------------- */
/*                                    Hero                                    */
/* -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
  /* Offset for fixed nav */
}

/* Background Effects */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

canvas#starfield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  /* Slightly reduced opacity for better text contrast with stars */
}

.orb-1 {
  width: 50vw;
  height: 50vw;
  background: var(--accent-primary);
  top: -10%;
  left: -10%;
  animation: float-1 15s infinite alternate ease-in-out;
}

.orb-2 {
  width: 40vw;
  height: 40vw;
  background: var(--accent-secondary);
  bottom: -10%;
  right: -10%;
  animation: float-2 18s infinite alternate ease-in-out;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 1;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  opacity: 0.5;
}

.hero-content {
  text-align: center;
  z-index: 2;
  max-width: 800px;
  padding: 0 var(--space-sm);
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
  padding: 0.5rem 1rem;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 99px;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Scroll Indication */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.6;
}

.mouse {
  width: 20px;
  height: 32px;
  border: 2px solid white;
  border-radius: 12px;
  position: relative;
}

.mouse::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: white;
  border-radius: 2px;
  animation: scroll 2s infinite;
}

.scroll-indicator span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* -------------------------------------------------------------------------- */
/*                                    About                                   */
/* -------------------------------------------------------------------------- */
.about .lead {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.value-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 2.5rem;
  border-radius: 16px;
  transition: 0.3s;
}

.value-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
  border-color: var(--accent-secondary);
}

.value-card .icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.value-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.value-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* -------------------------------------------------------------------------- */
/*                                  Services                                  */
/* -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: var(--space-xl);
}

.service-card {
  background: var(--bg-elevated);
  padding: 3rem 2rem;
  border-radius: 24px;
  text-align: center;
  border: 1px solid var(--border-subtle);
  transition: all 0.4s var(--ease-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 40px -10px rgba(0, 217, 255, 0.1);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 2rem;
  transition: 0.4s;
}

.service-card:hover .service-icon {
  background: var(--gradient-accent);
  color: white;
}

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

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

.tech-stack h3 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.tech-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
}

.tech-icon {
  font-size: 3rem;
  /* Larger font size for Devicons */
  color: var(--text-secondary);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  cursor: default;
  transition: 0.4s var(--ease-bounce);
}

.tech-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  /* Icons naturally have colors, but this ensures white if needed or we can use colored class */
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* -------------------------------------------------------------------------- */
/*                                   Contact                                  */
/* -------------------------------------------------------------------------- */
.contact {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.contact-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0, 217, 255, 0.05) 0%, transparent 60%);
  z-index: -1;
}

.contact-content p {
  margin-bottom: 3rem;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.email-link {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  color: white;
  position: relative;
  transition: 0.3s;
}

.email-link:hover {
  text-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
  color: var(--accent-primary);
}

/* -------------------------------------------------------------------------- */
/*                                   Footer                                   */
/* -------------------------------------------------------------------------- */
.footer {
  background: #050505;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: right;
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

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

/* -------------------------------------------------------------------------- */
/*                                 Animations                                 */
/* -------------------------------------------------------------------------- */
@keyframes float-1 {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(50px, -50px);
  }
}

@keyframes float-2 {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(-40px, 40px);
  }
}

@keyframes scroll {
  0% {
    transform: translate(-50%, 0);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    transform: translate(-50%, 10px);
    opacity: 0;
  }
}

/* -------------------------------------------------------------------------- */
/*                                Mobile Resp                                 */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* Add JS toggle logic if complete menu needed */
  }

  .nav-container {
    justify-content: center;
  }

  .footer-grid {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    align-items: center;
  }

  .footer-links a {
    text-align: center;
  }
}