@import "https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300..500&display=swap";
@import "https://fonts.googleapis.com/css2?family=Big+Shoulders:opsz,wght@10..72,200&display=swap";

/* Réinitialisation et normalisation de base */
* {
    padding: 0;
    margin: 0;
    border: none;
}

*,
*:before,
*:after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

a,
a:link,
a:visited,
a:hover {
    text-decoration: none;
}

aside,
nav,
footer,
header,
section,
main {
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    font-size: inherit;
    font-weight: inherit;
}

ul,
ul li {
    list-style: none;
}

img {
    vertical-align: top;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

address {
    font-style: normal;
}

input,
textarea,
button,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background-color: transparent; /* #0000 équivaut à transparent */
}

input::-ms-clear {
    display: none;
}

button,
input[type="submit"] {
    display: inline-block;
    -webkit-box-shadow: none;
    box-shadow: none;
    background-color: transparent; /* #0000 équivaut à transparent */
    background: none;
    cursor: pointer;
}

input:focus,
input:active,
button:focus,
button:active {
    outline: none;
}

button::-moz-focus-inner {
    padding: 0;
    border: 0;
}

label {
    cursor: pointer;
}

legend {
    display: block;
}

/* Animations */
@-webkit-keyframes rotation {
    0% {
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }
    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes rotation {
    0% {
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }
    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.around-spin {
    -webkit-animation: rotation 30s linear infinite;
    animation: rotation 30s linear infinite;
}

/* Styles globaux */
html {
    overflow-x: hidden;
    scroll-behavior: auto;
}

body {
    background: #fff;
    color: #000;
    font-family: 'Inter Tight', sans-serif;
    font-size: clamp(1rem, .886rem + .57vw, 1.25rem);
    font-weight: 400;
    line-height: 1; 
}

body a {
    color: #000;
    text-decoration: none;
}

/* Conteneurs et sections */
.container {
    position: relative;
    max-width: 1920px;
    padding-inline: clamp(1.25rem, -0.536rem + 8.93vw, 7.5rem);
    margin: 0 auto;
}

.section {
    padding-block: clamp(3rem, 2.636rem + 6.82vw, 4rem);
}

.section-title {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    font-weight: 400;
    font-size: clamp(2.375rem, 1.92rem + 2.27vw, 3.375rem);
}

.section-title__index {
    font-family: 'Big Shoulders', sans-serif;
    opacity: .5;
    font-weight: 200;
    font-size: 1.2em;
    letter-spacing: -.05em;
}

/* Preloader */
.preloader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100dvh;
    background-color: #fff;
    z-index: 10000;
}

/* Header */
.header {
    position: fixed;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    border-bottom: 0.5px solid #191919;
    color: #191919;
    padding-block: 0.1rem;
}

.header-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    position: relative;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    height: 60px;
    width: 100%;
    margin: 0 auto;
    max-width: 1920px;
    padding-inline: clamp(1.25rem, 6.25vw, 4rem);
}

.header__logo {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 1.4rem;
}

.header__mail {
    margin-block: 1rem;
}

/* Menu de navigation */
.menu-nav {
    position: absolute;
    right: clamp(0rem, -0.909rem + 4.55vw, 2rem);
    top: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    background-color: #000;
    color: #fff;
    height: 400px;
    width: 300px;
    max-width: 300px;
    border-radius: 5px;
    padding: 2rem;
    padding-top: 80px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    font-size: 24px;
}

.menu-nav__list {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    height: 100%;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #4f4f4f;
}

.menu-nav__link {
    position: absolute;
    top: 100%;
    left: 0;
    color: #EFEBE1;
    opacity: .5;
    -webkit-transition: opacity .4s ease-in-out;
    transition: opacity .4s ease-in-out;
}

.menu-nav__link:hover {
    opacity: 1;
}

.menu-nav__link.active {
    opacity: 1;
    font-weight: 450;
}

.menu-nav__link-wrap {
    display: block;
    height: 24px;
    position: relative;
    overflow: hidden;
}

.menu-nav__mail {
    padding-top: 1rem;
    font-size: .7em;
}

/* Section Hero */
.hero {
    position: relative;
    min-height: 100vh;
    height: auto;
    width: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    background-color: #EFEBE1;
    color: #191919;
}

.hero-container {
    position: relative;
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    padding-top: 100px;
    padding-bottom: 18px;
    z-index: 2;
}

.hero__title {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    font-size: calc(5 * (1vw + 1vh));
    font-weight: 350;
    letter-spacing: -.4rem;
    will-change: transform, color;
}

@media (min-width: 1921px) {
    .hero__title {
        font-size: 194px;
    }
}

