* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#about {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.about-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 80px;
    margin-top: 40px;
}

.about-content {
    width: 60%;
}

.about-content h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #d4af37;
    text-transform: uppercase;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    font-family: 'Poppins', sans-serif;
}

#about-footer {
    background: #121212;
    color: white;
    text-align: center;
    padding: 80px 0;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#about-footer h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

#about-footer p {
    font-size: 1rem;
    margin-bottom: 10px;
    color: white;
}

#about-hero {
    width: 100vw;
    height: 50vh;
    background-color: #121212;
    display: flex;
    position: relative;
    margin: 0;
    padding: 0;
}

.about-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 50px;
}

.about-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 20px;

}

#about-section {
    background: #121212;
    padding: 100px 0;
    margin-bottom: 0;

}

.about-skills {
    width: 35%;
    max-width: 300px;
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 280px;
    transition: all 0.3s ease-in-out;
}

.about-skills::before {
    content: "";
    display: block;
    height: 100px;
}

.about-skills:focus,
.about-skills:active {
    border: 1px solid rgba(212, 175, 55, 0.8);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    transition: box-shadow 0.3s ease-in-out, border 0.3s ease-in-out;
}

.about-skills:hover {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.8);
    transform: scale(1.03);
}

.about-skills h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #d4af37;
    text-transform: uppercase;
}

.about-skills li {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: white;
}

.about-skills ul {
    list-style: none;
    padding: 0;
}

.about-text {
    width: 60%;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #d4af37;
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.5;
}

#about-title {
    width: 100%;
    background: black;
    text-align: center;
    padding: 60px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.artstation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
    justify-items: center;
}

.artstation-project {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(8px);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 90%;
    max-width: 300px;
    margin: 0 auto;
    border: 1px solid rgba(100, 200, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.6);
    text-decoration: none;
}

.artstation-project a,
.artstation-project a:hover,
.artstation-project a:focus,
.artstation-project a:active {
    text-decoration: none;
}

.artstation-project img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.artstation-project img:hover {
    transform: scale(1.08);
    filter: brightness(1.2) contrast(1.2);
}

.artstation-project h3 {
    font-size: 1rem;
    margin-top: 10px;
    color: #64baff;
    text-shadow: 0 0 8px rgba(100, 200, 255, 0.8);
}

.artstation-project:hover {
    box-shadow: 0 0 25px rgba(212, 175, 55, 1);
    transform: scale(1.05);
}

.artstation-project a:hover .project-title,
.artstation-project a:focus .project-title {
    color: #d4af37;
}

.artstation-title {
    text-align: center;
    width: 100%;
    display: block;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6), 0 0 10px rgba(212, 175, 55, 0.5);
}

.bar {
    width: 100%;
    height: 4px;
    background-color: white;
    transition: 0.3s;
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, #000000 0%, #1c1c1c 100%);
    z-index: -1;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #eee;
    background: #111;
    background-size: cover;
    margin-bottom: 0;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}



body.fade-in {
    animation: fadeInReal 0.4s ease-in-out;
}

@keyframes fadeInReal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    display: none;
}

.close-btn:hover {
    transform: scale(1.2);
}

#contact {
    display: flex;
    align-items: flex-start;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 40px 0;
}

.contact-info {
    width: 40%;
}

.contact-info h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #eee;
}

.contact-info p {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #eee;
}

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

.contact-form {
    width: 55%;
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    font: 1rem Padding, sans-serif;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: none;
}

.contact-form textarea {
    min-height: 100px;
}

.contact-form button {
    width: 120px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: #5555ff;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

#contact-footer {
    text-align: center;
    width: 100%;
    padding: 90px 0 30px;
    margin-bottom: 0 !important;
}

#contact-footer h2 {
    font-size: 2rem;
    margin-bottom: 25px;
}

#contact-footer p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: white;
}

#contact-footer a {
    color: white;
    text-decoration: none;
}

#contact-footer a:hover {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

.container {
    width: 80%;
    max-width: 100vh;
    margin: 0 auto;
    padding: 0;
    color: #eee;
}

.data-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: rgba(212, 175, 55, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: flicker 1.5s infinite alternate;
}

