/* ==========================================================================
   Base styles and reset
   ========================================================================== */
   html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    overflow-x: hidden; /* prevent sideways scroll */
    overflow-y: auto; /* allow vertical scroll */
  }
  
  /* ==========================================================================
     Canvas background
     ========================================================================== */
  canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
  }
  
  /* ==========================================================================
     Fixed navigation header with subtle blur effect
     ========================================================================== */
  .top-nav {
    /* Fixed positioning fundamentals */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    
    /* Very subtle background */
    background-color: rgba(0, 0, 0, 0.15) !important;
    
    /* Layout */
    padding: 12px 0 !important;
    margin: 0 !important;
    text-align: center !important;
    
    /* Performance enhancement */
    transform: translateZ(0) !important;
    will-change: transform !important;
    transition: background-color 0.3s ease !important;
  }
  
  /* Create a pseudo-element for the blur effect */
  /* liker bluren her */
  .top-nav::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
  }
  
  /* Firefox-specific adjustments */
  @-moz-document url-prefix() {
    .top-nav {
      background-color: rgba(10, 10, 10, 0.25) !important;
    }
    
    .top-nav::before {
      background: linear-gradient(to bottom, 
                  rgba(0, 0, 0, 0.15) 0%, 
                  rgba(0, 0, 0, 0.1) 50%, 
                  rgba(0, 0, 0, 0) 100%) !important;
    }
  }
  
  /* Logo in navigation */
  .top-nav .logo-nav {
    width: 70px !important;
    height: auto !important;
    opacity: 0.85 !important;
    margin: 0 auto 8px !important;
    display: block !important;
  }
  
  /* Navigation list container */
  .top-nav ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    gap: 2rem !important;
    flex-wrap: wrap !important;
  }
  
  /* Navigation list items */
  .top-nav ul li a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: 300 !important;
    transition: color 0.2s ease !important;
  }
  
  .top-nav ul li a:hover {
    color: #dfefff !important;
  }
  
  /* Clickable logo container */
  .top-nav > a {
    display: inline-block !important;
    transition: opacity 0.2s ease !important;
    margin-left: 20px !important; /* Add space from left edge */
  }
  
  .top-nav > a:hover {
    opacity: 1 !important;
  }
  
  /* ==========================================================================
     Main content container
     ========================================================================== */
  .content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    /* Adjusted padding to account for fixed header */
    padding-top: 160px !important; /* This value should be adjusted based on your header height */
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 5rem;
    text-align: left;
  }
  
  
  /* ==========================================================================
     Typography
     ========================================================================== */
  /* Logo image */
  .logo {
    width: 100px;
    height: auto;
    opacity: 0.85;
    margin-bottom: 2rem;
  }
  
  /* Headings */
  h1, h2, h3 {
    font-family: 'Exo 2', sans-serif;
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 1rem;
  }
  
  h1 {
    font-size: 2.3rem;
    margin-top: 4rem;
    text-transform: uppercase;
  }
  
  h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    text-transform: uppercase;
  }
  
  h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
  }
  
  /* Paragraphs */
  p {
    max-width: 600px;
    color: #ccc;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  /* General links */
  a {
    color: #ccc;
    text-decoration: underline;
  }

/* ==========================================================================
   Projects Grid Styles
   ========================================================================== */
   .projects-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    margin-bottom: 2rem;
  }
  
  /* Maintain your existing project-card styles */
  .project-card {
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  
  /* Adjust for larger screens - optional */
  @media (min-width: 1200px) {
    .projects-container {
      grid-template-columns: repeat(2, 1fr);
      gap: 3rem;
    }
    
    .content {
      max-width: 1200px; /* Only when viewing projects page */
    }
  }
  
  /* ==========================================================================
     Navigation styles (for non-fixed navigation)
     ========================================================================== */
  nav {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding: 0 1rem;
    max-width: 100vw;
    -webkit-overflow-scrolling: touch;
  }
  
  nav a {
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    color: #ffffff;
    font-size: 1rem;
    transition: color 0.1s ease, letter-spacing 0.5s ease;
  }
  
  nav a:hover {
    color: #a9c8e6;
    letter-spacing: 0.5px;
  }
  
  nav::-webkit-scrollbar {
    display: none; /* Hide horizontal scrollbar for cleaner look */
  }
  
  /* ==========================================================================
     Main page return button
     ========================================================================== */
  .main-button {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 1rem;
    color: #ffffff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
  }
  
  .main-button:hover {
    color: #dfefff;
    border-color: #dfefff;
  }
  
  /* ==========================================================================
     Profile Elements
     ========================================================================== */
  .profile-pic {
    width: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    opacity: 0.95;
  }
  
  .email a {
    color: #ffffff;
    text-decoration: underline;
  }
  
  .social-links {
    margin-top: 1rem;
  }
  
  .social-links a {
    color: #ffffff;
    font-size: 1.5rem;
    margin-right: 1rem;
    text-decoration: none;
    transition: color 0.2s ease;
  }
  
  .social-links a:hover {
    color: #dfefff;
  }
  
  /* ==========================================================================
     Footer Styles
     ========================================================================== */
  .footer {
    width: 100%;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .footer-content {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
  }
  
  /* Footer links - using stronger selectors to override any other styles */
  .footer .contact a,
  .footer-content .contact a,
  .contact a,
  footer a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
  }
  
  .footer .contact a:hover,
  .footer-content .contact a:hover,
  .contact a:hover,
  footer a:hover {
    color: white !important;
  }
  
  /* ==========================================================================
     Responsive adjustments
     ========================================================================== */
  @media (max-width: 768px) {
    /* Footer adjustments */
    .footer-content {
      flex-direction: column;
      gap: 1rem;
      text-align: center;
    }
    
    /* Navigation adjustments */
    .top-nav ul {
      flex-direction: column;
      gap: 1rem;
    }
    
    /* Adjust padding for smaller screens */
    .content {
      padding-top: 180px !important; /* More space for stacked nav on mobile */
    }
  }

  /* Position logo container to the left */
  .top-nav > a {
    display: inline-block !important;
    float: left !important;
    margin-left: 1.5rem !important;
    margin-right: auto !important;
  }
  
  /* Position the logo image to the left */
  .top-nav .logo-nav {
    margin: 0 !important;
    text-align: left !important;
  }
  
  /* Add clearfix to prevent layout issues */
  .top-nav:after {
    content: "" !important;
    display: table !important;
    clear: both !important;
  }
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */
   @media (max-width: 768px) {
    /* Footer adjustments */
    .footer-content {
      flex-direction: column;
      gap: 1rem;
      text-align: center;
    }
    
    /* Navigation adjustments */
    .top-nav ul {
      flex-direction: column;
      gap: 1rem;
    }
    
    /* Adjust padding for smaller screens */
    .content {
      padding-top: 180px !important; /* More space for stacked nav on mobile */
    }
    
    /* Position logo container to the left */
    .top-nav > a {
      display: inline-block !important;
      float: left !important;
      margin-left: 1.5rem !important;
      margin-right: auto !important;
    }
    
    /* Position the logo image to the left */
    .top-nav .logo-nav {
      margin: 0 !important;
      text-align: left !important;
    }
    
    /* Add clearfix to prevent layout issues */
    .top-nav:after {
      content: "" !important;
      display: table !important;
      clear: both !important;
    }
  }
  
  /* ==========================================================================
     Mobile Navigation Enhancements
     ========================================================================== */
  /* Hamburger menu button for mobile */
  .mobile-menu-toggle {
    display: none;
  }
  
  @media (max-width: 768px) {
    /* Hide original menu on mobile and set up for menu toggle functionality */
    .top-nav ul {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.5s ease-in-out;
      padding: 0 !important;
      margin: 0 !important;
      opacity: 0;
    }
    
    /* Display menu when active class is added (via JavaScript) */
    .top-nav ul.active {
      max-height: 300px;
      opacity: 1;
      padding-top: 1rem !important;
      padding-bottom: 1rem !important;
      width: 100% !important;
      background-color: rgba(0, 0, 0, 0.85) !important;
      clear: both !important;
    }
    
    /* Style individual menu items better on mobile */
    .top-nav ul li {
      margin: 0.5rem 0 !important;
      width: 100% !important;
      text-align: center !important;
    }
    
    /* Make menu items take more space */
    .top-nav ul li a {
      padding: 0.75rem !important;
      display: block !important;
      width: 100% !important;
      max-width: 300px !important;
      margin: 0 auto !important;
      text-align: center !important;
      border-radius: 4px !important;
      background-color: rgba(255, 255, 255, 0.05) !important;
    }
    
    /* Menu toggle button styling */
    .mobile-menu-toggle {
      display: block;
      position: absolute;
      right: 1.5rem;
      top: 1.5rem;
      background: transparent;
      border: none;
      color: white;
      font-size: 1.5rem;
      cursor: pointer;
      z-index: 10000;
    }
    
    /* Improve top nav appearance on mobile */
    .top-nav {
      padding: 10px 0 !important;
      text-align: center !important;
    }
  }