/* ============================================
   LIVIA REGOLI - PERSONAL WEBSITE
   Styles separated for maintainability
   ============================================ */

/* ---------- CSS Variables (Design Tokens) ---------- */
:root {
    --bg-deep: #0a0a0f;
    --bg-surface: #12121a;
    --accent-primary: #7c3aed;
    --accent-secondary: #a78bfa;
    --accent-glow: #c4b5fd;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --gold: #fbbf24;
    --gold-soft: #fcd34d;
}

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Syne', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---------- Three.js Canvas Container ---------- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- Noise Overlay ---------- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ---------- Content Wrapper ---------- */
.content {
    position: relative;
    z-index: 2;
}

/* ---------- Navigation ---------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(10, 10, 15, 0.9), transparent);
    backdrop-filter: blur(10px);
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent-glow);
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

/* ---------- Hero Section ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8rem;
    position: relative;
}

.hero-content {
    max-width: 900px;
}

.hero-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero h1 .accent {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border: 1px solid var(--text-muted);
    border-radius: 2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-glow);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}

/* ---------- Scroll Indicator ---------- */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards, pulse 2s ease-in-out infinite;
    animation-delay: 1.2s, 1.2s;
}

.scroll-indicator span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.scroll-indicator .line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
}

/* ---------- Section Styles ---------- */
section {
    padding: 8rem;
    position: relative;
}

.section-header {
    margin-bottom: 4rem;
}

.section-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-glow));
}

/* ---------- About Section ---------- */
#chi-sono {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-deep) 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.about-text .highlight {
    color: var(--text-primary);
    font-weight: 600;
}

.about-visual {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ---------- Stat Cards ---------- */
.stat-card {
    background: rgba(124, 58, 237, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.4s ease;
}

.stat-card:hover {
    transform: translateX(10px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.2);
}

.stat-card .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ---------- Ingegnere Pun Section ---------- */
.ingegnere-section {
    background: var(--bg-surface);
    padding: 4rem;
    border-radius: 1.5rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.ingegnere-section::before {
    content: '{ }';
    position: absolute;
    top: -20px;
    right: 40px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8rem;
    color: rgba(124, 58, 237, 0.05);
    font-weight: 700;
}

.ingegnere-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.ingegnere-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.8;
}

.ingegnere-text .toggle {
    display: inline-block;
    cursor: pointer;
    position: relative;
    color: var(--accent-glow);
    font-weight: 600;
    transition: all 0.3s ease;
}

.ingegnere-text .toggle:hover {
    text-shadow: 0 0 20px var(--accent-primary);
}

/* ---------- Quote Section ---------- */
#filosofia {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
}

.quote-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.quote-mark {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12rem;
    line-height: 0.5;
    color: rgba(124, 58, 237, 0.2);
    margin-bottom: -2rem;
}

blockquote {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-style: italic;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.quote-author {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    color: var(--gold);
}

.quote-context {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

/* ---------- Interests Section ---------- */
#interessi {
    background: var(--bg-deep);
}

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

.interest-card {
    background: linear-gradient(145deg, var(--bg-surface), var(--bg-deep));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.interest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-glow));
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.interest-card:hover {
    transform: translateY(-10px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.interest-card:hover::before {
    transform: scaleX(1);
}

.interest-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.interest-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.interest-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------- Footer ---------- */
footer {
    padding: 4rem 8rem;
    background: var(--bg-surface);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-left {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.footer-right {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.footer-right a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-right a:hover {
    color: var(--accent-glow);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* ---------- Responsive Design ---------- */
@media (max-width: 1024px) {
    section {
        padding: 4rem 2rem;
    }

    nav {
        padding: 1rem 2rem;
    }

    .hero {
        padding: 0 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .interests-grid {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav-links {
        display: none;
    }
}
