/****************** FONTS *********************/

@font-face {
    font-family: "Velvelyne";
    font-weight: 400;
    src: url('../../public/fonts/Velvelyne-Regular.woff2') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: "Velvelyne";
    font-weight: 300;
    src: url('../../public/fonts/Velvelyne-Light.woff2') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: "Velvelyne";
    font-weight: 500;
    src: url('../../public/fonts/Velvelyne-Bold.woff2') format('opentype');
    font-display: swap;
}

/**************** CSS VARIABLES *****************/

:root {
    --bg: rgb(242,240,239);
    --text: black;
    --accent: #D41D00;
    --radius-x: 38vw;
    --radius-y: 20vh;
    --card-w: min(280px, 50vh);
    --card-h: min(420px, 80vw);
}

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

h2, h3 {
    font-weight: 400;
}

span, p {
    font-family: "Martian Mono", monospace;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a:hover {
    color:#D41D00;
    font-style: italic;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Velvelyne", sans-serif;
    font-weight: 400;
    min-height: 100vh;
    overflow-x: hidden;
}

/********************** SCENE CAROUSEL **********************/

.scene {
    position: relative;
    height: 500vh;
}

.scene-sticky {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/*********************** ELLIPSE TRACK *************************/

.track {
    position: relative;
    width: calc(var(--radius-x) * 2);
    height: calc(var(--radius-y) * 2);
    cursor: grab;
    transform-style: preserve-3d;
}

/*********************** TRACK ITEMS ***************************/

.track-item {
    position: absolute;
    top: 50%;
    left: 50%;
    font-family: "Martian Mono", monospace;
    font-weight: 300;
    font-size: min(0.7rem);
    text-transform: uppercase;
    white-space: nowrap;
}

.is-active {
    color: #D41D00;
}

/************************ DISPLAY CARD ******************************/

.active-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.display-card {
    width: var(--card-w);
    height: var(--card-h);
    position: relative;
    overflow: hidden;
}

.display-card img {
    border-radius: 20px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    cursor: zoom-in;
}

.display-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 20px;
}

.card-title {
    font-size: 1.7rem;
    color: white;
    text-align: center;
    max-width: 100%;
}

.card-footer {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: auto;
}

.full-page {
    inset: 0;
    margin: auto;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-page img {
    width: 90vw;
    height: 90vh;
    border-radius: 0;
    object-fit: contain;
    cursor: zoom-out;
}

/******************* ABOUT AND WORK SECTIONS **************************/

.about-section, .work {
    z-index: 100;
    position: sticky;
    bottom: 0;
    top: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 3rem;
}

.icon-email, .icon-instagram {
    width: 2.2em;
    height: 2.2em;
    vertical-align: middle;
    opacity: 50%;
    padding-left: 0.4em;
}
.icon-instagram {
    width: 1.8em;
    height: 1.8em;
}

.icon-email:hover, .icon-instagram:hover {
    opacity: 100%;
}

/***************** CARD ANIMATION ON ENTER | EXIT ********************/

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    80% {
        transform: scale(1.03);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.display-card {
    animation: popIn 0.4s cubic-bezier(0.22, 1, 0.30, 1) both;
}

/************************* RESPONSIVE DESIGN ************************/

/*------------------ XL DEVICES AND UP ---------------------------*/

@media only screen and (max-width: 1200px) {
    :root {
        --radius-x: 38vw;
        --radius-y: 25vh;
    }
}

/*------------------ LARGE DEVICES, DESKTOPS ---------------------*/

@media only screen and (max-width: 992px) {

    :root {
        --radius-x: 38vw;
        --radius-y: 30vh;
    }
}

/*--------------------- MEDIUM DEVICES ----------------------------*/

@media only screen and (max-width: 768px) {
    :root {
        --radius-x: 38vw;
        --radius-y: 35vh;
    }
}

/*------------------ PORTRAIT TABLETS AND LARGE PHONES ------------*/

@media only screen and (max-width: 600px) {
    :root {
        --radius-x: 40vw;
        --radius-y: 40vh;
    }
}

/*----------------------- PHONES, SMALL DEVICES --------------------*/

@media (max-width: 600px) {
    :root {
        --radius-x: 42vw;
        --radius-y: 48vw;
    }
    .about-section, .work {
        padding: 2rem 1.5rem;
    }
    .track-item {
        font-size: 0.5rem;
    }
}


/*------------------------ DARK THEME ------------------------------*/

@media (prefers-color-scheme: dark) {
    :root {
        --bg: rgb(31 31 31);
        --text: rgb(242, 240, 239);
    }

    .track-item {
        color: white;
    }

    a:hover,
    .is-active {
        color: #d2e300;
    }
}