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

:root {
    /* Light theme colors */
    --primary-color: #ff6b9d;
    --secondary-color: #6a5acd;
    --accent-color: #00d4ff;
    --background-color: #f9f7fe;
    --card-color: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --border-color: #eaeaea;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, #ff6b9d, #6a5acd);
    --gradient-secondary: linear-gradient(135deg, #00d4ff, #6a5acd);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-circle: 50%;

    /* Font sizes */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-md: 1rem;
    --font-lg: 1.25rem;
    --font-xl: 1.5rem;
    --font-xxl: 2rem;
    --font-xxxl: 2.5rem;
}

/* Dark theme variables */
.dark-theme {
    --primary-color: #ff85b3;
    --secondary-color: #7d6de0;
    --accent-color: #00e5ff;
    --background-color: #121212;
    --card-color: #1e1e1e;
    --text-color: #f0f0f0;
    --text-secondary: #aaaaaa;
    --border-color: #333333;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, #ff85b3, #7d6de0);
    --gradient-secondary: linear-gradient(135deg, #00e5ff, #7d6de0);
}

/* Dark theme specific adjustments for better contrast */
.dark-theme .contact-item {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.dark-theme .social-link {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-theme .hobby {
    background: rgba(255, 107, 157, 0.2);
    border-color: rgba(255, 107, 157, 0.35);
}

.dark-theme .hobby:hover {
    background: rgba(255, 107, 157, 0.3);
    border-color: rgba(255, 107, 157, 0.5);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: var(--spacing-sm);
}

/* Header Styles */
.header {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 0 0 40% 40%;
    z-index: -1;
    transform: scale(1.1);
}

.profile-section {
    position: relative;
    z-index: 1;
}

.avatar-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto var(--spacing-md);
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-circle);
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, opacity 0.8s ease;
    opacity: 1;
    transform: scale(1);
}

.avatar:hover {
    transform: scale(1.05);
}

.avatar-loading {
    opacity: 0;
    transform: scale(0.8);
}

.avatar-border {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: var(--radius-circle);
    border: 2px dashed var(--accent-color);
    animation: spin 20s linear infinite;
    pointer-events: none;
}

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

.name {
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-xxxl);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.title {
    font-size: var(--font-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.tagline {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-sm);
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    color: white;
    font-size: var(--font-sm);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-item i {
    margin-right: 6px;
    font-size: var(--font-md);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-circle);
    color: white;
    font-size: var(--font-lg);
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.social-link:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

/* Card Styles */
.card {
    background: var(--card-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent-color);
}

/* About Section */
.about-text {
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: var(--font-md);
}

.stats {
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.stat {
    flex: 1;
    padding: var(--spacing-sm);
}

.stat-value {
    font-size: var(--font-xxl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: var(--font-sm);
    color: var(--text-secondary);
}

/* Skills Section */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-xs);
}

.skill-name {
    font-weight: 500;
}

.skill-percent {
    color: var(--primary-color);
    font-weight: 600;
}

.skill-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.dark-theme .skill-bar {
    background-color: #333;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    transition: width 1.5s ease-in-out;
}

/* Experience Section */
.timeline {
    position: relative;
    padding-left: var(--spacing-lg);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-circle);
    background: var(--accent-color);
    border: 3px solid var(--card-color);
    box-shadow: 0 0 0 3px var(--accent-color);
}

.timeline-date {
    font-size: var(--font-sm);
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: var(--font-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: var(--font-md);
}

/* Discography Section */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-md);
}

.album {
    text-align: center;
}

.album-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.album-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: var(--font-md);
}

.album-year, .album-tracks {
    font-size: var(--font-sm);
    color: var(--text-secondary);
}

/* Hobbies Section */
.hobbies-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.hobby {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(255, 107, 157, 0.15);
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 107, 157, 0.2);
}

.hobby:hover {
    transform: translateX(5px);
    background: rgba(255, 107, 157, 0.25);
    border-color: rgba(255, 107, 157, 0.4);
}

.hobby i {
    color: var(--primary-color);
    font-size: var(--font-lg);
    width: 24px;
}

/* Quote Section */
.quote-section {
    text-align: center;
    background: var(--gradient-primary);
    color: white;
}

.quote-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.7;
}

.quote-text {
    font-size: var(--font-lg);
    font-style: italic;
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.quote-author {
    font-weight: 600;
    font-size: var(--font-md);
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-sm);
    color: var(--text-secondary);
    font-size: var(--font-sm);
}

.footer-text {
    margin-bottom: var(--spacing-xs);
}

.footer-note {
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-xs);
    opacity: 0.8;
}

.theme-toggle {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.4);
}

/* Responsive Design */
@media (min-width: 576px) {
    .container {
        padding: var(--spacing-md);
    }

    .header::before {
        height: 100%;
        border-radius: 0 0 35% 35%;
    }

    .avatar-container {
        width: 180px;
        height: 180px;
    }

    .name {
        font-size: 3rem;
    }

    .hobbies-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .album-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: var(--spacing-lg);
    }

    .stats {
        max-width: 80%;
        margin: 0 auto;
    }

    .timeline {
        padding-left: var(--spacing-xl);
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }

    .main-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    .about-section {
        grid-column: 1 / -1;
    }

    .quote-section {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Animation for skill bars on scroll */
@keyframes fillBar {
    from { width: 0; }
    to { width: attr(data-width); }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

/* Music Player Styles */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    z-index: 1000;
    width: 320px;
    max-width: calc(100vw - 40px);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.music-player:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.music-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.music-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-circle);
    background: var(--gradient-primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-lg);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

.music-info {
    flex: 1;
    min-width: 0;
}

.music-title {
    font-weight: 600;
    font-size: var(--font-sm);
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-status {
    font-size: var(--font-xs);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.volume-control i {
    color: var(--primary-color);
    font-size: var(--font-sm);
}

#volumeSlider {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-circle);
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--card-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#volumeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-circle);
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--card-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Responsive music player */
@media (max-width: 576px) {
    .music-player {
        width: 280px;
        bottom: 10px;
        right: 10px;
    }

    .music-controls {
        gap: var(--spacing-xs);
    }

    .volume-control {
        display: none; /* Hide volume control on very small screens */
    }
}

/* Animation for music player */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.music-playing .music-btn {
    animation: pulse 2s infinite;
}

/* Autoplay hint animation */
@keyframes border-glow {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 157, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 157, 0); }
}

.autoplay-hint {
    animation: border-glow 2s infinite;
    border: 2px solid var(--primary-color);
}

/* Remove hint when music starts */
.music-playing,
.music-player:active,
.music-player:focus {
    animation: none;
    border: none;
}