/* =====================
   BASE STYLES
===================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    background-color: #011936;
    transition: background-color 0.6s ease;
}

main {
    min-height: 70vh;
}

h1 {
    color: white;
    font-size: 3.5rem;
    margin: 0;
    text-align: center;
}

h2,
h3 {
    color: white;
    font-size: 2rem;
    margin: 5px 0 0;
    text-align: center;
}

/* =====================
   NAVIGATION
===================== */
.menu_bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 0;
    background-color: inherit;
    transition: background-color 0.6s ease;
}

.menu_title {
    text-align: center;
}

#menu_bar_border {
    width: 90%;
    padding: 0.75rem;
    border: 3px solid #27DFE5;
    border-radius: 15px;
    margin-top: 1rem;

    animation: neonShift 12s linear infinite;
}

@keyframes neonShift {
    from {
        filter: hue-rotate(0deg);
    }
    to {
        filter: hue-rotate(360deg);
    }
}


nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
    max-width: 90%;
    margin: 1rem 0;
    position: relative;
    left: 60px;
}

nav a {
    flex: 1 1 150px;
    max-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: 3px solid rgb(33, 236, 23);
    border-radius: 12px;
    background-color: transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

nav a img {
    max-height: 60px;
    object-fit: contain;
}


.nav-text {
    display: none;
}

nav a:hover {
    transform: translateY(-3px);
    border-color: #27DFE5;
    box-shadow: 0 4px 10px rgba(39, 223, 229, 0.4);
}

nav a.active {
    border-color: #27DFE5;
    box-shadow: 0 0 12px #27DFE5;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: #06fb33;
    cursor: pointer;
}


#menu_bar_border {
    width: 90%;
    padding: 0.5rem;
    border: 3px solid #27DFE5;
    border-radius: 15px;
    margin-top: 0.75rem;
    transition: border-color 0.6s ease;
}

/* =====================
   SECTION TRANSITIONS
===================== */
main {
    position: relative;
}

.section {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 20px);
    width: 90%;
    max-width: 1000px;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}


.section.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.section.fade-out {
    opacity: 0;
    transform: translate(-50%, 20px);
}


/* =====================
   ABOUT
===================== */
.about .about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.about img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border: 3px solid #27DFE5;
    border-radius: 15px;
    background-color: #01274d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

#about_header_text {
    color: white;
    font-size: 2rem;
    text-shadow: 0 0 10px hsl(357, 100%, 54%);
    animation: hue-shift 7s infinite alternate;
}

@keyframes hue-shift {
  0% {
    text-shadow: 0 0 10px hsl(357, 100%, 54%),
                 0 0 20px hsl(357, 100%, 54%);
  }
  50% {
    text-shadow: 0 0 10px hsl(120, 100%, 50%),
                 0 0 20px hsl(120, 100%, 50%);
  }
  100% {
    text-shadow: 0 0 10px hsl(240, 100%, 50%),
                 0 0 20px hsl(240, 100%, 50%);
  }
}

#about_body_text {
    flex: 1;
    min-width: 250px;
    color: white;
    font-size: 1.25rem;
    line-height: 1.6;
}

/* =====================
   SKILLS & CONTACT
===================== */
.logos-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    justify-items: center;
    width: 100%;
}

.logo-card,
.contact-card {
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-card {
    border: 3px solid #5215ec;
}

.contact-card {
    border: 3px solid #06d6fb;
}

.logo-card:hover,
.contact-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(3,248,85,0.5);
}

.logo-card img,
.contact-card img {
    max-width: 80%;
    max-height: 80%;
}

.contact-card a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Section titles */
#skills_text,
#projects_text,
#contact_text {
    grid-column: 1 / -1;
    font-size: 2.5rem;
    font-weight: bold;
    color: #27DFE5;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow:
        0 0 5px #27DFE5,
        0 0 10px #27DFE5,
        0 0 20px #27DFE5,
        0 0 40px #027a18;
}

/* =====================
   PROJECTS
===================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
    justify-items: center;
}

.project-card {
    width: 100%;
    padding: 1.5rem;
    border: 3px solid #9002cd;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(3,248,85,0.5);
}

.project-link a {
    font-size: 1.4rem;
    font-weight: bold;
    color: #27DFE5;
    text-decoration: none;
    text-shadow: 0 0 5px #27DFE5, 0 0 10px #27DFE5;
}

.projects img {
    width: 250px;
    height: 250px;
}

.project-text p {
    color: white;
}

/* =====================
   SCROLL TO TOP BUTTON
===================== */
#scrollToNav {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: #27DFE5;
    color: #011936;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(39,223,229,0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#scrollToNav.visible {
    opacity: 1;
    pointer-events: auto;
}

#scrollToNav:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(39,223,229,0.7);
}

/* =====================
   THEME COLORS
===================== */
.theme-about { background-color: #110051; }
.theme-skills { background-color: #49035b; }
.theme-projects { background-color: #4f030d; }
.theme-contact { background-color: #033309; }

/* =====================
   MOBILE
===================== */
@media (max-width: 700px) {
    .about .about-content {
        flex-direction: column;
        text-align: center;
    }

    nav {
        display: none;
        flex-direction: column;
    }

    nav.active {
        display: flex;
    }

    #about_button {
        position: relative;
        right: 40px;
        max-height: 45px;
    }

    #skills_button {
        position: relative;
        right: 40px;
        max-height: 45px;
    }

    #projects_button {
        position: relative;
        right: 40px;
        max-height: 45px;
    }

    #contact_button {
        position: relative;
        right: 40px;
        max-height: 45px;
    }

    .menu-toggle {
        display: block;
    }

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

    .about img {
        order: -1;
    }
}
