@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,400;0,700;0,900;1,400;1,700&display=swap');

[data-theme="light"] {
    --color-bg1: #EBEAE7;
    --color-bg2: #EBEAE7;
    --color-menu: rgba(255, 255, 255, .75);
    --color-text: #453727;
    --color-titles: #292116;
    --color-fg: #96705B;
    --color-logos: #6e422a;
    --color-other: #98e7ff;
    --logo-offset: -63px;
    --toogle-offset: -48px;
    --btn-top-offset: -48px;
}

[data-theme="dark"] {
    --color-bg1: #000;
    --color-bg2: #001F33;
    --color-menu: rgba(0, 0, 0, .75);
    --color-text: #A9D7F5;
    --color-titles: #FFF;
    --color-fg: #EFC69B;
    --color-logos: #DF9B6D;
    --color-other: #790d28;
    --toogle-offset: 0;
    --logo-offset: 0;
    --btn-top-offset: -0px;
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Exo 2', sans-serif;
    box-sizing: border-box;
    scroll-behavior: smooth;
    text-align: justify;
}

::before,
::after {
  box-sizing: inherit;
}

/* example use of CSS custom properties */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
body {
    background: linear-gradient(to right, var(--color-bg1), var(--color-bg2));
    color: var(--color-text);
    font-size: 22px;
    position: relative;
}
b {
    color: var(--color-fg);
}

/* === MENU === */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;

    nav {
        display: flex;
        gap: 30px;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        background: var(--color-menu);
        height: 90px;
        border-bottom: 1px solid var(--color-logos);
        padding: 0 30px;
        backdrop-filter: blur(5px);
    }
    
    #logo {
        display: block;
        width: 84px;
        height: 64px;
        cursor: pointer;
        background: transparent url('../images/logo.png') no-repeat  0px var(--logo-offset);
        background-size: cover;
    }
    #top-menu:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 2px;
        width: 100%;
        background: linear-gradient(to right, #D946EF, #DC2626, #FB923C);
    }
    #top-menu ul {
        position: relative;
        list-style: none;
        margin: 0;
        padding: 0 30px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        height: 100%;
        width: 100%;
    }
    #top-menu ul li a {
        display: block;
        text-decoration: none;
        color: var(--color-titles);
        margin: 0 30px;
        font-weight: 700;
        font-size: 2rem;
        line-height: 2rem;
        
    position: relative;
    padding: 0.2em 0;
    }

    #top-menu ul li a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 0.1em;
        background-color: var(--color-text);
        opacity: 0;
        transition: opacity 300ms, transform 300ms, width 300ms;
        transform: scale(0);
        transform-origin: center;
    }
    #top-menu ul li a.active::after {
        opacity: 1;
        transform: scale(1);
        background-color: var(--color-fg);
    }
    
    #top-menu ul li a:hover::after,
    #top-menu ul li a:focus::after {
        opacity: 1;
        transform: scale(1);
    }

    #switch-theme-btn {
        flex-basis: 48px;
        flex-grow: 0;
        flex-shrink: 0;
        width: 48px;
        height: 48px;
        cursor: pointer;
        background: transparent url('../images/dark-mode.png') no-repeat var(--toogle-offset) 0px ;
    }

    #switch-theme-btn:hover, #switch-theme-btn:focus {
        background: transparent url('../images/dark-mode.png') no-repeat var(--toogle-offset) -48px;
    }

    #menu-btn {
        display: none;
        cursor: pointer;
        font-size: 3rem;
        color: var(--color-titles);
    }
    #menu-btn:hover {
        color: var(--color-logos);
    }
}

/* === CONTENT === */
h1 {
    position: relative;
    color: var(--color-titles);
    text-align: center;
    width: 100%;
    margin: 0 auto;
}
h1:before, h1:after {
    content: '';
    display: block;
    margin-top: 2rem;
    float:left;
    width: calc(50% - 200px);
    height: 3px;
    background: linear-gradient(to left, var(--color-logos), transparent);
}
h1:after{
    float: right;
    background: linear-gradient(to right, var(--color-logos), transparent);
}


p {
    margin: 15px 0 35px 0;
    line-height: 1.6em;
}

section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 150px 30px 30px;
    max-width: 1280px;
    margin: 0 auto;
}

.container {
    display: flex;
	justify-content: space-between;
    align-items: stretch;
    gap: 60px 100px;
    
    .strong {
        font-weight: 700;
        font-size: 2rem;
        color: var(--color-titles);
        margin: 0;
    }

    .very-strong {
        font-weight: 700;
        font-size: 2.7rem;
        color: var(--color-logos);
        margin: 8px 0;
    }
    div {
	    flex-grow: 1;
        flex-shrink: 1;
        flex-basis: 0;
    }
    .col1{flex-grow: 2; flex-shrink: 2;}
    .col2{flex-grow: 3; flex-shrink: 3;}
}

