/*
 * Foglio CSS corrispondente alla struttura Sass del portfolio.
 * File sorgente: scss/main.scss
 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin-top: 0;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

textarea {
    resize: vertical;
}

a {
    color: inherit;
}

address {
    font-style: normal;
}

[hidden] {
    display: none !important;
}

body {
    background-color: #ffffff;
    color: #172033;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
    color: #10233f;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    text-wrap: balance;
}

h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 8vw, 3.5rem);
    line-height: 1.15;
}

h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 5vw, 2.75rem);
}

h3 {
    margin-bottom: 0.75rem;
    font-size: clamp(1.125rem, 3vw, 1.5rem);
}

h4 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

p {
    margin-bottom: 1rem;
}

strong {
    font-weight: 700;
}

small {
    font-size: 0.875rem;
}

a {
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

::selection {
    background-color: #e8efff;
    color: #10233f;
}

:focus-visible {
    outline: 0.1875rem solid #ffffff;
    outline-offset: 0.125rem;
    box-shadow: 0 0 0 0.375rem #2f5fd0;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background-color: #10233f;
    box-shadow: 0 0.5rem 1.75rem rgb(16 35 63 / 10%);
    color: #ffffff;
    font-weight: 600;
    transform: translateY(calc(-100% - 2rem));
    transition: transform 150ms ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (forced-colors: active) {
    :focus-visible {
        outline-color: Highlight;
        box-shadow: none;
    }

    .skip-link {
        border: 0.125rem solid CanvasText;
    }
}

.container {
    width: min(calc(100% - 2.5rem), 75rem);
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
}

.section {
    padding-block: 4rem;
}

section[id] {
    scroll-margin-top: 6rem;
}

@media (min-width: 64rem) {
    .section {
        padding-block: 6rem;
    }
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 0.0625rem solid #d0d5dd;
    background-color: rgb(255 255 255 / 96%);
    box-shadow: 0 0.125rem 0.5rem rgb(16 35 63 / 8%);
    backdrop-filter: blur(0.75rem);
}

.site-header__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-block: 0.75rem;
}

.site-logo {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.5rem;
    color: #10233f;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.site-logo__image {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    object-fit: contain;
}

.site-nav {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav__list {
    display: flex;
    min-width: max-content;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__list a {
    display: inline-flex;
    min-width: 2.75rem;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 9999px;
    color: #344054;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        background-color 150ms ease,
        color 150ms ease,
        box-shadow 150ms ease;
}

.site-nav__list a:hover {
    background-color: #e8efff;
    box-shadow: inset 0 0 0 0.0625rem rgb(47 95 208 / 24%);
    color: #2349a3;
}

.site-nav__list a[aria-current="page"] {
    background-color: #e8efff;
    color: #2349a3;
}

.site-nav__list a[aria-current="page"]:hover {
    background-color: #e8efff;
    color: #2349a3;
}

@media (min-width: 64rem) {
    .site-header {
        position: static;
        box-shadow: none;
    }

    .site-header__inner {
        min-height: 4.75rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
        padding-block: 0.5rem;
    }

    .site-nav {
        width: auto;
        overflow: visible;
    }

    .site-nav__list {
        gap: 0.5rem;
    }

    .site-nav__list a {
        padding-inline: 1rem;
    }
}

.text-link {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.5rem;
    color: #2f5fd0;
    font-weight: 600;
    text-decoration-color: transparent;
    transition:
        color 150ms ease,
        text-decoration-color 150ms ease;
}

.text-link::after {
    content: "→";
    transition: transform 150ms ease;
}

.text-link:hover {
    color: #2349a3;
    text-decoration-color: currentColor;
}

.text-link:hover::after {
    transform: translateX(0.25rem);
}

@media (prefers-reduced-motion: reduce) {
    .text-link::after {
        transition: none;
    }
}

.button {
    display: inline-flex;
    width: 100%;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border: 0.125rem solid transparent;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease,
        color 150ms ease,
        transform 150ms ease;
}

.button--primary {
    border-color: #2f5fd0;
    background-color: #2f5fd0;
    box-shadow: 0 0.125rem 0.5rem rgb(16 35 63 / 8%);
    color: #ffffff;
}

.button--primary:hover {
    border-color: #2349a3;
    background-color: #2349a3;
    box-shadow: 0 0.5rem 1.75rem rgb(16 35 63 / 10%);
    transform: translateY(-0.125rem);
}

.button--secondary {
    border-color: #2f5fd0;
    background-color: #ffffff;
    color: #2f5fd0;
}

.button--secondary:hover {
    border-color: #2349a3;
    background-color: #e8efff;
    color: #2349a3;
    transform: translateY(-0.125rem);
}

.button:active {
    box-shadow: none;
    transform: translateY(0);
}

.button:disabled,
.button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.hero__actions,
.contact-cta__actions,
.contact-form__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

@media (min-width: 36rem) {
    .button {
        width: auto;
    }

    .hero__actions,
    .contact-cta__actions,
    .contact-form__actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .button--primary:hover,
    .button--secondary:hover {
        transform: none;
    }
}

.section-heading {
    max-width: 48rem;
    margin-bottom: 3rem;
}

.section-heading h2 {
    margin-bottom: 1rem;
}

.section-heading h2::after {
    display: block;
    width: 3rem;
    height: 0.25rem;
    margin-top: 0.75rem;
    border-radius: 9999px;
    background-color: #2f5fd0;
    content: "";
}

.section-heading p {
    max-width: 65ch;
    margin-bottom: 0;
    color: #667085;
    font-size: 1.125rem;
}

.section-heading--split {
    display: flex;
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.section-heading--split > div {
    max-width: 48rem;
}

.section-heading--split > .text-link {
    flex-shrink: 0;
}

.page-hero {
    padding-block: 4rem;
    border-bottom: 0.0625rem solid #d0d5dd;
    background-color: #f7f9fc;
}

.page-hero--illustrated {
    padding-block: 3rem;
}

.page-hero h1 {
    margin-bottom: 1rem;
}

.page-hero__description {
    max-width: 62ch;
    margin-bottom: 0;
    color: #667085;
    font-size: 1.125rem;
}

/* Testata delle pagine interne con testo e illustrazione */
.page-hero__layout {
    display: grid;
    align-items: center;
    gap: 2rem;
}

