:root {
  --color-black: #0f1b26;
  --color-red: #dd5639;
  --color-blue: #20a5a6;
  --color-white: #f5e8d1;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    background: var(--color-black);
    color: var(--color-white);
    margin-bottom: 100px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("../../assets/image1.jpg");
    background-size: auto;
    background-repeat: repeat;
    animation: slide-bg 120s linear infinite;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}


header {
    color: var(--color-white);
    display: flex;
    flex-direction: row;
    margin: 40px;
    padding-left: 40px;
    padding-right: 40px;
    padding-top: 10px;
    padding-bottom: 10px;

    h1 {
        margin: 0;
        flex: 1;
    }

    nav {
        background: rgb(from var(--color-blue) r g b / 0.4);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
        transition: 
            background 0.3s ease,
            box-shadow 0.3s ease;

        border-radius: 25px;
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        padding: 15px;


        
        a {            
            color: var(--color-white);
            margin: 0 15px;
            position: relative;
            text-decoration: none;
        }

        a::after {
            content: "";
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            bottom: -5px;
            width: 0;
            height: 3px;
            background: var(--color-red);
            transition: width 0.3s ease;
        }

        a:hover::after {
            width: 100%;
        }
    }

    nav:hover {
        background: rgb(from var(--color-blue) r g b / 0.8);
        box-shadow: 0 10px 50px rgb(from var(--color-blue) r g b / 0.5);
    }
}

section {
    margin-bottom: 40px;
}

h2 {
    display: flex;
    justify-content: center;
    border-bottom: 2px solid var(--color-red);
    padding-bottom: 10px;
}

a {
    color: var(--color-white);
}

.mainContent {
    flex: 0 0 50%;
    max-width: 800px;
    margin: auto;
}

#projects {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project {
    --sep-margin: 10px;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
    animation-delay: calc(var(--index) * 1000ms);

    h3 {
        padding: 10px;
        padding-left: 20px;
        margin-top: 0px;
        margin-bottom: calc(var(--sep-margin) + 5px);
        color: var(--color-white);
        background-color: var(--color-red);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.projectContent {
    background: var(--color-white);
    padding: 20px;
    color: var(--color-black);

    --sep-margin: 10px;
    
    p {
        margin-top: 0;
        margin-bottom: var(--sep-margin);
    }

    a {
        display: inline-block;
        padding: 12px 24px;
        background: var(--color-black);
        color: var(--color-white);
        text-decoration: none;
        margin-bottom: calc(var(--sep-margin) + 5px);
        outline: 2px solid var(--color-white);
        outline-offset: -5px;
        transition: background 0.2s ease, transform 0.15s ease;

    }

    a:hover {
        background: var(--color-red);
        transform: scale(1.05);
    }
}


.tags {  
    display: flex;
    flex-wrap: wrap;
}


.tag {
    padding: 15px;
    border-radius: 50px;
    color: var(--color-blue);  
    
    font-size: 16px;
    line-height: 12px;
    
    outline: 2px solid var(--color-blue);
    outline-offset: -8px;
}

@keyframes slide-bg {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -1920px 0;
    }
}