:root {
    --nav-color: transparent;
    --nav-transition-color: #fac458a9;
    --nav-text-color: #2c3e50;
    --nav-text-hover: #ffffff;
    --nav-shadow: #fac458a9;
    --nav-padding: 1rem;
    --nav-border-radius: 0.5rem;
    --transition-speed: 0.3s;
    --logo-size: 2.5rem;
    --body-bg-color:#473b2c;
    --sub-section-bg-color: #756352;
    --accent-color: #fac458;
    --strong-color: #fac458;
    --em-color: #e8dcc0;
    --text-font-size: 1.2rem;
    --content-text-color:rgb(255, 252, 239);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--body-bg-color);

    hr {
        display: none;
    }
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--nav-color), var(--nav-transition-color));
    padding: var(--nav-padding);
    box-shadow: 0 4px 6px var(--nav-shadow);
    /* position: absolute; */
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);

    img {
        height: var(--logo-size);
        width: var(--logo-size);
        border-radius: var(--nav-border-radius);
        transition: transform var(--transition-speed) ease;

        &:hover {
            transform: scale(1.1) rotate(5deg);
        }
    }

    nav {
        display: flex;
        align-items: center;

        ul {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            list-style: none;

            li {
                position: relative;

                a {
                    display: block;
                    padding: 0.75rem 1.25rem;
                    color: var(--nav-text-color);
                    text-decoration: none;
                    font-weight: 500;
                    border-radius: var(--nav-border-radius);
                    transition: all var(--transition-speed) ease;
                    position: relative;
                    overflow: hidden;

                    &::before {
                        content: '';
                        position: absolute;
                        top: 0;
                        left: -100%;
                        width: 100%;
                        height: 100%;
                        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
                        transition: left var(--transition-speed) ease;
                    }

                    &:hover {
                        color: var(--nav-text-hover);
                        background-color: rgba(255, 255, 255, 0.1);
                        transform: translateY(-2px);
                        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

                        &::before {
                            left: 100%;
                        }
                    }

                }

                /* Active page indicator */
                &.active a{
                    background-color: rgba(255, 255, 255, 0.2);
                    color: var(--nav-text-hover);
                    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
                    transform: translateY(-2px);
                }
            }
        }
    }
}

@keyframes buttonBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
        transform: rotate(3deg);
    }
    25% {
        transform: translateY(-8px) scale(1.05);
    }
    50% {
        transform: translateY(-12px) scale(1.1);
    }
    75% {
        transform: translateY(-8px) scale(1.05);
    }
}

main{
    overflow-x: hidden;

    br {
        display: none;
    }

    hero-image {
        display: block;
        height: 100vh;
        width: 100vw;
        position: relative;
        overflow: hidden;

        picture, img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 1;
            filter: brightness(0.8);
        }

        h1{
            /* text-transform: uppercase; */
            /* text-align: center; */
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 3;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: clamp(3rem, 50vh, 200rem);
            font-family: "Anton", sans-serif;
            font-weight: 400;
            font-style: normal;
            line-height: 50vh;
            color: transparent;
            background: url('imgs/smallerme.jpg') center/cover;
            background-clip: text;
            -webkit-background-clip: text;
            /* filter: grayscale(100%); */
            word-spacing: 100vw;
        }
    }

    about-me {
        display: block;
        background: color-mix(in display-p3, var(--sub-section-bg-color), color(display-p3 0.42 0.35 0.29));
        height: fit-content;
        min-height: 50dvh;
        color: color(display-p3 0.97 0.96 0.95);
        padding: 4rem 2rem;
        font-family: "Funnel Sans", sans-serif;
        font-optical-sizing: auto;
        font-weight: 400;
        font-style: normal;
        line-height: 1.7;

        
        hgroup {
            text-align: center;
            margin-bottom: 4rem;

            h2 {
                font-size: 3rem;
                font-weight: 700;
                position: relative;
            }

            p {
                font-size: var(--text-font-size);
                opacity: 0.9;
                font-style: italic;
            }
        }

        > p {
            margin: 0 auto 2rem auto;
            font-size: var(--text-font-size);
            text-align: justify;

            strong, b {
                color: var(--strong-color);
                font-weight: 600;
            }

            em, i {
                color: var(--em-color);
                font-style: italic;
            }
        }

        figure{
            min-width: 300px;
            width: 50vw;
            margin: 3rem auto;
            padding: 2rem;
            background: rgba(255, 255, 255, 0.05);
            border-left: 4px solid #fac458;
            border-radius: 0 var(--nav-border-radius) var(--nav-border-radius) 0;
            backdrop-filter: blur(5px);
            overflow-wrap: break-word;
            

            blockquote {
                font-size: var(--text-font-size);
                font-style: italic;
                line-height: 1.6;
                margin-bottom: 1rem;
                quotes: '"' '"';

                &::before {
                    content: open-quote;
                    font-size: 1.5rem;
                    color: var(--accent-color);
                    line-height: 0;
                }

                &::after {
                    content: close-quote;
                    font-size: 1.5rem;
                    color: var(--accent-color);
                    line-height: 0;
                }
            }

            figcaption {
                font-size: 0.9rem;
                opacity: 0.8;
                text-align: right;
                

                a {
                    color: var(--accent-color);
                    /* text-decoration: none; */
                    transition: opacity var(--transition-speed) ease;

                    &:hover {
                        opacity: 0.7;
                    }
                }
            }
        }
    }

    res-proj-box {
        display: flex;
        min-height: 50vh;
        background: linear-gradient(135deg, var(--sub-section-bg-color), #6b5847);
        overflow: hidden;

        article {
            flex: 1;
            padding: 3rem 2rem;
            color: #f8f6f3;
            font-family: "Funnel Sans", sans-serif;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            transition: flex var(--transition-speed) ease, transform var(--transition-speed) ease;
            position: relative;
        }

        h3 {
            font-size: clamp(2rem, 4vw, 3rem);
            margin-bottom: 1.5rem;
            transition: all var(--transition-speed) ease;
            font-weight: 600;
        }
        
        p {
            max-width: 45ch;
            line-height: 1.6;
            margin-bottom: 2rem;
            font-size: var(--text-font-size);
            
            abbr {
                color: var(--accent-color);
                text-decoration: underline;
                text-decoration-style: dotted;
                cursor: help;
            }
            
            dfn {
                font-style: italic;
                color: #e8dcc0;
            }
        }
        
        a {
            padding: 1rem 2rem;
            background: transparent;
            color: var(--accent-color);
            text-decoration: none;
            border: 2px solid var(--accent-color);
            border-radius: var(--nav-border-radius);
            font-weight: 500;
            font-size: var(--text-font-size);
            transition: all var(--transition-speed) ease;
            
            &:hover {
                background: var(--accent-color);
                color: var(--sub-section-bg-color);
                animation: buttonBounce 0.6s ease-in-out;
            }
        }
        
        &:first-child {
            border-right: 1px solid rgba(250, 196, 88, 0.2);
        }
    }
}