.page-hero__content {
    min-width: 0;
}

.page-hero__media {
    width: min(100%, 28rem);
    margin-inline: auto;
}

.page-hero__image {
    display: block;
    width: 100%;
    height: auto;
}

@media (min-width: 48rem) {
    .section-heading--split {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 2rem;
    }
}

@media (min-width: 64rem) {
    .page-hero {
        padding-block: 6rem;
    }

    .page-hero--illustrated {
        padding-block: 4rem;
    }

    .page-hero__layout {
        grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
        gap: 4rem;
    }

    .page-hero__media {
        justify-self: end;
        margin-inline: 0;
    }
}

.skill-card,
.education-card,
.cv-entry,
.cv-education-entry,
.cv-skill-group,
.cv-language {
    height: 100%;
    padding: 1.5rem;
    border: 0.0625rem solid #d0d5dd;
    border-radius: 1.25rem;
    background-color: #ffffff;
    box-shadow: 0 0.125rem 0.5rem rgb(16 35 63 / 8%);
}

.skill-card,
.cv-skill-group {
    border-top: 0.25rem solid #2f5fd0;
}

.skill-card h3,
.education-card h3,
.cv-entry h3,
.cv-education-entry h3,
.cv-skill-group h3,
.cv-language h3 {
    margin-bottom: 0.75rem;
}

.skill-card__list,
.cv-skill-group__list,
.cv-entry__list,
.project-card__list {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.skill-card__list li + li,
.cv-skill-group__list li + li,
.cv-entry__list li + li,
.project-card__list li + li {
    margin-top: 0.5rem;
}

.skill-card__list li::marker,
.cv-skill-group__list li::marker,
.cv-entry__list li::marker,
.project-card__list li::marker {
    color: #2f5fd0;
}

.project-card {
    display: flex;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    border: 0.0625rem solid #d0d5dd;
    border-radius: 1.25rem;
    background-color: #ffffff;
    box-shadow: 0 0.125rem 0.5rem rgb(16 35 63 / 8%);
    transition:
        border-color 250ms ease,
        box-shadow 250ms ease,
        transform 250ms ease;
}

.project-card__media {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    margin: 0;
    border-bottom: 0.0625rem solid #eef2f6;
    background-color: #ffffff;
}

.project-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-card__media--diagram {
    background-color: #eef2f6;
}

.projects__grid--page .project-card__media--diagram {
    aspect-ratio: auto;
    padding: 1.5rem;
}

.projects__grid--page .project-card__media--diagram .project-card__image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 60rem;
    margin-inline: auto;
}

