@font-face {
    font-family: 'Ronzino';
    src: url('font/Ronzino-Regular.woff2') format('woff2'),
        url('font/Ronzino-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ronzino';
    src: url('font/Ronzino-Oblique.woff2') format('woff2'),
        url('font/Ronzino-Oblique.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Ronzino';
    src: url('font/Ronzino-Medium.woff2') format('woff2'),
        url('font/Ronzino-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ronzino';
    src: url('font/Ronzino-MediumOblique.woff2') format('woff2'),
        url('font/Ronzino-MediumOblique.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Ronzino';
    src: url('font/Ronzino-Bold.woff2') format('woff2'),
        url('font/Ronzino-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ronzino';
    src: url('font/Ronzino-BoldOblique.woff2') format('woff2'),
        url('font/Ronzino-BoldOblique.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #ffffff;
    color: #000000;
    font-family: 'Ronzino', sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img,
.more-link,
.back-to-top-link,
.mobile-menu-btn,
.mobile-mute-btn,
.index-list a,
.project-number,
.number {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

img {
    -webkit-touch-callout: none;
}

.container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.left-panel {
    flex: 1;
    min-width: 0;
    padding: 25px 40px 40px 36px;
    position: relative;
    overflow-y: auto;
}

.left-panel.gallery-mode {
    padding: 0;
    margin-right: -21px;
    z-index: 10;
}

.right-panel {
    flex: 0 0 auto;
    width: max-content;
    padding: 30px 40px 20px 60px;
    position: relative;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.index-bg-logo {
    position: absolute;
    top: 20%;
    left: 41%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-height: 100%;
    pointer-events: none;
    z-index: 0;
    transition: filter 0.3s ease, opacity 0.3s ease;
    will-change: filter, opacity;
}

.left-panel h2 {
    position: relative;
    z-index: 1;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    margin-left: 45px;
    transition: opacity 0.3s ease;
}

.index-list {
    position: relative;
    z-index: 1;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.index-list li {
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: baseline;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.index-list li:hover {
    opacity: 0.6;
}

.index-list a {
    color: inherit;
    text-decoration: none;
    display: flex;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.index-list .number,
.cv-heading .number {
    font-weight: 700;
    display: inline-block;
    width: 30px;
    margin-right: 15px;
    font-variant-numeric: tabular-nums;
}

#cv-view h2 {
    font-size: 14px;
    margin-bottom: 0.8rem;
}

#cv-view {
    transition: opacity 0.4s ease;
}

#cv-view.anim-prep {
    opacity: 0;
}

.left-panel.animating-to-cv .index-list li,
.left-panel.animating-to-cv h2 {
    opacity: 0;
}

.left-panel.animating-to-cv .index-bg-logo {
    opacity: 0;
    filter: invert(1) opacity(0);
}

.cv-section {
    margin-bottom: 0.8rem;
}

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

.cv-heading {
    position: relative;
    z-index: 1;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
}

.cv-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-left: 45px;
    margin-top: 1.1rem;
    z-index: 1;
    position: relative;
}

.cv-item {
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
}

.cv-date {
    font-weight: 700;
    color: #888888;
    width: 140px;
    flex-shrink: 0;
}

.cv-info {
    display: flex;
    flex-direction: column;
}

.cv-institution {
    font-weight: 700;
    color: #000000;
}

.cv-details {
    font-weight: 500;
    color: #888888;
}

.last-updated {
    margin-top: 2rem;
    font-size: 14px;
    font-weight: 700;
    color: #888888;
    z-index: 1;
    position: relative;
}

.gallery-view {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: -1px;
}

video.gallery-image {
    object-fit: cover;
    position: relative;
    left: -1px;
}

.description {
    text-align: left;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    margin-bottom: 1rem;
    white-space: nowrap;
}

.description-mobile {
    display: none;
}

.mobile-only {
    display: none !important;
}

.contact-info {
    text-align: left;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    color: #888888;
}

.contact-info a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact-info a:hover {
    opacity: 0.6;
}

.contact-info br {
    -webkit-user-select: none;
    user-select: none;
}

.more-link {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    background-image: linear-gradient(#000, #000);
    background-size: 100% 70%;
    background-repeat: no-repeat;
    background-position-y: top 25%;
    color: #ffffff !important;
    padding: 0;
    display: inline;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.project-details {
    margin-top: 2.5rem;
    text-align: left;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    scroll-margin-top: 30px;
}

.project-header {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    margin-bottom: 1.5rem;
}

.project-title {
    font-weight: 700;
    margin-bottom: 1.2rem;
    position: relative;
}

.title-left {
    display: contents;
}

.title-center {
    display: contents;
}

.title-right {
    display: contents;
}

.title-left .project-title {
    grid-row: 1;
    grid-column: 1;
    text-align: left;
}

.title-left .project-meta {
    grid-row: 2;
    grid-column: 1;
    text-align: left;
}

.title-center .project-title {
    grid-row: 1;
    grid-column: 2;
    text-align: left;
}

.title-center .project-meta {
    grid-row: 2;
    grid-column: 2;
    text-align: left;
}

.title-right .project-title {
    grid-row: 1;
    grid-column: 3;
    text-align: right;
    justify-self: end;
}

.project-number {
    position: absolute;
    left: -50px;
}

.project-meta {
    margin-bottom: 0;
}

.gray-text {
    color: #888888;
}

.project-description {
    text-align: justify;
    text-align: left;
    line-height: 1.35;
    white-space: nowrap;
}

.project-image-container {
    margin-top: 1.5rem;
    width: 0;
    min-width: 100%;
}

.project-image {
    width: 100%;
    height: auto;
    display: block;
}

.project-footer {
    margin-top: 1rem;
    font-weight: 700;
    text-align: left;
    font-size: 13px;
    color: #888888;
}

.project-footer p {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-footer a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.project-footer a:hover {
    opacity: 0.6;
}

.paper-container {
    display: inline-flex;
    align-items: start;
    white-space: nowrap;
}

.back-to-top-container {
    margin-top: 5.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-email {
    font-weight: 700;
    font-size: 13px;
    color: #888888;
}

.footer-email a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-email a:hover {
    opacity: 0.6;
}

.footer-copyright {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 13px;
    color: #000000;
    text-align: left;
}

.back-to-top-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #000000;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.back-to-top-link:hover {
    opacity: 0.6;
}

.back-to-top-link svg {
    stroke: #000000;
    transition: transform 0.3s ease;
    transform: translateY(2px);
}

.back-to-top-link:hover svg {
    transform: translateY(0.5px);
}

.project-gallery-inline {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    width: 100%;
}

.project-gallery-inline.active {
    grid-template-rows: 1fr;
}

.project-gallery-inner {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-gallery-inline.active .project-gallery-inner {
    opacity: 1;
    transition: opacity 0.4s ease 0.1s;
}

.mobile-header {
    display: none;
}

.mobile-menu {
    display: none;
}

@media (max-width: 992px) {
    .container {
        display: block;
        height: auto;
        overflow: visible !important;
    }

    .left-panel {
        display: none;
    }

    .right-panel {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        padding: 50px 12px 40px 12px;
        overflow: visible !important;
    }

    .more-link {
        background-position-y: top 15%;
    }

    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 12px 15px 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: 100%;
        max-width: 600px;
        background-color: #ffffff;
        z-index: 100;
        font-weight: 700;
        font-size: 14px;
        box-sizing: border-box;
    }

    .mobile-menu-btn {
        cursor: pointer;
        transition: opacity 0.3s ease;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    }

    .mobile-menu-btn:hover {
        opacity: 0.6;
    }

    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: 100%;
        max-width: 600px;
        height: 100%;
        background-color: #ffffff;
        z-index: 99;
        padding: 55px 12px 40px 12px;
        overflow-y: auto;
        overflow-x: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-menu.active {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu .description,
    .mobile-menu .contact-info {
        display: block;
        font-size: 14px;
        line-height: 1.55;
        font-weight: 700;
    }

    .mobile-menu .description {
        margin-bottom: 1.5rem;
        line-height: 1.3;
        white-space: normal;
    }

    .mobile-menu .description br {
        display: none;
    }

    .mobile-menu .contact-info {
        color: #888888;
        margin-bottom: 2.5rem;
        line-height: 1.3;
    }

    .mobile-menu .contact-info br {
        display: none;
    }

    .mobile-menu .contact-info p:last-child {
        margin-top: 1.5rem;
    }

    .mobile-menu .contact-info a {
        color: inherit;
        text-decoration: none;
    }

    .mobile-menu-index {
        position: relative;
    }

    .mobile-menu-logo {
        position: absolute;
        top: -30%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 110%;
        max-height: 110%;
        pointer-events: none;
        z-index: 0;
        transition: filter 0.3s ease, opacity 0.3s ease;
        will-change: filter, opacity;
    }

    .mobile-menu-index h2 {
        position: relative;
        z-index: 1;
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 1rem;
    }

    .mobile-menu-index .index-list {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .mobile-menu-index .index-list li {
        font-size: 14px;
        font-weight: 700;
    }

    .mobile-menu-index .index-list a {
        color: inherit;
        text-decoration: none;
    }



    .description {
        display: none;
    }

    .contact-info {
        display: none;
    }

    .project-details {
        font-size: 13px;
        line-height: 1.4;
        margin-top: 0;
        margin-bottom: 1rem;
        padding-bottom: 2.5rem;
        position: relative;
        display: flex;
        flex-direction: column;
        scroll-margin-top: 60px;
    }

    .project-details:has(+ .project-details)::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: -12px;
        right: -12px;
        height: 3px;
        background-color: #000000;
        filter: invert(1);
        mix-blend-mode: difference;
    }

    .project-details:not(:has(+ .project-details)) {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    #project-arrabbiosa {
        margin-top: 0.7rem;
    }

    .project-image-container {
        order: 1;
        margin-top: 0;
        margin-bottom: 1.5rem;
    }

    .project-header {
        display: flex;
        flex-direction: column;
        position: relative;
        order: 2;
        margin-bottom: 1.5rem;
    }

    .project-description {
        white-space: normal;
        line-height: 1.3;
        order: 3;
        font-size: 14px;
        margin-left: calc((100% - 15px) * 0.325 + 15px);
        transition: margin-left 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .mobile-controls-wrapper {
        order: 4;
        display: flex;
        align-items: center;
        gap: 20px;
        margin-top: 1rem;
        margin-left: calc((100% - 15px) * 0.325 + 15px);
        max-height: 100px;
        overflow: hidden;
        transition: margin-left 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .project-gallery-inline {
        order: 5;
        margin-left: -12px;
        margin-right: -12px;
        width: auto;
        transition:
            grid-template-rows 0.6s cubic-bezier(0.25, 1, 0.5, 1),
            margin-top 0.6s cubic-bezier(0.25, 1, 0.5, 1),
            margin-bottom 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .project-gallery-inline.active {
        margin-top: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .project-footer {
        font-size: 13px;
        order: 6;
        margin-top: 1rem;
        margin-left: calc((100% - 15px) * 0.325 + 15px);
        transition: margin-left 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .project-gallery-inline.active+.project-footer {
        animation: fadeInShowLess 0.4s ease forwards;
        animation-delay: 0.4s;
        opacity: 0;
        margin-left: 0;
    }

    .title-left .project-title {
        position: absolute;
        top: 0;
        left: 0;
        width: calc((100% - 15px) * 0.325);
        padding-left: 25px;
        margin-bottom: 0;
    }

    .title-center .project-title {
        order: 1;
        text-align: left;
        margin-bottom: 0;
        margin-left: calc((100% - 15px) * 0.325 + 15px);
    }

    .title-right .project-title {
        order: 2;
        text-align: left;
        margin-bottom: 0.8rem;
        margin-left: calc((100% - 15px) * 0.325 + 15px);
    }

    .title-left .project-meta {
        order: 3;
        padding-left: 0;
        margin-bottom: 0.15rem;
        margin-left: calc((100% - 15px) * 0.325 + 15px);
    }

    .title-center .project-meta {
        order: 4;
        text-align: left;
        margin-bottom: 0;
        margin-left: calc((100% - 15px) * 0.325 + 15px);
    }

    .project-number {
        position: absolute;
        left: 0;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .project-description.mobile-only {
        white-space: normal;
    }

    .project-description br {
        display: none;
    }

    .back-to-top-container {
        margin-top: 6rem;
        margin-bottom: 0rem;
        position: relative;
        padding-bottom: 1rem;
    }

    .back-to-top-container::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: -12px;
        right: -12px;
        height: 3px;
        background-color: #000000;
        filter: invert(1);
        mix-blend-mode: difference;
    }

    .footer-email {
        font-size: 14px;
    }

    .footer-copyright {
        font-size: 13px;
        margin-top: 0.8rem;
        margin-bottom: -1rem;
    }


    .back-to-top-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: #000000;
        text-decoration: none;
        font-weight: 700;
        font-size: 14px;
        transition: opacity 0.3s ease;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    }

    .back-to-top-link:hover {
        opacity: 0.6;
    }

    .back-to-top-link svg {
        stroke: #000000;
        transition: transform 0.3s ease;
        transform: translateY(1px);
    }

    .back-to-top-link:hover svg {
        transform: translateY(0.5px);
    }

    video.gallery-image {
        left: 0;
    }

    .mobile-mute-btn {
        order: 4;
        text-decoration: none;
        font-weight: 700;
        font-size: 13px;
        cursor: pointer;
        margin-top: 0;
        margin-bottom: 0;
        transition: opacity 0.3s ease;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    }

    .mobile-mute-btn:hover {
        opacity: 0.6;
    }

    .cv-list {
        margin-left: 0;
        margin-top: 0.8rem;
        gap: 1rem;
    }

    .cv-date {
        width: 160px;
        flex-shrink: 0;
    }

    .last-updated {
        margin-top: 8rem;
    }

    .mobile-menu-cv h2 {
        font-size: 14px;
        margin-bottom: 1.2rem;
        font-weight: 700;
    }

    .mobile-menu .mobile-menu-description,
    .mobile-menu .mobile-menu-contact,
    .mobile-menu .mobile-menu-index {
        transition: opacity 0.3s ease;
    }

    .mobile-menu.animating-to-cv .mobile-menu-description,
    .mobile-menu.animating-to-cv .mobile-menu-contact,
    .mobile-menu.animating-to-cv .mobile-menu-index {
        opacity: 0;
    }

    .mobile-menu-cv {
        transition: opacity 0.4s ease;
    }

    .mobile-menu-cv.anim-prep {
        opacity: 0;
    }

    .mobile-menu-cv br {
        display: none;
    }
}

@keyframes fadeInShowLess {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}