/* Ultra Dark Theme */
:root {
    --primary-color: #79c0ff; /* brighter for contrast */
    --primary-dark: #1f6feb;
    --accent-color: #7c3aed;
    --text-primary: #f0f6fc;
    --text-secondary: #c9d1d9; /* brighter secondary text */
    --text-muted: #9aa4af; /* improved readability */
    --bg-primary: #000000;
    --bg-secondary: #121212; /* lighter than bg-primary for separation */
    --bg-tertiary: #1f1f1f; /* clearer step from secondary */
    --border-color: #3a3a3a; /* higher contrast borders */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.6), 0 2px 4px -2px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.7), 0 4px 6px -4px rgb(0 0 0 / 0.7);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Base Styles */
html {
    padding: 0;
    margin: 0;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 0;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* Hero Content */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    gap: 4rem;
    position: relative;
    z-index: 1; /* ensure above decorative overlays */
}

.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
}

.hero-image {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-placeholder {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

.profile-photo {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
    border: 4px solid var(--primary-color);
}

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

/* Typography */
h1 {
    color: var(--text-primary);
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 500;
    margin: 0 0 1.5rem 0;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 2rem 0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid;
    border-image-source: linear-gradient(135deg, #ff9cf3, #86e1f9, #a18cd1);
    border-image-slice: 1;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff9cf3, #86e1f9, #a18cd1);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    left: 0;
}

.btn-secondary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 156, 243, 0.3);
}

h2 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 600;
    margin: 2rem 0 1.5rem 0;
}

h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 1rem 0;
}

/* Hero Section */
#hero {
    height: 100vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Aurora background and subtle musical overlay */
#hero::before {
    content: '';
    position: absolute;
    inset: -20% -10% -10% -10%;
    background:
        radial-gradient(1200px 600px at 10% 10%, rgba(124, 58, 237, 0.25), transparent 60%),
        radial-gradient(900px 500px at 80% 20%, rgba(121, 192, 255, 0.25), transparent 60%),
        radial-gradient(1000px 600px at 20% 90%, rgba(255, 156, 243, 0.22), transparent 60%);
    filter: blur(32px);
    animation: auroraMove 18s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

#hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%2386e1f9' stroke-opacity='0.18' stroke-width='2'%3E%3Cpath d='M28 14v24c0 4-3 7-7 7s-7-3-7-7 3-7 7-7c2 0 4 .8 5.4 2.1V14l20-6v20c0 4-3 7-7 7s-7-3-7-7 3-7 7-7c2 0 4 .8 5.4 2.1'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 160px 160px;
    background-repeat: repeat;
    opacity: 0.08;
    animation: notesDrift 40s linear infinite;
    z-index: 0;
    pointer-events: none; /* do not block clicks */
}

@keyframes auroraMove {
    0% { transform: translateY(0) translateX(0) scale(1); }
    50% { transform: translateY(-4%) translateX(2%) scale(1.02); }
    100% { transform: translateY(2%) translateX(-2%) scale(1.03); }
}

@keyframes notesDrift {
    0% { background-position: 0 0; }
    100% { background-position: 800px 400px; }
}


/* Sections */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-bottom: 2rem;
}


/* Project Section */
#project-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 1000px;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    height: 220px;
    margin: 0 auto;
    cursor: pointer;
    justify-content: center;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--primary-color) inset;
    border-color: var(--primary-color);
}

.project-card:hover::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(400px 120px at 50% 0%, rgba(121, 192, 255, 0.25), transparent 60%),
                radial-gradient(300px 120px at 20% 20%, rgba(124, 58, 237, 0.2), transparent 60%);
    opacity: 0.9;
}

.project-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    z-index: 2;
    position: relative;
    flex-shrink: 0;
}

.project-card .project-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
    z-index: 2;
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
}

.project-card .hover-hint {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.8;
    z-index: 2;
    position: relative;
}

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.project-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.modal-title {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1rem;
}

.modal-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Music Section - PRESERVING THE GRADIENT BORDER */
#music-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
    margin: 2rem auto;
    border-radius: 16px;
    border: 4px solid;
    border-image-source: linear-gradient(135deg, #ff9cf3, #86e1f9, #a18cd1);
    border-image-slice: 1;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

#music-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 156, 243, 0.02), rgba(134, 225, 249, 0.02), rgba(161, 140, 209, 0.02));
    pointer-events: none;
}

/* Music Box Title with Gradient Animation */
#music-section h2 {
    margin: 0 0 1rem 0;
    text-align: center;
    background: linear-gradient(270deg, #ff9cf3, #86e1f9, #a18cd1);
    background-size: 600% 600%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite;
    font-size: 2.5rem;
    font-weight: 700;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Music Buttons */
.music-button {
    padding: 12px 24px;
    font-size: 16px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: white;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.music-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-color));
}

.music-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Audio Player */
#audioPlayer {
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
    border-radius: var(--radius-md);
    background: transparent;
    display: block;
    border: none;
    box-shadow: none;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Lists */
ul {
    color: var(--text-secondary);
}

li {
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .profile-placeholder {
        width: 250px;
        height: 250px;
        font-size: 1.1rem;
    }
    
    .profile-photo {
        width: 250px;
        height: 250px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    
    section {
        padding: 0 1rem;
    }
    
    
    #project-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .music-button {
        min-width: 120px;
        padding: 10px 16px;
        font-size: 14px;
    }
}