* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: black;
    color: purple;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
}

main, section {
    display: none;
}

#home {
    display: block;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.sidebar {
    position: fixed;
    left: -100px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-right: 2px solid purple;
    transition: left 0.3s ease;
    z-index: 10;
}

.sidebar {
    position: fixed;
    left: -120px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 15px;
    border-right: 2px solid purple;
    transition: left 0.3s ease;
    z-index: 10;
}

.sidebar a {
    text-decoration: none;
    color: purple;
    padding: 16px 25px;
    border: 2px solid purple;
    font-weight: bold;
    background: rgba(0, 255, 255, 0.05);
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
    font-size: 1.1rem;
}

.sidebar:hover {
    left: 0;
}


.sidebar a.active {
    background: purple;
    color: black;
    box-shadow: 0 0 10px purple, 0 0 20px purple;
}

.center-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    animation: fadeUp 1.2s ease forwards;
    animation-delay: 1s;
}

.center-content h1 {
    font-size: 5rem;
    text-shadow: 0 0 10px purple, 0 0 20px purple, 0 0 30px purple;
}

.center-content p {
    margin-top: 15px;
    font-size: 2rem;
    text-shadow: 0 0 5px purple, 0 0 10px purple;
}

@keyframes fadeUp {
    from { transform: translate(-50%, -40%); opacity: 0; }
    to   { transform: translate(-50%, -50%); opacity: 1; }
}

@keyframes slideInText {
    from { transform: translateX(-80px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideInImage {
    from { transform: translateX(80px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

#about {
    display: none;
    min-height: 80vh;
    padding: 80px 20px;
    color: purple;
    background: black;

    display: flex;
    justify-content: center;
    align-items: center;
}


.about-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 60px;
    max-width: 1000px;
    width: 100%;
    flex-wrap: wrap;
}


.about-text {
    flex: 1;
    min-width: 300px;
    max-width: 550px;
    text-align: left;
    opacity: 0;
    animation: slideInText 1s forwards;
    animation-delay: 0.5s;
}

.about-text h2 {
    font-size: 3rem;
    color: purple;
    text-shadow: 0 0 10px purple, 0 0 20px purple;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 15px;
    text-shadow: 0 0 5px purple;
}

.about-image {
    flex-shrink: 0;
    opacity: 0;
    animation: slideInImage 1s forwards;
    animation-delay: 0.8s;
}

.about-image img {
    width: 300px;
    height: auto;
    border-radius: 15px;
    border: 2px solid purple;
    box-shadow: 0 0 10px purple, 0 0 20px purple;
    object-fit: cover;
    transition: box-shadow 0.3s ease;
}

.about-image img:hover {
    box-shadow: 0 0 20px purple, 0 0 40px purple, 0 0 60px purple;
}

.portfolio-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    color: purple;
}

.portfolio-section h2 {
    font-size: 2.5rem;
    text-shadow: 0 0 10px purple;
    margin-bottom: 40px;
    text-align: center;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1000px;
}

.portfolio-card {
    border: 2px solid purple;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 0 10px purple;
    transition: transform 0.3s, box-shadow 0.3s;
    background: black;
    width: 100%;
    max-width: 280px;
}

.portfolio-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: grayscale(50%) brightness(80%);
    transition: filter 0.3s;
}

.portfolio-card:hover img {
    filter: grayscale(0%) brightness(100%);
}

.project-title {
    background: rgba(0, 255, 255, 0.15);
    padding: 5px 10px;
    color: purple;
    font-weight: bold;
    text-shadow: 0 0 5px purple;
    border: 1px solid purple;
    margin-top: -35px;
    z-index: 2;
}

.portfolio-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px purple, 0 0 40px purple;
}


.contact-section {
    display: none;
    min-height: 80vh;
    padding: 80px 20px;
    color: purple;
    background: black;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.contact-section h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    text-shadow: 0 0 10px purple, 0 0 20px purple;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1000px;
}

.contact-card {
    border: 2px solid purple;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 0 10px purple;
    transition: transform 0.3s, box-shadow 0.3s;
    background: black;
    width: 100%;
    max-width: 250px;
    padding: 15px;
    border-radius: 10px;
}

.contact-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 5px;
    transition: transform 0.3s;
}

.contact-card:hover img {
    transform: scale(1.1);
    filter: brightness(1) invert(0);
}

.contact-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: purple;
    text-shadow: 0 0 5px purple;
}

.contact-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px purple, 0 0 40px purple;
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .about-text, .about-image {
        max-width: 100%;
    }

    .contact-grid, .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sidebar {
        left: -60px;
        padding: 10px;
    }

    .sidebar a {
        padding: 10px 15px;
        font-size: 1rem;
    }

    .center-content h1 {
        font-size: 3rem;
    }

    .center-content p {
        font-size: 1.5rem;
    }
}


#about, #portfolio, #contact {
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 40px;
}

#about::-webkit-scrollbar,
#portfolio::-webkit-scrollbar,
#contact::-webkit-scrollbar {
    width: 6px;
}

#about::-webkit-scrollbar-track,
#portfolio::-webkit-scrollbar-track,
#contact::-webkit-scrollbar-track {
    background: transparent;
}

#about::-webkit-scrollbar-thumb,
#portfolio::-webkit-scrollbar-thumb,
#contact::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

#about::-webkit-scrollbar-thumb:hover,
#portfolio::-webkit-scrollbar-thumb:hover,
#contact::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

body {
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
  #about {
    padding-top: calc(env(safe-area-inset-top, 0px) + 80px);
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 40px;
    min-height: auto;
    max-height: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .about-container {
    margin-top: 0;
    gap: 20px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-text,
  .about-image {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }

  .about-text h2 {
    margin-top: 0;
    font-size: 2rem;
  }

  .about-text p {
    font-size: 1rem;
    line-height: 1.55;
  }

  .about-image img {
    width: 220px;
    height: auto;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .mobile-menu-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: purple;
    cursor: pointer;
    z-index: 1001;
    text-shadow: 0 0 10px purple;
  }

  .mobile-menu {
    position: fixed;
    top: 0;
    right: -220px;
    width: 200px;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 60px 20px;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .mobile-menu a {
    text-decoration: none;
    color: purple;
    padding: 12px;
    border: 2px solid purple;
    font-weight: bold;
    text-align: center;
    background: rgba(0, 255, 255, 0.05);
    transition: transform 0.2s, background 0.2s;
  }

  .mobile-menu a:hover {
    transform: scale(1.05);
    background: purple;
    color: black;
  }

  .mobile-menu.open {
    right: 0;
  }
}

.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  color: purple;
  position: fixed;
  top: 20px;
  left: 20px;
  cursor: pointer;
  z-index: 2000;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: -220px;
  width: 200px;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  border-right: 2px solid purple;
  padding-top: 60px;
  transition: left 0.3s ease;
  z-index: 1500;
  flex-direction: column;
}

.mobile-menu a {
  display: block;
  padding: 15px;
  color: purple;
  text-decoration: none;
  border-bottom: 1px solid purple;
}

.mobile-menu a.active {
  background: purple;
  color: black;
}

.mobile-menu.active {
  display: flex;
  left: 0;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  .sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  #about, #portfolio, #contact {
    min-height: auto;
    max-height: none;
    padding-top: 100px;
  }
}

