/* Global Styles */
:root {
  --primary-color: #8a2be2;
  --bg-dark: #0a0a0f;
  --text-light: #ffffff;
  --text-gray: #888888;
  --gradient-blue: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
  --gradient-purple: linear-gradient(135deg, #8a2be2 0%, #4a148c 100%);
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  /* background: linear-gradient(135deg, #2a2a45 0%, #3a3a60 100%); */
  background: linear-gradient(135deg, var(--bg-dark) 0%, #2a2a45 100%);
  color: var(--text-light);
  line-height: 1.6;
  transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.projects-page {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #2a2a45 100%);
  color: var(--text-light);
}

body.scrolled {
  background: linear-gradient(135deg, #1a237e 0%, #7b1fa2 50%, #00acc1 100%);
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo a::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  background: url("images/favicon.svg") no-repeat center center;
  background-size: contain;
}

/* .nav-links a {
  color: var(--text-light);
  text-decoration: none;
  margin-left: 2rem;
  transition: color 0.3s ease;
} */
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px; /* Ensures spacing between the links */
}

.nav-links a {
  display: inline-flex; /* Keeps icons and text properly aligned */
  align-items: center;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.contact-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: fill 0.3s ease;
}

.contact-link:hover svg {
  fill: var(--primary-color);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 12rem 2rem;
}

.hero h1 {
  font-size: 6rem;
  margin-bottom: 1.5rem;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 2rem;
  color: var(--text-gray);
  margin-bottom: 3rem;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--gradient-purple);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 30px;
  transition: transform 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
}

/* Projects Section */
.projects-section {
  margin-top: 6rem;
  padding: 4rem 2rem;
}

/* Services Section */
.services {
  padding: 4rem 2rem;
}

.services h2 {
  text-align: center;
  max-width: 1000px;
  margin: 0 auto 5rem;
  font-size: 2.5rem;
  line-height: 1.4;
}

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

.service-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 3rem;
  border-radius: 20px;
  transition: transform 0.3s ease;
  text-align: center;
}

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

.progress-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.ai-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-blue);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

/* Story & Current Work Sections */
.story,
.current-work {
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.25rem;
  line-height: 1.8;
}

.story h2,
.current-work h2 {
  margin-bottom: 2rem;
  font-size: 3rem;
  line-height: 1.3;
}

/* Team Section */
.team {
  padding: 4rem 2rem;
  text-align: center;
}

.team h2 {
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

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

.team-member {
  text-align: center;
}

.team-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
}

/* Contact Section */
.contact {
  padding: 4rem 2rem;
  text-align: center;
}

.contact h2 {
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  transition: transform 0.3s ease;
}

.contact-card .contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-card .contact-link img {
  width: 24px;
  height: 24px;
}

.contact-card .contact-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.contact-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text-light);
  font-size: 1.8rem;
}

.contact-card p {
  color: var(--text-gray);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

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

.projects-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  display: block;
  margin: 1rem auto;
  text-align: center;
  width: fit-content;
}

.contact-link,
.website-link {
  display: block;
  color: var(--text-light);
  text-decoration: none;
  margin: 0.5rem 0;
  transition: color 0.3s ease;
}

.contact-link:hover,
.website-link:hover {
  color: var(--primary-color);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-gray);
}

/* Modal Styles - Improved for stability */
/* .modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
} */
/* Modal Styles - Improved for stability */

.modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #2a2a45 100%);
  padding: 4rem;
  border-radius: 24px;
  width: 90%;
  max-width: 1200px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  will-change: transform, opacity;
  -webkit-overflow-scrolling: touch;
}

.modal.show .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.close-button {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
  width: 100%;
  perspective: 1000px;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 2.5rem;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.project-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.15);
}

.project-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.project-card:hover .project-icon {
  transform: scale(1.1);
}

.project-content {
  flex: 1;
}

.project-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.project-card p {
  color: var(--text-gray);
  margin-bottom: 2rem;
  font-size: 1.4rem;
}

.learn-more {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--gradient-purple);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.3s ease;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.learn-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.text-gradient {
  background: linear-gradient(135deg, #b388ff 0%, #7c4dff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.project-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: var(--primary-color);
}

.projects-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    padding: 1.5rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}
