/* ================================VARIABLES & RESET================================ */
:root {
    --primary: 239, 236, 227;
    --secondary: 143, 171, 212;
    --accent: 74, 112, 169;
    --background: 0, 0, 0;
    --border: 0, 0, 102;
}
@font-face {
    font-family: "Clash Display";
    src: url("assets/fonts/ClashDisplay-Variable.ttf") format("truetype");
}
html, body {
    margin: 0;
    padding: 0;
    border: 0;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    font-family: "Clash Display", serif;
    background-image: url("assets/images/background-winter.jpg");
    background-size: cover;
    visibility: visible;
}
body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    height: -webkit-fill-available;
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior-y: contain;
    position: relative;
}

/* PAGES WRAPPER = */
#pages_wrapper {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    padding:0 10% 0 10% ;
    box-sizing: border-box;
}



/* ================================DEV INFO================================ */
#dev_info {
    flex-direction: row;
    align-content: center;
    align-self: center;
    justify-content: center;
    justify-self: right;
    flex-shrink: 0;
    margin-left: auto;
}
#version {
    margin-right: 15px;
}
#style_desktop, #version {
    visibility: visible;
}
#style_desktop {
    visibility: visible;
}
#style_phone {
    display: none;
}
#style_tablet {
    display: none;
}

a{
    color: black;
    text-decoration:none;
}

/* ================================HEADER & FOOTER================================ */
#header {
    display: flex;
    width: 100%;
    height: 50px;
    min-height: 50px;
    background: linear-gradient(to bottom, rgba(var(--accent), 1), rgba(var(--accent), 0.4));
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px white solid;
    flex-shrink: 0;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
}
#home_button, #contact_button {
    font-weight: 700;
    font-size: 26px;
    cursor: pointer;
}
.show_more {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    bottom: 0;
    padding: 10px 10px 0 10px;
    text-shadow: 1px 1px 2px white;
    font-weight: 600;
}
#footer {
    display: flex;
    width: 100%;
    min-height: 50px;
    background: linear-gradient(to top, rgba(var(--accent), 1), rgba(var(--accent), 0.7));
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-top: 1px solid white;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* ================================PRESENTATION BLOCK================================ */
#middle_container {
    align-self: center;
    justify-self: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 110%;
    height: 70vh;
    min-width: 450px;
    max-width: 30vw;
    padding: 12px;
    box-sizing: border-box;
    transition: width 0.4s ease, height 0.4s ease, min-height 0.4s ease;
}
#presentation_block {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(var(--border), 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}
#presentation_block_title {
    text-transform: lowercase;
    margin-left: 5%;
}
#presentation_block_title:first-letter {
    text-transform: uppercase;
}
#presentation_header {
    display: flex;
    justify-content: space-between;
    padding: 15px 15px 0 15px;
    background: linear-gradient(to right, rgba(var(--accent), 0.5), rgba(var(--accent), 0.7), rgba(var(--accent), 0.5));
    border-radius: 0 0 50px 50px;
    width: 80%;
    align-self: center;
    transition: width 0.4s ease;
}
#presentation_inner_block {
    display: flex;
    flex-direction: column;
    flex-shrink: 2;
    height: 80%;
    width: 80%;
    align-self: center;
    margin: 15px 0 20px 0;
    border-radius: 30px 0 30px 30px;
    overflow: hidden;
    transition: all 0.4s ease;
}
#presentation_text {
    white-space: pre-line;
    display: flex;
    flex-direction: column;
    padding: 20px 15px;
    font-size: 20px;
    line-height: 30px;
    font-weight: 500;
    text-align: justify;
    word-wrap: break-word;
    overflow-y: auto;
    flex-grow: 1;
    background: rgba(143, 171, 212, 0.5);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(143, 171, 212, 0.3);
}
#presentation_text p {
    margin: 0 2px 15px 0;
}

/* MAIN CONTENT AREA: scrollable */
#page_container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.border_left, .border_right {
    position: absolute;
    width: 80px;
    height: 100%;
    margin: 0;
    padding: 0;
}
.border_left {
    background: linear-gradient(to right, rgba(var(--accent), 1), rgba(var(--accent), 0.2), rgba(var(--accent), 0));
    align-self: center;
    left: 0;

}
.border_right {
    background: linear-gradient(to left, rgba(var(--accent), 1), rgba(var(--accent), 0.2), rgba(var(--accent), 0));
    justify-self: right;
    right: 0;
}
#pfp_container {
    position: relative;
}
#profilepic {
    height: 70px;
    width: 70px;
    align-self: end;
    clip-path: circle();
    border: 4px solid #000;
    border-radius: 50%;
    margin-right: 15px;
    margin-bottom: 15px;
}
#hat {
    position: absolute;
    z-index: 1;
    height: 75px;
    top: -20px;
    right: -35px;
    rotate: 20deg;
}

