.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: currentColor;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.8s ease;
}

.toggle-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.content {
    margin-top: 2rem;
    line-height: 1.6;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
}

/* Animation classes */
.fade-out {
    opacity: 1 !important;
}

/*  Main CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Mono', monospace;
    color: #fff;
  }

  body {
    background-color: #000;
    overflow-x: hidden;
    perspective: 1000px;
  }

  .stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
  }

  .star {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    animation: twinkle 5s infinite;
  }

  @keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
  }

  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    position: fixed;
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  }

  .logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
  }

  .nav {
    display: flex;
    gap: 2rem;
  }

  .nav a {
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    transition: all 0.3s ease;
  }

  .nav a:hover {
    text-shadow: 0 0 5px #fff, 0 0 10px #fff;
  }

  .nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #fff;
    transition: width 0.3s ease;
  }

  .nav a:hover::after {
    width: 100%;
  }

  .hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
    position: relative;
  }

  .orbital-system {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
  }

  .orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform-style: preserve-3d;
    animation: rotate 20s linear infinite;
  }

  .planet {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    transform-style: preserve-3d;
  }

  @keyframes rotate {
    0% { transform: translate(-50%, -50%) rotateX(60deg) rotateZ(0deg); }
    100% { transform: translate(-50%, -50%) rotateX(60deg) rotateZ(360deg); }
  }

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

  .hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: fadeIn 2s ease;
  }

  .hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    animation: fadeIn 2s ease 0.5s both;
  }

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

  .cta-button {
    background-color: transparent;
    border: 1px solid #fff;
    padding: 12px 32px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeIn 2s ease 1s both;
    text-decoration: none;
    display: inline-block;
  }

  .cta-button:hover {
    background-color: #fff;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  }

  .sections {
    position: relative;
  }

  .section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
  }

  .section-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
  }

  .section-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
  }

  .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 2px;
    background-color: #fff;
  }

  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
  }

  .skill-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    transform: translateZ(0);
  }

  .skill-card:hover {
    transform: translateZ(20px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.1);
  }

  .skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .skill-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .skill-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
  }

  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
  }

  .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    height: 250px;
  }

  .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    filter: grayscale(100%);
  }

  .gallery-item:hover .gallery-img {
    transform: scale(1.1);
  }

  .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .gallery-item:hover .gallery-overlay {
    opacity: 1;
  }

  .contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
  }

  .form-group {
    position: relative;
  }

  .form-group.full {
    grid-column: 1 / -1;
  }

  .form-input, .form-textarea {
    width: 100%;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
  }

  .form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.1);
  }

  .form-textarea {
    min-height: 150px;
    resize: vertical;
  }

  .submit-btn {
    background-color: transparent;
    border: 1px solid #fff;
    padding: 12px 32px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    grid-column: 2;
    justify-self: end;
  }

  .submit-btn:hover {
    background-color: #fff;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  }

  footer {
    text-align: center;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-links {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    gap: 2rem;
  }

  .footer-link {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
  }

  .footer-link:hover {
    color: #fff;
    transform: scale(1.2);
  }

  .footer-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
  }

  @media (max-width: 768px) {
    .header {
      padding: 1.5rem 2rem;
    }

    .hero-title {
      font-size: 2.5rem;
    }

    .hero-subtitle {
      font-size: 1.2rem;
    }

    .section {
      padding: 3rem 1.5rem;
    }

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

    .skills-grid, .gallery {
      grid-template-columns: 1fr;
    }

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

    .submit-btn {
      grid-column: 1;
    }
  }
  .smooth-transition {
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background-color: #000000; /* Match your portfolio background */
          z-index: 9999;
          opacity: 1;
          pointer-events: none;
          transition: opacity 0.6s ease;
      }
      .contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.contact-item {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 150px;
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.contact-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.contact-icon {
  font-size: 1.8rem;
  margin-right: 1rem;
  opacity: 0.8;
}

.contact-title {
  font-size: 1.3rem;
  margin: 0;
}

.contact-detail {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
  margin-top: auto;
  word-break: break-all;
  padding: 0.5rem 0;
}

.contact-detail:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}