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

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

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
}

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

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: #3b82f6;
    transition: width 0.3s ease;
}

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

/* Service Card */
.service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Experience & Leadership Cards */
.exp-card, .leadership-card {
    transition: all 0.3s ease;
}

/* Project Card */
.project-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px);
}

/* Testimonial Card */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
}

/* Skill Card */
.skill-card {
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateX(4px);
}

/* Team Card */
.team-card {
    transition: all 0.2s ease;
}

.team-card:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

/* Social Icon */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
}

/* Animated Contact Button */
.animated-contact-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.animated-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Contact Section Animated Background - Lightweight */
.animated-contact-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    z-index: 0;
}

.animated-contact-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    animation: pulseLight 4s ease-in-out infinite;
}

.animated-contact-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: pulseLight 4s ease-in-out infinite reverse;
}

@keyframes pulseLight {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

/* Flag Animated Section */
.flag-wave {
    position: relative;
    overflow: hidden;
}

.flag-wave::before {
    content: "🚀 🌾 💡 ⚡ 🔥";
    position: absolute;
    font-size: 120px;
    opacity: 0.03;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    animation: slideFlags 20s linear infinite;
    pointer-events: none;
}

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

.flag-icon {
    animation: bounceGlobe 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes bounceGlobe {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Tags */
.tag {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    border-radius: 9999px;
    padding: 2px 8px;
    font-size: 10px;
}

.tag:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

/* Custom Scrollbar - Global */
.custom-scroll::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Blog Scroll Container - Scrollbar only shows when content overflows */
.blog-scroll-container {
    max-height: 400px;
    overflow-y: auto;
}

/* Hide scrollbar when not needed (but keep functionality) */
.blog-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* For Webkit browsers - scrollbar only visible on hover or when scrolling */
.blog-scroll-container::-webkit-scrollbar {
    width: 4px;
    background: transparent;
}

.blog-scroll-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.blog-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.blog-scroll-container:hover::-webkit-scrollbar-thumb,
.blog-scroll-container:active::-webkit-scrollbar-thumb {
    background: #94a3b8;
    opacity: 1;
}

/* Firefox scrollbar styling */
.blog-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Custom Scrollbar for other elements */
.custom-scroll::-webkit-scrollbar {
    width: 3px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Line Clamp Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Alpine.js Cloak */
[x-cloak] {
    display: none !important;
}

/* Current Badge Animation */
@keyframes pulse-green {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

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

/* Carousel Image Transitions */
.carousel-image {
    transition: opacity 0.5s ease-in-out;
}

/* Carousel Dot Indicator Animation */
.carousel-dot {
    transition: all 0.3s ease;
}

/* Hover effect on project card */
.project-card:hover .carousel-dot-active {
    transform: scale(1.1);
}

/* Print Styles */
@media print {
    .animated-contact-btn, .animated-contact-bg, .carousel-dot {
        display: none;
    }
    body {
        background: white;
    }
}

/* Responsive */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
}

/* Focus Styles */
button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 8px;
}

/* Carousel container */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Image fade transition */
.image-fade-enter-active,
.image-fade-leave-active {
    transition: opacity 0.5s ease;
}

.image-fade-enter,
.image-fade-leave-to {
    opacity: 0;
}

/* Modal styles */
.modal-open {
    overflow: hidden;
}

/* Blog card hover effects */
.blog-card {
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
}

/* Placeholder image styles */
.placeholder-img {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Truncate text */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}