@media (max-width: 768px) {
    .hero__title {
        font-size: calc(4.2 * (1vw + 1vh));
        letter-spacing: -.1rem;
    }
}

.hero__subtitle {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: .5rem;
    color: #191919;
    font-size: clamp(1.6rem, 1.486rem + .57vw, 2rem);
    line-height: 1.1;
    max-width: 42%;
    text-wrap: balance;
}

@media (max-width: 1440px) {
    .hero__subtitle {
        max-width: 54%;
    }
}

@media (max-width: 1024px) {
    .hero__subtitle {
        max-width: 100%;
        font-size: 22px;
    }
}

.hero__subtitle .around-spin {
    margin-top: 1rem;
    height: 1.5em;
    width: 1.5em;
}

.hero__bottom {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding-top: 30px;
    -webkit-column-gap: .2em;
    -moz-column-gap: .2em;
    column-gap: .2em;
}

.hero__arrow {
    width: .6em;
    height: .6em;
}

.hero__img {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 90%;
    width: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    -o-object-position: right;
    object-position: right;
    z-index: 1;
}

/* Section About */
.about {
    border-top: 1px solid #191919;
    background-color: #EFEBE1;
    color: #191919
}

.about-content {}

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
    }
}

.about-content__text {
    margin-top: 48px;
    font-size: clamp(1.25rem, 1.136rem + .57vw, 1.5rem);
    line-height: 1.4;
    width: 100%;
}

@media (max-width: 1440px) {
    .about-content__text {
        width: 100%;
    }
}

/* Section Skills */
.skills__container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    /* If this container needs top margin, add it here e.g. margin-top: 3rem; */
}

@media (max-width: 1024px) {
    .skills__container {
        margin-top: 48px; 
    }
}

.skills__heading {
    font-size: 1.3rem; 
    padding-block: .7em; 
}

.skills__content {
    font-size: 1.05rem; 
    letter-spacing: normal;
    padding-bottom: 1.5em; 
}

.skills__list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
    line-height: 1.4;
    position: relative;
}

.skills__list li:not(:last-child):after {
    position: relative;
    content: "/";
    display: inline-block;
    padding-inline: clamp(.5rem, .386rem + .57vw, .75rem);
}

/* Section Projects START - MODIFIED SECTION */
.projects {
    background-color: #EFEBE1;
    border-top: 1px solid #191919;
    color: #191919
}

.projects-container {
    margin-top: clamp(3rem, 2.318rem + 3.41vw, 4.5rem);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center; /* This will center .projects-item if its max-width is less than column width */
    width: 100%;
    -webkit-column-gap: 1rem;
    -moz-column-gap: 1rem;
    column-gap: 1rem;
    row-gap: 4rem;
}

@media (max-width: 860px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
}

.projects-item {
    display: flex;
    flex-direction: column;
    row-gap: 18px;
    max-width: 90%; /* NEW: Reduces the width of the project item within the grid column */
    /* The justify-items: center on .projects-container will center this block */
}

.projects-item__content {
    grid-template-columns: repeat(3, 1fr);
}

.projects-item__content h3 {
    text-align: center;
}

.projects-item__img {
    position: relative;
    overflow: hidden;
    border-radius: 5px; 
}

/* Main project thumbnail image */
.projects-item__img > img { 
    display: block; 
    aspect-ratio: 1.2 / 1;
    object-fit: cover;
    object-position: center;
    border-radius: 5px; 
    width: 100%;
    opacity: 1; /* Default opacity for transition */
    transition: opacity 0.3s ease; /* Transition for hover opacity change */
}

/* The <a> tag - make it cover the entire .projects-item__img area */
.projects-item__img-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none; 
    background-color: transparent; 
    border-radius: 5px; 
    display: flex; 
    justify-content: center;
    align-items: center;
    opacity: 1; 
    pointer-events: auto; 
    transition: none; 
    text-decoration: none; 
}

/* The arrow icon <img> INSIDE the <a> tag */
.projects-item__img-link > img {
    width: 5rem;  
    height: 5rem; 
    background-color: #EFEBE1; 
    border-radius: 100%; 
    padding: 1.5rem; 
    box-sizing: border-box; 
    opacity: 0; 
    transform: scale(0.8); 
    transition: opacity 0.3s ease, transform 0.3s ease; 
}

/* On hover of the main image container, show the arrow icon */
.projects-item__img:hover .projects-item__img-link > img {
    opacity: 1;          
    transform: scale(1);  
}

/* Reduce opacity of the main project image on hover */
.projects-item__img:hover > img {
    opacity: 0.75; /* Adjust as desired */
}


