* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.5;
    color: #222;
    background: #fff;
}







/* HEADER */

header {
    position: sticky;
    top: 0;
    background: #0D1B2A;
    border-bottom: 0px solid #1B263B;
    padding: 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
    gap: 1rem;
}






/* Logo area: image + name */

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-text {
    position: relative;
    display: inline-block;
    font-weight: bold;
    font-size: 2.2rem;
    color: #E0E1DD;
}

.logo-text::after {
    content: "Paolo De Bortol";
    position: absolute;
    inset: 0;
    color: transparent;
    background-image: linear-gradient(
        112deg,
        transparent 0%,
        transparent 45%,
        rgba(172, 184, 194, 0.22) 48%,
        rgba(245, 248, 250, 0.88) 50%,
        rgba(185, 194, 202, 0.28) 52%,
        transparent 55%,
        transparent 100%
    );
    background-size: 320% 100%;
    background-repeat: no-repeat;
    background-position: 185% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(203, 214, 224, 0.32));
    pointer-events: none;
    animation: logo-flare 4s linear infinite;
}








/* NAVIGATION */

header nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

header nav a {
    text-decoration: none;
    color: #E0E1DD;
    font-size: 0.95rem;
}

header nav a:hover {
    color: #FFFFFF;
}






/* LANGUAGE SWITCHER */

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1.5rem;
}

.lang-flag {
    width: 24px;
    height: auto;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    border-radius: 3px;
}

.lang-flag:hover {
    opacity: 1;
}

.lang-flag.active {
    opacity: 1;
    outline: 2px solid #E0E1DD;
    outline-offset: 2px;
}






/* HERO SECTION */

.hero {
    padding: 2rem 2rem 2rem;
    background: linear-gradient(
        #0D1B2AFF,
        #0D1B2A55
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #E0E1DD;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-headline {
    position: relative;
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 4rem);
    margin: 0 auto 0.9rem;
    color: #D8C7A3;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.32;
    text-align: center;
    transform: translateX(-50%);
    white-space: nowrap;
}

.hero-headline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.9rem;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 242, 170, 0.78),
        rgba(224, 225, 221, 0.8),
        rgba(255, 242, 170, 0.78),
        transparent
    );
}

.hero-divider {
    height: 1px;
    margin: 0 auto 2.1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}


.hero-content p {
    font-size: 1.2rem;
    line-height: 1.6;
}


.hero-content h2 {
    margin-top: 0rem;
    margin-bottom: 0.8rem;
    font-size: 1.8rem
}

.hero-spacer {
    height: 1.8rem;
}






/* SCROLL DOWN BUTTON */
.scroll-down {
    position: static;               /* no overflow */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-top: 0rem;
    border-radius: 999px;
    border: 2px solid #E0E1DD;
    text-decoration: none;
    cursor: pointer;
    animation: scroll-bounce 1.6s infinite;
}

.scroll-down .arrow {
    width: 12px;
    height: 12px;
    border-right: 2px solid #E0E1DD;
    border-bottom: 2px solid #E0E1DD;
    transform: translateY(-2px) rotate(45deg);
}

.scroll-down:hover {
    border-color: #FFFFFF;
}

.scroll-down:hover .arrow {
    border-color: #FFFFFF;
}

/* Increase spacing between What I do paragraph and scroll hint */
.scroll-hint {
    margin-top: 2rem;          /* increase vertical space */
    font-size: 1.25rem;        /* slightly bigger */
    font-weight: 600;
}




@keyframes scroll-bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(6px);
    }
    60% {
        transform: translateY(3px);
    }
}






/* SECTIONS */

.section {
    padding: 4rem 1.5rem;
}

.section-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 3rem;
    align-items: center;
    justify-content: center;
}

/* TEXT BLOCK */

.text-block {
    width: 35%;
    min-width: 260px;
    position: sticky;
    top: 100px;
}

.text-block h2 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.text-block p {
    font-size: 1.25rem;
    line-height: 1.6;
}







/* CAROUSEL */

