/* General styles */
html {
    scroll-behavior: smooth;
    max-width: 2560px;
    margin: 0 auto;
}

body {
    font-family: var(--font--family); /* Use custom font */
    position: relative; /* Ensure body is positioned correctly */
    z-index: 1; /* Ensure body content is above the background */
    background-color: black;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-y: scroll;
    opacity: 1; /* Initial state */
    visibility: hidden; /* Initial state */
    transition: opacity 300ms ease; /* Transition properties */
}

body.fade-in {
    opacity: 1;
    visibility: visible;
}

body.fade-out {
    opacity: 0;
    visibility: hidden;
}

.nav-links,
.technology-container,
.button,
.project-technology,
a {
    transition: all 0.5s ease;
}

a {
    text-decoration: none;
    color: var(--text-color);
    position: relative;
}

a:hover {
    color: var(--accent-color);
}

a[id] {
    display: block;
    visibility: hidden;
    position: relative;
}

li {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

p {
    color: var(--secondary-text-color);
}

h1,
h2,
h3,
p {
    cursor: default;
}

ul {
    padding: 0;
    margin: 0;
}


#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-color);
    color: #000000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#scroll-to-top:hover {
    background-color: #02cc74;
    transform: translateY(-5px);
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

#scroll-to-top:hover img {
    transform: translateY(-2px);
}

/* Fade-in and slide-in animations */
.fade-in-1, .fade-in-2, .fade-in-3, .fade-in-4, .fade-in-5, .fade-in-6 {
    opacity: 0;
    filter: blur(10px); /* Initial blur effect */
    transition: opacity 1s ease-in, filter 1s ease-in; /* Transition for both opacity and blur */
}

.fade-in-1.active, .fade-in-2.active, .fade-in-3.active, .fade-in-4.active, .fade-in-5.active, .fade-in-6.active {
    opacity: 1;
    filter: blur(0); /* Remove blur effect */
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    filter: blur(10px);
    transition: opacity 1s ease-in, transform 1s ease-in, filter 1s ease-in;
}

.slide-in-left.active {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

.slide-in-bottom {
    opacity: 0;
    transform: translateY(50px);
    filter: blur(10px);
    transition: opacity 1s ease-in, transform 1s ease-in, filter 1s ease-in;
}

.slide-in-bottom.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Hero section */
#hero-background {
    position: relative;
    overflow: hidden;
    z-index: 1;
    padding-bottom: 2em;
}

.gradient-overlay {
    position: absolute;
    top: 60%;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 1) 100%
    );
    pointer-events: none;
    z-index: 2;
}

nav {
    background-color: rgba(0, 0, 0, 0); /* Add a semi-transparent background color */
}
.nav-bar {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-column: span 12;
    align-items: center;
    color: var(--text-color);
    height: 80px; /* Set a fixed height for the navbar */
    z-index: 1000; /* Set a high z-index to ensure it is on top */
    position: relative; /* Ensure it is positioned above the VANTA.NET background */
}

#logo {
    grid-column: 3 / span 1;
    font-weight: 200;
    font-size: 1.35rem;
    cursor: default;
}

.nav-bar.scrolled {
    background-color: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(10px); /* Add webkit prefix for Safari support */
    backdrop-filter: blur(10px);
    height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-links-container {
    grid-column: 7 / span 4; /* Moved from 8 to 7 to reduce space */
    display: flex;
    justify-content: flex-end; /* Align links to the right */
    gap: 2.5rem;
}

/* Base navigation link styles */
.nav-links {
    font-size: 1.25rem;
    cursor: pointer;
    position: relative;  /* Required for absolute positioning of underline */
    transition: all 0.3s ease;
}

/* Animated underline element */
.nav-links::after,
a::after {
    content: '';
    position: absolute;  /* Position relative to nav link */
    width: 0;           /* Start with 0 width */
    height: 2px;        /* Thickness of underline */
    bottom: -4px;       /* Space between text and underline */
    left: 0;           /* Align to left edge */
    background-color: var(--accent-color);
    transition: width 0.3s ease;  /* Smooth width animation */
}

/* Expand underline on hover */
.nav-links:hover::after,
a:hover::after {
    width: 100%;  /* Expand to full width */
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Subtract the navbar height */
    text-align: center;
    margin-top: -5.5rem; /* Offset the navbar height */
    cursor: default;
}

.hero .column {
    width: 100%;
    grid-column: 2 / span 10;
    margin: 0 auto;
    color: var(--text-color);
}
.hero #hero-introduction {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1.15rem;
    margin: 0 auto; /* Reset and center */
    width: 50%; /* Control width */
    padding: 1rem;
    box-sizing: border-box; /* Include padding in width calculation */
}

#hero-introduction {
    color: #a9a9a9;
}


