/* Variables */
:root {
  --primary: #0a1929;
  --secondary: #1976d2;
  --accent: #ffa726;
  --text-light: #eceff1;
  --text-dark: #263238;
  --bg-dark: #0d1b2a;
  --bg-light: #f5f7fa;
  --electric-blue: #00bcd4;
  --warning: #ff6f00;
}

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

/* Base styles */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-dark);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & Navigation */
header {
  background: rgba(10, 25, 41, 0.98);
  backdrop-filter: blur(20px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--electric-blue);
  transition: all 0.3s ease;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--electric-blue);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.logo span {
  color: var(--accent);
  font-size: 0.8rem;
  display: block;
  margin-top: -5px;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--electric-blue);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--electric-blue);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 4px;
  position: relative;
  z-index: 1001;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-light);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(10, 25, 41, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  transition: left 0.3s ease;
}

.mobile-nav.active {
  left: 0;
}

.mobile-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: color 0.3s ease;
}

.mobile-nav a:hover {
  color: var(--electric-blue);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1565c0 50%, var(--primary) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="%2300bcd4" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.1;
}

.hero-content {
  text-align: center;
  color: var(--text-light);
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.hero-subtitle {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--electric-blue);
  font-weight: 600;
}

.hero p {
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(45deg, var(--electric-blue), var(--secondary));
  color: white;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 188, 212, 0.5);
}

.download-btn {
  background: linear-gradient(45deg, var(--accent), var(--warning));
  box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}

.download-btn:hover {
  box-shadow: 0 8px 25px rgba(255, 167, 38, 0.5);
}

/* Sections */
section {
  padding: 4rem 0;
}

.dark-section {
  background: var(--bg-dark);
  color: var(--text-light);
}

.light-section {
  background: var(--bg-light);
  color: var(--text-dark);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--electric-blue);
  font-weight: 500;
  opacity: 0.8;
}

/* About Section */
.about-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
}

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

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

.stat-card {
  background: rgba(0, 188, 212, 0.1);
  padding: 1.5rem;
  border-radius: 4px;
  text-align: center;
  border: 2px solid var(--electric-blue);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--electric-blue);
  display: block;
}

/* Services Grid */
.services-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 188, 212, 0.3);
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--electric-blue);
  box-shadow: 0 10px 30px rgba(0, 188, 212, 0.2);
}

.service-card h3 {
  color: var(--electric-blue);
  margin-bottom: 1rem;
  font-weight: 700;
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

/* Projects Section */
.projects-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.project-image {
  width: 100%;
  height: 250px;
  position: relative;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-image:hover img {
  transform: scale(1.05);
}

.project-image-fallback {
  display: none;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1565c0 50%, var(--primary) 100%);
  color: var(--text-light);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  align-items: center;
  justify-content: center;
  letter-spacing: 2px;
}

.project-year {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--electric-blue);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 2;
}

.project-content {
  padding: 2rem;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.project-accent-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(45deg, var(--electric-blue), var(--secondary));
  margin-bottom: 1rem;
  border-radius: 2px;
}

.project-subtitle {
  color: var(--electric-blue);
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-specs {
  list-style: none;
  margin-top: 1rem;
}

.project-specs li {
  padding: 0.3rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.project-specs li::before {
  content: '⚡';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Contact Section */
.contact-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 4px;
  text-align: center;
  border: 2px solid var(--electric-blue);
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 188, 212, 0.2);
}

.contact-card h3 {
  color: var(--electric-blue);
  margin-bottom: 0.5rem;
}

.contact-card p {
  font-weight: 600;
}

.contact-card a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-card a:hover {
  color: var(--electric-blue);
  text-decoration: underline;
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--electric-blue);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  font-size: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 188, 212, 0.5);
}

/* Footer - ONLY at bottom */
.footer {
  background: var(--primary);
  color: var(--text-light);
  padding: 3rem 0 1rem;
  border-top: 3px solid var(--electric-blue);
  position: relative;
  z-index: 1;
  clear: both;
  margin-top: 0;
  display: block;
}

/* Hide any duplicate footers that might appear elsewhere */
section .footer,
.hero .footer,
.about .footer,
.services .footer,
.projects .footer {
  display: none !important;
}

/* Only show footer when it's the direct child of body or after sections */
body > .footer,
section + .footer {
  display: block !important;
}

.footer-content {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section {
  position: relative;
}

.footer-section h4 {
  color: var(--electric-blue);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--electric-blue);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--accent);
  font-size: 0.8rem;
  display: block;
  margin-top: -5px;
}

.footer-section p {
  opacity: 0.8;
  line-height: 1.6;
  margin: 0;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section ul li {
  padding: 0.3rem 0;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-section ul li:hover {
  opacity: 1;
}

.footer-contact a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-contact a:hover {
  color: var(--electric-blue);
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--electric-blue), transparent);
  margin: 2rem 0 1rem;
}

.footer-bottom {
  text-align: center;
}

.footer-copyright {
  opacity: 0.7;
  font-size: 0.9rem;
}

.footer-copyright p {
  margin-bottom: 0.5rem;
}

.footer-tagline {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem !important;
}

/* Responsive Design - Mobile First */
@media (min-width: 640px) {
  .cta-group {
    flex-direction: row;
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
  
  .logo {
    font-size: 1.8rem;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .menu-toggle {
    display: none;
  }
  
  .nav-links {
    display: flex;
  }
  
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 4rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .contact-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  section {
    padding: 6rem 0;
  }
  
  .footer {
    padding: 4rem 0 2rem;
  }
}