@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --logoColor: white;
    --constlogoColor: white;
    --accentColor: #FF1F00;
    --constaccentColor: #FF1F00;
    --darkColor: #181818;
    --constdarkColor: #181818;
    --defaultMargin: 2rem;
}

body {
    font-family: "Inter", sans-serif;
}

h1 {
    font-family: "Inter", sans-serif;
    font-size: 4em;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
}

h2,
h2 a {
    font-family: "mastro-display", sans-serif;
    font-size: 3rem;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: -1.2px;


    &.subh {
        font-size: 1.5em;
        font-weight: 500;
    }

    &.light {
        font-weight: 400;
    }
}

h3 {
    font-family: "mastro-display", sans-serif;
    font-size: 2em;
    font-style: normal;
    font-weight: 600;
    line-height: normal;

    &.subh {
        font-size: 1.125em;
        font-weight: 400;
    }

    &.light {
        font-weight: 400;
        letter-spacing: -0.8px;
    }
}

p,
a {
    font-family: "Inter", sans-serif;
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 400;
    line-height: 145%;
    transition: all 0.5s ease;
}

a:hover {
    font-size: 1.1em;
    transition: all 0.5s ease;
}

b {
    font-weight: 800;
    color: var(--accentColor);
}

a {
    color: var(--accentColor);
}

video {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    user-select: none;
}

.tags,
li {
    opacity: 0.5;
    font-family: Inter;
    font-size: 1.125em;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    display: block;
}


li {
    opacity: 1;
    list-style: disc;
    list-style-position: inside;
    display: list-item;
}


abbr {
    text-decoration: underline dotted;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
    transition: all 0.5s ease;
}

abbr:hover {
    text-decoration: underline dotted;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.1em;
}


header {

    &.hWhite {
        --logoColor: var(--accentColor);
    }

    &.hAccent {
        --accentColor: var(--logoColor);
    }

    color: var(--logoColor);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 7.5vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;


    .logo {
        height: 80%;
        cursor: pointer;
        overflow: visible;
        transition: all 0.5s ease;

        * {
            transition: all 0.5s ease;
        }

        #leftCode,
        #rightCode,
        #slash,
        #sticker {
            opacity: 0;
        }

        #sticker2,
        #Clef {
            stroke: var(--logoColor);
        }

        #leftCode,
        #rightCode,
        #slash,
        #Bulb {
            stroke: var(--accentColor);
        }

        #eye1,
        #eye3 {
            fill: var(--accentColor);
        }

        #sticker {
            transform-origin: 50% 50%;
            transition: all 0.5s 0.75s ease, visibility 0.25s 0.6s ease;
        }

        #leftCode {
            transition: all 0.5s 0.5s ease, visibility 0.25s 0.35s ease;
        }

        #slash {
            transition: all 0.5s 0.5s ease, visibility 0.25s 0.35s ease;
        }

        #rightCode {
            transition: all 0.5s ease, visibility 0.25s ease;
        }

        &:hover {

            #leftCode,
            #rightCode,
            #slash,
            #sticker {
                opacity: 1;
            }

            #leftCode {
                transform: translateX(-60%);
                transition: all 0.5s 0.25s ease, visibility 0.25s 0.1s ease;
            }

            #sticker {
                transform: translateX(100%) rotate(360deg);
                transition: all 0.5s ease, visibility 0.25s ease;
            }

            #slash {
                transform: translateX(180%);
                transition: all 0.5s 0.5s ease, visibility 0.25s 0.35s ease;
            }

            #rightCode {
                transform: translateX(200%);
                transition: all 0.5s 0.75s ease, visibility 0.25s 0.6s ease;
            }

        }
    }

}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    height: 100%;

    svg {
        shape-rendering: geometricPrecision;
        font-size: 2em;
        height: 60%;
        cursor: pointer;
        fill: var(--logoColor);
    }


    svg * {
        transform-origin: center;
        stroke-width: 4;
    }

    #animated {
        transform: scaleX(0.4);
    }

    #photoBtn {
        transition: all 0.5s ease;

        path {
            transition: transform 0.5s ease;
        }
    }

    #webDev {
        fill: none;

        rect {
            fill: var(--logoColor);
        }

        circle {
            stroke: var(--logoColor);
        }

        * {
            transition: all 0.5s ease;
        }

    }

    #webDev:hover {
        rect {
            fill: var(--accentColor);
        }

        circle,
        path {
            stroke: var(--accentColor);
        }

        #animatedfull {
            transform: scaleX(0.4);
        }

        #animated {
            transform: scaleX(-1);
        }
    }


    #photoBtn:hover path {
        fill: var(--accentColor);
        transform: scale(2);
        transition: transform 0.5s ease;
    }

    p {
        position: absolute;
        bottom: -1em;
        right: 0;
        z-index: 200;
        opacity: 0;
        transition: all 0.5s ease;
        user-select: none;
        text-shadow: var(--constdarkColor) 1px 1px 10px;
    }

    svg:hover+p {
        transition: all 0.5s ease;
        opacity: 1;
        right: 2rem;
    }

}

