@font-face {
    font-family: "Syne";
    src: url("assets/Syne.ttf") format("truetype");
}

:root {
    --Primary: #207EDE; --PrimaryRGB: 32, 126, 222;
    --PureBlack: #000; --PureBlackRGB: 0, 0, 0;
    --PureWhite: #fff; --PureWhiteRGB: 255, 255, 255;
    --Background: #e8e2d8; --BackgroundRGB: rgb(232, 226, 216);
    --BgDark: #111111; --BgDarkRGB: rgb(17, 17, 17);

/* Hero */
    --Rotation: 0deg;
    --Thickness: 20px;
    --Border: 8px;
    --Gap: 30px;
    --Scale: 0.9;

/* Reals */
    --Variant1: var(--Primary);
    --Variant2: #DBE4F9;
    --Variant3: #90AFEC;

    --DisabledBackground: #ecece7;
    --DisabledBgdark: #a6a6a6;
}

* {
    margin: 0;
    padding: 0;

    &::after, &::before {
        box-sizing: border-box;
    }
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: clip;
    width: 100%;
    font-family: "Syne", sans-serif;
}

#HeaderPlaceHolder {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.NavBar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: var(--PureWhite);
    padding: 20px 100px;
    box-shadow: 0 4px 4px rgba(var(--PureBlackRGB), 0.25);

    .NavLogo {
        color: var(--Primary);
        display: flex;
    
        img {
            width: 90px;
            height: 90px;
        }
    }

    .NavMenus {
        display: flex;
        flex-grow: 1;
        justify-content: space-between;
        margin: 0 10vw;
        flex-wrap: wrap;

        .NavLinks {
            display: flex;
            flex-direction: column;
            list-style: none;
            margin: 0;
            padding: 0;
            gap: 6px;

            span {
                text-transform: uppercase;
                color: var(--Primary);
                font-weight: 800;
                font-size: 1.2rem;
                margin-bottom: 10px;
            }

            a {
                text-decoration: none;
                color: var(--Primary);
                font-weight: 400;
                font-size: 1.2rem;
                transition: opacity 0.3s ease;
                display: flex;
                gap: 5px;
            }   

            a:hover, a.active {opacity: 0.5;}
        }
    }

    .MobileNav {
        display: none;
        position: absolute;
        top: 100%; left: 50%;
        transform: translateX(-50%);
        width: 100%; max-width: 100%;
        background-color: var(--PureWhite);
        box-shadow: 0 8px 32px rgba(var(--PureBlackRGB),0.2);
        z-index: 999;
        padding: 16px;
        flex-direction: column; gap: 4px;
        border-top: 1px solid rgba(var(--PrimaryRGB), 0.1);
        animation: mobileNavIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);

        &.open { display: flex; }

        a {
            display: block; padding: 11px 16px;
            text-decoration: none; color: var(--Primary);
            font-family: "Montserrat", sans-serif;
            font-weight: 600; font-size: 1rem;
            border-radius: 8px;
            transition: background 0.2s, color 0.2s;

            &:hover { background: rgba(var(--PrimaryRGB),0.1); color: var(--Primary); }
        }

        .Divider {
            height: 1px;
            background: rgba(var(--PrimaryRGB),0.15);
            margin: 6px 0;
        }

        .CTA {
            margin-top: 8px;

            .BtnSolid {
                display: block;
                width: 100%;
                text-align: center;
                padding: 12px 0;
                color: var(--PureWhite);
            }
        }
    }
}

.HamburgerBtn {
    display: none;
    background: none; border: none;
    cursor: pointer; padding: 6px;
    flex-direction: column; justify-content: center;
    align-items: center; gap: 5px;
    width: 38px; height: 38px;
    border-radius: 8px;
    transition: background 0.2s ease;

    &.HamburgerBtn:hover { background: rgba(var(--PrimaryRGB),0.1); }

    &.open .HamburgerLine:nth-child(1) {transform: translateY(7px) rotate(-45deg);}
    &.open .HamburgerLine:nth-child(2) {opacity: 0; }
    &.open .HamburgerLine:nth-child(3) {transform: translateY(-7px) rotate(45deg);}
}