/* ================================PROJECT CONTAINER & GRID================================ */
#project_container {
    display: flex;
    min-height: 0;
    width: 30%;
    min-width: 470px;
    overflow: hidden;
    transition: all 0.4s ease;
    flex-direction: column;
    max-width: 600px;
    align-self: center;
    justify-content: flex-end;
    gap: 40px;
}
.project {
    display: flex;
    width: 450px;
    background-image: url("assets/images/background_placeholder.jpg");
    background-size: cover;
    border: 1px solid rgba(143, 171, 212, 0.3);
    background-blend-mode: lighten;
    border-radius: 10px;
    mask-size: 200% 100%;
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.99), rgba(0, 0, 0, 0.99) 50%, rgba(0, 0, 0, 0.8));
    margin: 15px;
    transition: all 0.4s ease, mask-position 0.6s ease;
    flex-shrink: 2;
}
.project:hover {
    mask-position: 100% 0;
    text-shadow: 0 0 3px lightgrey,
    0 0 5px white,
    0 0 8px grey;
}
.project .description_gradient {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(5px);
    height: 100%;
    width: 100%;
    transition: all 0.4s ease;
}
.project_description {
    height: 70%;
    min-height: 200px;
    width: 100%;
    box-shadow: inset 0 0 0 2px rgb(var(--border));
    margin: 5px 5px 5px 5px;
    box-sizing: border-box;
    padding: 0 10px;
    background: linear-gradient(to left, rgba(var(--accent), 0.5), rgba(var(--accent), 0.8));
    transition: all 0.4s ease;
    position: relative;
    border-radius: 10px;
}
.project_title {
    font-weight: 600;
    margin-right: 5px;
}
.project_description_text {
    align-self: center;
    justify-self: center;
    margin-right: 10px;
    margin-left: 10px;
}
.project_details {
    display: flex;
    position: absolute;
    bottom: 0;
    left: 0;
    width: calc(100% - 4px);
    height: 0;
    overflow: hidden;
    background: rgba(143, 171, 212, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: height 0.3s ease;
    box-sizing: border-box;
    padding: 0 10px;
    align-items: center;
    justify-content: center;
    align-self: center;
    justify-self: center;
    margin-left: 2px;
    margin-bottom: 2px;
    gap: 3%;
    border-radius: 0 0 6px 6px;
}
.project_details.expanded {
    height: 50px;
}
.project.force-hover {
    mask-position: 100% 0;
    text-shadow: 0 0 3px lightgrey,
    0 0 5px white,
    0 0 8px grey;
}
.tech_logo {
    height: 90%;
    width: auto;
    box-sizing: border-box;
}



/* ================================CONTACT FORM================================ */
#contact_container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    align-self: center;
    justify-self: center;
    width: 100%;
    height: 100%;
}
#form_container {
    justify-items: center;
    width: 40%;
    height: 85%;
    min-width: 670px;
    transition: width 0.8s ease;
}
#contact_form {
    padding-top: 35px;
    display: flex;
    flex-direction: column;
    gap: 60px;
    align-self: center;
    align-items: center;
    justify-self: center;
    width: 90%;
    height: 90%;
}
input[type=text], input[type=email] {
    height: 50px;
    width: 85%;
    font-size: 22px;
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    font-family: "Clash Display", serif;
}
#form_name_email {
    display: flex;
    flex-direction: row;
    width: 90%;
    gap: 50px;
    justify-content: space-between;
}
#form_message {
    width: 90%;
    height: 80%;
    font-family: "Clash Display", serif;
    font-size: 20px;
    line-height: 1.5;
    border-radius: 8px;
    box-shadow: 1px 1px 1px #999999;
    max-width: 99%;
    min-height: 100px;
    min-width: 50%;
}
#submit_button{
    border-radius: 15px;
    width: 250px;
    height: 75px;
    font-family: "Clash Display", serif;
    font-size: 20px;
    transition: all 0.4s ease;
}
#inquiry{
    width: 90%;
    height: 75px;
    text-align: center;
}

.custom-dropdown {
    position: relative;
    width: 100%;
    margin-top: 10px;
}

.dropdown-selected {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    background: white;
    position: relative;
}

.dropdown-selected::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(244, 242, 242, 0.90);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 4px;
    display: none;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-options.active {
    display: block;
}

.option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.option:hover {
    background: #f5f5f5;
}

.custom-dropdown.error .dropdown-selected {
    border-color: #ff0000;
    background-color: #fff5f5;
}

#submit_button:hover{
    background: rgba(191, 191, 191, 0.6);
}

