:root {
    --bg-color: #050510; /* Deep Space */
    --text-primary: #e0e6ed;
    --text-secondary: #94a3b8;
    --accent-cyan: #00f3ff;
    --accent-purple: #bc13fe;
    --accent-green: #00ff9d;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #050510 100%); /* Deep space gradient */
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow: hidden; /* Prevent scrolling, SPA feel */
    height: 100vh;
    width: 100vw;
}

/* --- Background & Effects --- */
#nebula-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.nebula-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.05) 0%, rgba(188, 19, 254, 0.05) 40%, rgba(0, 0, 0, 0) 70%);
    transform: translate(-50%, -50%);
    z-index: -2;
    animation: pulse-glow 15s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes pulse-glow {
    0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(1.3) rotate(10deg); opacity: 0.6; }
}
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
    opacity: 0.3;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 60%, black 100%);
    pointer-events: none;
    z-index: 998;
}

/* --- Layout & Sections --- */
main#app {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(0.95) translateY(20px);
    padding: 60px 20px 100px; /* Reduced top padding from 80px to 60px */
    display: block; /* Changed from flex to block to fix scrolling issues */
    overflow-y: auto; /* Allow scrolling within section if needed */
}

section.active-section {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    z-index: 10;
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
    /* height: 100%; Removed to allow content to grow and scroll properly */
    margin: 0 auto; /* Changed from margin: auto to margin: 0 auto to align to top */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from center to flex-start to align content to top */
    padding-top: 2vh; /* Add a little dynamic top padding */
}

/* --- Typography & Common --- */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-title {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    display: inline-block;
}

/* --- Navigation Dock --- */
.dock {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 10px 20px;
    display: flex;
    gap: 15px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.dock-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.dock-item svg {
    width: 24px;
    height: 24px;
}

.dock-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.dock-item.active {
    color: var(--accent-cyan);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

/* --- HOME: Cloud Core --- */
#home {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cloud-core-container {
    text-align: center;
    position: relative;
    z-index: 2;
    margin: auto; /* Ensure centering in the flex section */
}

.hero-text h1 {
    font-size: 5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.role-badge {
    font-family: var(--font-mono);
    color: var(--accent-green);
    background: rgba(0, 255, 157, 0.1);
    padding: 5px 15px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.mission-statement {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* --- ABOUT: Human Node (Redesigned) --- */
.about-layout-wide {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.identity-header {
    text-align: center;
    margin-bottom: 20px;
}

.full-name {
    font-size: 3.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.surname-highlight {
    color: var(--accent-cyan);
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.identity-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.id-badge {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 5px 12px;
    border-radius: 4px;
    color: var(--accent-green);
}

/* Terminal Bio */
.bio-terminal-container {
    background: #0f0f1a;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

.terminal-bar {
    background: #1a1a25;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #2a2a35;
}

.term-btn { width: 10px; height: 10px; border-radius: 50%; }
.term-title { margin-left: auto; font-family: var(--font-mono); font-size: 0.7rem; color: #666; }

.bio-content {
    padding: 25px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #a0a0b0;
}

.json-line { margin-bottom: 10px; }
.key { color: var(--accent-purple); }
.string { color: #ce9178; }

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 12px;
}

.info-card h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-cyan);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
}

.focus-card ul { list-style: none; }
.focus-card li { margin-bottom: 8px; font-size: 0.9rem; color: var(--text-secondary); }
.arrow { color: var(--accent-green); margin-right: 5px; }

.tags-container { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-primary);
    border: 1px solid transparent;
    transition: all 0.3s;
}
.tag:hover { border-color: var(--accent-purple); color: var(--accent-purple); }


/* --- BLOG: Thought Stream --- */
.blog-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.featured-post {
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.8), rgba(10, 10, 15, 0.9));
    border: 1px solid var(--accent-cyan);
    padding: 30px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
    transition: transform 0.3s;
}

.featured-post:hover { transform: translateY(-5px); }

.post-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-green);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blink-dot {
    width: 6px; height: 6px; background: var(--accent-green); border-radius: 50%;
    animation: blink 1s infinite;
}

.featured-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
}

.read-btn {
    display: inline-block;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--accent-cyan);
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.3s;
}

.read-btn:hover {
    background: var(--accent-cyan);
    color: #000;
}

.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.post-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-secondary);
}

.post-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 60px;
}

