/* Enrico Tarandetti - Minimal Portfolio Style */
/* Inspired by modern minimalist design principles */

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
    color: #ffffff;
    background: #000000;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Three.js Canvas Background */
#threejs-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    padding: 2rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.nav-item {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    color: #ffffff;
    transform: translateX(-5px);
}

/* Main Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    position: relative;
    z-index: 10;
}

.name {
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.name .first-name {
    display: block;
    background: linear-gradient(135deg, #ffffff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.name .last-name {
    display: block;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

.tagline {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    max-width: 600px;
}

.roles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 4rem;
}

.role {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.3px;
}

.role::before {
    content: "—";
    margin-right: 1rem;
    color: #00d4ff;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.social-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.social-link:hover {
    color: #00d4ff;
    transform: translateY(-2px);
}

/* About Section */
.about {
    margin-top: 8rem;
    max-width: 700px;
}

.about h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.about p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

/* Projects Grid */
.projects {
    margin-top: 8rem;
    width: 100%;
}

.projects h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.9);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-5px);
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
}

.project-description {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.project-link {
    font-size: 0.9rem;
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: #ffffff;
}

/* Contact */
.contact {
    margin-top: 8rem;
    padding-bottom: 4rem;
}

.contact h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.contact-info {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.contact-link {
    color: #00d4ff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: #ffffff;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(0, 212, 255, 0.1);
    border-top: 2px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 2rem;
    }

    nav {
        padding: 1.5rem;
    }

    .nav-menu {
        gap: 0.3rem;
    }

    .nav-item {
        font-size: 0.8rem;
    }

    .roles {
        margin-bottom: 3rem;
    }

    .role {
        font-size: 1rem;
    }

    .social-links {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .about,
    .projects,
    .contact {
        margin-top: 6rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 1.5rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }

    nav {
        padding: 1rem;
    }

    .name {
        font-size: clamp(2.5rem, 10vw, 6rem);
    }

    .tagline {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }

    .roles {
        margin-bottom: 2rem;
    }

    .role {
        font-size: 0.9rem;
    }

    .about h2,
    .projects h2,
    .contact h2 {
        font-size: 1.5rem;
    }

    .about,
    .projects,
    .contact {
        margin-top: 4rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in {
        opacity: 1;
        transform: none;
    }
}