:root {
  --primary-color: #2973B2;
  --primary-rgb: 41, 115, 178;
  --primary-light: #4c9aff;
  --primary-dark: #1e5c8f;
  --secondary-color: #091e42;
  --text-color: #172b4d;
  --background-color: #ffffff;
  --section-bg: #f4f5f7;
  --card-shadow: 0 8px 16px rgba(9, 30, 66, 0.08);
  --section-padding: 5rem 2rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(9, 30, 66, 0.08);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin-left: 3rem;
}

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

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

section {
  min-height: max(600px, 100vh);
  padding: var(--section-padding);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.section-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  pointer-events: none;
}

.hero {
  min-height: max(600px, 100vh);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background-color: var(--secondary-color);
  color: white;
  padding-top: 80px;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ffffff, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.cta-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(41, 115, 178, 0.3);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.feature:hover::before {
  opacity: 1;
}

.feature i {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 1rem;
  border-radius: 1rem;
  background-color: rgba(var(--primary-rgb), 0.1);
}

.feature h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  font-weight: 600;
}

.feature p {
  color: var(--text-color-light);
  line-height: 1.6;
  margin: 0;
  font-size: 1.1rem;
}

.services {
  background: var(--section-bg);
  position: relative;
  min-height: max(700px, 90vh);
}

.services .section-background {
  background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.service-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(8px);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(9, 30, 66, 0.12);
}

.service-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-content {
  padding: 2rem;
}

.service-content h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.project-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.project-card .image-container {
  position: relative;
  width: 100%;
  padding-top: 48%;
  overflow: hidden;
}

.project-card .image-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 25px;
  background: linear-gradient(to top, 
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.8) 40%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.project-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
  filter: grayscale(40%);
}

.project-card:hover img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.project-card .content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: white;
  position: relative;
}

.project-card h3 {
  font-size: 1.25rem;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.project-card p {
  color: #4a4a4a;
  line-height: 1.4;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.project-card .tech-stack {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.project-card .tech-tag {
  background: #f5f5f5;
  color: #4a4a4a;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.project-card:hover .tech-tag {
  background: #eee;
}

.projects .section-background {
  background-image: url('https://images.unsplash.com/photo-1518770660439-4636190af475?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

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

.project-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-images img:hover {
  transform: scale(1.02);
}

.about {
  background: var(--section-bg);
  position: relative;
  min-height: max(500px, 80vh);
}

.about .section-background {
  background-image: url('https://images.unsplash.com/photo-1517433670267-08bbd4be890f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(8px);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--primary-color);
  position: relative;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.footer {
  background: var(--secondary-color);
  color: white;
  text-align: center;
  padding: 3rem 2rem;
  width: 100%;
}

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

.footer a:hover {
  color: white;
}

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

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

.data-section {
  margin: 2rem auto 0;
  max-width: 1000px;
}

.data-section summary {
  cursor: pointer;
  padding: 1rem 1.5rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: var(--card-shadow);
  color: var(--primary-color);
  font-weight: 500;
  transition: all 0.3s;
  font-size: 1.1rem;
}

.data-section summary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12);
}

.data-content {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--card-shadow);
  margin-top: 1rem;
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 95%;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 2rem;
  pointer-events: none;
  width: 100%;
}

.lightbox-button {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  backdrop-filter: blur(5px);
}

.lightbox-button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.lightbox-close {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero p {
    font-size: 1.25rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .nav-links {
    display: none;
  }

  .lightbox-nav {
    padding: 0 1rem;
  }

  .lightbox-button {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
  }

  .feature {
    padding: 1.5rem;
  }

  .feature i {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  .feature h3 {
    font-size: 1.3rem;
  }

  .feature p {
    font-size: 1rem;
  }

  .projects {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
  }

  .project-card .content {
    padding: 1rem;
  }

  .project-card h3 {
    font-size: 1.1rem;
  }

  .project-card p {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .project-card .tech-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}
