/* ═══════════════════════════════════════════════════════════
   CHI SONO - VERTICAL INFINITE CAROUSEL
   Style: Rimac Automobili scroll animations
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ═══ VARIABLES ═══ */
:root {
    --bg-color: #070707;
    --text-color: #FCF7F8;
    --accent-color: #961114;
    --secondary-bg: #1a1a1a;
    --border-color: rgba(252, 247, 248, 0.1);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', sans-serif;
    --nav-height: 80px;
    --transition-smooth: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme {
    --bg-color: #FCF7F8;
    --text-color: #070707;
    --accent-color: #961114;
    --secondary-bg: #f0f0f0;
    --border-color: rgba(7, 7, 7, 0.1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* ========================================
   NAVBAR
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(7, 7, 7, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-theme);
    padding: 0;
}

body.light-theme .navbar {
    background-color: rgba(252, 247, 248, 0.8);
}

.navbar-container {
    height: var(--nav-height);
    padding: 0 var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
    padding: 61.400;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: auto;
    height: 40px;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-smooth);
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link:hover::after {
    width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background-color: var(--secondary-bg);
    border-color: var(--accent-color);
    transform: rotate(180deg);
}

.sun-icon,
.moon-icon {
    position: absolute;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.sun-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

body.light-theme .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

body.light-theme .moon-icon {
    opacity: 0;
    transform: rotate(90deg);
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent-color);
    transition: all 0.3s;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #ff6b6b);
    z-index: 999;
    transition: width 0.1s linear;
    width: 0;
}

/* ═══════════════════════════════════════════════════════════
   CAROUSEL CONTAINER
   ═══════════════════════════════════════════════════════════ */

.carousel-container {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.carousel-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    scroll-snap-align: start;
    padding: var(--nav-height) 2rem 2rem;
}

.section-content {
    max-width: 1200px;
    width: 100%;
    z-index: 2;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════
   SECTION 1: HERO / CHI SONO
   ═══════════════════════════════════════════════════════════ */

#section-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-text {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s forwards 0.2s;
}

.hero-title .accent {
    color: var(--accent-color);
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.4s;
}

.about-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.6s;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    opacity: 0.9;
}

.about-text strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* Scroll Hint */
.scroll-hint {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s forwards 1s, bounce 2s infinite 2s;
}

.scroll-hint span {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.scroll-hint svg {
    color: var(--accent-color);
}

/* Background Shapes with Parallax */
.background-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.05;
    filter: blur(80px);
}

.shape-1 {
    width: 600px;
    height: 600px;
    top: -300px;
    right: -300px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: -200px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ═══════════════════════════════════════════════════════════
   SECTION 2: GITHUB
   ═══════════════════════════════════════════════════════════ */

#section-github {
    background: var(--secondary-bg);
}

.platform-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-smooth);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.platform-icon {
    color: var(--accent-color);
    flex-shrink: 0;
}

.platform-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
}

.platform-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.platform-description strong {
    color: var(--accent-color);
    font-weight: 600;
}

.platform-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 2rem;
    padding: 1rem 2rem;
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    transition: all 0.3s;
}

.platform-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateX(5px);
}

/* Background Grid */
.background-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   SECTION 3: SOCIAL & CONTATTI
   ═══════════════════════════════════════════════════════════ */

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.social-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-smooth);
}

.social-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(150, 17, 20, 0.2);
}

.social-icon {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.social-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.social-desc {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.social-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.social-link:hover {
    opacity: 0.7;
}

.scroll-hint.bottom {
    margin-top: 3rem;
}

/* ═══════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS (Rimac-style)
   ═══════════════════════════════════════════════════════════ */

[data-scroll-reveal] {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

[data-scroll-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

[data-scroll-parallax] {
    transition: transform 0.1s linear;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 0.7;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE MOBILE
   ═══════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    .platform-card {
        padding: 3rem;
    }
    
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important;
    }
    
    .navbar-links {
        position: fixed;
        right: -100%;
        top: var(--nav-height);
        flex-direction: column;
        background: var(--bg-color);
        width: 100%;
        max-width: 300px;
        height: calc(100vh - var(--nav-height));
        padding: 2rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.2);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
    }
    
    .navbar-links.active {
        right: 0;
    }
    
    .navbar-links a {
        padding: 1.2rem 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .platform-card {
        padding: 2rem;
    }
    
    .platform-header {
        flex-direction: column;
        text-align: center;
    }
    
    .platform-title {
        font-size: 2.5rem;
    }
    
    .social-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .carousel-section {
        padding: calc(var(--nav-height) + 1rem) 1rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .about-text {
        font-size: 1rem;
    }
    
    .platform-card {
        padding: 1.5rem;
    }
    
    .platform-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .platform-title {
        font-size: 2rem;
    }
    
    .social-card {
        padding: 1.5rem;
    }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .social-card:hover {
        transform: none;
    }
    
    .platform-link:hover {
        transform: none;
    }
}

/* LOGIN BUTTON - MOBILE ONLY */
.login-btn-mobile {
    display: none;
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .login-btn-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }
} 