.hero {
    margin-bottom: var(--defaultMargin);
}

.flex {
    display: flex;
    justify-content: center;
    align-items: center;
}

.relative {
    position: relative;
}



section {
    padding: var(--defaultMargin) 8rem;
    position: relative;
    overflow: hidden;
    margin-bottom: var(--defaultMargin);

    .thumb {
        position: relative;
        width: 66%;
        z-index: 2;
    }

    .title:hover{
        text-decoration: underline;
        cursor: pointer;
    }
    .subtitle:hover{
        text-decoration: underline;
        cursor: pointer;
    }

    .imgList {
        position: relative;
        width: 100%;
        box-shadow: 0px 1px 3.5px 0px rgba(0, 0, 0, 0.80);
        overflow: visible;
        cursor: pointer;

        img {
            transition: all 0.5s ease;
            width: 100%;
            height: auto;
            aspect-ratio: 3/2;
            object-fit: cover;
            user-select: none;
        }

        .nextImg {
            position: absolute;
            top: 0;
            left: 100%;
            width: 100%;
            z-index: 4;
            opacity: 0;
            height: 100%;
            transition: all 0.5s ease;
            pointer-events: none;
        }

        .playBtn {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 5em;
            height: 5em;
            transform: translate(-50%, -50%);
            z-index: 5;
            opacity: 0.75;
            transition: all 0.5s ease;

            &:hover {
                transform: translate(-50%, -50%) scale(1.1);
                opacity: 1;
            }
        }

        &:hover img:not(.playBtn) {
            transform: scale(1.01);
        }
    }

    .imgNav {
        width: 100%;
        height: 0.25em;
        box-sizing: content-box;
        display: flex;
        gap: 0.5em;
        padding: var(--defaultMargin) 0.5em;
        transition: all 0.5s ease;

        &:hover {
            height: 0.5em;
            padding: calc(var(--defaultMargin) - 0.13em) 0.5em;
        }
    }

    button {
        all: unset;
        cursor: pointer;
        height: 100%;
        border-radius: 0.125em;
        width: 4em;
        background-color: white;
        transition: all 0.5s ease;
        opacity: 0.5;
        box-shadow: 0px 1px 3.5px 0px rgba(0, 0, 0, 0.80);

        &:hover {
            opacity: 1;
        }

        &.active {
            opacity: 1;
            background-color: var(--accentColor);
        }
    }

    .flex {
        align-items: start;
        gap: 1.125em;
        padding-inline: 0.5em;
    }

    hgroup {
        width: 50%;

        * {
            display: inline;
        }
    }

    p {
        width: 50%;
    }

    .projectArrow {
        position: absolute;
        opacity: 1;
        bottom: 5em;
        right: -7em;
        z-index: 5;
        padding: 0;
        cursor: pointer;
        background: none;
        border: none;
        width: 6%;
        height: auto;
        transition: all 0.5s ease;
        text-align: center;
        box-shadow: none;
        transform: rotate(-90deg);
        display: none;
    }

    .projectArrow svg {
        fill: none;
        pointer-events: none;
        stroke: white;
        stroke-width: 5px;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .projectArrow svg line {
        transition: all 0.5s ease;
        stroke-dasharray: 90;
        stroke-dashoffset: 90;
    }

    .projectArrow:hover svg line {
        stroke-dashoffset: 0;
    }

    .projectArrow p {
        opacity: 0;
        left: -100%;
        transition: all 0.5s ease;
        transform: rotate(90deg);
        position: absolute;
        bottom: 25%;
        text-align: center;
        width: fit-content;
    }

    .projectArrow:hover p {
        opacity: 1;
        left: -3em;
    }
}


@property --animated {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
}

section.webDev {
    background-color: var(--accentColor);
    color: white;

    button.active {
        background-color: white;
    }

    &::after {
        content: "";
        position: absolute;
        z-index: 3;
        background: url(../assets/webDevDeco.svg);
        background-size: 100%;
        background-repeat: no-repeat;
        top: var(--defaultMargin);
        left: calc(66% - 2.5rem);
        width: calc(33% + 4rem);
        aspect-ratio: 516 / 634;
        opacity: var(--animated);
        pointer-events: none;
    }

    .imgList::after {
        content: "";
        position: absolute;
        z-index: 3;
        top: -3px;
        left: -25vw;
        width: calc(150vw * var(--animated));
        height: calc(100% + 6px);
        border: white 3px dashed;
        pointer-events: none;
        border-inline: none;
    }

    .imgList::before {
        content: "";
        position: absolute;
        z-index: 3;
        top: -25vw;
        left: -3px;
        height: calc(150vw * var(--animated));
        width: calc(100% + 6px);
        border: white 3px dashed;

        pointer-events: none;
    }

    .imgList:hover img:not(.playBtn) {
        transform: scale(0.98);
    }

    opacity: 0;

    &.in-view {
        animation: webDevSection 1.5s 0.1s ease forwards;

    }

}

@keyframes webDevSection {
    0% {
        /* transform: translateY(100%); */
        opacity: 0;
        --animated: 0;
    }

    50% {
        /* transform: translateY(0); */
        --animated: 0;
    }

    100% {
        --animated: 1;
        opacity: 1;
    }
}


section.music {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 50%, rgba(0, 0, 0, 0.75) 100%), var(--darkColor);
    color: white;

    .title {
        color: var(--accentColor);
    }

    .imgList::after {
        content: "";
        background-image: url(../assets/sectionStave.svg);
        background-size: 100%;
        pointer-events: none;
        background-repeat: no-repeat;
        position: absolute;
        bottom: -2rem;
        right: -25%;
        width: 75%;
        aspect-ratio: 751 / 61;
        z-index: 3;
        opacity: 0.4;
    }

    &:before {
        content: "";
        background-image: url(../assets/trebleClef.svg);
        background-size: 100%;
        background-repeat: no-repeat;
        position: absolute;
        pointer-events: none;
        top: -12.5%;
        right: calc(10% + ((1 - var(--animated)) * 10%));
        aspect-ratio: 470 / 1220;
        height: 125%;
        transform: scale(calc(0.9 + 0.1 * var(--animated)));
        z-index: 2;
        opacity: calc(0.25 * var(--animated));
        rotate: 15deg;
    }

    &.in-view {
        animation: musicSection 1.5s 0.1s ease forwards;
    }

}