.projects__grid--page .project-card__media--wide {
    aspect-ratio: 16 / 9;
}

.project-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.5rem;
}

.project-card__content > h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.project-card__content > h3:not(:first-child) {
    margin-top: 1.5rem;
    color: #2349a3;
    font-size: 1.125rem;
}

.project-card__technologies {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 0.0625rem solid #eef2f6;
    color: #667085;
    font-size: 0.9375rem;
}

.project-card__content > .text-link {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 0.75rem;
}

@media (hover: hover) {
    .project-card:hover {
        border-color: #2f5fd0;
        box-shadow: 0 0.5rem 1.75rem rgb(16 35 63 / 10%);
        transform: translateY(-0.25rem);
    }
}

.education-card__date,
.education-card__status,
.cv-language__level {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #e8efff;
    color: #2349a3;
    font-size: 0.9375rem;
    font-weight: 600;
}

.education-card__description:last-child,
.cv-language__level,
.cv-education-entry__period:last-child {
    margin-bottom: 0;
}

.cv-timeline,
.cv-education__list {
    display: grid;
    gap: 1.5rem;
}

.cv-entry__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 0.0625rem solid #eef2f6;
}

.cv-entry__header p {
    margin-bottom: 0;
}

.cv-entry__company,
.cv-education-entry__institution {
    color: #2349a3;
    font-weight: 600;
}

.cv-entry__period,
.cv-education-entry__period {
    color: #667085;
    font-size: 0.9375rem;
}

.cv-language {
    display: flex;
    max-width: 30rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cv-language h3 {
    margin-bottom: 0;
}

.cv-interests__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cv-interests__list li {
    padding: 0.5rem 1rem;
    border: 0.0625rem solid #d0d5dd;
    border-radius: 9999px;
    background-color: #e8efff;
    color: #2349a3;
    font-weight: 500;
}

@media (min-width: 48rem) {
    .skill-card,
    .education-card,
    .cv-entry,
    .cv-education-entry,
    .cv-skill-group,
    .cv-language,
    .project-card__content {
        padding: 2rem;
    }

    .cv-entry__header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 2rem;
    }

    .cv-entry__period {
        flex-shrink: 0;
        text-align: right;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card:hover {
        transform: none;
    }
}

.contact-form {
    padding: 1.5rem;
    border: 0.0625rem solid #d0d5dd;
    border-radius: 1.25rem;
    background-color: #ffffff;
    box-shadow: 0 0.125rem 0.5rem rgb(16 35 63 / 8%);
}

.form-field + .form-field {
    margin-top: 1.5rem;
}

.form-field label {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: #10233f;
    font-weight: 600;
}

.form-field label span:not([aria-hidden="true"]),
#required-fields-note {
    color: #667085;
    font-size: 0.9375rem;
    font-weight: 400;
}

.form-field input:not([type="checkbox"]),
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    border: 0.0625rem solid #667085;
    border-radius: 0.75rem;
    background-color: #ffffff;
    color: #172033;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.form-field textarea {
    min-height: 10rem;
}

.form-field input:not([type="checkbox"]):hover,
.form-field select:hover,
.form-field textarea:hover {
    border-color: #2f5fd0;
}

.form-field input:not([type="checkbox"]):focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
    border-color: #2f5fd0;
    outline: 0.1875rem solid #ffffff;
    outline-offset: 0.125rem;
    box-shadow: 0 0 0 0.375rem #2f5fd0;
}

.form-field input:user-invalid,
.form-field select:user-invalid,
.form-field textarea:user-invalid {
    border-color: #b42318;
}

.form-field--checkbox {
    display: grid;
    min-height: 2.75rem;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.75rem;
}

