/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Unbounded:wght@400;500;600;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --bg-primary: #0a0a12;
    --bg-secondary: #12121f;
    --bg-card: rgba(30, 30, 50, 0.6);
    --bg-card-hover: rgba(40, 40, 65, 0.8);
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;
    --accent: #7c3aed;
    --accent-light: #a855f7;
    --accent-glow: rgba(124, 58, 237, 0.3);
    --accent-glow-strong: rgba(124, 58, 237, 0.6);
    --gradient-main: linear-gradient(135deg, #7c3aed, #a855f7, #c084fc);
    --gradient-bg: linear-gradient(180deg, #0a0a12 0%, #14142a 50%, #0a0a12 100%);
    --border-color: rgba(124, 58, 237, 0.15);
    --border-color-hover: rgba(124, 58, 237, 0.4);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.15);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-secondary);
}

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== BACKGROUND EFFECTS ===== */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-glow::before,
.bg-glow::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.bg-glow::before {
    width: 700px;
    height: 700px;
    background: var(--accent);
    top: -200px;
    right: -100px;
    animation: floatGlow1 20s ease-in-out infinite;
}

.bg-glow::after {
    width: 600px;
    height: 600px;
    background: var(--accent-light);
    bottom: -150px;
    left: -100px;
    animation: floatGlow2 25s ease-in-out infinite;
}

@keyframes floatGlow1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.15;
    }

    25% {
        transform: translate(-80px, 60px) scale(1.2);
        opacity: 0.22;
    }

    50% {
        transform: translate(50px, -40px) scale(0.9);
        opacity: 0.12;
    }

    75% {
        transform: translate(-30px, -80px) scale(1.1);
        opacity: 0.20;
    }
}

@keyframes floatGlow2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.15;
    }

    25% {
        transform: translate(70px, -50px) scale(1.15);
        opacity: 0.20;
    }

    50% {
        transform: translate(-60px, 80px) scale(0.95);
        opacity: 0.10;
    }

    75% {
        transform: translate(40px, 30px) scale(1.1);
        opacity: 0.18;
    }
}

/* ===== SNOWFLAKES ===== */
#snowflakes-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ===== HERO / BANNER ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(10, 10, 18, 0.3) 0%,
            rgba(10, 10, 18, 0.6) 50%,
            var(--bg-primary) 100%);
}

#particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--accent);
    box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(124, 58, 237, 0.1);
    overflow: hidden;
    animation: avatarPulse 4s ease-in-out infinite;
    transition: var(--transition);
}

.hero-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 60px var(--accent-glow-strong);
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes avatarPulse {

    0%,
    100% {
        box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(124, 58, 237, 0.1);
    }

    50% {
        box-shadow: 0 0 60px var(--accent-glow-strong), 0 0 100px rgba(124, 58, 237, 0.2);
    }
}

.hero-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 30%, #a855f7 60%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    animation: fadeInUp 0.8s ease-out;
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.3));
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle span {
    color: var(--accent-light);
    font-weight: 500;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-scroll .arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    animation: bounceDown 2s infinite;
}

@keyframes bounceDown {

    0%,
    100% {
        transform: rotate(45deg) translate(0, 0);
        opacity: 1;
    }

    50% {
        transform: rotate(45deg) translate(5px, 5px);
        opacity: 0.5;
    }
}

/* ===== SECTIONS ===== */
.section {
    position: relative;
    z-index: 1;
    padding: 5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gradient-main);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* ===== ABOUT ===== */
.about-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-card:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow), var(--shadow-glow);
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.9;
}

.about-text strong {
    color: var(--accent-light);
    font-weight: 600;
}

/* ===== PROJECTS ===== */
.project-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.project-card:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow), var(--shadow-glow);
    transform: translateY(-4px);
}

.project-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-main);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 30px var(--accent-glow);
}

.project-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.2rem;
    justify-content: center;
}

.project-tag {
    padding: 0.3rem 0.9rem;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-light);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    gap: 1.2rem;
}

.skill-item {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.3rem 1.8rem;
    transition: var(--transition);
}

.skill-item:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-glow);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
}

.skill-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.skill-percent {
    color: var(--accent-light);
    font-weight: 700;
    font-size: 0.9rem;
}

.skill-bar {
    height: 6px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 3px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ===== MUSIC PLAYER ===== */
.music-section {
    padding: 3rem 2rem 5rem;
    max-width: 900px;
    margin: 0 auto;
}

.music-player {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.music-player:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow), var(--shadow-glow);
}

.music-info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.music-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-main);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 0 20px var(--accent-glow);
}

.music-details {
    flex: 1;
    min-width: 0;
}

