/*MARK: BASE */
:root {
    --max-width-full: 1200px;
    --max-width-content: 800px;
    --social-icons-filter: invert(61%) sepia(11%) saturate(450%) hue-rotate(34deg) brightness(92%) contrast(85%);
    --bg-color: #f5edd6;
    --bg-lighter: #FFF9EA;
    --text-color: #4B4737;
    --text-faded-color: #B1AB99;
    --text-sub: #8E8772;
    --text-occasional-accent: #A89262;
    --link-color: #959f73;
    --link-hover-color: #009177;
    --shadow-color: #00001c1a;
    --button-color: #b9c297;
    --button-hover-color: #f5924f;
    --code-chunk-bg: #1e1e1e;
    --code-chunk-text: #ffb86c;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #2b2b25; /* Deep earthy brown */
        --bg-lighter: #3a3a32; /* Muted forest green */
        --text-color: #e0e0d4; /* Warm parchment */
        --text-faded-color: #b0a58f; /* Aged stone */
        --text-sub: #a49979; /* Soft sand */
        --text-occasional-accent: #c4a76f; /* Golden leaf */
        --link-color: #a3b38f; /* Moss green */
        --link-hover-color: #6bbba1; /* Soft teal */
        --shadow-color: #00000040;
        --button-color: #98a17e; /* Dried herb green */
        --button-hover-color: #d98b5d; /* Burnt orange */
        --code-chunk-bg: #252525; /* Dark wood */
        --code-chunk-text: #ffcc99; /* Muted amber */
    }
}

/* For Webkit browsers (Chrome, Safari, Edge, etc.) */
::-webkit-scrollbar {
    width: 10px;  /* Adjust width as needed */
    height: 10px; /* For horizontal scrollbar */
}

::-webkit-scrollbar-track {
    background: var(--bg-lighter);  /* Light background for the track */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--link-color);  /* Earthy green color for the thumb */
    border-radius: 10px;
    border: 3px solid var(--bg-lighter);  /* Creates a gap around the thumb */
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color);  /* Slightly brighter green on hover */
}

::-webkit-scrollbar-corner {
    background: var(--bg-color);  /* Light background for corners */
}

html {
    scroll-behavior: smooth;
}

h1 {
    font-family: 'Nunito', sans-serif;
    font-size: 50px;
    /* Adjust as needed */
    color: var(--text-color);
    /* Dark neutral color */
    font-weight: 1000;
    border-bottom: 3px solid var(--bg-color);
}

h2 {
    font-size: 40px;
    /* Adjust as needed */
    font-family: 'Nunito', sans-serif;
    margin-bottom: -10px;
    color: var(--link-hover-color);
    /* Vibrant green-blue */
}

h3 {
    font-size: 30px;
    /* Adjust as needed */
    color: var(--text-occasional-accent);
    /* Muted gold accent */
    margin-bottom: -10px;
    border-bottom: 3px solid var(--bg-color);
}

h4 {
    font-size: 25px;
    /* Adjust as needed */
    color: var(--text-faded-color);
    /* Soft tone */
    border-bottom: 3px solid var(--bg-color);
    margin-bottom: -10px;
}

h5 {
    font-size: 20px;
    /* Adjust as needed */
    color: var(--link-color);
    /* Subtle greenish tint */
    border-bottom: 3px solid var(--bg-color);
    margin-bottom: -10px;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    text-align: center;
    padding: 50px;
}

main {
    max-width: var(--max-width-full);
    margin: auto;
}

a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.5s ease;
}

a:hover {
    text-decoration: green wavy underline;
    color: var(--link-hover-color);
}

img {
    max-width: var(--max-width-content);
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 0px 8px var(--shadow-color);
}

video {
    border-radius: 8px;
    box-shadow: 0 0px 8px var(--shadow-color);
}

