/* CreationStudio — Tristan Bagot-inspired portfolio */

@font-face {
    font-family: Terminal-Grotesque;
    src: url('src/fonts/terminal-grotesque-webfont.woff2') format('woff2'),
         url('src/fonts/terminal-grotesque-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    box-sizing: border-box;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent;
}

html {
    line-height: 1.15;
    font-size: 62.5%;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    background: #000;
    color: #fff;
    font-family: Terminal-Grotesque, 'Helvetica Neue', Arial, sans-serif;
    font-size: 4rem;
    line-height: 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.landing-locked,
html.landing-locked body {
    overflow: hidden;
    height: 100%;
}

::selection {
    background: #fff;
    color: #000;
}

a, a:focus, a:hover, a:visited {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

h1, h4, h5, .link, .infos {
    text-transform: uppercase;
}

h1 {
    font-size: 4rem;
    font-weight: inherit;
}

h2 {
    font-size: 7vw;
    font-weight: inherit;
}

h3 {
    font-size: 4rem;
    font-weight: inherit;
    margin-bottom: 1rem;
}

h4 {
    font-size: 2rem;
    font-weight: inherit;
}

h5, .link, .infos {
    font-size: 1.3rem;
    letter-spacing: 0.05em;
    font-weight: inherit;
}

@media only screen and (min-width: 1024px) {
    h1, h2, h3, h3 a {
        color: #000;
        text-shadow:
            1px 1px 0 #fff,
            -1px -1px 0 #fff,
            1px -1px 0 #fff,
            -1px 1px 0 #fff;
    }

    section#selected-projects .project .project-title {
        text-shadow:
            1px 1px 0 #fff,
            -1px -1px 0 #fff,
            1px -1px 0 #fff,
            -1px 1px 0 #fff,
            0 0 20px rgba(0, 0, 0, 0.8);
    }
}

@media only screen and (max-width: 1023px) {
    h3 { font-size: 3.5rem; }
    h2 { font-size: 12vw; }
    .md-hide { display: none; }
}

@media only screen and (max-width: 767px) {
    h2 { font-size: 5rem; }
    h5, .link, .infos { font-size: 1rem; }
}

section {
    text-align: center;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.loader .spinner {
    width: 70px;
    height: 70px;
    animation: rotate 2s linear infinite;
}

.loader .spinner svg {
    width: 100%;
    height: 100%;
}

.loader .path {
    stroke: #fff;
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
    fill: none;
    stroke-width: 2;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 89, 200; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124; }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translate3d(0, -100%, 0);
    transition: transform 0.3s ease;
}

header.visible {
    transform: translate3d(0, 0, 0);
}

/* Landing */
section#landing {
    position: relative;
    z-index: 150;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #000;
}

section#landing h5 {
    margin-top: 1rem;
}

section#landing #site-title {
    position: relative;
    z-index: 60;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

body.intro-ready section#landing #site-title {
    opacity: 1;
    transform: translateY(0);
}

/* Selected projects */
section#selected-projects {
    padding: 0 20px 30vh;
    overflow: hidden;
}

section#selected-projects > h5 {
    margin-bottom: 4rem;
}

section#selected-projects .project {
    display: block;
    margin-bottom: 3rem;
    position: relative;
}

section#selected-projects .project .project-title {
    transition: color 0.1s ease;
    display: inline;
    cursor: pointer;
    letter-spacing: -0.01em;
    line-height: 80%;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 0;
}

section#selected-projects .project .link {
    display: none;
    margin-top: 1em;
    position: relative;
    mix-blend-mode: difference;
    z-index: 100;
}

section#selected-projects .project .preview {
    visibility: hidden;
    display: block;
    transform-style: preserve-3d;
    position: fixed;
    top: 50%;
    left: -51vw;
    width: 50vw;
    pointer-events: none;
    z-index: 50;
    box-shadow: 0 0 20px 10px rgba(0, 0, 0, 0.8);
    will-change: transform;
}

section#selected-projects .project .preview .ui {
    display: block;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: none;
    background: #000;
    height: 24px;
    padding: 8px;
}

section#selected-projects .project .preview .ui li {
    display: block;
    float: left;
    width: 6px;
    height: 6px;
    border-radius: 10px;
    margin-right: 10px;
    background: #fff;
    list-style: none;
}

section#selected-projects .project .preview img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-top: none;
    background: #111;
    min-height: 200px;
    object-fit: cover;
    object-position: top;
}

section#selected-projects .project.hover .project-title {
    z-index: 100;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

section#selected-projects .project.hover .link,
section#selected-projects .project.hover .preview {
    display: block;
}

section#selected-projects .project.hover .infos {
    display: none;
}

section#selected-projects .project .infos {
    margin-top: 0.5em;
}

section#selected-projects .project .infos span {
    margin: 0 0.25em;
}

section#selected-projects .project .infos a {
    cursor: pointer;
}

span.checked::after {
    content: '✓';
    text-transform: none;
}

@media only screen and (max-width: 1023px) {
    section#selected-projects .project .preview {
        display: none !important;
    }

    section#selected-projects .project.hover .infos {
        display: block;
    }

    section#selected-projects .project .link {
        display: block;
        margin-top: 0.5em;
    }
}

/* Connect */
section#connect {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
}

section#connect .inner {
    position: relative;
    z-index: 10;
}

section#connect .list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

section#connect .list p {
    margin: 0;
}

section#connect h5 {
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

#discover {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
    pointer-events: none;
}

#discover-images {
    width: 100%;
    height: 100%;
}

.discover-item {
    position: absolute;
    transform: translate(-50%, -50%);
    visibility: hidden;
    top: 130%;
    left: -100%;
    max-height: 700px;
    max-width: 400px;
    opacity: 0;
    transition: opacity 0.4s ease;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.discover-item.visible {
    visibility: visible;
    opacity: 1;
    top: 50%;
    left: 50%;
}

.discover-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* Footer */
footer {
    width: 100%;
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 20px;
    text-align: center;
}

footer h5 {
    font-size: 1.3rem;
    letter-spacing: 0.05em;
}

footer a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

@media only screen and (min-width: 1024px) {
    section#selected-projects {
        padding-left: 20%;
        padding-right: 20%;
    }
}