.music-title {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-artist {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.music-progress {
    margin-bottom: 1rem;
}

.music-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.music-progress-fill {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.music-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.music-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.music-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-btn:hover {
    color: var(--accent-light);
    transform: scale(1.1);
}

.music-btn-play {
    width: 50px;
    height: 50px;
    background: var(--gradient-main);
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 0 25px var(--accent-glow);
}

.music-btn-play:hover {
    color: white;
    transform: scale(1.15);
    box-shadow: 0 0 40px var(--accent-glow-strong);
}

.music-volume {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    justify-content: center;
}

.music-volume-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.music-volume-icon:hover {
    color: var(--accent-light);
}

.music-volume-bar {
    width: 100px;
    height: 4px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.music-volume-fill {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 2px;
    width: 80%;
}

/* ===== CONTACT ===== */
.contact-section {
    padding: 3rem 2rem 6rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--gradient-main);
    border: none;
    border-radius: 50px;
    color: white;
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 30px var(--accent-glow);
    text-decoration: none;
}

.contact-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 50px var(--accent-glow-strong);
}

.contact-btn svg {
    width: 24px;
    height: 24px;
}

.contact-hint {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
}

.footer span {
    color: var(--accent-light);
    font-weight: 500;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero {
        padding: 1.5rem;
    }

    .hero-avatar {
        width: 120px;
        height: 120px;
    }

    .section {
        padding: 3.5rem 1.5rem;
    }

    .about-card,
    .project-card {
        padding: 1.8rem;
    }

    .music-player {
        padding: 1.5rem;
    }

    .music-controls {
        gap: 1rem;
    }

    .music-btn-play {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-avatar {
        width: 100px;
        height: 100px;
    }

    .about-card,
    .project-card {
        padding: 1.4rem;
    }

    .skill-item {
        padding: 1rem 1.2rem;
    }

    .music-player {
        padding: 1.2rem;
    }

    .contact-btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
}


/* ===== 3D TILT CARDS ===== */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-card .tilt-inner {
    transition: transform 0.1s ease-out;
}

/* ===== CLICK RIPPLE ===== */
.click-ripple {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%) scale(0);
    animation: rippleExpand 0.6s ease-out forwards;
}

@keyframes rippleExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* ===== ANIMATED GRADIENT TITLE ===== */
.hero-title {
    background-size: 200% 200%;
    animation: fadeInUp 0.8s ease-out, gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ===== TYPING CURSOR ===== */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--accent-light);
    margin-left: 3px;
    animation: blink 0.8s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ===== EASTER EGG TOAST ===== */
.easter-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 1rem 2rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    z-index: 10000;
    box-shadow: 0 0 40px var(--accent-glow-strong);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    white-space: nowrap;
}

.easter-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.easter-toast .toast-emoji {
    font-size: 1.3rem;
    margin-right: 0.5rem;
}

/* ===== STATUS BADGE ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #4ade80;
    margin-top: 1.2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
    }
}

/* ===== VISITOR COUNTER (fake) ===== */
.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.visitor-counter .eye-icon {
    font-size: 0.9rem;
}

/* ===== GLITCH EFFECT ON TITLE ===== */
.hero-title {
    position: relative;
    cursor: default;
}

.hero-title.glitch {
    animation: fadeInUp 0.8s ease-out, gradientShift 4s ease-in-out infinite, glitchShake 0.3s linear;
}

.hero-title.glitch::before,
.hero-title.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: 'Unbounded', sans-serif;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.hero-title.glitch::before {
    background: linear-gradient(135deg, #ff00ff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    animation: glitchTop 0.3s linear;
}

.hero-title.glitch::after {
    background: linear-gradient(135deg, #00ffff 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    animation: glitchBottom 0.3s linear;
}

@keyframes glitchShake {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-3px, 2px);
    }

    40% {
        transform: translate(3px, -2px);
    }

    60% {
        transform: translate(-2px, -1px);
    }

    80% {
        transform: translate(2px, 1px);
    }

    100% {
        transform: translate(0);
    }
}

@keyframes glitchTop {
    0% {
        transform: translate(0);
    }

    25% {
        transform: translate(5px, 0);
    }

    50% {
        transform: translate(-3px, 0);
    }

    75% {
        transform: translate(4px, 0);
    }

    100% {
        transform: translate(0);
    }
}

@keyframes glitchBottom {
    0% {
        transform: translate(0);
    }

    25% {
        transform: translate(-4px, 0);
    }

    50% {
        transform: translate(3px, 0);
    }

    75% {
        transform: translate(-5px, 0);
    }

    100% {
        transform: translate(0);
    }
}

/* ===== AVATAR SPIN ===== */
.hero-avatar.spin {
    animation: avatarSpin 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes avatarSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.15);
        filter: hue-rotate(90deg);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* ===== MAGNETIC BUTTON ===== */
.contact-btn {
    position: relative;
    transition: transform 0.2s ease-out, box-shadow 0.3s ease;
}

/* ===== TIME GREETING ===== */
.time-greeting {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.6rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
    letter-spacing: 1px;
}

.time-greeting .greeting-emoji {
    font-size: 1rem;
    margin-right: 0.3rem;
}

/* ===== LOADING SCREEN ===== */
.loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a12;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: 'Unbounded', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 30%, #a855f7 60%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
    animation: loaderFill 1.8s ease-in-out forwards;
}