.footer-logo {
    width: 30px;
    height: auto;
    opacity: 0.7;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.footer-logo:hover {
    transform: scale(1.1);
    opacity: 1;
}

h1,
h2,
h3,
.portfolio-item {
    font-family: 'Orbitron', sans-serif;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.hamburger {
    position: absolute;
    right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
    cursor: pointer;
    transition: opacity 0.3s ease-in-out;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
}

#hero {
    display: flex;
    align-items: center;
}
.hero-container{
    background: transparent;
    width: 100%;
    height: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: auto;
    justify-content: flex-start;
    text-align: center;
    margin-top: 50px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.9;
}

.role-title {
    display: block;
    font-size: 2rem;
    text-align: center;
  }

.pipe {
    font-size: 1.4em;
    padding: 0 10px;
    display: inline-block;
    transform: translateY(1px);
  }

.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

#hero-text {
    position: relative;
    z-index: 1;
    padding-top: 100vh;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 36px;
    margin: 0;
}

.hidden-section {
    display: none;
    opacity: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 30px;
    margin-top: 20px;
    color: white;
    border-radius: 10px;
    position: relative;
    max-height: 800px;
    overflow-y: auto;
    transition: opacity 0.3s ease-in-out;
}

.hidden-section h1 {
    text-align: center;
    font-size: 2.2rem;
    color: whit;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.visible {
    opacity: 1 !important;
    display: block !important;
    transition: opacity 0.3s ease-in-out;
}

@keyframes flicker {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
        text-shadow: 0 0 5px rgba(212, 175, 55, 0.8), 0 0 10px rgba(212, 175, 55, 0.6);
    }
}

@keyframes scan-flicker {
    0% {
        opacity: 1;
        text-shadow: 0 0 5px rgba(212, 175, 55, 0.6);
    }

    25% {
        opacity: 0.8;
        text-shadow: -3px 0 10px rgba(212, 175, 55, 0.4);
    }

    50% {
        opacity: 1;
        text-shadow: 3px 0 12px rgba(212, 175, 55, 0.7);
    }

    75% {
        opacity: 0.85;
        text-shadow: 5px 0 8px rgba(212, 175, 55, 0.5);
    }

    100% {
        opacity: 1;
        text-shadow: 0 0 5px rgba(212, 175, 55, 0.6);
    }
}

.intestazione {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 40px;
}

.logo {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 1001;
}

.logo img {
    height: 50px;
    transition: opacity 0.3s ease-in-out;
}

.logo img:hover {
    transform: scale(1.1);
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    margin: 15px 0;
    transition: color 0.3s ease;
}

.menu a:first-child {
    margin-left: 0;
}

.menu {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease-in-out;
}

.menu.active {
    right: 0;
}

.menu a:hover {
    color: #d4af37;
}

.menu-open .hamburger {
    display: none;
}

.menu-open .close-btn {
    display: block;
    z-index: 1001;
}
.name-main {
    font-size: 2.5rem;
  }

.name-title {
    text-align: center;
    font-size: 3rem;
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 40px;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.overlay-content a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.3s ease;
    letter-spacing: 2px;
    font-family: 'Orbitron';
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.overlay-content a:hover {
    color: #d4af37;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

#overlay-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 999;
}

#overlay-menu.active {
    opacity: 1;
    visibility: visible;
}

#overlay-menu.active~.social-icons {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#overlay-menu.active~.social-icons img {
    display: none;
}

#portfolio {
    display: flex;
    align-items: center;
    padding: 20px;
}

.portfolio-content {
    position: relative;
    width: 100%;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 20px;
    justify-items: center;
    margin: 0 auto;
    max-width: 900px;
}

.portfolio-item {
    background: transparent;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    padding: 15px 30px;
    border: 2px solid white;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

.portfolio-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #d4af37;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-in-out;
    z-index: -1;
}

.portfolio-item:hover::before {
    transform: scaleX(1);
}

.portfolio-item:hover {
    color: black;
    border-color: #d4af37;
}

.portfolio-item:active {
    transform: scale(0.95);
}

.profile-image {
    position: relative;
    width: 40%;
}

.profile-image img {
    display: flex;
    max-width: 100%;
    height: auto;
    z-index: 1;
}

.scan-flicker {
    font-size: 2rem;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    animation: scan-flicker 3s infinite alternate;
}

section {
    position: relative;
    min-height: 60vh;
    margin-bottom: 30px;
}

.section-number {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 120px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.1);
}

.skill {
    margin-bottom: 15px;
}

.skill-bar {
    background: #555;
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
    height: 8px;
}

.skills-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    /* allineamento in alto */
    justify-content: space-between;
    padding-top: -80px;
    padding-bottom: 80px;
}

