/* --- Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', Tahoma, Geneva, Verdana, sans-serif;
}




html {
    scroll-behavior: smooth;
    container-type: scroll-state;
}

body {

    /* costum cursor */
    cursor: url('../img/cursor.png') 32 32, auto;

    
    /* 1. Setup the default coordinates (centered) so it looks great before the mouse moves */
    --mouse-x: 50%;
    --mouse-y: 50%;

    /* 2. Create the radial gradient. 
       We use a soft, translucent version of your primary color that fades into your background color */
    background: radial-gradient(
        50vh circle at var(--mouse-x) var(--mouse-y), 
        var(--color-hero) 0%, 
        var(--color-bg) 100%
    );

    /* 3. FIX: Pins the background gradient relative to the browser window while scrolling */
    background-attachment: fixed;


    color: var(--color-text-main);
    line-height: 1.6;

    /* Smooth transition for any color changes */
    transition: background-color 0.3s ease, color 0.3s ease; 
}

small {
    font-size: 0.65rem;
    margin-top: 1.2rem;
    display: block;

}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}


/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 25px;
}

.btn-main {
    background: none;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-main:hover {
    background: var(--color-primary);
    color: var(--color-bg);
    border: 2px solid var(--color-primary);
}

.btn-inverse {
    border: 2px solid var(--color-text-light);
    color: var(--color-text-light);
}

.btn-inverse:hover {
    background-color: var(--color-bg);
    color: var(--color-primary);
}


/* --- Sticky Navigation Menu --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--color-nav-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border-nav);
    padding: 1rem 0;
    transition: all 0.3s ease;    
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 1px;
    font-family: 'Baloo 2', Inter, Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-nav);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    font-family: 'Baloo 2', Inter, Tahoma, Geneva, Verdana, sans-serif;
}

.nav-links a:hover {
    color: var(--color-primary);
}


/* --- Desktop Adjustments --- */
.hamburger-btn {
    display: none; /* Hidden on big screens */
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.hamburger-btn:hover {
    color: var(--color-text-nav);
}


/* --- Theme Toggle Button --- */
.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem; /* Spacing between the link menu and the button */
}

.theme-btn {
    background: var(--color-bg-alt);
    /* border: 1px solid var(--color-border-nav); */
    border-color: transparent;

    /* Uses the primary color for the icon by default */
    color: var(--color-primary);
    
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;

    
    /* Added color and background-image to the transition for smoothness */
    transition: transform 0.2s, background-image 0.3s, color 0.3s;
}

.theme-btn:hover {
    transform: scale(1.1);
    color: var(--color-text-light);  
    background: var(--color-primary);
    border-color: transparent;
}

/* Adjust mobile layout spacing */
@media (max-width: 768px) {
    .nav-right {
        gap: 1rem;
    }
}

/* --- HERO SECTION --- */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 2rem 2rem 2rem;
    background: none;
    top: 0;
    z-index: 1;
    will-change: transform, opacity, background;
    margin-top: 0; /* Reset any default margin */
}

.hero-spacer {
    display: none;
}

.hero-title {
    font-size: clamp(1.4rem, 3vw, 2.6rem);
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: 'Inter', Tahoma, Geneva, Verdana, sans-serif;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    height: clamp(150px, 30vh, 260px);
    width: auto;
    display: block;
}


/* --- Section Commons --- */
section {
    padding: 5rem 0;
    margin: 10rem 0 0 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 4rem;
    text-transform: uppercase;
    position: relative;
    text-align: center;
    font-family: 'Baloo 2', Inter, Tahoma, Geneva, Verdana, sans-serif;
}

.section-title-2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    position: relative;
    font-family: 'Baloo 2', Inter, Tahoma, Geneva, Verdana, sans-serif;
}

.section-title-2 h2 {
    color: var(--color-text-light);
}

/* --- Content Layouts --- */
.grid-2col {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* --- About Section --- */

#about {
    position: relative;
    z-index: 2;    
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    max-width: 350px;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.about-info p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}


/* --- Projects Section --- */
#projects {
    position: relative;
    z-index: 2;
}

.project-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    margin-bottom: 6rem;
    align-items: center;
}

.project-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-family: 'Baloo 2', Inter, Tahoma, Geneva, Verdana, sans-serif;
}

.project-info p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.project-image {
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.project-image:hover {
    transform: translateY(-5px);
}

.project-image img {
    width: 100%;
    border-radius: 3px;
}

#project-header {
    padding: 4rem 0;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border-light);
}

.project-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.project-tagline {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 700px;
}


/* --- Section Grid --- */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch;
}

.card {
    background: var(--color-bg-alt);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--color-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 1rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-family: 'Baloo 2', Inter, Tahoma, Geneva, Verdana, sans-serif;
}

.card-content p {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    line-height: 1;
}

/* Keep the old project-row styles from interfering */
.project-row {
    display: none;
}



/* --- Contact Section --- */
#contact {
    background: var(--color-secondary);
    color: var(--color-text-light);
    text-align: center;
    padding: 7rem 0;
    margin-top: 20rem;
    z-index: 2;
    position: relative;
}

#contact p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* --- Footer --- */
footer {
    background-color: var(--color-footer); 
    color: var(--color-text-main);
    text-align: center;
    padding: 0 0 1rem   0;
    z-index: 2;
    position: relative;
}

.back-to-top i {
    color: var(--color-text-main);
    margin: 0.1rem 0 0.6rem;
    transition: all .2s ease-in;
    font-size: 10vh;
}

.back-to-top i:hover {
    color: var(--color-primary);
    transform: translateY(-5px);
} 

.social-links {
    margin-bottom: 0.5rem;
}

.social-links a {
    text-decoration: none;
}

.social-links a i {
    height: 3rem;
    width: 3rem;
    color: var(--color-text-main);
    margin: 0 1rem;
    font-size: xx-large;
    transition: color 0.3s, transform 0.3s ease;
}

.social-links a i:hover {
    color: var(--color-primary);
    transform: translateY(-5px);
}


/* --- Responsive Design ---*/
@media (max-width: 768px) {
    .project-title { font-size: 2.2rem; }
    .grid-2col { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-title { font-size: 1rem; }
    .hero-image img{
    height: 20vh;
    width: auto;
    }
    .about-wrapper, .project-row { grid-template-columns: 1fr; gap: 2rem; }
    .about-info {
        align-items: center;
        text-align: center;
    }
    .project-row { margin-bottom: 4rem; }
    #contact { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    #about { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    .feature-showcase, .feature-showcase.reverse { grid-template-columns: 1fr; direction: ltr; gap: 2rem; }

    .hamburger-btn {
        display: block; /* Show hamburger button on mobile */
    }

    /* Convert the list into a absolute-positioned drop-down menu */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%; /* Sits exactly under the navbar */
        left: 0;
        width: 100%;
        background-color: var(--color-bg);
        border-bottom: 1px solid var(--color-border-nav);
        padding: 1.5rem 0;
        gap: 1.5rem !important;
        text-align: center;

        
        /* Hide menu by default */
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        z-index: 99;
    }

    /* Active class applied by JavaScript */
    .nav-links.active {
        max-height: 400px;
        height: auto; /* Expands to show options */
        opacity: 1;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1rem !important;
    }
}


/* Mobile layout: 1 card wide */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .card img {
        height: 220px;
    }
}

/* Wide phones and tablets */
@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Small laptops and tablets */
@media (min-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Desktop */
@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Mobile fallback */
@media (max-width: 639px) {
    .card img {
        height: 220px;
    }
}
