@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --text-primary: #000000;
    --text-secondary: #666666;
    --border-color: #e5e5e5;
    --card-bg: #ffffff;
    --gradient-dark: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    --gradient-light: linear-gradient(135deg, #f5f5f5 0%, #ffffff 50%, #f5f5f5 100%);
    --accent-color: #000000;
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #2a2a2a;
    --card-bg: #1a1a1a;
    --gradient-dark: linear-gradient(135deg, #ffffff 0%, #e5e5e5 50%, #ffffff 100%);
    --gradient-light: linear-gradient(135deg, #1a1a1a 0%, #121212 50%, #1a1a1a 100%);
    --accent-color: #ffffff;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Modern Font Classes */
.font-display {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Animated Gradient Background */
.gradient-bg {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated Text Gradient */
.gradient-text {
    background: linear-gradient(90deg, #000000 0%, #666666 50%, #000000 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

/* Glowing Effect */
.glow-text {
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Card with Gradient Border on Hover */
.card-hover {
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e5e5;
}

.card-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #000000, #666666, #000000);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s;
}

.card-hover:hover::before {
    opacity: 1;
}

.card-hover:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

/* Section Title with Animated Gradient Underline */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #000000, #666666, #000000);
    background-size: 200% 100%;
    animation: underlineGlow 3s ease-in-out infinite;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-title.in-view::after {
    width: 120px;
}

@keyframes underlineGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Fade In Up with Blur */
@keyframes fadeInUpBlur {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.fade-in-up {
    animation: fadeInUpBlur 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

/* Staggered Animation Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Slide In from Left with Blur */
@keyframes slideInLeftBlur {
    from {
        opacity: 0;
        transform: translateX(-60px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

.slide-in-left {
    animation: slideInLeftBlur 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

/* Slide In from Right with Blur */
@keyframes slideInRightBlur {
    from {
        opacity: 0;
        transform: translateX(60px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

.slide-in-right {
    animation: slideInRightBlur 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

/* Scale In with Gradient Pulse */
@keyframes scaleInPulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleInPulse 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

/* Navigation Link with Gradient Underline */
.nav-link {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #000000, #666666);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Skill Badge with Morphing Effect */
.skill-badge {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e5e5;
    background: #ffffff;
    color: #000000;
    overflow: hidden;
}

.skill-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #000000, #333333);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-badge:hover::before {
    transform: translateX(0);
}

.skill-badge:hover {
    transform: translateY(-4px) scale(1.05);
    color: #ffffff;
    border-color: #000000;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.skill-badge span {
    position: relative;
    z-index: 1;
}

/* Button with Animated Gradient */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #000000, #1a1a1a);
    background-size: 200% 200%;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a1a, #333333);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Icon Rotate with Gradient Spin */
.icon-rotate {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.icon-rotate:hover {
    transform: rotate(360deg) scale(1.1);
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.3));
}

/* Stats Counter with Counting Animation */
.stat-number {
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #000000, #666666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulsing Dot */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.pulse-dot {
    animation: pulse 2s ease-in-out infinite;
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

.text-reveal {
    animation: textReveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Gradient Text Hover Effect */
.gradient-hover {
    transition: all 0.3s ease;
    background: linear-gradient(90deg, #000000, #000000);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-hover:hover {
    background: linear-gradient(90deg, #000000, #666666, #000000);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

/* Backdrop Blur Effect */
.blur-backdrop {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Smooth Fade In */
.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Border Gradient Animation */
@keyframes borderRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.border-gradient-animated {
    position: relative;
}

.border-gradient-animated::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #000000, #666666, #000000, #666666);
    background-size: 400% 400%;
    border-radius: inherit;
    animation: borderRotate 6s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.border-gradient-animated:hover::before {
    opacity: 1;
}


/* ============================================
   PARTICLE SYSTEM STYLES
   ============================================ */

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Reduce particle visibility on mobile for performance */
@media (max-width: 768px) {
    #particle-canvas {
        opacity: 0.5;
    }
}

/* Ensure hero content stays above particles */
#home > .max-w-7xl {
    position: relative;
    z-index: 10;
}

/* Optional: Add subtle gradient overlay for depth */
#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(200, 200, 200, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 2;
}


/* ============================================
   TECH STACK VISUALIZATION STYLES
   ============================================ */

/* Skill Bars */
.skill-bar-container {
    position: relative;
    cursor: pointer;
}

.skill-bar-container::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    max-width: 280px;
    white-space: normal;
    text-align: center;
}

.skill-bar-container::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.skill-bar-container:hover::after,
.skill-bar-container:hover::before {
    opacity: 1;
    visibility: visible;
}

.skill-bar {
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: skillShine 2s ease-in-out infinite;
    transform: translateX(-100%);
}

@keyframes skillShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 3D Tech Cloud */
#tech-cloud-container {
    perspective: 1000px;
}

.tech-cloud-3d {
    position: relative;
    width: 320px;
    height: 320px;
    transform-style: preserve-3d;
    animation: rotateCloud 25s linear infinite;
}

.tech-cloud-3d.paused {
    animation-play-state: paused;
}

@keyframes rotateCloud {
    from { transform: rotateY(0deg) rotateX(10deg); }
    to { transform: rotateY(360deg) rotateX(10deg); }
}

.tech-tag {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #000;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backface-visibility: visible;
}

.tech-tag:hover {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: scale(1.2) !important;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.tech-tag.primary {
    background: #000;
    color: #fff;
    border-color: #000;
    font-size: 14px;
    padding: 10px 20px;
}

.tech-tag.primary:hover {
    background: #333;
}

/* Tech Tag Tooltip */
.tech-tag-tooltip {
    position: fixed;
    background: #000;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    max-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.tech-tag-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.tech-tag-tooltip h5 {
    font-weight: 600;
    margin-bottom: 4px;
}

.tech-tag-tooltip p {
    color: #aaa;
    line-height: 1.4;
}

/* Timeline Styles */
.tech-timeline {
    position: relative;
}

.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot {
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.5);
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.1);
}

.timeline-content {
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-4px);
    border-color: #000;
}

/* Mobile Timeline Adjustments */
@media (max-width: 768px) {
    .tech-timeline::before {
        display: none;
    }
    
    .timeline-item {
        flex-direction: column !important;
    }
    
    .timeline-item > div:first-child,
    .timeline-item > div:last-child {
        width: 100% !important;
        text-align: left !important;
        padding: 0 !important;
    }
    
    .timeline-content .flex {
        justify-content: flex-start !important;
    }
    
    .tech-cloud-3d {
        width: 280px;
        height: 280px;
    }
    
    .tech-tag {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* Animation for timeline items */
.timeline-item:nth-child(1) { transition-delay: 0.1s; }
.timeline-item:nth-child(2) { transition-delay: 0.2s; }
.timeline-item:nth-child(3) { transition-delay: 0.3s; }
.timeline-item:nth-child(4) { transition-delay: 0.4s; }
.timeline-item:nth-child(5) { transition-delay: 0.5s; }
.timeline-item:nth-child(6) { transition-delay: 0.6s; }


/* ============================================
   CERTIFICATION BADGES STYLES
   ============================================ */

.cert-badge {
    position: relative;
    cursor: pointer;
}

.cert-badge::after {
    content: attr(data-cert) ' • ' attr(data-year);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
}

.cert-badge::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cert-badge:hover::after,
.cert-badge:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Badge shine effect on hover */
.cert-badge > div::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    transition: left 0.5s ease;
    border-radius: inherit;
}

.cert-badge:hover > div::after {
    left: 100%;
}

.cert-badge > div {
    position: relative;
    overflow: hidden;
}

/* Verified badge indicator */
.cert-badge > div::before {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.cert-badge:hover > div::before {
    opacity: 1;
    transform: scale(1);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .cert-badge > div {
        width: 7rem !important;
        height: 7rem !important;
    }
    
    .cert-badge::after {
        font-size: 10px;
        padding: 6px 10px;
    }
}
