* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0e0e0e;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 50px;
    display: inline-block;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: #4da3ff;
    bottom: -10px;
    left: 0;
    border-radius: 2px;
}

.accent {
    color: #4da3ff;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(14, 14, 14, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 999;
}

.navbar .logo {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -1px;
}

.navbar ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: .3s;
}

.navbar a:hover {
    color: #fff;
}

.nav-btn {
    background: #4da3ff;
    color: #000 !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700 !important;
}

.nav-btn:hover {
    background: #7abaff;
}

.hero {
    min-height: 100vh;
    padding: 120px 10% 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.hero h1 {
    font-size: 64px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero p {
    opacity: .7;
    max-width: 450px;
    font-size: 18px;
    margin-bottom: 30px;
}

.socials {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: .3s;
    text-decoration: none;
}

.social-link:hover {
    background: #4da3ff;
    color: #000;
    border-color: #4da3ff;
    transform: translateY(-5px);
}

.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.orb-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1/1;
}

.orb {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #4da3ff, #0e0e0e 70%);
    filter: blur(60px);
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

.code-layer {
    position: absolute;
    inset: 0;
    padding: 0 30px; 
    
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(150, 180, 210, 0.6);
    background: radial-gradient(circle at center, rgba(14, 14, 14, .7), transparent 80%);
    
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    pointer-events: none;

    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.code-line {
    display: block;
    white-space: pre;
    min-height: 21px;
    color: #e2e8f0;
}

.code-line.active {
    text-shadow: 0 0 15px rgba(77, 163, 255, 0.3);
}

.syntax-keyword { color: #60a5fa !important; font-weight: 700; }
.syntax-type { color: #d8b4fe !important; }
.syntax-anno { color: #22d3ee !important; }
.syntax-string { color: #4ade80 !important; }
.syntax-method { color: #facc15 !important; }
.syntax-comment { color: #64748b !important; font-style: italic; }

.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background-color: #4da3ff;
    margin-left: 2px;
    vertical-align: sub;
    animation: cursorFade 1s step-end infinite;
}

@keyframes cursorFade {
    50% { opacity: 0; }
}

.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    font-size: 17px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.stats-grid {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.stat-item h3 {
    font-size: 42px;
    font-weight: 800;
    color: #4da3ff;
}

.stat-item span {
    font-size: 14px;
    opacity: 0.6;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: .3s;
}

.skill-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(77, 163, 255, 0.3);
    transform: translateY(-5px);
}

.skill-card i {
    font-size: 32px;
    margin-bottom: 10px;
    color: #fff;
}

.skill-card span {
    font-size: 13px;
    font-weight: 500;
    display: block;
}

#projects {
    background-color: #0e0e0e;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 30px;
    transition: .3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: #4da3ff;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.folder-icon { font-size: 36px; color: #4da3ff; }

.project-links a {
    color: #fff;
    font-size: 20px;
    margin-left: 15px;
    transition: .2s;
    opacity: 0.7;
}

.project-links a:hover { opacity: 1; color: #4da3ff; }

.project-card h3 { font-size: 22px; margin-bottom: 10px; }
.project-card p { font-size: 15px; opacity: 0.7; margin-bottom: 20px; flex-grow: 1; }

.project-tech {
    display: flex;
    gap: 15px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    opacity: 0.5;
    flex-wrap: wrap;
}

.contact-wrapper {
    display: flex;
    justify-content: center;
}

.contact-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    max-width: 800px;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.contact-card:hover {
    border-color: rgba(77, 163, 255, 0.3);
    transform: translateY(-5px);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(77, 163, 255, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.contact-icon {
    font-size: 40px;
    color: #4da3ff;
    margin-bottom: 25px;
    display: inline-block;
}

.contact-card h3 { font-size: 32px; font-weight: 700; margin-bottom: 15px; color: #fff; }
.contact-card p { font-size: 16px; color: #ccc; line-height: 1.6; max-width: 500px; margin: 0 auto 40px; }

.main-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #4da3ff;
    color: #000;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.main-contact-btn:hover {
    background: #7abaff;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(77, 163, 255, 0.4);
}

.main-contact-btn i { transition: transform 0.3s ease; }
.main-contact-btn:hover i { transform: translateX(5px); }

.contact-socials {
    margin-top: 40px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

.contact-socials a { color: #888; text-decoration: none; transition: color 0.3s; }
.contact-socials a:hover { color: #4da3ff; text-decoration: underline; }
.contact-socials .separator { color: #444; margin: 0 10px; }

.spotify-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 0 15px;
}

.spotify-card {
    width: 100%;
    max-width: 550px; 
    min-width: 320px;
    border-radius: 60px; 
    padding: 15px 25px;
    background: rgba(30, 30, 30, 0.95); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3); 
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    justify-content: flex-start;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 10;
    cursor: pointer;
}

.spotify-card:hover {
    border-color: #1db954; 
    transform: translateY(-5px);
    background: rgba(40, 40, 40, 0.95);
    box-shadow: 0 15px 50px -5px rgba(29, 185, 84, 0.25), inset 0 0 0 1px rgba(29, 185, 84, 0.4);
}

.spotify-img-box {
    position: relative;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.1);
}

.spotify-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: spin 10s linear infinite;
    animation-play-state: paused; 
}

.spotify-img-box.playing img { animation-play-state: running; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.spotify-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    text-align: center;
    flex-grow: 1; 
    width: 100%;
    padding: 0 10px;
}

.status-text {
    font-size: 11px;
    color: #1db954;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.song-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; 
    margin: 0 auto 5px auto;
}

.song-title:hover { color: #1db954; text-decoration: underline; }
.artist-name { font-size: 13px; color: #ccc; }

.spotify-icon {
    position: absolute;
    top: 20px;
    right: 25px; 
    left: auto;
    font-size: 24px;
    color: #1db954;
    opacity: 0.8;
    margin: 0;
}

.music-bars {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: .3s;
}

.spotify-img-box.playing .music-bars { opacity: 1; }

.bar {
    width: 4px;
    background: #1db954;
    border-radius: 2px;
    animation: dance 1s ease-in-out infinite;
}

.bar:nth-child(1) { height: 20%; animation-delay: 0s; }
.bar:nth-child(2) { height: 40%; animation-delay: 0.2s; }
.bar:nth-child(3) { height: 60%; animation-delay: 0.4s; }

@keyframes dance {
    0%, 100% { height: 10%; }
    50% { height: 80%; }
}

.spotify-progress-wrapper { width: 100%; margin-top: 10px; }
.time-labels { display: flex; justify-content: space-between; font-size: 11px; color: #ddd; margin-bottom: 5px; font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.progress-bar-bg { width: 100%; height: 5px; background: rgba(255, 255, 255, 0.15); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; width: 0%; background: #1db954; border-radius: 3px; transition: width 1s linear; box-shadow: 0 0 10px rgba(29, 185, 84, 0.4); }

.spotify-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: visibility 0s linear 0.5s;
}

.spotify-modal.active { visibility: visible; opacity: 1; transition: opacity 0.3s ease; }

.modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
}

.expanded-player {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: translateY(100px);
    opacity: 0;
}

.close-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: .3s;
}

.close-btn:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }

.expanded-img-box {
    width: 250px; height: 250px;
    margin: 0 auto 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.expanded-img-box img { width: 100%; height: 100%; object-fit: cover; }

.expanded-info h2 { font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.expanded-info p { font-size: 18px; color: #ccc; font-weight: 500; margin-bottom: 30px; }

.expanded-progress { margin-bottom: 30px; }
.big-bar { height: 8px; background: rgba(255,255,255,0.1); }

.spotify-btn {
    background: #1db954 !important;
    color: #fff !important;
    width: 100%;
    justify-content: center;
}

.spotify-btn:hover {
    background: #1ed760 !important;
    box-shadow: 0 0 30px rgba(29, 185, 84, 0.4) !important;
}

footer {
    padding: 50px 0;
    text-align: center;
    opacity: 0.5;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 50px;
}

@media (max-width: 900px) {
    .navbar { padding: 0 20px; }
    .navbar ul { display: none; }
    .navbar .logo { font-size: 20px; }
    .nav-btn { padding: 6px 15px; font-size: 13px; }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 100px;
        text-align: center;
        gap: 60px;
    }

    .hero h1 { font-size: 42px; }
    .hero p { margin: 20px auto 30px; font-size: 16px; }
    .socials { justify-content: center; }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .stats-grid { justify-content: center; }

    .contact-card { padding: 40px 20px; }
    .contact-card h3 { font-size: 24px; }
    .contact-card p { font-size: 14px; }

    .expanded-player {
        width: 90%;
        padding: 25px;
        border-radius: 24px;
    }

    .expanded-img-box {
        width: 160px;
        height: 160px;
        margin-bottom: 20px;
    }

    .expanded-info h2 {
        font-size: 20px;
    }

    .expanded-info p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .expanded-img-box {
        width: 130px;
        height: 130px;
    }
}