.post-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.post-tag {
    font-size: 0.7rem;
    background: rgba(188, 19, 254, 0.2);
    color: var(--accent-purple);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Mobile adjustments for new sections */
@media (max-width: 768px) {
    .info-grid { grid-template-columns: 1fr; }
    .full-name { font-size: 2.5rem; }
}

/* --- FEED: Telemetry HUD --- */
.hud-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    height: 60vh;
}

.hud-panel {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

.hud-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.panel-header {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--glass-border);
    padding-bottom: 10px;
}

.log-list {
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.log-list li {
    margin-bottom: 15px;
    border-left: 2px solid var(--glass-border);
    padding-left: 15px;
}

.log-list .timestamp { color: var(--text-secondary); margin-right: 10px; }
.log-list .cmd { color: var(--accent-purple); font-weight: bold; }

.status-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.value-highlight { color: var(--accent-green); }

.audio-visualizer {
    display: flex;
    gap: 5px;
    height: 30px;
    align-items: flex-end;
    margin-top: 20px;
}

.bar {
    width: 6px;
    background: var(--accent-purple);
    animation: equalizer 1s infinite ease-in-out;
}

.bar:nth-child(1) { animation-duration: 0.8s; height: 40%; }
.bar:nth-child(2) { animation-duration: 1.2s; height: 80%; }
.bar:nth-child(3) { animation-duration: 0.5s; height: 50%; }
.bar:nth-child(4) { animation-duration: 1.0s; height: 70%; }

@keyframes equalizer {
    0%, 100% { height: 20%; }
    50% { height: 100%; }
}

/* --- SKILLS: Neural Network --- */
.skills-layout {
    position: relative;
    width: 100%;
    height: 60vh;
    display: flex;
    gap: 20px;
}

#skills-canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: rgba(0,0,0,0.3);
    overflow: hidden;
}

#skills-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.skill-node {
    position: absolute;
    background: rgba(5, 5, 16, 0.9);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
    z-index: 2;
    transform: translate(-50%, -50%); /* Center on coordinate */
    user-select: none;
}

.skill-node:hover, .skill-node.active {
    background: var(--accent-cyan);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    z-index: 10;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Skill Detail Panel */
#skill-detail-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--accent-cyan);
    border-radius: 12px;
    padding: 20px;
    z-index: 20;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    transform: translateX(0);
    backdrop-filter: blur(10px);
}

#skill-detail-panel.hidden {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.panel-header h3 {
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 1.1rem;
}

#close-skill-panel {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
}

#close-skill-panel:hover { color: var(--accent-red, #ff5f56); }

.skill-metric {
    margin-bottom: 15px;
}

.skill-metric span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-green);
    width: 0%;
    transition: width 1s ease-out;
    box-shadow: 0 0 10px var(--accent-green);
}

.skill-info p {
    font-size: 0.9rem;
    color: #c0c0d0;
    line-height: 1.5;
    margin-bottom: 15px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: var(--accent-purple);
    background: rgba(188, 19, 254, 0.1);
}

@media (max-width: 768px) {
    .skills-layout { height: auto; flex-direction: column; }
    #skills-canvas-container { height: 50vh; }
    #skill-detail-panel {
        position: fixed;
        top: auto;
        bottom: 90px; /* Above dock */
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        right: auto;
    }
    #skill-detail-panel.hidden {
        transform: translate(-50%, 20px);
    }
}

/* --- CONTACT: Secure Uplink --- */
.terminal-window {
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    font-family: var(--font-mono);
}

.terminal-header {
    background: #2d2d2d;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.title { margin-left: 15px; color: #999; font-size: 0.8rem; }

.terminal-body {
    padding: 30px;
    color: #fff;
}

.input-line {
    display: flex;
    margin-bottom: 15px;
    align-items: baseline;
}

.prompt {
    color: var(--accent-green);
    margin-right: 10px;
    white-space: nowrap;
}

input, textarea {
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-mono);
    width: 100%;
    outline: none;
    font-size: 1rem;
}

.cmd-btn {
    background: transparent;
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 10px 20px;
    font-family: var(--font-mono);
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
    width: 100%;
}

.cmd-btn:hover {
    background: var(--accent-green);
    color: #000;
}

