/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; }
ul { list-style: none; }

/* Tag components */
.tag {
    padding: 4px 10px;
    font-size: 12px;
    color: rgba(148, 163, 184, 0.8);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    transition: all 0.2s;
}

.skill-card:hover .tag {
    border-color: rgba(59, 130, 246, 0.15);
    color: rgba(148, 163, 184, 1);
}

.tag-sm {
    padding: 3px 8px;
    font-size: 11px;
    color: rgba(148, 163, 184, 0.6);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

/* Header states */
#header {
    background: transparent;
    transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

#header.scrolled {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger */
.animate-on-scroll:nth-child(2) { transition-delay: 0.05s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.15s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.25s; }

/* Mobile menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 300px;
    display: block;
}

/* Selection */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

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

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
    section {
        padding-top: 64px;
        padding-bottom: 64px;
    }
}