.hero h1 {
    font-size: clamp(2.5rem, 4vw, 5rem);
    max-width: 72%;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 auto;
}

strong {
    color: var(--accent-color);
}

/* Technologies section */
.technologies h2,
.technologies p{
    text-align: left;
    line-height: 1.5;
    padding: 0;
    margin: 0;
}

.main h2 {
    color: var(--text-color);
    font-size: 3rem;
    font-weight: 500;
    margin-left: -0.07em; /* Adjust margin for font */
}

.main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    color: var(--text-color);
}

.main p {
    font-family: 'Poppins', sans-serif;
    color: var(--secondary-text-color);
    font-weight: 500;
}

.technology-boxes {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Default to 4 columns */
    gap: 16px;
}

.technology-container {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 16px;
    background-color: #1a1a1a; /* Adjust as needed */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: default;
}

.technology-container:hover {
    background-color: #242424; /* Adjust hover background color */
}

.technology-icon {
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.technology-icon img {
    width: 2rem; /* Reduce size of icon within container */
    height: 2rem;
    object-fit: contain;
    display: block; /* Ensure proper display */
}

.technology-icon-background {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1); /* Default background for icons */
    border-radius: 8px;
}

.technology-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 1rem;
}

.technology-name {
    font-family: 'Raleway', 'Raleway Fallback', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.technology-description {
    font-family: 'Raleway', 'Raleway Fallback', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 4px 0 0;
}

#javascript .technology-icon-background {
    background-color: var(--javascript-bg);
}

#figma .technology-icon-background {
    background-color: var(--figma-bg);
}

#firebase .technology-icon-background {
    background-color: var(--firebase-bg);
}

#python .technology-icon-background {
    background: var(--python-bg);
}

#git .technology-icon-background {
    background-color: var(--git-bg);
}

#swift .technology-icon-background {
    background-color: var(--swift-bg);
}

#kotlin .technology-icon-background {
    background-color: var(--kotlin-bg);
}

#java .technology-icon-background {
    background: var(--java-bg);
}

/* Projects section */
.projects h2,
.projects p {
    text-align: left;
    line-height: 1.5;
    padding: 0;
    margin: 0 0 0 0;
    cursor: default;
}

.projects h2 {
    margin-top: 2.5em;
}

.projects p {
    margin-bottom: 2.5em;
}

.project-boxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns side by side */
    gap: 16px; /* Gap between the columns */
    margin-top: 2rem; /* Add margin to the top for spacing */
}

.project-container {
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Ensure content doesn't overflow the rounded edges */
    padding: 16px; /* Add padding inside the container */
    height: auto; /* Allow the container to adjust its height */
}

.project-image {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding-bottom: calc(426 / 528 * 100%); /* Maintain the aspect ratio of 528x426 */
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image covers the entire container */
    border-radius: 8px; /* Ensure the image has rounded edges */
    transition: transform 0.3s ease; /* Smooth scale transition */
}

.project-image img:hover {
    transform: scale(1.1); /* Scale the image on hover */
}

.project-details {
    flex-grow: 1; /* Ensure the text takes up the remaining space */
    margin-top: 16px; /* Add space between the image and the text */
}

.project-desc-links {
    color: #02cc74;
    font-size: 0.8rem;
}

.project-image-overlay {
    position: absolute;
    padding-left: 1rem;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;

}

.project-image-overlay p {
    font-family: 'Raleway', 'Raleway Fallback', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    margin: 0;
}

.project-technologies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Adjust minmax value as needed */
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.project-technology {
    cursor: default;
    font-family: 'Raleway', 'Raleway Fallback', sans-serif;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.1);
    border: solid 1px rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    text-align: center; /* Center text */
    box-sizing: border-box; /* Include padding in width calculation */
}

.project-technology:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Lighten the background on hover */
}

.project-button-container {
    display: flex;
    justify-content: flex-end; /* Align button to the right */
    margin-top: 1rem; /* Add space between the text and the button */
}

.project-button {
    font-family: 'Raleway', 'Raleway Fallback', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    background-color: var(--accent-color);
    color: #000000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-button:hover {
    background-color: #02cc74; /* Brighter mint green */
    /* color: var(--text-color); */
    transform: translateY(-5px); /* Subtle lift effect */
    box-shadow: 0 2px 4px rgba(0, 255, 191, 0.2); /* Mint-tinted shadow */
    color: #000000;
}

.project-button::after {
    display: none; /* Disable underline for project buttons */
}

.project-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer section */
footer {
    background-image: url('../images/topology/topology2.png');
    background-size: cover;
    background-position: center;
    margin-top: 10em;
    border-top: solid 2px #313131;
    color: var(--text-color);
    padding: 2rem 0;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto;
    gap: 1rem;
}

