/* ===== Base ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: clamp(15px, 2vw, 18px);
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    background-image: linear-gradient(rgba(17, 17, 17, 0.08), rgba(17, 17, 17, 0.25)), url('./images/fond_d_ecran.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ===== h1 (titre) ===== */
h1 {
    position: absolute;
    top: 0.5vh;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    color: rgb(255, 255, 255);
    text-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.9);
    font-size: clamp(18px, 3vw, 36px);
    letter-spacing: 0.02em;
}

/* ===== main.home-grid ===== */
.home-grid {
    position: relative;
    min-height: 100vh;
    padding: 5.5rem 2rem 2rem;
}

/* ===== sections (about/work/stack/bin/research) ===== */
.about-links,
.work-links,
.stack-links,
.bin {
    width: min(40vw, 430px);
    padding: 0.75rem;
    text-align: center;
    color: rgb(255, 255, 255);
    text-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.9);
    background: rgba(208, 199, 199, 0.35);
    border-radius: 16px;
    box-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(0.5px);
}

/* h2 dans chaque section */
section h2 {
    grid-column: 1 / -1;
    margin: 0 0 0.5rem;
    font-size: clamp(16px, 2vw, 24px);
    letter-spacing: 0.03em;
}

/* Positionnement des sections */
.about-links {
    position: absolute;
    top: 11vh;
    left: 3vw;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.work-links {
    position: absolute;
    top: 11vh;
    right: 3vw;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.stack-links {
    position: absolute;
    bottom: 4vh;
    left: 3vw;
    display: grid;
    width: min(30vw, 350px);
    gap: 0.8rem;
}

.bin {
    position: absolute;
    right: 3vw;
    bottom: 4vh;
    width: min(11vw, 110px);
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.research {
    position: absolute;
    bottom: 2.5vh;
    left: 50%;
    transform: translateX(-50%);   
    width: min(82vw, 600px);
    background-color: rgba(255, 255, 255, 0.812);
    border-radius: 10px;
    box-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.8rem;
}

/* ===== boutons + contenu ===== */
button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border: none;
    border-radius: 10px;
    color: rgb(255, 255, 255);
    text-decoration: none;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

button:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
}

button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 2px;
}

.icon {
    width: clamp(38px, 7.5vh, 72px);
    padding: 0.2rem;
}

.item-name {
    font-weight: 600;
    font-size: clamp(10px, 1.8vw, 16px);
    line-height: 1.2;
}

/* ===== responsive ===== */
@media (max-width: 600px) {
    h1 {
        top: 0.7rem;
        width: calc(100% - 2rem);
        text-align: center;
    }

    .home-grid {
        display: grid;
        gap: 1rem;
        padding: 5.6rem 1rem 2rem;
    }

    .about-links,
    .work-links,
    .stack-links,
    .bin {
        position: static;
        width: auto;
    }

    .about-links,
    .work-links,
    .stack-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .bin {
        justify-self: start;
    }
}