/* ==========================================
   Reset & Root Variables
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #1a1a2e;
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
}

/* ==========================================
   Base Styles
   ========================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==========================================
   Animated Background
   ========================================== */
.chess-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.03;
    pointer-events: none;
}

.chess-square {
    position: absolute;
    width: 80px;
    height: 80px;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.3; }
    50% { transform: translate(30px, 30px) rotate(180deg); opacity: 0.1; }
}

/* Music Notes Animation */
.music-notes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.note {
    position: absolute;
    font-size: 2rem;
    opacity: 0;
    animation: rise 8s infinite;
}

@keyframes rise {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    50% { opacity: 0.2; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ==========================================
   Container
   ========================================== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ==========================================
   Header
   ========================================== */
header {
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
}

.avatar-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 2rem;
    position: relative;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 20px var(--accent-purple)); }
    50% { filter: drop-shadow(0 0 40px var(--accent-blue)); }
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    border: 4px solid var(--bg-dark);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
}

.avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid var(--bg-dark);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
    display: block;
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

.tagline {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(168, 85, 247, 0.1);
    border: 2px solid var(--accent-purple);
    border-radius: 30px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-btn:hover {
    background: var(--accent-purple);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
}

/* ==========================================
   Sections
   ========================================== */
section {
    margin: 4rem 0;
    padding: 2rem;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    transition: all 0.3s;
}

section:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.2);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon {
    font-size: 2rem;
}

/* ==========================================
   Skills Section
   ========================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-card {
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s;
    cursor: pointer;
}

.skill-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.skill-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--accent-blue);
}

.skill-items {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==========================================
   Projects Section
   ========================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 20px;
    border: 2px solid transparent;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-pink);
    box-shadow: 0 15px 40px rgba(236, 72, 153, 0.3);
}

.project-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--accent-pink);
}

/* ==========================================
   Interests Section
   ========================================== */
.interests-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.interest-item {
    padding: 1.5rem 2rem;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 20px;
    border: 2px solid var(--accent-purple);
    font-size: 1.2rem;
    transition: all 0.3s;
    cursor: pointer;
}

.interest-item:hover {
    background: var(--accent-purple);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.5);
}

/* ==========================================
   Chess Knight Animation
   ========================================== */
.chess-knight {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 3rem;
    animation: knight-move 4s infinite;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s;
}

.chess-knight:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 20px var(--accent-purple));
}

@keyframes knight-move {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(20px, -20px); }
    50% { transform: translate(40px, 0); }
    75% { transform: translate(20px, 20px); }
}

/* ==========================================
   Footer
   ========================================== */
footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.made-with {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
}

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

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .tagline { font-size: 1.1rem; }
    .skills-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 1rem;
    }
    header {
        padding: 2rem 1rem;
    }
}