/***Reset***/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/***Variables***/
:root {
    --color-logo: #8272b4;
    --light-bg: #fafafa;
    --text-color: #252525;
    --container-width: clamp(300px, 80vw, 800px);
}

/***General***/
html {
    font-family: "Lato", sans-serif;
    background: var(--light-bg);
    color: var(--text-color);
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

.color-logo {
    color: var(--color-logo);
}

/* Logo */
#logo {
    width: clamp(200px, 100%, 400px);
    font-size: clamp(1.5em, 2vw, 2em);
    letter-spacing: 0.05em;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0.5em 0;
}

#logo .firstname, #logo .lastname {
    display: block;
    position: relative;
}

#logo .firstname::after {
    content: "/>";

}

#logo .lastname::before {
    content: ".";
    color: hsl( from var(--color-logo) h s calc(l - 15));
}

#logo .lastname::after {
    content: "{...}";
}

#logo .firstname__first-letter {
    font-weight: 900;
    color: var(--color-logo);
    font-family: "Lato", sans-serif;
    font-style: normal;
    display: inline-block;
    transform: rotate(90deg) translateY(.05em) translateX(.05em);
}

#logo .lastname__first-letter {
    font-weight: 900;
    color: var(--color-logo);
    font-family: "Lato", sans-serif;
    font-style: normal;
    display: inline-block;
}

/* Header */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.header-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-title .job, .header-title .location {
    text-align: center;
}

.header-title .job {
    font-size: clamp(1em, 1vw, 1.5em);
}

.header-title .location {
    font-size: clamp(0.8em, 0.8vw, 1em);
}

.landing-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.landing-buttons a {
    text-decoration: none;
    color: var(--color-logo);
    font-size: clamp(1.5em, 1vw, 2.5em);
    font-weight: 400;
}

.landing-buttons a:hover {
    color: hsl( from var(--color-logo) h s calc(l - 15));
}

/* Nav toggle */
#nav-toggle {
    position: fixed;
    top: 1em;
    right: 1em;
    z-index: 1001;
}

.nav-toggle {
    cursor: pointer;
    --toggle-width: 30px;
    --toggle-height: 3px;
    --toggle-spacing: 6px;

    width: var(--toggle-width);
    height: var(--toggle-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle:hover {
    animation: wiggle 0.2s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-3deg);
    }
    75% {
        transform: rotate(3deg);
    }
}

.nav-toggle .nav-toggle-line {
    display: block;
    width: var(--toggle-width);
    height: var(--toggle-height);
    background-color: var(--color-logo);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/** state Open **/
.nav-toggle--open {
    justify-content: space-evenly;
}

.nav-toggle--open .nav-toggle-line.line--1 {
    transform: translateY(calc(-1 * var(--toggle-spacing))) rotate(0deg);
}

.nav-toggle--open .nav-toggle-line.line--2 {
    opacity: 1;
    transform: scaleX(1);
}

.nav-toggle--open .nav-toggle-line.line--3 {
    transform: translateY(var(--toggle-spacing)) rotate(0deg);
}

/** state Close **/
.nav-toggle--close {
    justify-content: center;
}

.nav-toggle--close .nav-toggle-line.line--1 {
    transform: translateY(3px) rotate(45deg) scaleX(125%);
    
}

.nav-toggle--close .nav-toggle-line.line--2 {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle--close .nav-toggle-line.line--3 {
    transform: translateY(calc(-1 * var(--toggle-height))) rotate(-45deg) scaleX(125%);
}

/* Nav */
nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 100%;
    padding-top: 15vh;
    width: clamp(200px, 20vw, 300px);
    background: hsl( from var(--light-bg) h s calc(l - 10));
    box-shadow: -5px 0 20px rgba(130, 114, 180, 0.1);
    overflow: hidden;
    z-index: 999;
    transition: transform 0.3s ease-in-out;
}

.nav-sidebar--open {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.nav-links {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 1em;
    padding: 1em;
}

.nav-link--item {
    text-decoration: none;
    color: hsl( from var(--color-logo) h s calc(l - 15));
    font-size: clamp(1em, 1vw, 1.5em);
    font-weight: 400;
    transition: color 0.3s ease-in-out;
}

/***Main***/
main {
    flex: 1;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4rem;
}

/*** Landing Section */
#landing {
    width: var(--container-width);
}

#landing .title {
    font-size: clamp(2em, 2vw, 3em);
    font-weight: 400;
    margin-bottom: 2rem;
}