.footer-content {
    display: contents; /* Use contents to allow direct placement of children */
}

.footer-content h2 {
    grid-column: 2 / span 10;
    justify-self: start;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-column: 2 / span 10;
    gap: 1rem;
}

.footer-column:nth-child(1) {
    grid-column: 8 / span 2;
}

.footer-column:nth-child(2) {
    grid-column:10 / span 2;
}

.footer-column:nth-child(3) {
    grid-column: 12/ span 2;
}

.footer-bottom {
    grid-column: 2 / span 10; /* Align with the divider */
    justify-self: start; /* Align to the start */
}

.footer-column h3 {
    margin-bottom: 1rem;
    text-align: left; /* Center the heading */
}

.footer-column ul {
    width: 100%; /* Makes the ul take full width of column */
    padding: 0;
}

.footer-column li {
    text-align: left; /* Center the list items */
    margin-bottom: 0.5rem;
}

#divider {
    grid-column: 2 / span 10; /* Span the entire width of the footer */
    width: 100%;
    height: 2px;
    background-color: #313131;
    margin: 0 auto;
}

.footer-socials {
    grid-column: 2 / span 10;
    justify-self: center;
    margin-bottom: 2.5em;
}


.footer-socials-container a::after {
    display: none; /* Disable underline for footer social icons */
}

.footer-socials-container a {
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.footer-socials-container a:hover {
    color: var(--accent-color);
}


/* Large screens (1280px and above) */
@media (min-width: 1281px) {
    .main {
        grid-column: 2 / span 10;
    }

    .footer-container {
        grid-template-columns: repeat(12, 1fr);
    }
}

/* Desktop (1024px to 1280px) */
@media (max-width: 1280px) {
    .main {
        grid-column: 1 / span 12;
        padding: 0 2rem;
    }

    .hero #hero-introduction {
        padding: 1rem;
        width: 50%;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: clamp(1.2rem, 5vw, 4rem);
        max-width: 90%;
    }
}


@media (max-width: 1024px) {
    .main {
        grid-column: 1 / span 12;
        padding: 0 2rem;
    }

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

    .project-technology {
        font-size: 0.85rem;
        padding: 0.6rem 0.9rem;
    }

    .nav-bar {
        grid-template-columns: repeat(12, 1fr);
    }

    #logo {
        grid-column: 2 / span 2;
    }

    .nav-links-container {
        grid-column: 8 / span 4;
    }

    .hero h1 {
        font-size: clamp(2rem, 5vw, 4rem);
        max-width: 90%;
    }

    .main {
        grid-column: 1 / span 12;
    }

    .footer-container {
        grid-template-columns: repeat(6, 1fr);
        gap: 2rem;
    }

    .footer-column:nth-child(1) {
        grid-column: 2 / span 2;
    }

    .footer-column:nth-child(2) {
        grid-column: 4 / span 2;
    }

    .footer-column:nth-child(3) {
        grid-column: 6 / span 2;
    }
}

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

    .project-boxes {
        grid-template-columns: 1fr;
    }

    .project-technology {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .nav-bar {
        padding: 0 1rem;
    }

    #logo {
        grid-column: 1 / span 2;
    }

    .nav-links-container {
        grid-column: 7 / span 5;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 5vw, 4rem);
        max-width: 90%;
    }

    .hero #hero-introduction {
        width: 90%;
        margin: 0 auto;
        padding: 1rem;
        box-sizing: border-box;
    }

    .main {
        padding: 0 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-column {
        grid-column: 1 / -1 !important;
    }

    #scroll-to-top {
        display: none;
    }
}

@media (max-width: 560px) {
    .hero h1 {
        font-size: clamp(1.2rem, 5vw, 4rem);
        max-width: 90%;
    }

    .hero #hero-introduction {
        width: 100%;
        font-size: 0.9rem;
        margin: 0 auto;
        padding: 1rem;
        box-sizing: border-box;
    }

    .nav-links {
        font-size: 1rem;
    }

    .main h2 {
        font-size: 2rem;
    }

    /* .project-technologies {
        gap: 0.35rem;
    }

    .project-technology {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        margin-bottom: 0.25rem;
    } */
}

/* Small Mobile (below 480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: clamp(1.2rem, 7vw, 5rem);
        max-width: 90%;
    }

    .hero #hero-introduction {
        width: 100%;
        font-size: 0.9rem;
        margin: 0 auto;
        padding: 1rem;
        box-sizing: border-box;
    }


    .nav-links {
        font-size: 1rem;
    }

    .main h2 {
        font-size: 2rem;
    }

    .project-technologies {
        gap: 0.35rem;
    }

    .project-technology {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        margin-bottom: 0.25rem;
    }
}
