/* --- FOUNDATIONS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background: #050505;
    color: white;
    overflow-x: hidden;
}

/* --- BACKGROUND SYSTEM (Locked to screen) --- */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #0a1114 0%, #000 100%);
    perspective: 1000px;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #1a434d66 0%, #1c98b169 100%);
    filter: blur(100px);
    border-radius: 50%;
    animation: move 15s infinite alternate ease-in-out;
}

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 80px) scale(1.1); }
    100% { transform: translate(-20px, 40px) scale(0.9); }
}

/* --- GALAXY & STAR SYSTEM --- */
.galaxy-rotation-wrapper {
    position: absolute;
    width: 200vw;
    height: 200vh;
    top: -50vh;
    left: -50vw;
    animation: galaxySpin 60s linear infinite;
}

#starfield {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 10px white;
    animation: moveForward linear infinite;
}

@keyframes moveForward {
    0% { transform: translateZ(-1500px) scale(0); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateZ(1000px) scale(2); opacity: 0; }
}

@keyframes galaxySpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- UI NAVIGATION & SIDEBAR --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    pointer-events: none;
}

header * {
    pointer-events: auto;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.fixed-sidebar {
    position: fixed;
    bottom: 160px;
    left: 40px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 1.5rem;
    /* Independent hover transition */
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
}

.sidebar-line {
    width: 1px;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
}

/* --- PROJECT CARDS --- */
.project-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Transition specifically for hover properties */
    transition: transform 0.2s ease-out, background 0.2s ease-out, border-color 0.2s ease-out !important;
}

.tag {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    color: #9ca3af;
}

/* --- SKILLS SECTION --- */
#skills {
    background-color: rgba(10, 10, 10, 0.3);
    backdrop-filter: blur(2px);
    position: relative;
    z-index: 1;
}

.skill-card-dark {
    transition: transform 0.2s ease-out, background 0.2s ease-out, border-color 0.2s ease-out !important;
}

.skill-bar-dark {
    width: 100%;
    height: 6px;
    background: #1f2937;
    border-radius: 20px;
    overflow: hidden;
}

.skill-progress-gradient {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(to right, #2dd4bf 0%, #06b6d4 50%, #055fa8 100%);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
    /* Slower bar filling animation */
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.2, 1);
}

/* --- THE REVEAL SYSTEM (Entrance Animation) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    /* Limit transition to only transform/opacity to avoid lagging hover effects */
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none; /* Avoid hovering items before they appear */
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* --- THE MASTER HOVER FIX --- */
/* This kills the entrance delay and speeds up interaction the moment the mouse enters */
.project-card:hover, 
.skill-card-dark:hover,
.social-icon:hover {
    transition-delay: 0ms !important;
    transform: translateY(-8px) scale(1.02) !important;
    border-color: rgba(6, 182, 212, 0.5) !important;
    background: rgba(6, 182, 212, 0.05) !important;
    color: #06b6d4;
    z-index: 10;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 10px;
    border: 2px solid #050505;
}
::-webkit-scrollbar-thumb:hover { background: #06b6d4; }


/* Add this to the end of style.css */
.project-card div {
    transition: background-color 0.2s ease;
}