/* GOOGLE FONT */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;600;700&family=Playfair+Display:wght@700&display=swap');

/* VARIABLES */
:root {
    --primary-color: #6200ea;
    --secondary-color: #3700b3;
    --text-light: #ffffff;
    --text-dark: #121212;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

/* CSS RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Raleway', sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: #121212;
    overflow-x: hidden;
}

/* UTILITY CLASSES */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-light);
}

/* NAVIGATION */
#navbar {
    position: fixed; /* Changed from relative to absolute */
    top: 0;
    width: 100%;
    z-index: 100; /* Reduced from 1000 to 2 Keep it above the video but below content  */
    padding: 1rem 0;
    transition: all var(--transition-speed);
}

#navbar.glass-nav {
    /* background: rgba(18, 18, 18, 0.4); */
    backdrop-filter: blur(10px);
}

#navbar ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    
}

#navbar a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all var(--transition-speed);
    font-weight: 600;
    border-left: 3px #dde8dd solid;
    border-right: 3px rgb(234, 238, 234) solid;
}

#navbar a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* WELCOME SECTION */
#welcome-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.background-container {
    position: absolute;  
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1; /* Explicitly set z-index */
}

#titlevideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    /* z-index: 0; */
}

/* Content wrapper to center everything */
.content-wrapper {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    padding-top: 5rem;
    background: rgba(0, 0, 0, 0.5); /* Optional: adds a dark overlay */
}

/* for navbar behind video these media queries are added */
/* Start */
/* Other sections positioning */
.skills-matrix,
.achievements,
#contact,
.newsletter,
#main-footer {
    position: relative;
    z-index: 10; /* Ensure they're above the video */
    background: #121212; /* Add solid background */
}

/* Responsive styles */
@media screen and (max-width: 1024px) {
    .content-wrapper {
        padding-top: 4.5rem;
    }
    
    #navbar {
        padding: 0.8rem 0;
    }
}

@media screen and (max-width: 768px) {
    .content-wrapper {
        padding-top: 4rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #navbar {
        padding: 0.6rem 0;
    }

    #navbar ul {
        gap: 0.5rem;
    }

    #navbar a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .content-wrapper {
        padding-top: 3.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    #navbar {
        padding: 0.5rem 0;
    }

    #navbar ul {
        gap: 0.3rem;
    }

    #navbar a {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        border-left: 2px solid #dde8dd;
        border-right: 2px solid rgb(234, 238, 234);
    }
}

/* Mobile menu adjustments */
@media screen and (max-width: 600px) {
    #navbar ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    #navbar li {
        width: auto;
        text-align: center;
    }
}

/* Handle landscape orientation */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .content-wrapper {
        padding-top: 3.5rem;
    }

    #welcome-section {
        min-height: 120vh; /* Ensure enough space in landscape */
    }
}

/* Glass nav effect adjustment */
#navbar.glass-nav {
    /* background: rgba(241, 236, 236, 0.75); Slightly more opaque for better readability */
    backdrop-filter: blur(10px);
}
/* end */

.quote-container {
    margin: 2rem auto;
    max-width: 800px;
    width: 90%;
    padding: clamp(1rem, 4vw, 2rem);
    text-align: center;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.1); /* Optional: slight background for better readability */
    backdrop-filter: blur(5px); /* Optional: adds a blur effect behind the quote */
    border-radius: 8px;
}

blockquote {
    font-size: clamp(1rem, 3vw, 1.2rem);
    line-height: 1.8;
    color: #fff; /* Ensure text is visible on video */
}

blockquote footer {
    margin-top: 1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.8;
}

.typewriter {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    animation: 
    reveal 3.5s cubic-bezier(0.4, 0.0, 0.2, 1),
    pulse 1.5s ease-in-out infinite alternate;
    /* animation: typing 3.5s steps(40, end); */
    color: #fff; /* Ensure text is visible on video */
}
/* animation queires */
@keyframes reveal {
    from { width: 0 }
    to { width: 100% }
}