.HamburgerLine {
    display: block; width: 22px; height: 2px;
    background-color: var(--Primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.MobileNav {
    display: none;
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 100%;
    background-color: var(--PureWhite);
    box-shadow: 0 8px 32px rgba(var(--PureBlackRGB),0.2);
    z-index: 999;
    padding: 16px;
    flex-direction: column; gap: 4px;
    border-top: 1px solid rgba(var(--PrimaryRGB), 0.1);
    animation: mobileNavIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);

    &.open { display: flex; }

    a {
        display: block; padding: 11px 16px;
        text-decoration: none; color: var(--Primary);
        font-family: "Montserrat", sans-serif;
        font-weight: 600; font-size: 1rem;
        border-radius: 8px;
        transition: background 0.2s, color 0.2s;

        &:hover { background: rgba(var(--PrimaryRGB),0.1); color: var(--Primary); }
    }
}


.MobileNavDivider { height: 1px; background: rgba(var(--PrimaryRGB),0.15); margin: 6px 0; }
.MobileNavSub { display: flex; flex-direction: column; gap: 0; padding-left: 10px; }
.MobileNavSub a { font-size: 0.88rem; font-weight: 500; padding: 8px 14px; }
.MobileNavCTA { margin-top: 8px; }
.MobileNavCTA .BtnSolid { display: block; width: 100%; text-align: center; padding: 12px 0; color: var(--PureWhite); }

@keyframes mobileNavIn {
    from {opacity: 0; transform: translateX(-50%) translateY(-8px);}
    to   {opacity: 1; transform: translateX(-50%) translateY(0);}
}

section.Hero {
    backGround: radial-gradient(transparent 50%, color-mix(in oklab, var(--Background), var(--Background))), var(--Background);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    overflow: clip;
    font-family: "Syne", sans-serif;
    font-style: normal;

    .Box {
        position: absolute;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 150vw;
        height: 150vh;
        transform: translate(-10vw, -40px);

        &#Ground {z-index: 5;}
        &#Air    {z-index: 10;}
        &#Text   {z-index: 15;}

        .SubBox {
            display: flex;
            flex-direction: column;
            gap: var(--Gap);
            Text-align: center;
            font-size: 20px;
            transform: rotate(var(--Rotation)) scale(var(--Scale));

            .SubText {
                display: inline;
                width: fit-content;
                position: relative;
                overflow: visible;
                padding: 15px;
                margin: 0px;
                font-weight: 800;
                font-size: 80px;
                line-height: 65px;
                border-radius: 5px;
                paint-order: stroke fill;

                span {
                    position: absolute;
                    line-height: auto;
                    -webkit-Text-stroke-width: 9px;
                    white-space: nowrap;
                    Text-transform: uppercase;

                    &.TS26 {font-size: 26px; font-weight: 400;}
                    &.TS30 {font-size: 30px; font-weight: 600;}
                    &.TS46 {font-size: 46px; font-weight: 700;}

                    &.VT {
                        writing-mode: vertical-rl;
                        Text-orientation: upright;
                    }
                }

                &#SubT1 {
                    margin-right: 150px;
                    padding-top: 10px;
                    padding-bottom: 0px;
                    -webkit-text-stroke: 18px var(--Primary);
                    color: var(--Background);

                    span.T1A {right: -50px; bottom: 0px;}
                    span.T1B {right: 15px; bottom: 60px;}
                    span.T1C {right: -90px; bottom: 0px;}
                    span.T1D {right: 15px; bottom: 100px; letter-spacing:5px;}
                    span.T1E {right: -5px; bottom: 150px;}
                }

                &#SubT2 {
                    margin-left: 110px;
                    padding-bottom: 10px;
                    padding-top: 0px;
                    -webkit-text-stroke: 18px var(--Background);
                    color: var(--Primary);

                    span.T2A {left: -50px; top: 0px;}
                    span.T2B {left: 15px; top: 60px;}
                    span.T2C {left: -100px; top: 0px;}
                    span.T2D {left: 15px; top: 100px; letter-spacing:5px;}
                    span.T2E {left: -5px; top: 150px;}
                }
            }
        }

        img {
            position: absolute;
            z-index: 5;
            width: 100%;
            max-width: 500px;
            #grid, #cursor, #nodes { fill: var(--BgDark); }
        }
    }
}

#Ground {backGround: linear-gradient(var(--Rotation), transparent 50%, var(--Primary) 50%);}

#Air {
    backGround:
        linear-gradient(
        var(--Rotation),
        transparent calc(50% - var(--Thickness) - var(--Border)),
        var(--Background) calc(50% - var(--Thickness) - var(--Border)),
        var(--Background) calc(50% - var(--Thickness)),
        color-mix(in oklab, var(--Background), var(--Primary) 40%) calc(50% - var(--Thickness)),
        color-mix(in oklab, var(--Background), var(--Primary) 40%) calc(50% + var(--Thickness)),
        var(--Primary) calc(50% + var(--Thickness)),
        var(--Primary) calc(50% + var(--Thickness) + var(--Border)),
        transparent calc(50% + var(--Thickness) + var(--Border)));
    backGround-repeat: no-repeat;
}

@media (max-width: 600px) {
    :root {
        --Scale:     0.60;
        --Thickness: 10px;
        --Border:    5px;
        --Gap:       28px;
    }

    section.Hero {
        .Box {transform: translate(-6vw, 0);}
        img {max-width: 225px;}
    }
}

.BtnOutline {
    text-decoration: none;
    color: var(--Primary);
    border: 2px solid var(--Primary);
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 2px rgba(var(--PureBlackRGB), 0.25);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;

    &:hover {
        background-color: var(--Primary);
        color: var(--PureWhite);
    }
}

.BtnSolid {
    text-decoration: none;
    color: var(--PureWhite);
    background-color: var(--Primary);
    padding: 10px 24px;
    border-radius: 50px;
    box-shadow: 0 2px 2px rgba(var(--PureBlackRGB), 0.25);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;

    &:hover {        filter: brightness(0.9);
        transform: translateY(-2px);
    }
}