/*MARK: Under construction*/
.construction-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-lighter); /* Soft pastel color */
    color: var(--text-sub); /* Darker text for contrast */
    text-align: center;
    font-weight: bold;
    padding: 8px 0px;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 4px 6px var(--shadow-color);
    /* display: flex; */
    justify-content: center;
    align-items: center;
    position: fixed; /* Ensures the button stays inside */
}

/* Close button styling - sticks to the right */
.close-banner {
    position: absolute;
    right: 15px; /* Positioning on the right */
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close-banner:hover {
    opacity: 0.6;
}

/*MARK: Post page content*/
.post-content {
    background: var(--bg-lighter);
    border-radius: 12px;
    max-width: var(--max-width-content);
    margin: 0 auto;
    /* Centers horizontally */
    padding: 20px;
    text-align: justify;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.post-content h1 {
    font-weight: 1000;
    font-size: 50px;
    text-align: center;
}

.post-content h2 {
    font-weight: 1000;
    font-size: 35px;
    text-align: center;
    border-bottom: 8px dotted var(--bg-color);
}

.post-content li {
    padding-left: 10px;
    /* Add padding to position bullet */
    list-style-type: "🌿";
    /* Change bullet style to square (or use 'circle', 'disc', etc.) */
    /* Alternatively, use a custom bullet image */
    /* list-style-image: url('path-to-your-icon.png'); */
}

/*MARK: Code Block Container */
/* Code Block Container */
pre {
    background: var(--code-chunk-bg);
    /* Dark background */
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    /* Enables horizontal scrolling if needed */
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 4px 8px var(--shadow-color);

    text-align: left;
    /* Ensures text is left-aligned */
    display: block;
    /* Makes sure it behaves like a block element */
    min-width: 100px;
    /* Ensures it doesn’t become too small */
}

/* Inline Code */
code {
    background: var(--code-chunk-bg);
    /* Dark background */
    color: var(--code-chunk-text);
    /* Highlighted text color */
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Fira Code', monospace;
}

/*MARK: Input Field */
/* Form Container */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-lighter); /* Light background */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    margin: 20px auto;
    /* font-family: 'Arial', sans-serif; */
}

/* Input Styles */
input[type="email"] {
    padding: 12px 16px;
    margin: 10px 0;
    width: 80%;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid var(--text-sub);
    outline: none;
    transition: border-color 0.3s;
}

input[type="email"]:focus {
    border-color: var(--link-hover-color); /* Green on focus */
    box-shadow: 0 0 5px var(--shadow-color); /* Subtle glow */
}

/* Button Styles */
button[type="submit"] {
    padding: 12px 24px;
    background-color: var(--button-color);
    color: var(--bg-color);
    font-size: 16px;
    font-weight: 1000;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    width: 40%;
    margin-top: 10px;
    transition: background-color 0.3s, transform 0.2s, width 1s;
}

button[type="submit"]:hover {
    background-color: var(--button-hover-color); /* Slightly darker on hover */
    transform: translateY(-2px); /* Button lift effect */
    background-image: url('/assets/mailing-form/characters-run.gif');
    background-size: cover; /* Make the image cover the entire button */
    background-position: center;
    background-color: transparent;
    color: var(--text-color);
    transform: scale(1.05, 1.1); /* Slightly enlarge on hover */
    width: 70%;
    transition: background-color 0.3s, transform 0.2s, width 0.26s;

}

button:active {
    transform: translateY(2px); /* Button push effect */
}

/* Placeholder Styles */
input[type="email"]::placeholder {
    color: var(--text-sub); /* Light gray for placeholder */
    font-style: italic;
}

/*MARK: Navigation Bar */
/* Navigation Bar */
nav {
    /* background-color: #ffffff00; */
    width: 100%;
    overflow-x: hidden;
    /* Prevents horizontal scrolling */
    align-items: center;
    margin: 0 auto;
    /* Centers it horizontally */
}