#landing p {
    font-size: clamp(1em, 1vw, 1.5em);
    line-height: 1.5;
    margin-bottom: 1rem;
}

/***skills Section***/
#skills {
    width: var(--container-width);
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.skills--container{
    width: clamp(280px, 45%, 600px);
}

#skills .title {
    font-size: clamp(1.5em, 1.5vw, 2em);
    font-weight: 400;
    margin-bottom: 1rem;
    
}

.skill--list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.skill--list li {
    display: block;
}

.skill--name {
    font-size: clamp(0.8em, 0.8vw, 1em);
    color: hsl( from var(--color-logo) h s calc(l - 15));
    font-weight: 400;
    padding: 0.5em 1em;
    border: 1px solid hsl( from var(--color-logo) h s calc(l - 15));
    border-radius: 0.5em;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0 10px rgba(130, 114, 180, 0.1);
    background: white;
    cursor: help;
    display: inline-flex;
}

.skill--name:hover, .skill--name:focus, .skill--name.active {
    background: var(--color-logo);
    color: white;
    border-color: var(--color-logo);
    box-shadow: 0 0 10px rgba(130, 114, 180, 0.2);
    outline: none;
    transition: all 0.3s ease-in-out;
}

.skill--description {
    display: none;
    font-size: clamp(0.8em, 0.8vw, 1em);
    color: hsl( from var(--color-logo) h s calc(l - 15));
    font-weight: 400;
    padding: 0.5rem 1rem;
    border: 1px solid hsl( from var(--color-logo) h s calc(l - 15));
    background: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(130, 114, 180, 0.2);
    border-radius: 0.5em;
    width: 100%;
    position: absolute;
    left: 0;
}

.skill--description--visible {
    display: block !important;
}

.skill--description .line {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.skill--description .line span:first-child {
    white-space: nowrap;
}

.opquast-badge {
    width: clamp(100px, 100%, 200px);
    margin: 1rem auto 0 auto;
    display: block;
}

/***Projects Section***/
#projects {
    width: var(--container-width);
}

#projects .title {
    font-size: clamp(1.5em, 1.5vw, 2em);
    font-weight: 400;
    margin-bottom: 1rem;
}

.project--list {
    list-style: none;
    margin: 3rem 0 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.project--item {
    width: clamp(200px, 30%, 600px);
}

.project--item a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    aspect-ratio: 1/1;

    outline: 1px solid transparent;
    transition: all 0.3s ease-in-out;

    position: relative;
    overflow: hidden;
    background: white;
}

.project--item a:hover, .project--item a:focus {
    outline: 1px solid var(--color-logo);
    transition: all 0.3s ease-in-out;
}

.project--item .project--name {
    font-size: clamp(1em, 1vw, 1.5em);
    font-weight: 400;
    padding: 1rem;
    color: var(--color-logo);
}

.project--item .project--image {
    object-fit: contain;
    max-width: 100%;
    height: 100%;
    padding: 0 1rem;
    transition: all 0.3s ease-in-out;
}
.project--item .project--description {
    font-size: clamp(0.8em, 0.8vw, 1em);
    font-weight: 400;
    padding: 1rem;
    margin-top: auto;
    position: absolute;
    top:100%;
    transition: all 0.3s ease-in-out;
    background: hsl(from var(--color-logo) h s calc(l + 30) / 0.7);
    color: var(--text-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.project--item a:hover .project--description {
    transform: translateY(-100%) ;
    transition: all 0.3s ease-in-out;
}

.project--item a:hover .project--image {
    opacity: .4;
    transform: scale(.8);
    transition: all 0.3s ease-in-out;
}


/**Echo num section**/
#echo-numeric {
    width: var(--container-width);;
}
#echo-numeric .title {
    font-size: clamp(1.5em, 1.5vw, 2em);
    font-weight: 400;
    margin-bottom: 1rem;
}
#echo-numeric .link--website {
    display: flex;
    flex-direction  : column;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