@media (max-width: 950px) {
    .NavBar {
        padding: 10px 20px;
        
        .NavMenus {display: none;}
    }
    .HamburgerBtn { display: flex;}
    section.Hero {
        .Box {transform: translate(-6vw, 0);}
        img {max-width: 225px;}
    }
}

section.Work {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #000;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    canvas {
        position: absolute;
        top: 0;
        left: 0;
    }

    #CanvasGrid {z-index: 0;}
    #CanvasLetters{z-index: 1;}

    .Letters {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        pointer-events: none;
        perspective: 156.25rem;
        perspective-origin: center;
    }

    .Letter {
        position: absolute;
        font-family: "Syne", sans-serif;
        font-size: 14rem;
        font-weight: bold;
        color: var(--Primary);
        z-index: 2;
        transform-origin: center;
        transform-style: preserve-3d;
        will-change: transform;
    }

    .Container {
        position: relative;
        width: 500vw;
        height: 100vh;
        padding-left: 100vw;
        overflow: hidden;
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 10;
    }

    .Card {
        width: 10%;
        height: 50%;
        padding: 0.5rem;
        background-color: #000;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .CardImg {
        flex: 1;
        overflow: hidden;

        img {display: flex;}
        img>img {display: none;}
    }

    .CardDesc {
        height: 0.75rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 0.25rem;
        text-transform: uppercase;
        font-family: "Syne";
        font-size: 0.75rem;
        color: var(--Primary);
    }
}

section.Folders {
    background: var(--Background);
    color: var(--BgDark);
    overflow: hidden;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    .Rows {
        display: flex;
        width: 100%;
        position: relative;
        margin-left: 0; 
    
        &.Row1 {
            z-index: 1;

            .Folder:nth-child(1) {flex: 2;}
            .Folder:nth-child(2) {flex: 3;}
        }

        &.Row2 {
            z-index: 2;

            .Folder:nth-child(1) {flex: 2;}
            .Folder:nth-child(2) {flex: 3;}
            .Folder:nth-child(3) {flex: 2;}
        }

        .Folder {
            position: relative;
            height: 160px;
            overflow: visible;
            cursor: pointer !important;
            transition: filter 0.3s ease;
            z-index: 1;

            &.Variant1 .FolderIndex,
            &.Variant1 .FolderIndex::after,
            &.Variant1 .FolderName {background: var(--Variant1);}

            &.Variant2 .FolderIndex,
            &.Variant2 .FolderIndex::after,
            &.Variant2 .FolderName {background: var(--Variant2);}

            &.Variant3 .FolderIndex,
            &.Variant3 .FolderIndex::after,
            &.Variant3 .FolderName {background: var(--Variant3);}

            .FolderPreview {
                position: absolute;
                top: -50px;
                left: 50%;
                transform: translateX(-50%);
                width: 320px;
                height: 220px;
                pointer-events: none;
                z-index: 1;

                .PreviewImg {
                    position: absolute;
                    width: 90px;
                    height: 120px;
                    overflow: hidden;
                    opacity: 0;
                    transform: rotate(0deg) translateY(30px);
                    border-radius: 2px;
                    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
                    will-change: transform, opacity;

                    &:nth-child(1) {left: 0; top: 20px;}
                    &:nth-child(2) {left: 70px; top: 0;}
                    &:nth-child(3) {left: 140px; top: 20px;}

                    img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                        display: block;
                    }
                }
            }

            .Wrapper {
                position: relative;
                width: 100%;
                height: 100%;
                z-index: 2;

                .FolderIndex {
                    position: relative;
                    width: 220px;
                    padding: 0.75rem;
                    transition: background 0.4s ease;

                    &::after {
                        content: '';
                        position: absolute;
                        top: 0;
                        left: 100%;
                        width: 50px;
                        height: 100%;
                        background: inherit;
                        clip-path: polygon(0 0, 100% 100%, 0 100%);
                        transition: background 0.4s ease;
                    }

                    p {
                        font-size: 0.75rem;
                        text-transform: uppercase;
                        letter-spacing: 0.05em;
                        transition: color 0.4s ease;
                    }
                }       

                .FolderName {
                    width: 100%;
                    height: 100%;
                    display: flex;
                    align-items: flex-start;
                    padding: 1.5rem;
                    transition: background 0.4s ease, color 0.4s ease;

                    h2, h3 {
                        font-size: 3rem;
                        font-weight: 400;
                        transition: color 0.4s ease;
                    }
                }
            }
        }
    }
}

.Folder.disabled .FolderName,
.Folder.disabled .FolderIndex {
  background: var(--DisabledBackground);
  transition: background 0.3s ease;
}

.Folder.disabled .FolderIndex::after {
  background: var(--DisabledBackground);
  transition: background 0.3s ease;
}

.Folder.disabled h2,
.Folder.disabled p {
  color: var(--DisabledBgdark);
  transition: color 0.3s ease;
}

@media (max-width: 600px) {
    .CardImg {
        img {display: none;}
        img>img {display: flex;}
    }
}