/* ROOT	*/

:root {
    --main-color: #030000;
    --accent-color: #5f5a51;
    --accent-color-red: #fc440f;
    --text-color: #f7edd5;
    --margin-value: 80px;

    background: var(--main-color);
    color: var(--text-color);
    font-family: Writer;
    font-size: 1rem;
    font-weight: 300;
    font-style: italic;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

.bg-grid::before {
    content: '';
    z-index: 10;
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100vw;
    min-height: 100vh;
}

:root,
.bg-grid::before {
    background-image:
        linear-gradient(#f7edd510 1px, transparent 1px),
        linear-gradient(90deg, #f7edd510 1px, transparent 1px);
    background-size: 20px 20px;
    background-attachment: fixed;
}

.bounding-box {
    position: relative;
    height: fit-content;
    width: fit-content;
    box-sizing: border-box;
    display: flex;
    border: 1px solid var(--text-color);
}

.bounding-box::after {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    z-index: 10;
    pointer-events: none;

    background-image: 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"><rect x="0.5" y="0.5" width="10" height="10" fill="%23f7edd5"/></svg>'),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"><rect x="0.5" y="0.5" width="10" height="10" fill="%23f7edd5"/></svg>'),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"><rect x="0.5" y="0.5" width="10" height="10" fill="%23f7edd5"/></svg>'),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"><rect x="0.5" y="0.5" width="10" height="10" fill="%23f7edd5"/></svg>');
    background-position: top left, top right, bottom left, bottom right;
    background-repeat: no-repeat;
}

.scroll-focus {
    will-change: opacity, filter;
    transition: opacity 0.1s ease-out, filter 0.1s ease-out;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: calc(50% - 20px);
    left: calc(50% - 20px);
    z-index: 10;
    background-color: var(--text-color);
    width: 60px;
    height: 60px;
    mask-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAyMnYtMjBsMTggMTAtMTggMTB6Ii8+PC9zdmc+');
    mask-repeat: no-repeat;
    mask-size: 100%;
    /* pointer-events: none; */
    cursor: pointer;
}

/* TEXTE */

h3 {
    font-family: Formula;
    font-style: normal;
    font-stretch: expanded;
    font-size: 1.4rem;
    font-weight: 600;
}

h4 {
    font-family: Writer;
    font-style: italic;
    font-size: 1.2rem;
    font-weight: 600;

}

h5 {
    font-family: Writer;
    font-style: italic;
    font-size: 1.1rem;
    font-weight: 400;
}

p, legend, ul {
    /* text-wrap: balance; */
    font-size: 1.1rem;
}

a, button {
    text-decoration: none;
    color: var(--text-color);
}

em {
    /* font-style: normal; */
    font-weight: 500;
}

.text-button {
    font-family: Formula;
    font-weight: 300;
    font-stretch: expanded;
    font-style: normal;
    font-size: .9rem; 
    text-transform: lowercase;
    text-align: center;
    white-space: nowrap;
}

.text-button:hover {
    cursor: pointer;
}

.underline {
    position: relative;
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-start;
    justify-content: flex-start;
}

.underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 15%;
    height: 0.05rem;
    background-color: var(--text-color);
    transition: width 500ms ease-in-out;
}

.underline:hover::after,
.underline:focus::after {
    width: 75%;
}

.underline.inline {
    display: inline-flex;
}

.underline.inline::after {
    width: 65%;
    transition: width 500ms ease-in-out;
}

.underline.inline:hover::after,
.underline.inline:focus::after {
    width: 115%;
}

.underline.center {
    align-items: center;
	justify-content: center;
}

.underline.center::after {
    width: 35%;
    transition: width 200ms;
}

.underline.center:hover::after,
.underline.center:focus::after {
    width: 55%;
}

.slash::before {
    content: "//";
    margin-right: 10px;
}

.lowercase {
    text-transform: lowercase;
}


/* HEADER */

header {
    width: 100vw;
    position: fixed;
    top: 0px;
    padding: 20px 40px;
    z-index: 10;
    
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

footer {
    z-index: 0;
    position: relative;
    top: 0;
    min-height: 120px;
}

.nav-links, 
#home span {
    height: fit-content;
	display: flex;
	flex-flow: row wrap;
    pointer-events: all;
}

.nav-links {
	margin-top: 20px;
	justify-content: flex-end;
    gap: 20px;
}

#home {
    display: flex;
    flex-flow: row nowrap;
}

#ts-logo {
    height: 80px;
    width: 80px;
    background-color: var(--text-color);
    mask-image: url(../images/ts_signature.svg);
    mask-size: contain;
    mask-repeat: no-repeat;
}

#name-span {
    margin-top: 14px;
    align-items: baseline;
}

#my-name {
    display: block;
    text-wrap: nowrap;
    font-family: Writer;
    font-style: italic;
    font-size: 1.3rem;
    font-weight: 500;
    margin-right: 20px;
}

#my-skills {
    font-family: Writer;
    font-style: italic;
    font-size: .9rem;
    font-weight: 100;
}


/* FLOU PROGRESSIF */
/* .progressive-blur-panel {
    -webkit-backdrop-filter: blur(var(--blur));
    backdrop-filter: blur(var(--blur));
    -webkit-mask: linear-gradient(#000 0% 10%, #0000 30%);
    mask: linear-gradient(#000 0% 10%, #0000 30%);
} */

