@charset "UTF-8";
@import url('https://raw.githubusercontent.com/necolas/normalize.css/refs/heads/master/normalize.css');

/*Lets go for  a fantasy forest */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Lora:ital,wght@0,400;0,700;1,400&display=swap');

/* inspo for later https://codepen.io/z-/pen/bpxgWZ */
:root {
    --forest-verdant: #0a1a0a;
    --moss: #2d4c2d;
    --leaf: #4a7c44;
    --ethereal-gold: #d4af37;
    --goldfel-leaf: #796211;
    --aetheric-selector:rgb(170, 199, 151);
    --glow: rgba(212, 175, 55, 0.4);
    --text-light: #e0f0e0;
    --transition: 0.4s ease-in-out;
}

/* Smooth it out */
*, html {
    scroll-behavior: smooth !important;
    /* does this not work on my pc??? */
}

body {
    margin: 0;
    background-color: var(--forest-verdant);
    /* background-image:
        radial-gradient(circle at 20% 30%, rgba(74, 124, 68, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.05) 0%, transparent 40%); */
    color: var(--text-light);
    font-family: 'Lora', serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header:before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #152b15, var(--forest-verdant));
    background-image: url('060b8f0cb9319a8b896190f60c5a9bf9.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.5;
    z-index: -1;
}

header {
    padding: 10vh 0;
    text-align: center;
    border-bottom: 2px solid var(--ethereal-gold);
    position: relative;
    background-attachment: fixed;

}

header h1 {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(3rem, 10vw, 5rem);
    color: var(--ethereal-gold);
    text-shadow: 0 0 20px var(--glow);
    margin: 0;
}

header h2 {
    font-style: italic;
    font-weight: normal;
}

/* Navi ( oh man navi from zelda is called navi because they help guide tou) */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 26, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--leaf);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1rem;
    margin: 0;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    transition: var(--transition);
}

nav a:hover {
    color: var(--ethereal-gold);
}

/* Logic Gate CSS using attrivute selectors */
/* Default state */
nav a[href="#about"] {
    color: var(--selected);
}

/* Hover/focus */
nav a[href*="#"]:hover,
nav a[href*="#"]:focus {
    color: var(--ethereal-gold);
}

/* Active link highlighting */
body:has(#about:target) nav a[href="#about"],
body:has(#guidelines:target) nav a[href="#guidelines"],
body:has(#contribute:target) nav a[href="#contribute"],
body:has(#files:target) nav a[href="#files"] {
    color: var(--aetheric-selector);
}

/* When nothing is targeted (initial load) */
body:not(:has(:target)) nav a[href="#about"] {
    color: var(--selected);
}

/* Main Layout */
main {
    padding: 4rem 0;
}

article {
    margin-bottom: 6rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    transition: var(--transition);
}

h2,
h3 {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--ethereal-gold);
}

/* Links & Accents */
a {
    color: var(--ethereal-gold);
    transition: var(--transition);
}

blockquote {
    border-left: 3px italic var(--ethereal-gold);
    background: rgba(212, 175, 55, 0.1);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 15px 15px 0;
}

/* Aside */
aside {
    background: #1a120b;
    /* Dark parchment color */
    border: 2px solid var(--ethereal-gold);
    padding: 2rem;
    margin: 2rem;
    border-radius: 5px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
    position: relative;
}

aside h2,
aside h4 {
    text-align: center;
    border-bottom: 1px solid var(--ethereal-gold);
    padding-bottom: 1rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    list-style: none;
    padding: 0;
}

.features li {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border: 1px solid var(--leaf);
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.features li:hover {
    border-color: var(--ethereal-gold);
}

/* Buttons and SVG */
.link-github svg {
    width: 20px;
    fill: currentColor;
    vertical-align: middle;
}

.link-allstyles,
.link-guidelines,
.link-github {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--ethereal-gold);
    text-decoration: none;
    margin-top: 1rem;
    border-radius: 50px;
}

header .link-github{
    background-color: var(--moss);
}

header .link-github:hover {
    background: var(--ethereal-gold);
    color: var(--forest-verdant);
}

.page-footer .link-github {
    border: none;
    padding: 0;
    margin: 0;
    text-decoration: underline;
}
/* this looks like shit no matter what I do*/
.link-guidelines {
    color: var(--forest-verdant);
    border-color: var(--goldfel-leaf);
    background-color: var(--ethereal-gold);
}

/* Footer */
.page-footer {
    text-align: center;
    padding: 4rem 1rem;
    font-size: 0.9rem;
    border-top: 1px solid var(--moss);
    opacity: 0.7;
}

.page-footer ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Skip Link for Accessibility as per the book i loaned from the library*/
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--ethereal-gold);
    color: var(--forest-verdant);
    padding: 1rem;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}