.form_glass{
    background: rgba(244, 242, 242, 0.69);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(121, 120, 120, 0.3);
}

.glass-card {
    background: rgba(var(--secondary), 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ================================LOADING SCREEN================================ */
/* LOADER OVERLAY */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #1b1b2f 0, #05050a 55%, #000 100%);
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
    pointer-events: all;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-inner {
    padding: 1.8rem 3rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
    box-shadow:
            0 18px 45px rgba(0, 0, 0, 0.55),
            0 0 30px rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    animation: loader-pop 0.7s ease-out forwards;
}

.loader-text {
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 500;
    color: #f5f5f5;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

@keyframes loader-pop {
    0% {
        transform: translateY(10px) scale(0.96);
        opacity: 0;
        filter: blur(3px);
    }
    60% {
        transform: translateY(0) scale(1.02);
        opacity: 1;
        filter: blur(0);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ================================PAGE TRANSITION ANIMATION================================ */
#contact_container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.4s ease;
}

/* ================================LIGHTROPE================================ */
:root {
    --globe-width: 12px;
    --globe-height: 28px;
    --globe-spacing: 40px;
    --globe-spread: 3px;
    --light-off-opacity: 0.4;
}
.lightrope {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    position: absolute;
    z-index: 1;
    margin: 91px 0 0 -19px;
    padding: 0;
    pointer-events: none;
    width: 100%;
}
.lightrope li {
    position: relative;
    animation-fill-mode: both;
    animation-iteration-count: infinite;
    list-style: none;
    padding: 0;
    width: var(--globe-width);
    height: var(--globe-height);
    border-radius: 50%;
    margin: calc(var(--globe-spacing) / 2);
    display: inline-block;
    background: rgba(0, 247, 165, 1);
    box-shadow: 0 calc(var(--globe-height) / 6) calc(var(--globe-width) * 2) var(--globe-spread) rgba(0, 247, 165, 1);
    animation-name: flash-1;
    animation-duration: 2s;
}
.lightrope li:nth-child(2n+1) {
    background: rgba(0, 255, 255, 1);
    box-shadow: 0 calc(var(--globe-height) / 6) calc(var(--globe-width) * 2) var(--globe-spread) rgba(0, 255, 255, 0.5);
    animation-name: flash-2;
    animation-duration: 0.4s;
}
.lightrope li:nth-child(4n+2) {
    background: rgba(247, 0, 148, 1);
    box-shadow: 0 calc(var(--globe-height) / 6) calc(var(--globe-width) * 2) var(--globe-spread) rgba(247, 0, 148, 1);
    animation-name: flash-3;
    animation-duration: 1.1s;
}
.lightrope li:nth-child(odd) {
    animation-duration: 1.8s;
}
.lightrope li:nth-child(3n+1) {
    animation-duration: 1.4s;
}
.lightrope li:before {
    content: "";
    position: absolute;
    background: #222;
    width: calc(var(--globe-width) - 2px);
    height: calc(var(--globe-height) / 3);
    border-radius: 3px;
    top: calc(0px - (var(--globe-height) / 6));
    left: 1px;
}
.lightrope li:after {
    content: "";
    top: calc(0px - var(--globe-height) / 2);
    left: calc(var(--globe-width) - 3px);
    position: absolute;
    width: calc(var(--globe-spacing) + 12px);
    height: calc(var(--globe-height) / 3 * 2);
    border-bottom: solid #222 2px;
    border-radius: 50%;
}
.lightrope li:last-child:after {
    content: none;
}
.lightrope li:first-child {
    margin-left: calc(-1 * var(--globe-spacing));
}
@keyframes flash-1 {
    0%, 100% {
        background: rgba(0, 247, 165, 1);
        box-shadow: 0 calc(var(--globe-height) / 6) calc(var(--globe-width) * 2) var(--globe-spread) rgba(0, 247, 165, 1);
    }
    50% {
        background: rgba(0, 247, 165, var(--light-off-opacity));
        box-shadow: 0 calc(var(--globe-height) / 6) calc(var(--globe-width) * 2) var(--globe-spread) rgba(0, 247, 165, 0.2);
    }
}
@keyframes flash-2 {
    0%, 100% {
        background: rgba(0, 255, 255, 1);
        box-shadow: 0 calc(var(--globe-height) / 6) calc(var(--globe-width) * 2) var(--globe-spread) rgba(0, 255, 255, 1);
    }
    50% {
        background: rgba(0, 255, 255, var(--light-off-opacity));
        box-shadow: 0 calc(var(--globe-height) / 6) calc(var(--globe-width) * 2) var(--globe-spread) rgba(0, 255, 255, 0.2);
    }
}
@keyframes flash-3 {
    0%, 100% {
        background: rgba(247, 0, 148, 1);
        box-shadow: 0 calc(var(--globe-height) / 6) calc(var(--globe-width) * 2) var(--globe-spread) rgba(247, 0, 148, 1);
    }
    50% {
        background: rgba(247, 0, 148, var(--light-off-opacity));
        box-shadow: 0 calc(var(--globe-height) / 6) calc(var(--globe-width) * 2) var(--globe-spread) rgba(247, 0, 148, 0.2);
    }
}

/* ================================SNOW================================ */
.snow, .snow:after, .snow:before {
    content: "";
    position: absolute;
    top: -650px;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(4px 4px at 100px 50px, #fff, transparent),radial-gradient(6px 6px at 200px 150px, #fff, transparent),radial-gradient(3px 3px at 300px 250px, #fff, transparent),radial-gradient(4px 4px at 400px 350px, #fff, transparent),radial-gradient(6px 6px at 500px 100px, #fff, transparent),radial-gradient(3px 3px at 50px 200px, #fff, transparent),radial-gradient(4px 4px at 150px 300px, #fff, transparent),radial-gradient(6px 6px at 250px 400px, #fff, transparent),radial-gradient(3px 3px at 350px 500px, #fff, transparent);
    background-size: 650px 650px;
    animation: snowAnim 3s linear infinite;
    pointer-events: none;
    z-index: 0;
}
.snow:after {
    margin-left: -250px;
    opacity: 0.5;
    filter: blur(2px);
    animation-duration: 6s;
    animation-direction: reverse;
}
.snow:before {
    margin-left: -350px;
    opacity: 0.7;
    filter: blur(1px);
    animation-duration: 9s;
}
@keyframes snowAnim {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(650px);
    }
}

/* ================================INDIVIDUAL PROJECTS================================ */
#wallpaper_changer_container {
    z-index: 3;
    justify-self: end;
    background-image: url("assets/images/project_wallpaper_background.jpg");
}
#reservation_app_container {
    z-index: 2;
    justify-self: end;
    background-image: url("assets/images/project_reservation_background.jpg");
}
#portfolio_container {
    z-index: 1;
    justify-self: end;
    background-image: url("assets/images/project_portfolio_background.jpg");
}

/* ================================MEDIA QUERIES================================ */
@media (min-width: 651px) and (max-width: 1000px), (hover: hover) and (pointer: coarse) {
    #style_desktop {
        display: none;
    }
    #style_phone {
        display: none;
    }
    #style_tablet {
        display: unset;
    }
    html, body {
        overflow: hidden !important;
        height: 100% !important;
        width: 100%; !important;
    }
    #page_container {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 7;
    }
    .lightrope {
        z-index: 1;
    }
    #middle_container {
        margin-top: 30px;
        max-height: 550px;
        width: 40vw;
    }
    .project{
        width: 40%;
        min-width: 450px; !important;
    }
    #presentation_block {
        z-index: 7;
    }
    #project_container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }
    #page_container > * {
        flex-shrink: 0;
        margin-bottom: 20px;
    }
    .border_right, .border_left {
        position: absolute;
        height: 200vh; !important;
    }
    .border_right {
        position: absolute;
        right: 0;
        top: 0;
    }
    .border_left {
        position: absolute;
        left: 0;
        top: 0;
    }
    #contact_container {
        justify-content: center;
    }

    #form_container {
        width: 80%;
        min-width: unset;
    }
}
@media (max-width: 650px), (hover: none) and (pointer: coarse) {
    html, body {
        height: auto !important;
        min-height: 100vh;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    .border_left, .border_right {
        display: none;
    }


    #page_container {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        width: 100%;
        max-width: 100vw;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 7;
        align-content: center;
        justify-content: center;
    }

    .lightrope {
        z-index: 1;
    }
    #project_container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }
    #page_container > * {
        flex-shrink: 0;
        margin-bottom: 20px;
    }
    .project {
        max-width: 90%;
        justify-content: center;
        align-content: center;
        align-self: center;
        width: 80%;
        min-width: unset;
    }
    #presentation_text {
        font-size: 18px;
    }
    #middle_container {
        min-width: unset;
        width: 100%;
        margin-top: 35px;
        max-width: 100%;
    }
    #presentation_inner_block {
        width: 98%;
    }
    #style_desktop {
        display: none;
    }
    #style_phone {
        display: unset;
    }
    #style_tablet {
        display: none;
    }
    .snow {
        display: none;
    }

    #contact_container {
        justify-content: center;
        flex-direction: column;
    }

    #form_container {
        width: 95%;
        min-width: unset;
        height: auto;
    }

    #form_message {
        height: 200px;
    }

    #pages_wrapper{
        padding: 2px;
        width: 100%;
    }



}