@keyframes musicSection {
    0% {
        --animated: 0;
    }

    100% {
        --animated: 1;
    }
}

#imgFull[open] {
    all: unset;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    backdrop-filter: blur(1px);
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    outline: none;

    .container {
        box-shadow: 0px 1px 3.5px 0px rgba(0, 0, 0, 0.80);
        position: relative;
        width: fit-content;
        max-width: 90%;
        height: fit-content;
        max-height: 80vh;

        img,
        video {
            width: 64vw;
            max-height: 80vh;
            object-fit: contain;
        }
    }

    .metadata {
        position: absolute;
        top: -1.5em;
        left: -3em;

        img {
            height: 100%;
            width: auto;
        }

        div {
            display: flex;
            align-items: center;
            gap: 1ch;
            background-color: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(1px);
            padding: 0.5em;
            color: white;
            width: fit-content;
        }
    }

    .info {
        position: absolute;
        bottom: -1.5em;
        right: -3em;
        background-color: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(1px);
        padding: 0.5em;
        color: white;
        max-width: 40%;
    }

    .close {
        all: unset;
        position: absolute;
        top: -1.75em;
        right: -1.75em;
        height: 1.5rem;
        aspect-ratio: 1/1;
        cursor: pointer;
        padding: 1em;
        background-color: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(1px);
        transition: all 0.5s ease;

        img {
            height: 100%;
            width: auto;
        }

        &:hover {
            scale: 1.1;
        }
    }
}

.parallax {
    width: 100%;
    height: 15rem;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-bottom: var(--defaultMargin);
}

.txtCentered {
    text-align: center;
}

footer {
    background-color: var(--darkColor);
    color: white;
    padding: var(--defaultMargin) 8rem;
    text-align: center;
}

@media screen and (max-width: 768px) {
    :root {
        --defaultMargin: 1rem;
        font-size: 0.8em;
    }


    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 2em;

        &.subh {
            font-size: 1.5em;
        }
    }

    h3 {
        font-size: 1.5em;

        &.subh {
            font-size: 1.125em;
        }
    }

    p,
    a {
        font-size: 1em;
    }

    a {
        color: var(--accentColor);
    }

    .tags {
        opacity: 0.5;
        font-family: Inter;
        font-size: 1em;
        font-style: normal;
        font-weight: 600;
        line-height: normal;
        display: block;
    }

    section {
        padding: var(--defaultMargin) 2em;
        .title{
            text-decoration: underline;
        }
        .thumb {
            width: 100%;
        }

        .imgNav {
            height: 0.5em;
            gap: 0.25em;
        }

        .flex {
            flex-direction: column;
            gap: var(--defaultMargin);
        }

        hgroup {
            width: 100%;
        }

        p {
            width: 100%;
        }
    }

    section.webDev .imgList::after,
    section.webDev .imgList::before,
    section.music .imgList::after,
    section.music:before, section::before, section::after {
        all: unset;
        opacity: 0 !important;
    }

    #imgFull[open] {
        .container {
            width: fit-content;
            max-width: 100%;
            height: fit-content;
            max-height: 100vh;
    
            > img,
            > video {
                width: 85vw;
                max-height: 100vh;
                object-fit: contain;
            }
        }

        .metadata{
            position: fixed;
            top: 0;
            left: 0;
        }
           .info {
            position: fixed;
            bottom: 0;
            right: 0;
            background-color: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(1px);
            padding: 0.5em;
            color: white;
            max-width: 40%;
        }
    }
    

}