/* Removing anchor lines*/
a {
    text-decoration: none;
}
/* Responsive Adjustments */
@media (max-width: 768px) {

    /* Global spacing */
    .container {
        padding: 1rem;
    }

    body {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    /* Header */
    header {
        padding: 6vh 0;
        background-attachment: scroll; /* mobile-friendly */
    }

    header h1 {
        font-size: clamp(2.2rem, 9vw, 3.2rem);
    }

    header h2 {
        font-size: 1rem;
    }

    /* Navigation */
    nav ul {
        gap: 0.5rem;
        padding: 0.7rem;
        flex-wrap: wrap;
    }

    nav a {
        font-size: 0.8rem;
        letter-spacing: 1px;
        padding: 0.4rem 0.6rem;
    }

    /* Articles */
    article {
        margin-bottom: 3rem;
        padding: 1.2rem;
        border-radius: 15px;
    }

    h2, h3 {
        font-size: 1.4rem;
    }

    /* Aside */
    aside {
        margin: 1rem 0;
        padding: 1.5rem;
    }

    .features {
        grid-template-columns: 1fr; /* stack features */
        gap: 1rem;
    }

    /* Footer */
    .page-footer {
        padding: 2rem 1rem;
        font-size: 0.8rem;
    }

    .page-footer ul {
        flex-direction: column;
        gap: 0.8rem;
    }
}

/* Accordion Logic | AI is trying to help me figure it out but its only taught me :has and :is */

main article {
    display: none;
}

main article#about {
    display: block;
}

/*  Hide all articles except the one that was just clicked */
:target~main article#about,
main:has(article:not(#about):target) article#about {
    display: none;
}

main article:target {
    display: block !important;
    /* important is needed to override display: none in the :has selector */
}

#guidelines:target~#about,
#contribute:target~#about {
    display: none;
}











/* css crafter premade with my edits how do I even implement this *//* We use the existing header container to host the 'fireflies' */
header .container {
    position: relative;
    z-index: 2;
}

/* should mention that AI helped with the anim but i did do the anim for a myself*/
header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* We create 3 layers of "dots" using radial gradients */
    background-image: 
        radial-gradient(circle, var(--ethereal-gold) 1px, transparent 1px),
        radial-gradient(circle, #e4ddb4 1.5px, transparent 1.5px),
        radial-gradient(circle, var(--ethereal-gold) 1px, transparent 1px);
    background-size: 80px 80px, 150px 150px, 200px 200px;
    background-position: 0 0, 40px 60px, 130px 10px;
    
    /* Magical glow */
    filter: drop-shadow(0 0 5px var(--ethereal-gold));
    opacity: 0.5;
    
    /* This makes them move! */
    animation: magicDrift 30s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes magicDrift {
    0% {
        background-position: 0 0, 40px 60px, 130px 10px;
    }
    100% {
        /* Moving them at different rates creates parallax depth */
        background-position: 500px 1000px, -400px 500px, 300px -300px;
    }
}

/* Shakes every link a bit on hover */
a:hover {
    display: inline-block;
    animation: floaty 5s ease-in-out infinite;
}

/* Floaty Animation ( Semi parallax ) */
@keyframes floaty {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(2px, -6px) rotate(1deg); }
    50%  { transform: translate(-4px, -4px) rotate(-1deg); }
    75%  { transform: translate(2px, -6px) rotate(0.5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}