/* Ensure the page uses the full viewport height for sticky footer */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* Make the body a flex container so the footer stays at bottom */
body {
    display: flex;
    flex-direction: column;
    /* font-size: 0.9rem; (If you want the entire site scaled, move your base font-size here) */
}

/* The main container flexes to fill remaining space, pushing the footer down */
main.container {
    flex: 1;
}

/* 1) Smaller text across the site (optional if you want it global) */
body {
    font-size: 0.9rem;
}

/* 2) Extra side spacing for .container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 3) Reduce top/bottom padding in the nav bar */
header.container {
    padding-top: 0.2rem;
    padding-bottom: 0.1rem;
    margin-bottom: 3.5rem;
}

/* Centers content in the profile section */
.profile-container {
    /*padding-top: 0.2rem;*/
    text-align: center;
    margin: 1rem 0;
    /* Some vertical spacing */
}

/* Styles your profile image */
.profile-img {
    display: block;
    margin: 0.5rem auto;
    width: 90px;
    height: 90px;
    border-radius: 50%;
}

/* Constrain width of the profile description */
.profile-desc {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

/* Spacing around the "Recent Posts" section */
.recent-posts {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.recent-posts ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Each post item: title on left, date on right */
.post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.post-title a {
    text-decoration: none;
    /* color: inherit; */
}

.post-date {
    color: #bbb;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Horizontal rule styling */
hr {
    border: 0;
    border-top: 1px solid #444;
    margin: 0.5rem 0;
}

/* Footer credit smaller text */
.footer-credit {
    font-size: 0.7rem;
}

/* Basic nav layout for desktop */
.flex-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Hamburger is hidden on desktop, shown on mobile */
.hamburger {
    display: none;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #01aaff;
    /* same blue color as your home icon */
}

/* By default, nav-links are side by side on desktop */
.nav-links {
    display: flex;
    gap: 1rem;
}

/* FULL-SCREEN OVERLAY ON MOBILE */
@media (max-width: 768px) {

    /* Show hamburger on mobile */
    .hamburger {
        display: block;
        z-index: 10000;
        /* So it's above the overlay if needed */
    }

    /* Hide nav-links by default; become an overlay when .open is toggled */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--pico-background-color);
        color: var(--pico-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        gap: 1rem;
        z-index: 9999;
    }

    /* Reveal the overlay when .open is toggled */
    .nav-links.open {
        display: flex;
    }

    /* Style each link in the overlay */
    .nav-links li {
        list-style: none;
    }

    .nav-links a {
        color: var(--pico-color);
        font-size: 1.5rem;
        text-decoration: none;
    }
}

h1 {
    font-size: 1.75rem;
    /* default is often ~2em or larger */
}

h2 {
    font-size: 1.5rem;

}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.1rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.9rem;
}

footer.container {
    margin-top: 4.5rem;
    /* Adds spacing above the footer */
}

/* Add more space above year groupings in posts.html */
.posts-container h3 {
    margin-top: 2.5rem;
    /* Increased spacing */
    margin-bottom: 1rem;
    /* Space before the first post */
}

/* Post title links (remove underline) */
.post-title {
    text-decoration: none;
    /* Removes underline */
    color: var(--pico-primary);
}

/* shimmer loading skeleton with aspect-ratio support */
.aspect-ratio {
    position: relative;
    width: 100%;
    padding-top: calc(100% / (var(--aspect-ratio)));
    overflow: hidden;
    background: linear-gradient(90deg, #1a1d29, #2a2e3f, #1a1d29);
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}

.aspect-ratio img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

/* shimmer keyframes */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

h2 {
    color: #000000;
    /* Blue color code */
    text-shadow: 0 0 2px #ffffff;
    animation: glow 1s ease-in-out infinite alternate;
}

.hero {
    line-height: 1;
    display: inline-block;
    color: #e0e3e7;
    z-index: 2;
    filter: drop-shadow(0 1px 1px);
}

.layers {
    position: relative;
}

.layers::before,
.layers::after {
    content: attr(data-text);
    position: absolute;
    width: 110%;
    z-index: -1;
}

.layers::before {
    top: 2px;
    left: 3px;
    color: #e0287d;
}

.layers::after {
    top: 1px;
    left: -3px;
    color: #1bc7fb;
}

@keyframes paths {
    0% {
        clip-path: polygon(0% 43%, 83% 43%, 83% 22%, 23% 22%, 23% 24%, 91% 24%, 91% 26%, 18% 26%, 18% 83%, 29% 83%, 29% 17%, 41% 17%, 41% 39%, 18% 39%, 18% 82%, 54% 82%, 54% 88%, 19% 88%, 19% 4%, 39% 4%, 39% 14%, 76% 14%, 76% 52%, 23% 52%, 23% 35%, 19% 35%, 19% 8%, 36% 8%, 36% 31%, 73% 31%, 73% 16%, 1% 16%, 1% 56%, 50% 56%, 50% 8%);
    }

    5% {
        clip-path: polygon(0% 29%, 44% 29%, 44% 83%, 94% 83%, 94% 56%, 11% 56%, 11% 64%, 94% 64%, 94% 70%, 88% 70%, 88% 32%, 18% 32%, 18% 96%, 10% 96%, 10% 62%, 9% 62%, 9% 84%, 68% 84%, 68% 50%, 52% 50%, 52% 55%, 35% 55%, 35% 87%, 25% 87%, 25% 39%, 15% 39%, 15% 88%, 52% 88%);
    }

    30% {
        clip-path: polygon(0% 53%, 93% 53%, 93% 62%, 68% 62%, 68% 37%, 97% 37%, 97% 89%, 13% 89%, 13% 45%, 51% 45%, 51% 88%, 17% 88%, 17% 54%, 81% 54%, 81% 75%, 79% 75%, 79% 76%, 38% 76%, 38% 28%, 61% 28%, 61% 12%, 55% 12%, 55% 62%, 68% 62%, 68% 51%, 0% 51%, 0% 92%, 63% 92%, 63% 4%, 65% 4%);
    }

    45% {
        clip-path: polygon(0% 33%, 2% 33%, 2% 69%, 58% 69%, 58% 94%, 55% 94%, 55% 25%, 33% 25%, 33% 85%, 16% 85%, 16% 19%, 5% 19%, 5% 20%, 79% 20%, 79% 96%, 93% 96%, 93% 50%, 5% 50%, 5% 74%, 55% 74%, 55% 57%, 96% 57%, 96% 59%, 87% 59%, 87% 65%, 82% 65%, 82% 39%, 63% 39%, 63% 92%, 4% 92%, 4% 36%, 24% 36%, 24% 70%, 1% 70%, 1% 43%, 15% 43%, 15% 28%, 23% 28%, 23% 71%, 90% 71%, 90% 86%, 97% 86%, 97% 1%, 60% 1%, 60% 67%, 71% 67%, 71% 91%, 17% 91%, 17% 14%, 39% 14%, 39% 30%, 58% 30%, 58% 11%, 52% 11%, 52% 83%, 68% 83%);
    }

    76% {
        clip-path: polygon(0% 26%, 15% 26%, 15% 73%, 72% 73%, 72% 70%, 77% 70%, 77% 75%, 8% 75%, 8% 42%, 4% 42%, 4% 61%, 17% 61%, 17% 12%, 26% 12%, 26% 63%, 73% 63%, 73% 43%, 90% 43%, 90% 67%, 50% 67%, 50% 41%, 42% 41%, 42% 46%, 50% 46%, 50% 84%, 96% 84%, 96% 78%, 49% 78%, 49% 25%, 63% 25%, 63% 14%);
    }

    90% {
        clip-path: polygon(0% 41%, 13% 41%, 13% 6%, 87% 6%, 87% 93%, 10% 93%, 10% 13%, 89% 13%, 89% 6%, 3% 6%, 3% 8%, 16% 8%, 16% 79%, 0% 79%, 0% 99%, 92% 99%, 92% 90%, 5% 90%, 5% 60%, 0% 60%, 0% 48%, 89% 48%, 89% 13%, 80% 13%, 80% 43%, 95% 43%, 95% 19%, 80% 19%, 80% 85%, 38% 85%, 38% 62%);
    }

    1%,
    7%,
    33%,
    47%,
    78%,
    93% {
        clip-path: none;
    }
}

@keyframes movement {
    0% {
        top: 0px;
        left: -5px;
    }

    15% {
        top: 3px;
        left: 3px;
    }

    60% {
        top: 2px;
        left: -3px;
    }

    75% {
        top: -2px;
        left: 5px;
    }

    100% {
        top: 3px;
        left: 2px;
    }
}

@keyframes opacity {
    0% {
        opacity: 0.1;
    }

    5% {
        opacity: 0.7;
    }

    30% {
        opacity: 0.4;
    }

    45% {
        opacity: 0.6;
    }

    76% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.8;
    }

    1%,
    7%,
    33%,
    47%,
    78%,
    93% {
        opacity: 0;
    }
}

@keyframes font {
    0% {
        font-weight: 100;
        color: #e0287d;
        filter: blur(3px);
    }

    20% {
        font-weight: 500;
        color: rgba(224, 227, 231, 0.6);
        filter: blur(0);
    }

    50% {
        font-weight: 300;
        color: #1bc7fb;
        filter: blur(2px);
    }

    60% {
        font-weight: 700;
        color: rgba(224, 227, 231, 0.6);
        filter: blur(0);
    }

    90% {
        font-weight: 500;
        color: #e0287d;
        filter: blur(6px);
    }
}

.glitch span {
    animation: paths 5s step-end infinite;
}

.glitch::before {
    animation: paths 5s step-end infinite, opacity 5s step-end infinite, font 8s step-end infinite, movement 10s step-end infinite;
}

.glitch::after {
    animation: paths 5s step-end infinite, opacity 5s step-end infinite, font 7s step-end infinite, movement 8s step-end infinite;
}

figcaption {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-top: 0.3em;
}