@keyframes loaderFill {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), #c084fc);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

/* ===== MOUSE TRAIL ===== */
#mouse-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* ===== SKILL TOOLTIPS ===== */
.skill-item {
    position: relative;
}

.skill-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: rgba(15, 15, 30, 0.95);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.skill-item:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== SIDE NAVIGATION DOTS ===== */
.side-nav {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.side-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.2);
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.side-dot:hover {
    background: rgba(168, 85, 247, 0.5);
    transform: scale(1.3);
}

.side-dot.active {
    background: var(--accent-light);
    border-color: var(--accent-light);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .side-nav {
        display: none;
    }
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.3);
    backdrop-filter: blur(10px);
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    transform: translateY(-3px);
}

/* ===== SKILL COUNTER ANIMATION ===== */
.skill-percent {
    transition: all 0.3s ease;
}

/* ===== FILM GRAIN OVERLAY ===== */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9990;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    animation: grainShift 0.5s steps(3) infinite;
}

@keyframes grainShift {
    0% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(-2px, 1px);
    }

    66% {
        transform: translate(1px, -1px);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* ===== FLIP CARD ===== */
.flip-card {
    perspective: 1000px;
    cursor: pointer;
    max-width: 600px;
    margin: 0 auto;
}

.flip-inner {
    position: relative;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    backface-visibility: hidden;
}

.flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: rotateY(180deg);
}

.flip-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
    opacity: 0.6;
}

.flip-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.flip-stat {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease, background 0.2s ease;
}

.flip-stat:hover {
    transform: scale(1.05);
    background: rgba(124, 58, 237, 0.15);
}




/* ===== CUSTOM CONTEXT MENU ===== */
.context-menu {
    position: fixed;
    z-index: 100000;
    width: 200px;
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 0.5rem 0;
    transform-origin: top left;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.context-menu.visible {
    transform: scale(1);
    opacity: 1;
}

.context-menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.context-menu-item {
    padding: 0.8rem 1.2rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: rgba(124, 58, 237, 0.2);
}

.context-menu-item.disabled {
    color: var(--text-muted);
    cursor: default;
    pointer-events: none;
    font-size: 0.8rem;
    justify-content: center;
    opacity: 0.6;
}

.context-icon {
    font-size: 1.1rem;
}


/* ===== 3D TILT EFFECT ===== */
.tilt-element {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.tilt-element:hover {
    transform: perspective(1000px) rotateX(var(--rotateX)) rotateY(var(--rotateY));
}

/* ===== MAGNETIC BUTTONS ===== */
.magnetic-btn {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ===== SPOTLIGHT EFFECT ===== */
.skill-item,
.project-card {
    position: relative;
    /* overflow: hidden; - Removed to show tooltips */
}

.skill-item::before,
.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
            rgba(139, 92, 246, 0.15),
            transparent 40%);
    border-radius: inherit;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

.skill-item:hover::before,
.project-card:hover::before {
    opacity: 1;
}

.skill-item>*,
.project-card>* {
    position: relative;
    z-index: 2;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    background: var(--bg-dark);
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-glow);
}

/* ===== FOCUS MODE ===== */
body.focus-mode {
    --bg-dark: #050505;
    --text-muted: #666;
}

body.focus-mode .hero-bg,
body.focus-mode canvas {
    opacity: 0.1;
    filter: blur(2px) grayscale(100%);
    transition: all 0.5s ease;
}

body.focus-mode .side-nav,
body.focus-mode .grain-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

/* Focus Mode Button */
.focus-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--accent-light);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.focus-btn:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.focus-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow-strong);
}

/* ===== TOOLTIP ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

/* ===== CINEMATIC PRELOADER ===== */
.loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.8s cubic-bezier(0.6, -0.28, 0.735, 0.045), visibility 0.8s;
}