.carousel {
    width: 50%;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.carousel.ready {
    opacity: 1;
}

.carousel-strip {
    display: flex;
    gap: 0;
    transition: transform 0.8s ease-in-out;
    will-change: transform;
}

.slide {
    flex: 0 0 100%;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.slide::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 20px;
		border: 1px solid #FFFFFF50;
}







/* BACKGROUNDS */

.software-bg {
    background-color: #9EB9D4;
    background-image:
        linear-gradient(rgba(119, 141, 169, 0.05) 2px, transparent 3px),
        linear-gradient(90deg, rgba(119, 141, 169, 0.05) 2px, transparent 3px),
        linear-gradient(rgba(119, 141, 169, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(119, 141, 169, 0.03) 1px, #9EB9D4 1px);
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
    background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
}

.textures-bg {
    background-color: #c1d9db;
    background-image: repeating-linear-gradient(
        135deg,
        rgba(119, 141, 169, 0.07),
        rgba(119, 141, 169, 0.07) 3px,
        transparent 3px,
        transparent 10px
    );
}

.micromachining-bg {
    background-color: #3e6f94;
    background-image:
        linear-gradient(30deg, rgba(65, 90, 119, 0.06) 12%, transparent 12.5%, transparent 87%, rgba(65, 90, 119, 0.06) 87.5%, rgba(65, 90, 119, 0.06)),
        linear-gradient(150deg, rgba(65, 90, 119, 0.06) 12%, transparent 12.5%, transparent 87%, rgba(65, 90, 119, 0.06) 87.5%, rgba(65, 90, 119, 0.06)),
        linear-gradient(30deg, rgba(65, 90, 119, 0.13) 12%, transparent 12.5%, transparent 87%, rgba(65, 90, 119, 0.13) 87.5%, rgba(65, 90, 119, 0.13)),
        linear-gradient(150deg, rgba(65, 90, 119, 0.13) 12%, transparent 12.5%, transparent 87%, rgba(65, 90, 119, 0.13) 87.5%, rgba(65, 90, 119, 0.13)),
        linear-gradient(60deg, rgba(65, 90, 119, 0.13) 25%, transparent 25.5%, transparent 75%, rgba(65, 90, 119, 0.13) 75%, rgba(65, 90, 119, 0.13)),
        linear-gradient(60deg, rgba(65, 90, 119, 0.13) 25%, transparent 25.5%, transparent 75%, rgba(65, 90, 119, 0.13) 75%, rgba(65, 90, 119, 0.13));
    background-size: 20px 35px;
    background-position: 0 0, 0 0, 10px 18px, 10px 18px, 0 0, 10px 18px;
}

.smartslicer-bg {
    position: relative;
    overflow: hidden;
    background-color: #f1e4ba;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(200, 151, 39, 0.18), transparent 28%),
        radial-gradient(circle at 80% 70%, rgba(62, 111, 148, 0.16), transparent 30%);
    background-size: 100% 100%, 100% 100%;
    color: #0D1B2A;
}

.smartslicer-bg::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150vw;
    height: 150vw;
    background-image:
        linear-gradient(rgba(13, 27, 42, 0.025) 2px, transparent 2px),
        linear-gradient(90deg, rgba(13, 27, 42, 0.025) 2px, transparent 2px);
    background-size: 38px 38px;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(45deg);
}

.smartslicer-content {
    position: relative;
    z-index: 1;
    min-height: 340px;
}

.smartslicer-content .text-block {
    position: static;
    align-self: center;
}

.smartslicer-preview {
    display: flex;
    width: 27.2%;
    min-width: 240px;
    max-width: 288px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.smartslicer-preview img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    border: 1px solid #FFFFFF80;
    box-shadow: 0 18px 40px rgba(13, 27, 42, 0.22);
    transform-origin: 50% 72%;
    animation: smartslicer-wag 2.8s ease-in-out infinite;
    transition: box-shadow 0.2s;
}

.smartslicer-preview:hover img {
    box-shadow: 0 24px 48px rgba(13, 27, 42, 0.28);
}

@keyframes smartslicer-wag {
    0%,
    72%,
    100% {
        transform: translateX(0) rotate(0deg);
    }
    78% {
        transform: translateX(3px) rotate(1.2deg);
    }
    84% {
        transform: translateX(-3px) rotate(-1.2deg);
    }
    90% {
        transform: translateX(2px) rotate(0.8deg);
    }
    96% {
        transform: translateX(0) rotate(0deg);
    }
}

.contact-section {
    text-align: center;
    background: #B9D9EB;
    color: #0D1B2A;
		padding: 1.5rem 1rem 1.5rem;
}


.contact-icons {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
}

.contact-icon img {
    width: 60px;
    height: auto;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.contact-icon img:hover {
    opacity: 1;
    transform: scale(1.15);
}




/* FOOTER */

footer {
    background: #0D1B2A;
    color: #E0E1DD;
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid #1B263B;
}

footer a {
    color: #E0E1DD;
    text-decoration: none;
    margin: 0 0.5rem;
}

footer a:hover {
    color: #FFFFFF;
}

/* ANCHOR OFFSET */

#hero,
#textures,
#micromachining,
#software,
#smartslicer,
#contact {
    scroll-margin-top: 80px;
}






/* RESPONSIVE */

@media (max-width: 950px) {
    header {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 0.5rem;
    }
		.logo-img {
        height: 45px;
    }	
    .logo-text {
        font-size: 2rem;
    }

    .lang-switcher {
        margin-left: 0;
    }
		.contact-icon img {
				width: 45px;
		}
}

@media (max-width: 800px) {
    .section-content {
        flex-direction: column;
    }

    .text-block {
        position: static;
        width: 100%;
    }

    .carousel {
        width: 100%;
    }

    .smartslicer-preview {
        width: 70%;
        max-width: 320px;
    }
		
		#micromachining .text-block {
		order: 1;
    }

    #micromachining .carousel {
        order: 2;
    }
}





/* FIX HERO OVERFLOW ON MOBILE */



@media (max-width: 800px) {
    html {
        font-size: 85%;
    }
    .hero-headline {
        left: auto;
        width: 100%;
        transform: none;
        white-space: normal;
    }
		.logo-img {
        height: 40px;
    }
		.contact-icon img {
				width: 40px;
		}
}


@media (max-width: 600px) {
    html {
        font-size: 75%;
    }
		.logo-img {
        height: 35px;
    }
		.contact-icon img {
				width: 35px;
		}
}

@keyframes logo-flare {
    0% {
        background-position: 185% 0;
    }
    100% {
        background-position: -185% 0;
    }
}