/***Footer***/
footer {
    text-align: center;
    padding: 1em;
    font-size: clamp(0.8em, 0.8vw, 1em);
}

footer a {
    text-decoration: none;
    color: var(--color-logo);
    font-size: clamp(0.8em, 0.8vw, 1em);
    font-weight: 400;
}


/*media queries*/
@media (max-width: 768px) {
    .project--list {
        flex-direction: column;
    }
    
    .project--item {
        width: 100%;
    }
    .project--item .project--name {
        font-size: 1.5rem;
    }
}

/***Project Detail Page***/
#project-detail {
    width: var(--container-width);
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.project-header {
    margin-bottom: 3rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-logo);
    text-decoration: none;
    font-size: clamp(0.9em, 0.9vw, 1.1em);
    margin-bottom: 1rem;
    transition: all 0.3s ease-in-out;
}

.back-link:hover, .back-link:focus {
    color: hsl(from var(--color-logo) h s calc(l - 20));
    text-decoration: underline;
}

.project-title {
    font-size: clamp(2em, 3vw, 3em);
    font-weight: 400;
    color: var(--color-logo);
    margin: 0;
}

.project-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.project-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(130, 114, 180, 0.1);
}

.project-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-description {
    font-size: clamp(1em, 1vw, 1.2em);
    line-height: 1.6;
    color: hsl(from var(--color-logo) h s calc(l - 30));
}

.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.project-details > div {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(130, 114, 180, 0.1);
}

.project-details h3 {
    font-size: clamp(1.1em, 1.1vw, 1.3em);
    font-weight: 400;
    color: var(--color-logo);
    margin: 0 0 1rem 0;
}

.project-details p {
    font-size: clamp(0.9em, 0.9vw, 1em);
    line-height: 1.5;
    margin: 0;
    color: hsl(from var(--color-logo) h s calc(l - 30));
}

.project-details ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.project-details li {
    font-size: clamp(0.9em, 0.9vw, 1em);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    color: hsl(from var(--color-logo) h s calc(l - 30));
    position: relative;
    padding-left: 1rem;
}

.project-details li::before {
    content: "•";
    color: var(--color-logo);
    position: absolute;
    left: 0;
}

.project-details a {
    color: var(--color-logo);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.project-details a:hover, .project-details a:focus {
    color: hsl(from var(--color-logo) h s calc(l - 20));
    text-decoration: underline;
}

.error-message {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(130, 114, 180, 0.1);
}

.error-message p {
    font-size: clamp(1em, 1vw, 1.2em);
    color: hsl(from var(--color-logo) h s calc(l - 30));
    margin-bottom: 1rem;
}

.error-message a {
    color: var(--color-logo);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.error-message a:hover, .error-message a:focus {
    color: hsl(from var(--color-logo) h s calc(l - 20));
    text-decoration: underline;
}

@media (max-width: 768px) {
    .project-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-details {
        grid-template-columns: 1fr;
    }
    
    .project-image-container {
        padding: 1rem;
    }
}

/*mentions legales*/
#mentions-legales {
    width: var(--container-width);
}

#mentions-legales .title {
    font-size: clamp(1.5em, 1.5vw, 2em);
    font-weight: 400;
    margin-bottom: 1rem;
}

#mentions-legales h3 {
    font-size: clamp(1.1em, 1.1vw, 1.3em);
    font-weight: 400;
    color: var(--color-logo);
    margin: 1rem 0;
}

#mentions-legales p {
    font-size: clamp(0.9em, 0.9vw, 1em);
}
