/* BACKGROUND SECTION */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Stops padding from breaking layout width calculations */
}

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden; /* Guards against horizontal layout spills */
}

body {
    background: linear-gradient(
        to bottom right,
        #111111,
        #000000,
        #111111,
        #000000
    );
    cursor: default;
    position: relative;
    opacity: 0;
    animation: pageFadeIn 1s ease forwards;
}

@keyframes pageFadeIn {
    to { opacity: 1; }
}

/* MAINALL - ALL SECTION TOGETHER */
.mainall {
    position: relative;
    width: 100%;
    height: 100vh; 
    overflow: hidden;
    display: flex;
    align-items: center; 
    /* No justify-content here! */
}


/* NAVIGATION BAR SECTION */
.navmain {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: linear-gradient(
        to bottom right,
        #00000097,
        #11111198,
        #14131376,
        #0000005d
    );
    z-index: 15;
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
}

.navlinks {
    display: flex;
    gap: 30px;
    align-items: center;
    
}

.navi {
    color: rgba(255, 255, 255, 0.509);
    font-family: 'Courier New', Courier, monospace;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
    position: relative;

}

/* Highlights the text of the active page */
.navi.active {
    color: rgb(255, 255, 255);
}

/* Draws the custom underline */
.navi.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px; /* Thickness of the underline */
    bottom: -6px; /* How far below the text the line sits */
    left: 0;
    background-color: rgb(255, 255, 255);
    border-radius: 2px; /* Softens the edges of the line */
}

.upwork {
    background-color: rgb(0, 0, 0);
    border-radius: 20px;
    border: 2px solid rgb(255, 255, 255); /* Reduced from 7px for a cleaner look */
    padding: 6px 16px; /* Adds breathing room around the text inside the button */
    color: #ffffff;
    font-size: 16px; /* Lowered from 20px to match standard navigation sizes better */
    display: inline-flex; /* Ensures the text inside the button stays centered */
    align-items: center;
    justify-content: center;
}

/* NAVIGATION BAR HOVER SECTION */
.home:hover, .portfolio:hover, .contact:hover {
    transform: scale(1.05);
    color: rgb(255, 255, 255);
}

.upwork:hover {
    transform: scale(1.05);
    background-color: white;
    color: #000000;
}
/* FORM CONTAINER */
.firstform {
    display: flex;
    flex-direction: column; 
    gap: 15px; 
    background: rgba(20, 20, 20, 0.7); 
    padding: 40px; 
    border-radius: 15px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    width: 100%;
    max-width: 450px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); 
    backdrop-filter: blur(10px); 
    
    /* ADD THESE TWO LINES */
    margin-left: auto; /* Pushes ONLY the form to the right */
    margin-right: 5%; /* Creates the gap between the form and the screen edge */
}

/* FORM TEXT / LABELS */
.formm {
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace; /* Matches your navigation font */
    font-size: 15px;
    margin-bottom: -5px; /* Pulls the text slightly closer to its input box */
    letter-spacing: 1px;
}

/* INPUT FIELDS */
.firstform input[type="text"] {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5); /* Dark background for the text boxes */
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    outline: none; /* Removes the default ugly blue glow when clicked */
    transition: border 0.3s ease, background 0.3s ease;
}

/* INPUT FOCUS STATE (When user is typing) */
.firstform input[type="text"]:focus {
    border-color: #ffffff; /* Highlights the border white when clicked */
    background: rgba(20, 20, 20, 0.9);
}
/* SUBMIT BUTTON */
.submit-btn {
    margin-top: 10px;
    background-color: rgb(0, 0, 0);
    border-radius: 20px;
    border: 2px solid rgb(255, 255, 255);
    padding: 10px 20px;
    color: #ffffff;
    font-family:'Courier New', Courier, monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.submit-btn:hover {
    transform: scale(1.02);
    background-color: white;
    color: #000000;
}

/* FOOTER BAR SECTION */
.footbar {
    display: flex;
    justify-content: center;
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(
        to bottom right,
        #00000097,
        #11111198,
        #14131376,
        #0000005d
    );
    color: rgba(255, 255, 255, 0.552);
    font-size: 13px;
    border-top: 2px solid rgba(61, 60, 60, 0.77);
    font-style: italic;
}
.nav-toggle {
    display: none;
}

.hamburger {
    display: none;
}

/* MOBILE RESPONSIVE STYLES (Max width 1024px) */
@media screen and (max-width: 1024px) {
    .navmain {
        padding: 15px 25px;
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }

    /* Hide the checkbox entirely */
    .nav-toggle {
        display: none;
    }

    /* Style the 3-line Hamburger container */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 20;
    }

    /* Style the individual horizontal lines */
    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: rgb(255, 255, 255);
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    /* Update this block in your media query */
    .navlinks .navi {
        font-size: 18px;
        display: inline-block; /* Changed from block */
        width: auto; /* Changed from 100% */
        margin: 0 auto; /* Centers the items in the column */
    }
    /* Transform Navlinks into a full-width drop-down panel */
    .navlinks {
        display: flex;
        flex-direction: column;
        gap: 25px;
        position: absolute;
        
        /* Positions it exactly below the main navbar */
        top: 100%; 
        left: 0;
        width: 100%;
        padding: 30px 0;
        text-align: center;
        background: rgba(17, 17, 17, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        
        /* Pulls it up out of view by default */
        transform: translateY(-150%);
        opacity: 0;
        pointer-events: none; /* Prevents clicking links while hidden */
        transition: transform 0.4s ease, opacity 0.3s ease;
        z-index: 14;
    }

    /* Make the nav links slightly larger for easy mobile tapping */
    .navlinks .navi {
        font-size: 18px;
        display: block;
        width: 100%;
    }

    /* CSS TRICK: When checkbox is checked, slide the menu DOWN */
    .nav-toggle:checked ~ .navlinks {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto; /* Reactivates link clicks when visible */
    }

    /* OPTIONAL: Turns the hamburger into an 'X' when clicked */
    .nav-toggle:checked ~ .hamburger span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .nav-toggle:checked ~ .hamburger span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle:checked ~ .hamburger span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    .navi.active {
    color: rgb(255, 255, 255);
}

/* Draws the custom underline */
.navi.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px; /* Thickness of the underline */
    bottom: -6px; /* How far below the text the line sits */
    left: 0%;
    background-color: rgba(255, 255, 255, 0.272);
    border-radius: 2px; /* Softens the edges of the line */
}
}