@keyframes pulse {
    0% { opacity: 1 }
    100% { opacity: 0.7 }
}


/* Media Queries */
@media screen and (max-width: 480px) {
    .quote-container {
        margin: 1rem auto;
        width: 95%;
        padding: 0.75rem;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
}

/* SKILLS MATRIX */
.skills-matrix {
    padding: 4rem 0;
    margin: 2rem 0;
}

.metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.metrics-table th,
.metrics-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* ACHIEVEMENT CARDS */
.achievements {
    padding: 4rem 0;
    margin: 2rem 0;
}

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

.achievement-card {
    padding: 2rem;
    text-align: center;
    background: var(--glass-bg);
    border-radius: 16px;
    transition: transform var(--transition-speed);
}

.achievement-card:hover {
    transform: translateY(-10px);
}

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

.achievement-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.achievement-card ul {
    list-style: none;
    margin-top: 1rem;
}

/* CONTACT SECTION */
#contact {
    padding: 4rem 0;
    margin: 2rem 0;
}

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--glass-bg);
  border-radius: 12px;
  color: var(--text-light);
  text-decoration: none;
  transition: all var(--transition-speed);
}

.social-link:hover {
  transform: translateY(-5px);
  background: var(--primary-color);
  box-shadow: var(--card-shadow);
}

.social-link i {
  font-size: 1.5rem;
}

.social-link span {
  font-weight: 600;
}

.gdevicon {
  height: 24px;
  width: 24px;
  filter: brightness(0) invert(1);
}

/* NEWSLETTER SECTION */
.newsletter {
  padding: 4rem 0;
  margin: 2rem 0;
}

.newsletter-text {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8;
}

.newsletter-form {
  width: 100%;
  max-width: 800px;
  height: 600px;
  margin: 0 auto;
  display: block;
  background: transparent;
}

/* FOOTER */
#main-footer {
  padding: 2rem 0;
  text-align: center;
  background: rgba(0, 0, 0, 0.8);
}

.footer-text {
  font-size: 1rem;
  opacity: 0.8;
}

/* ANIMATIONS */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

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

/* RESPONSIVE DESIGN */
@media screen and (max-width: 1024px) {
  .section-title {
      font-size: 2rem;
  }

  .typewriter {
      font-size: 2.5rem;
  }
  
  .achievement-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  #navbar ul {
      padding: 0.5rem;
  }

  #navbar a {
      font-size: 0.9rem;
      padding: 0.4rem 0.8rem;
  }

  .metrics-table {
      font-size: 0.9rem;
  }

  .achievement-grid {
      grid-template-columns: 1fr;
      gap: 1.5rem;
  }

  .social-grid {
      grid-template-columns: repeat(2, 1fr);
  }

  .quote-container blockquote {
      font-size: 1rem;
  }
}

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

  .section-title {
      font-size: 1.8rem;
  }

  .typewriter {
      font-size: 2rem;
  }

  .metrics-table th,
  .metrics-table td {
      padding: 0.5rem;
      font-size: 0.8rem;
  }

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

  .social-link {
      padding: 0.8rem;
  }

  .newsletter-text {
      font-size: 1rem;
  }

  .newsletter-form {
      height: 500px;
  }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
  :root {
      --glass-bg: rgba(255, 255, 255, 0.05);
      --glass-border: rgba(255, 255, 255, 0.1);
  }

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

  .achievement-card {
      background: rgba(255, 255, 255, 0.05);
  }
}

/* Print Styles */
@media print {
  #navbar,
  .newsletter-form,
  .social-link {
      display: none;
  }

  body {
      color: #000;
      background: #fff;
  }

  .glass-effect {
      background: none;
      border: 1px solid #ccc;
  }

  .achievement-card,
  .metrics-table {
      break-inside: avoid;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
      animation: none !important;
      transition: none !important;
  }
}

:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  z-index: 1001;
}

.skip-link:focus {
  top: 0;
}
