/* Swid Sound - Premium Minimalist Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #313338;
    --text-primary: #ffffff;
    --text-secondary: #dbdee1;
    --text-muted: #949ba4;
    --accent: #ffffff;
    
    --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
    
    /* Spacing system */
    --spacing-xl: 80px;
    --spacing-lg: 48px;
    --spacing-md: 32px;
    --spacing-sm: 20px;
    --spacing-xs: 12px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    text-align: center;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 120px; /* Safe space to prevent overlapping content under the fixed footer */
}

/* Container */
.container {
    width: 100%;
    max-width: 680px; /* Constrained for excellent visual focus and reading comfort */
    padding: var(--spacing-xl) 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl); /* Generous vertical rhythm between blocks */
}

/* Common Section Layout */
section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* 1. Author Block (Hero Section) */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
}

.identity-title {
    font-size: clamp(2.5rem, 8vw, 3.5rem); /* Fluid typographic scaling */
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.identity-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem); /* Fluid typographic scaling */
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: -8px;
}

.profile-container {
    margin: 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.profile-img {
    width: 100%;
    max-width: 150px; /* Fluid scaling bounds */
    aspect-ratio: 1 / 1; /* Force perfect square proportions to make it a perfect circle */
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.profile-img:hover {
    transform: scale(1.04) rotate(1deg);
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-quote {
    font-size: clamp(1rem, 3vw, 1.15rem); /* Fluid typographic scaling */
    font-style: italic;
    font-weight: 300;
    color: var(--text-primary);
    max-width: 540px;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* 2. About Block */
.about-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    max-width: 560px;
}

.section-title {
    font-size: clamp(1.4rem, 4vw, 1.75rem); /* Fluid typographic scaling */
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.about-text {
    font-size: clamp(0.95rem, 2.5vw, 1rem); /* Fluid typographic scaling */
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 3. Works Block (Slider) */
.works-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
}

.mixes-toggle-btn {
    background-color: transparent;
    border: 1.5px solid var(--text-secondary);
    color: var(--text-primary);
    padding: 12px 36px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
}

.mixes-toggle-btn:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mixes-toggle-btn.active {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

/* CSS Grid container revealed by JS display: grid */
.audio-container {
    width: 100%;
    margin-top: 8px;
    display: none; /* Defaults to display: none and toggles via JS */
    grid-template-columns: 1fr; /* Mobile-first, single column */
    justify-items: center;
    gap: 24px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.audio-container.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Parent container permitted to expand fully in grid cells */
.mix-project-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: #43454a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    width: 100%;
    min-width: 300px; /* Sufficient physical space for timeline */
}

.mix-project-wrapper:hover {
    background-color: #4d4f55;
    border-color: rgba(255, 255, 255, 0.12);
}

/* Audio timeline optimization */
audio {
    width: 100%;
}

.mix-project-wrapper audio::-webkit-media-controls-panel {
    background-color: #2b2d31;
}

.mix-project-wrapper audio::-webkit-media-controls-current-time-display,
.mix-project-wrapper audio::-webkit-media-controls-time-remaining-display {
    color: #ffffff;
}

.project-desc {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Desktop overrides for CSS Grid */
@media (min-width: 769px) {
    .container {
        max-width: 1040px; /* Allow expanded width on desktop for 3 columns */
    }
    .audio-container {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop screens */
    }
}


/* 4. Contacts Block (Footer) - Fixed bottom styling */
.footer-section {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: #1e1f22; /* Darker separation background */
    padding: 16px var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px 24px; /* Space between wrapped columns and items */
    flex-wrap: wrap; /* Allows wrap on smaller viewports */
    width: 100%;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: color 0.2s, background-color 0.2s, transform 0.2s;
    border: 1px solid transparent;
}

.footer-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.footer-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
}

/* Responsive Overrides */
@media (max-width: 680px) {
    body {
        padding-bottom: 160px; /* Larger body padding on mobile to account for wrapped footer lines */
    }

    .container {
        padding: var(--spacing-lg) 16px;
        gap: var(--spacing-lg);
    }
    
    .profile-img {
        max-width: 130px;
    }
    

    
    .footer-section {
        padding: 16px 12px;
    }
    
    .footer-links {
        gap: 8px 12px;
    }
    
    .footer-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

/* Media query for mobile contrast and usability */
@media (max-width: 768px) {
    .mix-project-wrapper {
        width: calc(100% - 32px);
        margin: 0 auto;
    }
    audio {
        width: 100%;
        min-width: 280px;
    }
}