.progressive-blur_wrap {
  z-index: -1000;
  pointer-events: none;
  height: 6vw;
  min-height: 5rem;
  position: fixed;
  inset: 0% 0% auto;
  overflow: clip;
}

.progressive-blur_panel {
  -webkit-backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  width: 100%;
  height: 100%;
  padding: 0;
  position: absolute;
  -webkit-mask: linear-gradient(#0000 10%, #000 20% 40%, #0000 50%);
  mask: linear-gradient(#0000 10%, #000 20% 40%, #0000 50%);
}

.progressive-blur_panel.is-3 {
  -webkit-backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio))));
  backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio))));
  -webkit-mask: linear-gradient(#0000 0%, #000 20% 30%, #0000 50%);
  mask: linear-gradient(#0000 0%, #000 20% 30%, #0000 50%);
}

.progressive-blur_panel.is-9 {
  -webkit-backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  -webkit-mask: linear-gradient(#0000 60%, #000 80% 90%, #0000 100%);
  mask: linear-gradient(#0000 60%, #000 80% 90%, #0000 100%);
}

.progressive-blur_panel.is-4 {
  -webkit-backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio))));
  backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio))));
  -webkit-mask: linear-gradient(#0000 10%, #000 30% 40%, #0000 60%);
  mask: linear-gradient(#0000 10%, #000 30% 40%, #0000 60%);
}

.progressive-blur_panel.is-8 {
  -webkit-backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  -webkit-mask: linear-gradient(#0000 50%, #000 70% 80%, #0000 100%);
  mask: linear-gradient(#0000 50%, #000 70% 80%, #0000 100%);
}

.progressive-blur_panel.is-7 {
  -webkit-backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  -webkit-mask: linear-gradient(#0000 40%, #000 60% 70%, #0000 90%);
  mask: linear-gradient(#0000 40%, #000 60% 70%, #0000 90%);
}

.progressive-blur_panel.is-6 {
  -webkit-backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  -webkit-mask: linear-gradient(#0000 30%, #000 50% 60%, #0000 80%);
  mask: linear-gradient(#0000 30%, #000 50% 60%, #0000 80%);
}

.progressive-blur_panel.is-5 {
  -webkit-backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  -webkit-mask: linear-gradient(#0000 20%, #000 40% 50%, #0000 70%);
  mask: linear-gradient(#0000 20%, #000 40% 50%, #0000 70%);
}

.progressive-blur_panel.is-2 {
  -webkit-backdrop-filter: blur(calc(var(--blur) / var(--ratio)));
  backdrop-filter: blur(calc(var(--blur) / var(--ratio)));
  -webkit-mask: linear-gradient(#0000 0%, #000 10% 20%, #0000 40%);
  mask: linear-gradient(#0000 0%, #000 10% 20%, #0000 40%);
}

.progressive-blur_panel.is-1 {
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  -webkit-mask: linear-gradient(#000 0% 10%, #0000 30%);
  mask: linear-gradient(#000 0% 10%, #0000 30%);
}

.progressive-blur_panel.is-10 {
  -webkit-backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  backdrop-filter: blur(calc(var(--blur) / (var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio))));
  -webkit-mask: linear-gradient(#0000 70%, #000 90%, #0000 100%);
  mask: linear-gradient(#0000 70%, #000 90%, #0000 100%);
}


/* MENU BURGER */

.burger-btn {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
    pointer-events: all;
}

.burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    left: 0;
    transition: transform 400ms ease, opacity 400ms ease;
}

/* Positionnement des 3 traits du burger */
.burger-line:nth-child(1) { top: 10px; }
.burger-line:nth-child(2) { top: 19px; }
.burger-line:nth-child(3) { top: 28px; }


/* WELCOME */

#welcome {
    background: var(--main-color);
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 500ms;
    
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
}

#welcome video {
    width: 20vw;
    margin-top: 3vh;
}

/* =========================================
   RESPONSIVE
========================================= */
/* Sur Tablette (moins de 1024px) : on passe à 2 colonnes */
@media (max-width: 1024px) {
    #my-skills {
        display: none;
    }
}

/* Sur Mobile (moins de 768px) : on passe à 1 colonne */
@media (max-width: 768px) {
    #welcome video {
        width: 70vw;
        margin-top: 0;
    }
    
    p, legend {
        font-size: 1rem;
    }
    
    header {
        padding: 20px 25px;
    }

    #ts-logo {
        height: 60px;
        width: 60px;
    }

    #name-span {
        margin-top: 8px;
    }

    .burger-btn {
        display: block;
    }

    .main-nav {
        z-index: 10;
        position: fixed;
        top: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        background-color: #0005;
        backdrop-filter: blur(10px);
        
        display: flex;
        justify-content: center;
        align-items: center;

        transform: translateY(-100%); 
        transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links {
        height: auto;
        margin-top: none;
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .burger-btn.is-active .burger-line:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .burger-btn.is-active .burger-line:nth-child(2) {
        opacity: 0;
    }
    .burger-btn.is-active .burger-line:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    h3 {
        font-size: 1.2rem;
    }
}