.form-field--checkbox input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: #2f5fd0;
}

.form-field--checkbox label {
    display: block;
    min-height: auto;
    margin-bottom: 0;
    line-height: 1.5;
    font-weight: 400;
}

.form-field--checkbox .required-marker {
    display: inline-block;
    margin-left: 0.125rem;
}

.contact-form__actions {
    margin-top: 2rem;
}

@media (min-width: 48rem) {
    .contact-form {
        padding: 2rem;
    }
}

.contact-cta {
    border-block: 0.0625rem solid #d0d5dd;
    background-color: #e8efff;
}

.contact-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.contact-cta .section-heading {
    margin-bottom: 1rem;
}

.contact-cta__content {
    max-width: 48rem;
}

.contact-cta__content > p:last-child {
    margin-bottom: 0;
}

.site-footer {
    padding-block: 2rem;
    background-color: #10233f;
    color: #ffffff;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.site-footer__copyright {
    margin-bottom: 0;
    color: #eef2f6;
    font-size: 0.9375rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-links__link,
.site-footer__back-to-top {
    display: inline-flex;
    min-width: 2.75rem;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    color: #e8efff;
    font-weight: 600;
    text-decoration: none;
    transition:
        background-color 150ms ease,
        color 150ms ease;
}

.social-links__link:hover,
.site-footer__back-to-top:hover {
    background-color: rgb(255 255 255 / 12%);
    color: #ffffff;
}

.hero {
    padding-block: 4rem;
    background: linear-gradient(135deg, #f7f9fc 0%, #e8efff 100%);
}

.hero__grid {
    display: grid;
    align-items: center;
    gap: 3rem;
}

.hero__content {
    display: grid;
    width: 100%;
    gap: 1.5rem;
}

.hero__content h1 {
    max-width: 22ch;
    font-size: clamp(2rem, 7vw, 3.25rem);
}

.hero__description {
    max-width: 62ch;
    color: #344054;
    font-size: 1.125rem;
}

.hero__intro p:last-child {
    margin-bottom: 0;
}

.hero__actions {
    justify-content: flex-start;
    margin-top: 2rem;
}

.hero__media {
    width: 100%;
    max-width: 18rem;
    aspect-ratio: 1;
    justify-self: center;
}

.hero__image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.about {
    padding-block: 3rem;
}

.about__grid {
    display: grid;
    gap: 1.5rem;
}

.about__intro {
    padding: 1.5rem;
    border-left: 0.25rem solid #2f5fd0;
    border-radius: 0 0.75rem 0.75rem 0;
    background-color: #e8efff;
}

.about__intro p {
    margin-bottom: 0;
    color: #10233f;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.25;
}

.about__content {
    max-width: 70ch;
}

.about__content p:last-child {
    margin-bottom: 0;
}

.career {
    padding-top: 3rem;
    background-color: #f7f9fc;
}

.career .section-heading p {
    max-width: 62ch;
    color: #667085;
}

.career-chart {
    position: relative;
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0 0 0 2.75rem;
    list-style: none;
}

.career-chart::before {
    position: absolute;
    top: 1rem;
    bottom: 1rem;
    left: 0.625rem;
    width: 0.25rem;
    border-radius: 9999px;
    background-color: #2f5fd0;
    content: "";
}

.career-chart__item {
    position: relative;
}

.career-chart__item::before {
    position: absolute;
    top: 1rem;
    left: -2.75rem;
    z-index: 1;
    width: 1.5rem;
    height: 1.5rem;
    border: 0.25rem solid #2f5fd0;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 0.125rem 0.5rem rgb(16 35 63 / 8%);
    content: "";
}

.career-chart__milestone {
    border: 0.0625rem solid #d0d5dd;
    border-radius: 0.75rem;
    background-color: #ffffff;
    box-shadow: 0 0.125rem 0.5rem rgb(16 35 63 / 8%);
}

.career-chart__milestone summary {
    position: relative;
    display: grid;
    min-height: 2.75rem;
    gap: 0.25rem;
    padding: 1rem 2rem 1rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    list-style: none;
}

.career-chart__milestone summary::-webkit-details-marker {
    display: none;
}

.career-chart__milestone summary::marker {
    content: "";
}

.career-chart__milestone summary::after {
    position: absolute;
    top: 50%;
    right: 1rem;
    color: #2f5fd0;
    font-size: 1.25rem;
    font-weight: 700;
    content: "+";
    transform: translateY(-50%);
}

.career-chart__milestone[open] summary::after {
    content: "−";
}

.career-chart__dot {
    display: none;
}

.career-chart__milestone time {
    color: #2349a3;
    font-size: 0.9375rem;
    font-weight: 700;
}

.career-chart__label {
    color: #10233f;
    font-size: 1.125rem;
    font-weight: 600;
}

.career-chart__card {
    padding: 0 1rem 1rem;
}

.career-chart__card h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.career-chart__card p {
    margin-bottom: 0;
    color: #667085;
    font-size: 0.9375rem;
}

.career-chart__item--one {
    --level: 78%;
    --next-level: 61%;
}

.career-chart__item--two {
    --level: 61%;
    --next-level: 43%;
}

.career-chart__item--three {
    --level: 43%;
    --next-level: 24%;
}

.career-chart__item--four {
    --level: 24%;
}

.skills__grid,
.projects__grid,
.education__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

/* Spazi verticali delle sezioni successive della Home */
#competenze {
            padding-bottom: 3rem;
}

#progetti {
            padding-block: 3rem;
            background-color: #f7f9fc;
}

