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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background: #0a0a0a;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Background Animation */
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, #667eea10 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, #764ba210 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, #f093fb10 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Floating Particles */
.particle {
    position: absolute;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    pointer-events: none;
    opacity: 1;
    animation: float 20s infinite linear;
    will-change: transform, opacity;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Particles Container */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Glass Morphism */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card Hover Effects */
.project-card {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Navigation Animation */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Smooth Tab Underline Animation */
.tab-links {
    position: relative;
}
.tab-links::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 2px;
    width: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 300ms ease;
}
.tab-links.active::after {
    width: 100%;
}

/* Tab content transition */
.tab-content {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 300ms ease, transform 300ms ease;
}
.tab-content.show {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure hidden class works with transitions */
.tab-content.hidden {
    display: none;
}

/* Form status fade out animation */
.form-status-fade-out {
    transition: opacity 500ms ease-in-out;
    opacity: 0;
}

/* Typing Animation */
.typing-animation {
    border-right: 3px solid #667eea;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: #667eea; }
    51%, 100% { border-color: transparent; }
}

/* Skill Bar Animation */
.skill-bar {
    transform-origin: left;
    animation: growBar 1.5s ease-out forwards;
}

@keyframes growBar {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Hero Background - Desktop */
#home {
    background-image: url('https://serbanalin.eu/images/background.png');
    background-size: cover;
    background-position: center;
}

/* Hero Background - Mobile/Tablet */
@media only screen and (max-width: 768px) {
    #home {
        background-image: url('https://serbanalin.eu/images/bg-small.png');
    }
}