/* =====================================================
   PORTFOLIO - STYLES
   Sergio Calderon | teralink.tech
   Version: 1.0
   ===================================================== */

/* === BASE & RESET === */
* {
    border-color: #27272a;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: #09090b;
}

::-webkit-scrollbar-thumb {
    background-color: #27272a;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #3f3f46;
}

/* === TYPOGRAPHY === */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-balance {
    text-wrap: balance;
}

/* === NAVBAR === */
.navbar-blur {
    backdrop-filter: blur(12px);
    background-color: rgba(9, 9, 11, 0.9);
}

.navbar-scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    transition: width 0.3s ease;
}

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

/* === CARDS & COMPONENTS === */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* === GLASSMORPHISM === */
.glass-card {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(96, 165, 250, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    background: rgba(9, 9, 11, 0.95);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow:
        0 8px 32px rgba(96, 165, 250, 0.15),
        0 0 0 1px rgba(96, 165, 250, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* === GLOW EFFECTS === */
.glow-hover {
    position: relative;
    transition: all 0.4s ease;
}

.glow-hover::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6, #60a5fa);
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    filter: blur(15px);
}

.glow-hover:hover::before {
    opacity: 0.4;
}

.glow-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(96, 165, 250, 0.2),
        0 0 30px rgba(96, 165, 250, 0.1);
}

.logo-glow {
    animation: glowPulse 3s ease-in-out infinite;
}

/* === SKILL TAGS === */
.skill-tag {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.skill-tag:hover::before {
    opacity: 1;
}

.skill-tag:hover {
    transform: scale(1.08) translateY(-2px);
    color: white;
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

/* === TILT EFFECT === */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
}

.tilt-card .tilt-content {
    transform: translateZ(30px);
}

/* === PROGRESS BARS === */
.progress-bar-animated {
    width: 0%;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-animated.animate {
    /* Width set by data attribute */
}

.progress-bar-glow {
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

/* === TIMELINE === */
.timeline-line {
    height: 0;
    transition: height 1s ease-out;
}

.timeline-line.animate {
    height: 100%;
}

.timeline-card {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease-out;
}

.timeline-card.animate {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot.animate {
    animation: dotPulse 2s ease-out;
}

/* === CONTACT ICONS === */
.contact-icon {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.contact-icon:hover {
    transform: translateY(-5px) scale(1.1);
}

/* === HERO === */
.text-reveal {
    animation: textReveal 1s ease-out forwards;
    animation-delay: 0.3s;
    clip-path: inset(0 100% 0 0);
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(96, 165, 250, 0.3);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.animate-blink {
    animation: blink 1s infinite;
    color: #60a5fa;
}

@keyframes glowPulse {
    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(96, 165, 250, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.8));
    }
}

@keyframes dotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(96, 165, 250, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
    }
}

@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* === ACCESSIBILITY === */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 3px;
    border-radius: 4px;
}

/* === MEDIA QUERIES === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