#formazione {
            padding-top: 3rem;
        }

.projects__grid--page {
    max-width: 64rem;
    margin-inline: auto;
}

@media (min-width: 48rem) {
    .career-chart {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-height: 28rem;
        gap: 0;
        padding: 0;
        border: 0.0625rem solid #d0d5dd;
        border-radius: 1.25rem;
        background-color: #ffffff;
        background-image:
            linear-gradient(to right, rgb(47 95 208 / 8%) 0.0625rem, transparent 0.0625rem),
            linear-gradient(to bottom, rgb(47 95 208 / 8%) 0.0625rem, transparent 0.0625rem);
        background-size: 25% 100%, 100% 25%;
        box-shadow: 0 0.125rem 0.5rem rgb(16 35 63 / 8%);
    }

    .career-chart::before {
        display: none;
    }

    .career-chart__item::after {
        position: absolute;
        top: var(--level);
        right: 0;
        left: 0;
        z-index: 1;
        height: 0.25rem;
        background-color: #2f5fd0;
        content: "";
    }

    .career-chart__item:first-child::after {
        left: 50%;
    }

    .career-chart__item:last-child::after {
        right: 50%;
    }

    .career-chart__item:not(:last-child)::before {
        top: var(--next-level);
        right: -0.125rem;
        left: auto;
        width: 0.25rem;
        height: calc(var(--level) - var(--next-level));
        border: 0;
        border-radius: 0;
        background-color: #2f5fd0;
        box-shadow: none;
    }

    .career-chart__item:last-child::before {
        display: none;
    }

    .career-chart__milestone {
        position: absolute;
        top: var(--level);
        left: 50%;
        z-index: 2;
        width: min(13rem, calc(100% - 1rem));
        border: 0;
        background-color: transparent;
        box-shadow: none;
        text-align: center;
        transform: translateX(-50%);
    }

    .career-chart__milestone summary {
        min-height: 5.5rem;
        justify-items: center;
        padding: 1.5rem 0.5rem 0.5rem;
        background-color: rgb(255 255 255 / 92%);
        box-shadow: 0 0.125rem 0.5rem rgb(16 35 63 / 8%);
    }

    .career-chart__milestone summary::after {
        display: none;
    }

    .career-chart__dot {
        position: absolute;
        top: -0.75rem;
        left: 50%;
        display: block;
        width: 1.5rem;
        height: 1.5rem;
        border: 0.25rem solid #2f5fd0;
        border-radius: 50%;
        background-color: #ffffff;
        box-shadow: 0 0.125rem 0.5rem rgb(16 35 63 / 8%);
        transform: translateX(-50%);
        transition: transform 250ms ease;
    }

    .career-chart__milestone summary:hover .career-chart__dot,
    .career-chart__milestone summary:focus-visible .career-chart__dot,
    .career-chart__milestone[open] .career-chart__dot {
        transform: translateX(-50%) scale(1.35);
    }

    .career-chart__milestone:not([open]) > .career-chart__card {
        display: block;
    }

    .career-chart__card {
        position: absolute;
        right: auto;
        bottom: calc(100% + 0.75rem);
        left: 50%;
        z-index: 3;
        width: min(18rem, calc(100vw - 3rem));
        padding: 1rem;
        border: 0.0625rem solid #d0d5dd;
        border-radius: 0.75rem;
        background-color: #ffffff;
        box-shadow: 0 0.5rem 1.75rem rgb(16 35 63 / 10%);
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, 0.5rem) scale(0.96);
        transition:
            opacity 250ms ease,
            transform 250ms ease,
            visibility 250ms ease;
    }

    .career-chart__item--four .career-chart__card {
        top: calc(100% + 0.75rem);
        bottom: auto;
    }

    .career-chart__milestone:hover .career-chart__card,
    .career-chart__milestone:focus-within .career-chart__card,
    .career-chart__milestone[open] .career-chart__card {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0) scale(1);
    }

    .skills__grid,
    .projects__grid:not(.projects__grid--page),
    .education__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 64rem) {
    .hero {
        padding-block: 6rem;
    }



    .hero__grid {
        grid-template-columns: minmax(0, 1.65fr) minmax(28rem, 0.85fr);
        gap: 4rem;
    }

    .hero__content h1 {
        margin-bottom: 0;
    }

    .hero__media {
        max-width: 25rem;
        justify-self: end;
    }

    .about {
    padding-block: 4rem;
    }

    .career {
        padding-top: 4rem;
    }

    #competenze {
            padding-bottom: 4rem;
    }

    #progetti {
            padding-block: 4rem;
    }

    #formazione {
            padding-top: 4rem;
    }

    .about__grid {
        grid-template-columns: minmax(16rem, 0.85fr) minmax(0, 1.5fr);
        align-items: start;
        gap: 4rem;
    }

    .about__intro {
        padding: 2rem;
    }

    .skills__grid,
    .projects__grid:not(.projects__grid--page) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 80rem) {
    .hero__grid,
    .about__grid {
        gap: 6rem;
    }
}

