/* Hero styles */
.hero {
    display: flex;
    align-items: center;
    width: 35em;
    gap: 3em;
    padding-top: 5em;
}

.hero-subtitle {
    text-align: justify;
}

.profile-picture {
    flex-shrink: 0;
    width: 12em;
    height: 12em;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 1em var(--separator-color);
}

.text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1em;
    text-align: end;
}

.socials {
    display: flex;
    justify-content: flex-end;
    height: 1.25em;
    gap: 0.5em;
}

.social-icon svg {
    width: 100%;
    height: 100%;
}

.social-icon svg path {
    fill: var(--low-contrast-text);
    transition: fill 0.3s ease;
}

.social-icon:hover svg path {
    fill: var(--high-contrast-text);
}


/* Tab system styles */
.section-title:nth-of-type(even) {
    text-align: end;
}

.tabs {
    --tab-count: 2;

    display: flex;
    position: relative;
    border-bottom: 2px solid var(--separator-color);
}

.tabs input[type="radio"] {
    display: none;
}

.tabs label {
    display: block;
    position: relative;
    width: 100%;
    padding: 0.5em 0;
    text-align: center;
    color: var(--solid-bg);
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.tabs label:first-of-type {
    border-top-left-radius: 0.5em;
}
.tabs label:last-of-type {
    border-top-right-radius: 0.5em;
}

.tabs input[type="radio"]:checked + label {
    color: var(--low-contrast-text);
    text-shadow: 0 0 0.2em var(--solid-bg);
}

.tabs .slider {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: calc(100% / var(--tab-count));
    height: 2px;
    background-color: var(--solid-bg);
    transition: left 0.3s ease;
}

.tabs input[type="radio"]#radio-perso:checked ~ .slider {
    left: calc(100% / var(--tab-count));
}

.project-lists {
    position: relative;
    overflow: hidden;
    transition: height 1s ease-out;
    border-bottom-left-radius: 0.5em;
    border-bottom-right-radius: 0.5em;
}

.project-lists .list {
    position: absolute;
    display: grid;
    gap: 3em;
    height: fit-content;
    padding: 1em;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.project-lists .list.is-active {
    opacity: 1;
    pointer-events: auto;
}


/* Projects styles */
.project-container {
    display: flex;
    align-items: center;
    grid-auto-rows: 1fr;
    gap: 2em;
}

.project-container button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.project-description {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: flex-end;
    gap: 1em;
    flex: 1;
}

.project-description h3 {
    width: 100%;
}

.project-link {
    font-weight: bold;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--solid-bg);
}

.preview-container {
    font-size: inherit;
    width: 25em;
    height: 15em;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5em;
    transition: transform 0.3s ease;
    border: 3px solid var(--border-hover-color);
}

.preview-container img:hover {
    transform: scale(1.03);
}

.fullscreen-image {
    position: fixed;
    max-width: 80vw;
    max-height: 80vh;
}

.fullscreen-image::backdrop {
    background-color: rgba(0, 0, 0, 0.8);
}


/* Timeline styles */
.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3em;
    list-style: none;
    margin: 0 auto;
    padding: 2em 0 0 0;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 0.2em;
    background-color: var(--separator-color);
    transform: translateX(-50%);
}

.timeline .event {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    box-sizing: border-box;
    width: 50%;
    max-width: 40em;
}

.timeline .event:nth-child(even) {
    align-self: flex-start;
    padding-right: 2.5em;
    text-align: right;
}

.timeline .event:nth-child(odd) {
    align-self: flex-end;
    padding-left: 2.5em;
    text-align: left;
}

.timeline .event::after {
    content: "";
    display: block;
    position: absolute;
    width: 0.8em;
    height: 0.8em;
    top: 0.5em;
    border: 0.2em solid var(--separator-color);
    border-radius: 50%;
    background-color: var(--main-bg);
}

.timeline .event:nth-child(odd)::after {
    left: -0.6em;
}

.timeline .event:nth-child(even)::after {
    right: -0.6em;
}

.timeline .event::before {
    content: attr(data-duration-text);
    position: absolute;
    top: 0.5em;
    font-size: 0.8em;
    color: var(--low-contrast-text);
}

.timeline .event:nth-child(even)::before {
    right: -2.5em;
    transform: translateX(100%);
}

.timeline .event:nth-child(odd)::before {
    left: -2.5em;
    transform: translateX(-100%);
}

.event-description {
    color: var(--low-contrast-text);
    font-style: italic;
}



/* Responsive styles */
@media (max-width: 800px) {

    .project-container {
        flex-direction: column-reverse;
        gap: 1em;
    }

    .preview-container {
        width: 100%;
    }

    .project-lists .list {
        gap: 4em;
    }
}

@media (max-width: 650px) {
    .hero {
        width: 100%;
        flex-direction: column-reverse;
        gap: 2em;
    }

    .text-container {
        text-align: start;
    }

    .profile-picture {
        width: 15em;
        height: 15em;
        margin: 0;
    }
}