.animated-border {
    position: relative;
	flex-grow: 0;
	flex-shrink: 0;
    width: 300px;
    margin: 25px auto 40px;
    aspect-ratio : 1 / 1;
    /*background: repeating-conic-gradient(from var(--a), #D79959 0%, #D79959 5%, transparent 5%, transparent 40%,  #D79959 50%);*/
    background: repeating-conic-gradient(
        from var(--a),
        transparent 0%,
        #D79959 15%,
        #DC2626 30%,
        #D946EF 45%,
        transparent 0%,
        transparent 50%
        );
    animation: animate 4s linear infinite;
    border-radius: 50%;
}
@property --a {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}
@keyframes animate {
    0% {--a: 0deg} 100% {--a: 360deg}
}
.animated-border:after {
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--color-bg1);
    border-radius: 50%;
}
.animated-border img {
    position: absolute;
    z-index: 2;
    border-radius: 50%;
    top: 6px;
    left: 6px;
    max-width: calc(100% - 12px);
}

/* === FOOTER === */
footer .btn-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: block;
    width: 48px;
    height: 48px;
    cursor: pointer;
    background: transparent url('../images/btn-top.png') no-repeat var(--btn-top-offset) 0px;
}

footer .btn-top:hover, footer .btn-top:focus {
    background: transparent url('../images/btn-top.png') no-repeat var(--btn-top-offset) -48px;
}



/* --- Accueil --- */
#social-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    justify-content: center;

    a {
        color: var(--color-logos);
        font-size: 2em;
        transition-property: color, border;
        transition-duration: .25s;
        padding: 3px 8px;
        border-radius: 4px;
        border: 1px solid transparent;
        position: relative;
        display: inline-block;
        cursor: pointer;
    }

    a:hover {
        color: var(--color-text);
        border-color: var(--color-text);
    }
    
    /* Tooltip text */
    .tooltiptext {
        visibility: hidden; /* Hidden by default */
        font-size: .4em;
        width: 250px;
        color: var(--color-titles);
        background-color: var(--color-menu);
        text-align: center;
        padding: 5px 0;
        border: 1px solid var(--color-logos);
        border-radius: 6px;
        position: absolute;
        z-index: 1; /* Ensure tooltip is displayed above content */

        top: 100%; /* Position the tooltip below the link */
        left: 50%;
        margin-top: 15px;
        margin-left: -125px; /* Use half of the width (130/2 = 65), to center the tooltip */
    }

    /* Show the tooltip text on hover */
    a:hover .tooltiptext {
        visibility: visible;
    }
    .tooltiptext::after {
        content: " ";
        position: absolute;
        bottom: 100%;  /* At the top of the tooltip */
        left: 50%;
        margin-left: -8px;
        border-width: 8px;
        border-style: solid;
        border-color: transparent transparent var(--color-logos) transparent;
    }
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 50px;
    justify-content: center;
    margin-top: 30px;

    button {
        width: 250px;
        text-align: center;
        background-color: var(--color-menu);
        color: var(--color-titles);
        border: 1px solid var(--color-logos);
        font-weight: bold;
        padding: 7px 15px 9px;
        font-size: 1em;
        border-radius: 10px;
        cursor: pointer;
        text-decoration: none;
        transition: background-color .3s, color .3s;
    }

    button a {
        color: var(--color-titles);
        text-decoration: none;
    }

    button:hover {
        background-color: var(--color-other);
    }
}

/* --- COMPÉTENCES --- */
#competences {
    #skills {
        position: relative;
        display: flex;
        gap: 30px;
        align-items: top center;
        justify-content: center;
        margin: 50px 30px;
        flex-wrap: wrap;

        .subskills {
            position: relative;
            border: 1px solid  var(--color-other);
            border-radius: 10px;
            padding: 15px 30px;
            width: 30%;
            min-width: 300px;
            background-color: rgba(255, 255, 255, .03);
            font-size: .8em;

            cursor: pointer;
            transition: .5s;
            overflow: hidden;
            

            .subskills-icon {
                color:  var(--color-titles);
                font-size: 2.5em;
                display: block;
                text-align: center;
            }

            h2 {
                color: var(--color-titles);
                font-size: 1.2em;
                text-align: center;
                border-bottom: 1px solid var(--color-other);
                padding: 15px;
                margin-bottom: 30px;
            }
            h2:before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                height: 2px;
                width: 100%;
                background: linear-gradient(to right, #D946EF, #DC2626, #FB923C);
            }

            li {
                display: flex;
                gap: 10px;
                align-items: top center;
                justify-content: space-between;
                flex-wrap: wrap;

                .skill-title {
                    flex-grow: 1;
                }
            }

            .skill-icon {
                display: inline-block;
                width: 32px;
                height: 32px;
                background-image: url('../images/HTML5.svg');
                background-size: contain;

                .html {

                }
            } 

            .rating {
                display: inline-block;
                text-align: right;
                width: 100px;
                height: 20px;
                background-image: url('../images/rating.png');
                background-size: 100px;
            }

            .rating-1 {background-position: top -80px left;}
            .rating-2 {background-position: top -60px left;}
            .rating-3 {background-position: top -40px left;}
            .rating-4 {background-position: top -20px left;}
            .rating-5 {background-position: top left;}
        }

        ul, li {list-style-type: none; margin: 5px 0; padding: 0;}
    }
    
    #skills:hover .subskills {
        filter: blur(5px);
        opacity: .25;
    }
    
    #skills .subskills:hover {
        filter: blur(0);
        opacity: 1;
        box-shadow: -10px 20px 35px rgba(0, 0, 0, .15);
        transform: scale(1.15);

    }
}

/* --- Contact --- */
#map {
    height: 400px; /* The height is 400 pixels */
    width: 100%; /* The width is the width of the web page */
}