.nav-container {
    max-width: var(--max-width-full);
    /* Adjust based on your design */
    margin: 0 auto;
    padding: 10px 20px;
    /* Adds some space on smaller screens */
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    /* Ensures items wrap instead of overflowing */
    align-items: center;
    border-bottom: 3px solid var(--text-faded-color);
    /* Light separator line */
}

.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    /* Allows items to wrap if necessary */
    gap: 15px;
    /* Provides consistent spacing */
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-left: 20px;
    white-space: nowrap;
    /* Prevents text from breaking awkwardly */
}

.nav-links a {
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: var(--text-faded-color);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--link-hover-color);
    /* Add hover effect for the links */
}

/* Logo styling */
.logo {
    font-family: 'Nunito', sans-serif;
    font-size: 24px;
    font-weight: 1000;
    /* color: #333; */
    text-decoration: none;
}

/* Main container to hold both columns */
.main-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    /* Space between columns */
    flex-wrap: wrap;
    /* Allows wrapping on smaller screens */
}

/*MARK: Post Gallery*/
/* Posts area */

.posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Two columns */
    gap: 15px;
    padding: 20px;
    max-width: 1000px;
    margin: auto;
}

.post {
    background: var(--bg-lighter);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post:hover {
    transform: translateY(-2px);
    transform: scale(1.01, 1.01);
    /* transform: scale(2, .5); */
    box-shadow: 0 6px 12px var(--shadow-color);
}

.post img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
}

.post h2 {
    margin: 1px 0 -10px;
    font-size: 20px;
}

.post p {
    color: var(--text-sub);
    margin: 10px 0 -5px;
    font-size: 14px;
}

/*MARK: Homepage Columns*/
/* Left column styling */
.left-column {
    flex: 1;
    /* Take up remaining space */
    max-width: 80%;
    /* Adjusts the width */
}

.projects-grid {
    background: var(--bg-lighter);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Two columns for the project grid */
    gap: 5px 5px;
    /* Space between project items */
}

.project img {

    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

}

.project img:hover {

    transform: scale(1.05, 1.05);
}

.project-title {
    position: fixed;
    top: 5px;
    left: 0;
    width: 100%;
    padding: 0px;
    color: var(--bg-color);
    font-size: 42x;
    font-weight: bold;
    text-align: center;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project:hover .project-title {
    opacity: 1;
    transform: translateY(100);
}

/* Right column styling */
.right-column {
    flex: 1;
    /* Take up remaining space */
    max-width: 25%;
    overflow-x: visible;

    padding: 15px;
    border-radius: 8px;

    /* Adjusts the width */
}

.blog-posts-list {
    list-style: none;
    padding: 0;
}

.blog-posts-list li {
    margin-bottom: 15px;
    text-align: start;
}

.blog-posts-list a {
    font-size: 1.1rem;
    font-size: clamp(14px, 1.2vw, 18px);
    font-weight: bold;
    /* Adjust link color */
    text-decoration: none;
    white-space: nowrap;
}

.blog-posts-list a:hover {
    color: var(--link-hover-color);
    text-decoration: green wavy underline;
}

.blog-posts-list p {
    font-size: 0.9rem;
    /* color: #555; */
}

/* 'Show All' button styling */
.show-all-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: var(--button-color);
    color: var(--bg-lighter);
    text-decoration: none;
    border-radius: 5px;
    border: 50 var(--bg-color);
    box-shadow: 0 4px 6px var(--shadow-color);

    position: relative;
    top: -25px;
    left: 0px;
}

.show-all-btn:hover {
    background-color: var(--button-hover-color);
    color: #f5edd6;
}

/* MARK: Footer */
.footer {
    /* background-color: #222; */
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.footer p {
    font-size: 14px;
    color: var(--text-faded-color);
}

/* Social Icons */
.social-links {
    color: #000;
    display: flex;
    gap: 15px;
}

.social-icon img {
    width: 24px;
    height: 24px;
    opacity: 0.5;
    filter: var(--social-icons-filter);
    transition: opacity 0.3s ease;
}

.social-icon:hover img {
    opacity: 1;
}

/* MARK: TOC */
#toc {
    position: fixed;
    top: 130px;
    right: 20px;
    width: 15%;
    background: var(--bg-lighter);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-color);
    font-size: 14px;
    max-height: 70vh;
    overflow-y: auto;
}