.loader-screen.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    width: 300px;
}

.loader-logo {
    font-family: 'Unbounded', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: white;
    letter-spacing: 2px;
    opacity: 0;
    animation: loaderLogoIn 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) forwards;
    text-shadow: 0 0 20px var(--accent-glow);
}

.loader-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.5s forwards;
}

.loader-bar-fill {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    width: 0%;
    transition: width 0.2s linear;
}

@keyframes loaderLogoIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

/* Ensure flip card works in grid */
.flip-card {
    height: 450px;
    /* Fixed height for consistency */
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flip-inner {
    width: 100%;
    height: 100%;
}

.flip-front,
.flip-back {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ===== TERMINAL SECTION ===== */
.terminal-window {
    background: #0f172a;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(74, 222, 128, 0.1);
    border: 1px solid #334155;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.terminal-header {
    background: #1e293b;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #334155;
}

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn.red {
    background: #ef4444;
}

.terminal-btn.yellow {
    background: #f59e0b;
}

.terminal-btn.green {
    background: #22c55e;
}

.terminal-body {
    padding: 20px;
    color: #4ade80;
    font-size: 0.95rem;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
}

.terminal-line {
    margin-bottom: 8px;
    line-height: 1.5;
}

.terminal-prompt {
    color: #a78bfa;
    margin-right: 8px;
    font-weight: bold;
}

.cmd-highlight {
    background: rgba(74, 222, 128, 0.15);
    padding: 0 4px;
    border-radius: 4px;
    color: #fff;
}

.terminal-input-line {
    display: flex;
    align-items: center;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: inherit;
    flex: 1;
    outline: none;
    caret-color: #4ade80;
}

/* ===== SETTINGS BUTTON & MODAL ===== */
.settings-btn {
    position: fixed;
    top: 2rem;
    right: 5.5rem;
    /* Left of focus button */
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--text-muted);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: var(--bg-secondary);
    color: var(--accent);
    transform: rotate(90deg);
    border-color: var(--accent);
}

.settings-modal {
    position: fixed;
    top: 6rem;
    right: 2rem;
    width: 250px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-modal.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.close-settings {
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: var(--text-muted);
}

.close-settings:hover {
    color: var(--text-primary);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ===== PLAYLIST ===== */
.playlist {
    max-height: 0;
    overflow-y: auto;
    margin-top: 1rem;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    padding: 0;
}

.playlist.open {
    max-height: 200px;
    padding: 0.5rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
}

.playlist-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.playlist-item:last-child {
    border-bottom: none;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.playlist-item.active {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-light);
    font-weight: 500;
}

.playlist-item.active::before {
    content: '▶';
    font-size: 0.7rem;
    margin-right: -10px;
    animation: blink 2s infinite;
}

/* Custom Scrollbar for playlist */
.playlist::-webkit-scrollbar {
    width: 6px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.playlist::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.playlist::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== SETTINGS CONTROLS ===== */
.setting-group {
    margin-bottom: 1rem;
}

.setting-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.setting-buttons {
    display: flex;
    gap: 0.5rem;
}

.setting-btn {
    flex: 1;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.setting-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.setting-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.theme-buttons {
    display: flex;
    gap: 0.8rem;
}

.theme-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btn:hover {
    transform: scale(1.1);
}

.theme-btn.active {
    border-color: white;
    box-shadow: 0 0 15px currentColor;
    transform: scale(1.15);
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {

    /* General Layout */
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* Terminal on Mobile */
    .terminal-window {
        max-width: 100%;
        margin: 0 10px;
        border-radius: 8px;
    }

    .terminal-body {
        padding: 15px;
        min-height: 250px;
        font-size: 0.85rem;
    }

    /* Settings & Focus Buttons */
    .settings-btn {
        top: 1.5rem;
        right: 4.5rem;
        width: 40px;
        height: 40px;
    }

    .focus-btn {
        top: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
    }

    /* Settings Modal */
    .settings-modal {
        top: 5rem;
        right: 1.5rem;
        left: 1.5rem;
        width: auto;
    }

    /* Hide Side Nav Labels on Mobile (keep dots) */
    .side-nav {
        right: 1rem;
    }

    .side-dot {
        width: 10px;
        height: 10px;
        margin: 10px 0;
    }

    .side-dot::before {
        display: none;
        /* Hide hover text on mobile */
    }

    /* Project Cards */
    .projects-grid {
        grid-template-columns: 1fr;
        /* Single column on phone */
        padding: 0 10px;
    }

    .flip-card {
        height: 400px;
    }

    /* Skills Grid */
    .skills-grid {
        grid-template-columns: 1fr;
    }
}