@media (max-width: 1024px) {
    .projects-item {
        max-width: 95%; /* Adjust for mobile if needed, or remove if 100% width is fine on mobile */
    }

    .projects-item__img-link {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        -webkit-transform: none; 
        transform: none; 
        width: 100%;
        height: 100%;
        border-radius: 0%; 
        background-color: transparent; 
    }

    .projects-item__img-link > img { 
        display: none; 
    }
}

.projects-item__img-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2; 
    background-color: #fff;
}

.projects__link {
    text-align: center;
    margin-top: 4rem;
}

.projects__link a {
    display: inline-block;
    position: relative;
}

.projects__link a:after {
    position: absolute;
    bottom: -.3em;
    left: 0;
    right: 0;
    content: "";
    border-bottom: 1px solid #000;
}

.projects__link a > img {
    height: 1em;
    width: 1em;
}
/* Section Projects END */

/* Section Contact */
.contact {
    border-top: 1px solid #191919;
    background-color: #EFEBE1;
    color: #191919;
    padding-bottom: 2rem;
}

.contact-title {
    margin-bottom: 2rem;
}

@media (max-width: 576px) {
    .contact-title {
        grid-template-columns: 1.5fr 1fr;
    }
}

.contact-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding-block: 2rem;
    font-size: 1em;
}

@media (max-width: 576px) {
    .contact-row {
        grid-template-columns: 1.5fr 1fr;
    }
}

.contact-row__title {
    font-weight: 450;
    margin-bottom: 12px;
}

.contact-row li {
    opacity: .8;
    line-height: 1.3;
}

/* Footer */
.footer {
    bottom: 0;
    width: 100%;
    color: #191919;
    background: #EFEBE1;
    padding: 1.2rem 0 0rem;
    opacity: .8;
}

.footer-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.footer-row__back-to-top {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    color: #191919;
    gap: .1em;
    width: 120px;
}

/* Hamburger Menu Icon */
.hamburger {
    margin-left: auto;
    position: relative;
    width: 50px;
    height: 100%;
    padding: 1rem 0 1rem 1rem;
    cursor: pointer;
    -webkit-transition: all .25s ease-in-out;
    transition: all .25s ease-in-out;
    z-index: 100;
}

.hamburger-bar {
    position: absolute;
    top: 50%;
    right: 0;
    width: 30px;
    height: 1px; 
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    background: transparent; 
}

.hamburger-bar:before,
.hamburger-bar:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 1.5px;
    background: #191919; 
    -webkit-transition: all .25s ease-in-out; 
    transition: all .25s ease-in-out; 
}

.hamburger-bar:before {
    -webkit-transform: rotate(0deg) translateY(-4px);
    transform: rotate(0) translateY(-4px);
}

.hamburger-bar:after {
    -webkit-transform: rotate(0deg) translateY(4px);
    transform: rotate(0) translateY(4px);
}

.hamburger.active .hamburger-bar:before {
    -webkit-transform: rotate(45deg) translate(0px, 0px);background-color: #EFEBE1;
    transform: rotate(45deg) translate(0px, 0px);background-color: #EFEBE1;
}

.hamburger.active .hamburger-bar:after {
    -webkit-transform: rotate(-45deg) translate(0px, 0px);background-color: #EFEBE1;
    transform: rotate(-45deg) translate(0px, 0px);background-color: #EFEBE1;
}

/* Utilitaires */
.line {
    width: 100%;
    height: 1px;
    background-color: #191919;
}

.arrow-link {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    opacity: .8;
    -webkit-transition: opacity .25s ease-in-out;
    transition: opacity .25s ease-in-out;
}

.arrow-link a {
    color: #191919;
}

.arrow-link:hover {
    opacity: 1;
}

.arrow-link img {
    width: 1.1em;
    height: 1.1em;
}

.arrow-link-menu {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    opacity: .8;
    -webkit-transition: opacity .25s ease-in-out;
    transition: opacity .25s ease-in-out;
}

.arrow-link-menu a {
    color: #EFEBE1;
}

.arrow-link-menu:hover {
    opacity: 1;
}

.arrow-link-menu img {
    width: 1.1em;
    height: 1.1em;
}

/* ==== Project Pages ==== */
.project-header {
  background: #fff;
  color: #000;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header__logo-wrap {
  display: flex;
  align-items: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #000;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.7);
  border-radius: 50px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.back-button img {
  width: 14px;
  height: 14px;
}

.back-button:hover {
  background: #000;
  color: #fff;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.6rem 1rem;
  border: 1px solid #4f4f4f;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-back:hover {
  background: #191919;
  color: #fff;
}