#toc-list {
    list-style: none;
    text-align: start;
    padding: 0;
}

#toc-list li {
    margin: 2px 0;
    /* Reduce spacing */
    padding: 0;
    /* Remove any extra padding */
    line-height: 1.2;
    /* Adjust line spacing */
}

#toc-list a {
    text-decoration: none;
    color: var(--link-color);
}

#toc-list a:hover {
    color: var(--link-hover-color);
}

.toc-h2 {
    font-weight: 1000;
}

.toc-h3 {
    font-size: 12px;
    /* Smaller size */
    margin-left: 15px;
    /* Indent */
    font-weight: 700;
}

.toc-h4 {
    font-size: 11px;
    /* Smaller size */
    margin-left: 24px;
    /* Indent */
    font-weight: 500;
}

#back-to-top {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    font-size: 14px;
    background: var(--bg-lighter);
    color: var(--text-faded-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0px 4px 6px var(--shadow-color);
    transition: opacity 0.3s;
}

#back-to-top:hover {
    background: var(--button-hover-color)
}

#back-to-top.show {
    display: block;
}


/* MARK: About */
/* About Container */
.about-container {
    max-width: var(--max-width-content);
    margin: auto;
    background: var(--bg-lighter);
    padding: 20px;
    margin-bottom: 65px;
    border-radius: 12px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* Profile Section */
.profile {
    text-align: center;
    margin-bottom: 20px;
}

.profile img {
    width: 100%;
    height: 150px;
    border-radius: 15px;
    object-fit: cover;
    object-position: left center; /* Aligns the image to the left *
    /* border: 4px solid var(--link-color); */
}

.profile h1 {
    font-size: 24px;
    margin-top: 10px;
}

.quote {
    font-style: italic;
    color: var(--text-faded-color);
    font-size: 14px;
    margin: 10px 0;
}

.quote span {
    font-weight: bold;
}

/* Bio Section */
.bio h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.bio p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
}

/* Details Grid */
.details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.card {
    background: var(--text-color);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 2px 2px 5px var(--shadow-color);
}

.card h3 {
    margin: 0;
    font-size: 18px;
    color: var(--bg-lighter);
}

.card p {
    font-size: 14px;
    color: var(--bg-color);
}

/* MARK: Responsiveness */
/*. Responsive Design */
@media (max-width: 1200px) {
    
    body {
        padding: 5px;
    }
    .post-content h1,
    h1 {
        font-size: 35px;
    }

    .projects-grid {
        /* grid-template-columns: 2fr;  */
        grid-template-columns: repeat(2, 1fr);
    }

    .main-container {
        flex-direction: column;
        align-items: center;
    }

    .blog-posts-list a {
        font-size: 1.1rem;
    }

    #toc {
        display: none;
    }
}

@media (max-width: 768px) {

    .posts {
        grid-template-columns: 1fr;
        /* Switch to one column on small screens */
    }

    .main-container {
        flex-direction: column;
        align-items: center;
    }

    .left-column,
    .right-column {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .footer-container {
        flex-direction: column;
        gap: 10px;
    }

    .projects-grid {
        /* grid-template-columns: 2fr;  */
        grid-template-columns: repeat(1, 1fr);
    }

    .blog-posts-list a {
        font-size: 1.1rem;
    }

    .nav-container {
        flex-direction: column;
        /* Stack elements on small screens */
        align-items: center;
        padding: 15px;
    }

    .nav-links {
        /* flex-direction: column; Stack nav items vertically */
        align-items: center;
        gap: 10px;
    }

    .nav-links li {
        margin-left: 0;
        /* Remove left margin in stacked layout */
    }
}