/* GLOBAL SETTINGS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #0b1120;       
    --text-color: #ffffff;     
    --main-color: #ffd700;     
    --second-bg-color: #161e2e; 
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

section {
    min-height: 100vh;
    padding: 6rem 9% 3rem; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 1. HEADER & NAVIGATION */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 9%;
    background: var(--main-color);
    display: flex;
    justify-content: center; 
    align-items: center;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    min-height: 75px; 
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem; 
}

.navbar a {
    font-size: 1.2rem;
    color: var(--bg-color);
    font-weight: 700;
    transition: .3s ease; 
}

.navbar a:hover,
.navbar a.active {
    color: #ffffff; 
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6); 
}

/* 2. PROFILE SECTION */    
.home {
    padding-top: 10rem; 
}

.home-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem; 
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.home-img img {
    width: 280px;
    height: 320px;
    object-fit: cover;
    border: 3px solid var(--main-color);
}

.home-text {
    flex: 1; 
    max-width: 600px;
}

.home-text h1 {
    font-size: 2.8rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1.2rem;
}

.home-text h1 span { 
    color: var(--main-color); 
}

.home-text p { 
    font-size: 1.1rem; 
    line-height: 1.7;
    margin-bottom: 2.5rem;
    letter-spacing: 0.5px;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    color: var(--bg-color);
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: .3s ease;
    cursor: pointer;
}

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

/* 3. HEADINGS & ABOUT */
.heading {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem; 
    font-weight: 600;
}
.heading span { color: var(--main-color); }

.about-content {
    background: var(--second-bg-color);
    padding: 3rem; 
    border-radius: 5px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 4. SKILLS SECTION */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem; 
    max-width: 900px;
    margin: 0 auto;
}

.skill-box {
    background: var(--second-bg-color);
    padding: 1rem 2.5rem;
    border-radius: 2rem; 
    text-align: center;
    transition: .3s ease;
}

.skill-box h3 {
    font-size: 1rem;
    font-weight: 500;
}

.skill-box:hover {
    background: var(--main-color);
    color: var(--bg-color);
    transform: scale(1.05);
}

/* 5. PROJECTS SECTION */
.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem; 
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.project-box {
    position: relative;
    border-radius: 1rem;
    background: var(--second-bg-color);
    overflow: hidden;
    height: 250px; 
}

.project-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s ease;
}

.project-box:hover img {
    transform: scale(1.1);
}

.project-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.8), var(--bg-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 2rem;
    transform: translateY(100%);
    transition: .5s ease;
}

.project-box:hover .project-layer {
    transform: translateY(0);
}

.project-layer h4 { font-size: 1.6rem; color: var(--main-color); margin-bottom: 0.5rem;}
.project-layer p { font-size: 1rem; line-height: 1.6; margin-bottom: 1.5rem; color: var(--text-color); }
.project-layer a { font-weight: 600; color: var(--main-color); }

/* 6. CONTACT SECTION */
form {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; 
}

.input-box {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
}

.input-box input, form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: 5px;
}

/* Add this right below it to lock the message box size */
form textarea {
    resize: none; 
}

.input-box input { width: calc(50% - 0.75rem); } 

.submit-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 5rem; 
}

.social-icons {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-icons p {
    font-size: 1rem;
}

.icons-wrapper {
    display: flex;
    justify-content: center;
    gap: 1.8rem; 
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3.8rem;
    height: 3.8rem;
    background: transparent;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    transition: .3s ease;
}   

.social-icons a:hover {
    background: var(--main-color);
}

.social-icons a img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.back-to-top {
    text-align: center;
    margin-top: 3rem;
    font-size: 1rem;
}

.back-to-top a {
    color: var(--main-color);
    font-weight: 600;
}

/* 7. FOOTER */
.footer {
    text-align: left; 
    padding: 2rem 9%; 
    background: var(--second-bg-color);
    margin-top: 3rem;
    width: 100%;
}

.footer-text p {
    font-size: 0.9rem;
}


/* --- MOBILE RESPONSIVENESS W/ FULLY VISIBLE & CENTERED NAV --- */
@media (max-width: 991px) {
    section { padding: 4rem 5% 2rem; }
    .heading { font-size: 2rem; margin-bottom: 3rem; }
}

@media (max-width: 900px) {
    .home-content {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }
    
    .home-img img { width: 220px; height: 260px; }
    .home-text h1 { font-size: 2.2rem; }

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

@media (max-width: 768px) {
    /* Pinalaki ang header at ginawang column para maayos mag-center ang nav links sa baba */
    header { 
        padding: 1rem 2%;
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .navbar {
        position: relative;
        display: flex; 
        flex-direction: row;
        flex-wrap: wrap; 
        justify-content: center;
        align-items: center;
        gap: 1rem;
        width: 100%;
        background: transparent;
        padding-top: 0.5rem; /* Konting space sa taas ng links */
    }

    .navbar a { 
        font-size: 0.95rem; 
        margin: 0; 
        display: inline-block;
    }

    .home {
        padding-top: 11rem; /* Adjust space para hindi kainin ng header yung mukha mo */
    }
    
    .home-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .heading { font-size: 1.8rem; text-align: center; }
    
    .about-content { 
        padding: 2rem; 
        text-align: center; 
        margin: 0 auto;
    }

    .projects-container { 
        grid-template-columns: 1fr; 
        align-items: center;
    }
    
    .project-box {
        max-width: 350px; 
        margin: 0 auto; 
        width: 100%;
    }

    /* I-center ang Contact Form */
    form {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .input-box { 
        flex-direction: column; 
        gap: 1rem;
        width: 100%;
    }
    
    .input-box input { width: 100%; margin: 0; }
    
    /* I-center ang Footer sa Phone */
    .footer {
        text-align: center; 
        padding: 2rem 5%;
    }
}