* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Main Landing Page Container */
.landing-page {
  width: 100%;
  min-height: 100vh;
  background-color: #0ea5e9; /* Blue fallback */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 10vh 0 2rem 0;
  overflow: hidden;
}

.landing-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 768px) {
  .landing-video-bg {
    object-position: center center;
  }
}

@media (max-width: 480px) {
  .landing-video-bg {
    object-position: 60% center;
  }
}

.content-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.landing-page h1 {
  color: white;
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  text-align: center;
  margin: 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  line-height: 1.1;
  text-wrap: balance;
  padding: 0 2rem;
}

/* Glass Welcome Button - Fixed at Bottom */
.welcome-button {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  right: auto;
  z-index: 100;
  
  /* Ensure perfect centering */
  margin-left: 0;
  margin-right: 0;
  
  display: inline-block;
  padding: 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 25px;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  
  /* Safari backdrop-filter support */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  
  /* Centering transform with Safari support */
  -webkit-transform: translateX(-50%) translateZ(0);
  -moz-transform: translateX(-50%) translateZ(0);
  -ms-transform: translateX(-50%) translateZ(0);
  transform: translateX(-50%) translateZ(0);
  
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.1);
  
  /* Safari transition support */
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  
  overflow: hidden;
  
  /* Force hardware acceleration on Safari */
  will-change: transform, background, border-color, box-shadow;
}

.welcome-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: -webkit-linear-gradient(
    left,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  background: -moz-linear-gradient(
    left,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  -webkit-transition: left 0.5s ease;
  -moz-transition: left 0.5s ease;
  -o-transition: left 0.5s ease;
  transition: left 0.5s ease;
}

.welcome-button:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.9);
  -webkit-transform: translateX(-50%) translateY(-2px);
  -moz-transform: translateX(-50%) translateY(-2px);
  -ms-transform: translateX(-50%) translateY(-2px);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 3px rgba(255, 255, 255, 0.4),
    inset 0 -1px 3px rgba(0, 0, 0, 0.1);
}

.welcome-button:hover::before {
  left: 100%;
}

.welcome-button:active {
  -webkit-transform: translateX(-50%) translateY(0);
  -moz-transform: translateX(-50%) translateY(0);
  -ms-transform: translateX(-50%) translateY(0);
  transform: translateX(-50%) translateY(0);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .landing-page h1 {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }
  
  .welcome-button {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
  }
  
  .content-center {
    gap: 1.5rem;
  }
}

/* ========================================
   PROJECTS PAGE STYLES
   ======================================== */

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0ea5e9;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-logo:hover {
  color: #0284c7;
}

.nav-link {
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: #f1f5f9;
  color: #0ea5e9;
}

/* Projects Page Container */
.projects-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  padding-top: 5rem;
}

.projects-header {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.projects-header h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: #0c4a6e;
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: #475569;
  margin: 0;
  font-weight: 400;
}

/* Projects Container */
.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

/* Project Billboard Card */
.project-billboard {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-billboard:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12), 0 20px 40px rgba(0, 0, 0, 0.08);
}

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

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

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

.project-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-content h2 {
  font-size: 1.75rem;
  color: #0c4a6e;
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.project-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 1.5rem 0;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.tag {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tag:hover {
  background: #0ea5e9;
  color: white;
}

.project-link-button {
  display: inline-block;
  margin: 1.25rem 0 0.75rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.project-link-button:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25);
  border-color: rgba(14, 165, 233, 0.3);
}

.project-link-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.15);
}

/* ========================================
   PROJECT DETAIL PAGE STYLES
   ======================================== */

.project-detail-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  padding-top: 5rem;
  padding-bottom: 3rem;
}

.project-detail-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Project Header */
.project-detail-header {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.project-detail-header h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: #0c4a6e;
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.project-tagline {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: #475569;
  margin: 0 0 2rem 0;
  font-weight: 400;
}

.project-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.meta-item {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: white;
  border-radius: 8px;
  color: #0369a1;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Video Section */
.video-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.05);
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 1.5rem;
  aspect-ratio: 16 / 9;
}

.video-container video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-caption h3 {
  font-size: 1.5rem;
  color: #0c4a6e;
  margin: 0 0 0.5rem 0;
}

.video-caption p {
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* Project Description */
.project-description-section {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.05);
}

.project-description-section h2 {
  font-size: 2rem;
  color: #0c4a6e;
  margin: 0 0 1.5rem 0;
  font-weight: 700;
}

.description-content p {
  color: #475569;
  line-height: 1.8;
  margin: 0 0 1rem 0;
  font-size: 1.05rem;
}

.description-content p:last-child {
  margin-bottom: 0;
}

/* Features Section */
.project-features-section {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.05);
}

.project-features-section h2 {
  font-size: 2rem;
  color: #0c4a6e;
  margin: 0 0 2rem 0;
  font-weight: 700;
  text-align: center;
}

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

.feature-card {
  text-align: center;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  color: #0c4a6e;
  margin: 0 0 0.75rem 0;
  font-weight: 600;
}

.feature-card p {
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

/* Technology Stack */
.tech-stack-section {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.05);
}

.tech-stack-section h2 {
  font-size: 2rem;
  color: #0c4a6e;
  margin: 0 0 1.5rem 0;
  font-weight: 700;
  text-align: center;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.tech-tag {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid #7dd3fc;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  border-color: #0284c7;
  transform: translateY(-2px);
}

/* Back to Projects */
.back-to-projects {
  text-align: center;
  padding: 2rem 0;
}

.back-button {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: white;
  color: #0369a1;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 2px solid #e0f2fe;
}

.back-button:hover {
  background: #0ea5e9;
  color: white;
  border-color: #0ea5e9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

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

/* Responsive Design for Project Detail */
@media (max-width: 768px) {
  .project-detail-container {
    padding: 0 1.5rem;
  }

  .project-detail-header {
    padding: 2rem 0;
  }

  .project-meta {
    flex-direction: column;
    align-items: center;
  }

  .video-section,
  .project-description-section,
  .project-features-section,
  .tech-stack-section {
    padding: 1.5rem;
  }

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

  .tech-tags {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .project-detail-container {
    padding: 0 1rem;
  }

  .video-section,
  .project-description-section,
  .project-features-section,
  .tech-stack-section {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .meta-item {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Footer */
.projects-footer {
  background: #0c4a6e;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

.projects-footer p {
  margin: 0;
  font-size: 0.95rem;
}

/* Tablet Responsiveness */
@media (max-width: 1024px) {
  .projects-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }
  
  .project-image {
    height: 220px;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }
  
  .nav-logo {
    font-size: 1.25rem;
  }
  
  .projects-header {
    padding: 2rem 1.5rem;
  }
  
  .projects-container {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1.5rem;
  }
  
  .project-content {
    padding: 1.5rem;
  }
  
  .project-content h2 {
    font-size: 1.5rem;
  }
  
  .project-description {
    font-size: 0.95rem;
  }
  
  .project-image {
    height: 200px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .projects-container {
    padding: 0.75rem;
  }
  
  .project-billboard {
    border-radius: 12px;
  }
  
  .project-content {
    padding: 1.25rem;
  }
  
  .nav-container {
    padding: 0.875rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
  
  .nav-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
  }
}