/* Collegamento per scaricare il curriculum in PDF */
.cv-download {
    margin-top: 2rem;
}

.cv-profile__inner {
    display: grid;
    gap: 1.5rem;
}

.cv-profile__content {
    max-width: 70ch;
}

.cv-profile__content p:last-child {
    margin-bottom: 0;
}

@media (min-width: 48rem) {
    .cv-education__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 64rem) {
    .cv-profile__inner {
        grid-template-columns: minmax(14rem, 0.65fr) minmax(0, 1.35fr);
        align-items: start;
        gap: 4rem;
    }

    .cv-profile .section-heading {
        margin-bottom: 0;
    }

    .cv-education__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.contact__grid {
    display: grid;
    align-items: start;
    gap: 3rem;
}

.contact__intro {
    max-width: 36rem;
}

.contact__intro p:last-child {
    margin-bottom: 0;
}

.contact-form {
    width: 100%;
    max-width: 48rem;
}

@media (min-width: 64rem) {
    .contact__grid {
        grid-template-columns: minmax(16rem, 0.75fr) minmax(0, 1.25fr);
        gap: 4rem;
    }

    .contact-form {
        max-width: none;
    }
}

@media (min-width: 80rem) {
    .contact__grid {
        gap: 6rem;
    }
}

@media (min-width: 48rem) {
    .contact-cta__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 3rem;
    }

    .contact-cta__actions {
        flex-shrink: 0;
    }

    .site-footer__inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 1rem 2rem;
    }
}

@media (min-width: 64rem) {
    .site-footer__inner {
        flex-wrap: nowrap;
    }

    .site-footer__social {
        margin-inline: auto;
    }
}

/* Messaggi restituiti dopo l'invio del form */
.contact-form__status {
    min-height: 1.5rem;
    margin-top: 1rem;
    font-weight: 700;
}

.contact-form__status:empty {
    display: none;
}

.contact-form__status--success {
    color: #2349a3;
}

.contact-form__status--error {
    color: #b42318;
}