@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Nanum+Pen+Script&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    --color: rgba(30, 30, 30);
    --bgColor: rgba(245, 245, 245);
    background-color: #F8EDE3;
    min-height: 100vh;
    display: grid;
    align-content: flex-start; /* aligns content to the top */
    gap: 2rem;
    padding: 2rem;
    margin: 1.5rem 2rem;
    font-family: 'Inter', sans-serif;
    padding-bottom: 80px
}

header {
    margin: 0; /* no margin applied to the header */
    padding: 0; /* no padding applied to the header */
    width: 100%; /* header spans full width */
}


h1 {
    text-align: left;
    font-weight: 700;
    font-family: 'Nanum Pen Script', cursive;
    font-size: 5rem;
}

ul {
    list-style-position: inside;
}

ul li {
    line-height: 1.7rem;
    margin-left: 0;
}

ul li li {
    margin-left: 2rem;
}

/** Nav bar **/
/* Fixed Navbar Styling */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #FEFAE0;
    padding: 10px 0;
    z-index: 1000; /* Ensures navbar stays on top */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for definition */
}

nav > ul {
    display: flex;
    gap: 100px; /* Adjusts spacing between each list item */
    margin: 0;
    padding: 0;
}

nav > ul > li {
    list-style-type: none;
    font-size: 1.2rem;
}

nav > ul > li > a {
    color: #7d5d3d;
    text-decoration: none;
    padding: 5px 15px;
    transition: color 0.3s;
}

nav > ul > li > a:hover {
    color: #B99470; /* Optional hover color */
}

/* Add padding to body to prevent content from hiding under the navbar */
body {
    padding-top: 80px; /* Adjust based on navbar height */
}

/** Hyperlinks **/
a {
    background-color: transparent;
    color: #006BC8;
    text-decoration: none;
    word-wrap: break-word;
    font-family: 'Inter', sans-serif;
}

a:hover {
    text-decoration: underline;
    cursor: pointer;
}

/** Photo **/
.profile-photo {
    position: relative;
}

.profile-photo img {
    position: absolute;
    top: 0;
    right: 0;
}

/** Homepage intro **/
.intro-text {
    width: 70%;
    left: 0;
    position: relative;
    z-index: 1;
}


/** Sections **/
section {
    margin-top: 2rem;
}

#projects {
    margin-top: 1rem; /* smaller margin for first section */
}

h2 {
    margin-bottom: 1rem;
}

p {
    line-height: 1.7rem; /* paragraphs line spacing */
}

/** Footer **/
footer {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%; /* Ensures it spans the full width of the page */
    padding: 13px 30px; /* Increased padding for a larger footer */
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #FEFAE0; /* Optional background color */
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.1); /* Optional subtle shadow */
}

.footer-icons {
    display: flex;
    gap: 20px; /* Increases space between icons */
}

.footer-icons a {
    color: #333; /* Footer icon color */
    font-size: 1.4rem; /* Slightly larger font size for icons */
    text-decoration: none;
}

.footer-icons a:hover {
    color: #006BC8; /* Hover color for icons */
}

footer p {
    margin-right: 30px; /* Adjusts space from text to icons */
    font-size: 1rem; /* no increase in font size */
}

footer {
    z-index: 1; /* Footer remains behind content */
}

footer::before {
    display: block;
    height: 20px; /* Footer height to avoid overlap */
}

/* Responsive Styling */
@media (max-width: 768px) {
    /* Body adjustments */
    body {
        margin: 8rem 2rem;
    }

    /* Header and H1 adjustments */
    h1 {
        font-size: 3rem; /* Scales down heading font */
    }

    /* Navbar adjustments */
    nav > ul {
        flex-direction: column; /* Stack nav items vertically on mobile */
        gap: 20px; /* Reduces spacing between items */
    }

    nav > ul > li {
        font-size: 1rem;
    }

    /* Footer adjustments */
    footer {
        flex-direction: column; /* Stack footer content vertically */
        padding: 10px; /* Adjusts padding */
        gap: 10px; /* Space between icons and text */
    }

    /* Main content sections */
    .profile-photo img {
        position: relative;
        width: 60%; /* Make the image responsive */
        height: auto; /* Maintain aspect ratio */
        object-fit: cover; /* Crop image if necessary */
        margin: 1rem auto; /* Center the image */
        border-radius: 8px; /* Add some rounding if desired */
    }

    .intro-text {
        width: 100%; /* Allow the intro text to use full width */
        margin-top: 1rem; /* Add space above the text */
    }

    /* Adjustments for lists */
    ul li {
        margin-left: 0.5rem; /* Reduced indent on mobile */
    }

    .footer-icons {
        gap: 10px; /* Less space between icons on mobile */
    }

    /* Footer padding to add space above (avoid overlapping main text) */
    footer {
        position: fixed;        /* Keeps the footer fixed in place */
        bottom: 0;              /* Positions it at the bottom of the viewport */
        left: 0;                /* Aligns it with the left edge of the screen */
        width: 100vw;           /* Ensures it spans the full viewport width */
        padding: 13px 30px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #FEFAE0;
        z-index: 10;            /* Ensures it stays above other elements */
    }
}