.social-links {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.social-links a:hover { color: var(--accent-cyan); }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-text h1 { font-size: 3rem; }
    .about-grid { grid-template-columns: 1fr; }
    
 
    section {
        display: block;
        padding-top: 40px; 
        padding-bottom: 35vh;
        overflow-y: auto;
    }

    /* Eccezione per la Home: Centrata verticalmente */
    #home {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 0;
    }
    
    .content-wrapper {
        height: auto; /* Altezza naturale */
        min-height: auto;
        justify-content: flex-start; /* Allinea tutto in alto */
        display: flex;
        flex-direction: column;
    }

    .hud-grid { 
        grid-template-columns: 1fr; 
        display: flex;
        flex-direction: column;
        gap: 1rem;
        height: auto; /* Allow height to grow with content */
    }
    .dock { width: 90%; justify-content: space-between; padding: 10px; }

    /* Spotify Widget Mobile Optimization */
    .spotify-widget {
        width: 100%;
        box-sizing: border-box;
        padding: 15px;
        margin-bottom: 20px;
        min-height: 120px; /* Ensure minimum height */
    }

    .spotify-body {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .album-cover {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px;
    }

    .track-details {
        flex: 1;
        min-width: 0;
        text-align: left;
    }

    .song-title, .artist-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        max-width: 100%;
    }
}

/* --- BLOG POST VIEW --- */
.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-cyan);
    text-decoration: none;
    font-family: var(--font-mono);
    margin-bottom: 30px;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 0.9rem;
}

.back-btn:hover { transform: translateX(-5px); }

.back-btn.bottom-btn {
    margin-top: 40px;
    margin-bottom: 0;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
    width: 100%;
    justify-content: center;
}

.article-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

.article-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.2;
}

.article-meta {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    gap: 20px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #c0c0d0;
}

.article-content p { margin-bottom: 20px; }

/* Fix Immagini Blog: Responsive e Centrate */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.article-content h2 {
    color: var(--accent-cyan);
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-family: var(--font-main);
}

.article-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent-green);
}

.article-content pre {
    background: #0d0d15;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 25px;
    border: 1px solid var(--glass-border);
}

.article-content pre code {
    background: transparent;
    padding: 0;
    color: #e0e0e0;
}

/* --- SPOTIFY WIDGET --- */
.spotify-widget {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(29, 185, 84, 0.3);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.spotify-header {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #1DB954; /* Spotify Green */
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spotify-body {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.album-cover {
    width: 40px;
    height: 40px;
    background: #111;
    border-radius: 4px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.vinyl-groove {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #333;
    position: relative;
    animation: spin 4s linear infinite;
}

.vinyl-groove::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #1DB954;
    border-radius: 50%;
}

.track-details {
    flex: 1;
    overflow: hidden;
}

.track-name-scroller {
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
}

#spotify-track {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    display: inline-block;
    animation: marquee 10s linear infinite;
}

#spotify-artist {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.playback-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 0.8rem;
    border-radius: 2px;
    overflow: hidden;
}

.playback-progress {
    width: 30%;
    height: 100%;
    background: #1DB954;
    animation: progress 30s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes marquee {
    0% { transform: translateX(0); }
    20% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* --- PROJECTS --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
}

.project-card {
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    background: rgba(10, 10, 15, 0.8);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.1);
}

.project-card.featured {
    border-color: var(--accent-purple);
}

.project-card.featured::before {
    content: 'FEATURED';
    position: absolute;
    top: 12px;
    right: -30px;
    background: var(--accent-purple);
    color: #000;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 5px 30px;
    transform: rotate(45deg);
    font-family: var(--font-mono);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.folder-icon {
    color: var(--accent-cyan);
    font-size: 1.5rem;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-links a {
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.project-links a:hover {
    color: var(--accent-cyan);
}

.project-title {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
}

/* --- PROJECT DETAIL VIEW --- */
.project-detail-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--accent-cyan);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.1);
}

.detail-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

.detail-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-green);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-title {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.detail-meta {
    font-family: var(--font-mono);
    color: var(--accent-purple);
    font-size: 1rem;
    letter-spacing: 2px;
}

.detail-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.detail-desc-box h3, .detail-tech-box h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--glass-border);
    padding-bottom: 5px;
}

.detail-desc-box p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #c0c0d0;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.big-tech-tag {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.detail-actions {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.detail-actions .cmd-btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    padding: 15px;
}

@media (max-width: 768px) {
    .detail-body { grid-template-columns: 1fr; }
    .detail-title { font-size: 2rem; }
    .detail-actions { flex-direction: column; }
}