.skills-content .profile-image {
    width: 35%;
}

.skill-fill {
    background: #eee;
    height: 100%;
    width: 0;
}

.skill-name {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.skills-text {
    max-width: 600px;
    text-align: left;
    padding-left: 60px;
    margin-top: -50px;
}

.skills-text h2 {
    margin-top: -80;
    padding-top: 0;
    font-size: 2.2rem;
}

.skills-text .description {
    font-size: 16px;
    line-height: 1.6;
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 80px;
    margin-bottom: 20px;
}

.social-icons a {
    margin-bottom: 10px;
}

.social-icons img {
    width: 30px;
    height: auto;
    transition: transform 0.3s ease;
}

.social-icons a img:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 6px #feda6a);
}

.subtitle {
    margin-top: 60px;
    font-size: 20px;
    opacity: 0.9;
}

#latestworks,
#showreel,
#devlab,
#tools,
#design,
#interactive {
    height: auto;
    max-height: 800px;
    overflow-y: auto;
}

#showreel h1 {
    margin-bottom: 25px;
}


.title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.video-container {
    position: relative;
    width: 100%;
    height: 60vh;
    /* Altezza dinamica ma contenuta */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
}


.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    padding: 0;
    display: block;
}


.video-overlay-text {
    position: absolute;
    bottom: 0%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 10;
}

.video-overlay-text span {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-top: 5px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: white;
    border-radius: 10px;
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.8);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

* {
    scrollbar-color: white rgba(0, 0, 0, 0.7);
    scrollbar-width: thin;
}

#zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#zoom-overlay.active {
    visibility: visible;
    opacity: 1;
}

#zoom-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 150, 255, 0.6);
    z-index: 9999;
}

.zoom-arrow {
    position: absolute;
    top: 50%;
    width: 50px; /* leggermente più grande */
    height: 50px;
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 10000;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.8)); /* Giallo tech glow */
    transition: transform 0.2s ease, filter 0.3s ease;
    opacity: 0.9;
    filter: brightness(100) drop-shadow(0 0 6px rgba(212, 175, 55, 0.8));
}

.zoom-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 1)); /* Glow più forte al passaggio */
    filter: brightness(100) drop-shadow(0 0 6px rgba(212, 175, 55, 0.8));
    opacity: 1;
}

.zoom-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: none;
    z-index: 10001;
    filter: brightness(200%) drop-shadow(0 0 6px #ffffff);
    filter: brightness(100) drop-shadow(0 0 6px rgba(212, 175, 55, 0.8));
}

#zoom-prev {
    left: 30px;
}

#zoom-next {
    right: 30px;
}

#devlab h1 {
    margin-bottom: 30px;
}

#devlab p:not(.data-text) {
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    color: #eee;
}

#devlab .data-text {
    margin-top: 10px;
    text-align: center;
}

.tools-project {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(8px);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 90%;
    max-width: 300px;
    margin: 0 auto;
    border: 1px solid rgba(100, 200, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.6);
    text-decoration: none;
}

.tools-project a,
.tools-project a:hover,
.tools-project a:focus,
.tools-project a:active {
    text-decoration: none;
}

.tools-project img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tools-project img:hover {
    transform: scale(1.08);
    filter: brightness(1.2) contrast(1.2);
}

.tools-project h3 {
    font-size: 1rem;
    margin-top: 10px;
    color: #64baff;
    text-shadow: 0 0 8px rgba(100, 200, 255, 0.8);
}

.tools-project:hover {
    box-shadow: 0 0 25px rgba(212, 175, 55, 1);
    transform: scale(1.05);
}

.tools-project a:hover .project-title,
.tools-project a:focus .project-title {
    color: #d4af37;
}


.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* rapporto 16:9 */
    height: auto;
    overflow: hidden;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

#intro-gallery {
    width: 100vw;
    padding: 0;
    margin: 0;
    background: transparent; /* niente sfondo visibile */
    overflow: hidden;
    margin-bottom: 0;
    padding-bottom: 0;
  }
  
  .mini-gallery {
    display: grid;
    margin: 0;
    padding: 0;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }
  
  .mini-gallery img {
    width: 100%;
    height: 30vh; /* o 250px, a seconda di quanto le vuoi alte */
    object-fit: cover;
    display: block;
    border: 1px solid black;
  }
  #intro-gallery + section, #intro-gallery + div {
    margin-top: -10px;  /* Avvicina la sezione successiva */
    }