footer {
    background: linear-gradient(135deg, var(--sub-section-bg-color), #3d332a);
    color: #f8f6f3;
    padding: 3rem 2rem;
    text-align: center;
    font-family: "Funnel Sans", sans-serif;
    border-top: 3px solid var(--accent-color);
    position: relative;
    
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    }
    
    h2 {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
        margin-bottom: 2rem;
        color: var(--accent-color);
        font-weight: 600;
        
        &::after {
            content: '';
            position: absolute;
            bottom: -0.5rem;
            left: 50%;
            transform: translateX(-50%);
            width: 3rem;
            height: 2px;
            background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
        }
    }
    
    p {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        opacity: 0.9;
    }
    
    address {
        font-style: normal;
        margin-bottom: 2rem;
        
        a {
            color: var(--accent-color);
            font-size: 1.2rem;
            font-weight: 500;
            padding: 0.5rem 1rem;
            border-radius: var(--nav-border-radius);
            transition: all var(--transition-speed) ease;
            display: inline-block;
            
            &:hover {
                background: rgba(250, 196, 88, 0.1);
                transform: translateY(-2px);
                box-shadow: 0 4px 12px rgba(250, 196, 88, 0.2);
            }
        }
    }
    
    > a {
        display: inline-block;
        padding: 1rem 2rem;
        background: transparent;
        color: var(--accent-color);
        text-decoration: none;
        border: 2px solid var(--accent-color);
        border-radius: var(--nav-border-radius);
        font-weight: 500;
        font-size: 1.1rem;
        transition: all var(--transition-speed) ease;
        margin-top: 1rem;
        
        &:hover {
            background: var(--accent-color);
            color: var(--body-bg-color);
            animation: buttonBounce 0.6s ease-in-out;
            box-shadow: 0 8px 20px rgba(250, 196, 88, 0.3);
        }
    }
}




/* Responsive design */
@media (max-width: 768px) {
    :root {
        --nav-padding: 0.75rem;
        --logo-size: 2rem;
    }

    header {
        flex-direction: column;
        gap: 1rem;

        nav ul {
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.25rem;

            li a {
                padding: 0.5rem 1rem;
                font-size: 0.9rem;
            }
        }
    }
    about-me {
        padding: 3rem 1.5rem;

        > p {
            text-align: left;
        }

        figure {
            padding: 1.5rem;
        }
    }

    res-proj-box{
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    header nav ul {
        flex-direction: column;
        width: 100%;

        li {
            width: 100vw;

            a {
                text-align: center;
            }
        }
    }
}