/* ================================================
   MUSFIQUR RAHMAN PORTFOLIO - CUSTOM STYLES
   Premium Design System
   ================================================ */

/* ================================================
   TAILWIND CONFIGURATION
   ================================================ */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* ================================================
   CSS VARIABLES
   ================================================ */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    --cyan-50: #ecfeff;
    --cyan-100: #cffafe;
    --cyan-200: #a5f3fc;
    --cyan-300: #67e8f9;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --cyan-700: #0e7490;
}

/* ================================================
   BASE STYLES
   ================================================ */
@layer base {
    html {
        scroll-behavior: smooth;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    body {
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        line-height: 1.6;
    }
    
    h1, h2, h3, h4, h5, h6 {
        font-family: 'Space Grotesk', system-ui, sans-serif;
        font-weight: 700;
    }
}

/* ================================================
   COMPONENT STYLES
   ================================================ */
@layer components {
    /* Buttons */
    .btn-primary {
        @apply inline-flex items-center justify-center gap-2 px-6 py-3 bg-primary-600 text-white rounded-xl font-semibold transition-all duration-300 hover:bg-primary-700 hover:shadow-lg hover:shadow-primary-600/25 hover:-translate-y-0.5;
    }
    
    .btn-secondary {
        @apply inline-flex items-center justify-center gap-2 px-6 py-3 bg-white text-slate-700 rounded-xl font-semibold border border-slate-200 hover:border-primary-300 hover:bg-primary-50 transition-all duration-300;
    }
    
    /* Cards */
    .card {
        @apply bg-white rounded-2xl border border-slate-100 shadow-sm hover:shadow-xl transition-all duration-300;
    }
    
    .card-glass {
        @apply bg-white/80 backdrop-blur-md border border-white/20 rounded-2xl shadow-lg;
    }
    
    /* Inputs */
    .input-field {
        @apply w-full px-4 py-3 rounded-xl border border-slate-200 focus:border-primary-500 focus:ring-2 focus:ring-primary-500/20 transition-all outline-none;
    }
    
    /* Badge */
    .badge {
        @apply inline-flex items-center px-3 py-1 rounded-full text-xs font-medium;
    }
    
    .badge-primary {
        @apply bg-primary-100 text-primary-700;
    }
    
    /* Animations */
    .animate-fade-in {
        animation: fadeIn 0.6s ease-out forwards;
    }
    
    .animate-slide-up {
        animation: slideUp 0.6s ease-out forwards;
    }
    
    .animate-slide-down {
        animation: slideDown 0.6s ease-out forwards;
    }
    
    .animate-scale-in {
        animation: scaleIn 0.4s ease-out forwards;
    }
    
    /* Marquee */
    .animate-marquee {
        animation: marquee 30s linear infinite;
    }
    
    /* Glass Effect */
    .glass {
        @apply bg-white/80 backdrop-blur-lg border border-white/20;
    }
    
    .glass-dark {
        @apply bg-slate-900/80 backdrop-blur-lg border border-slate-700/20;
    }
}

/* ================================================
   KEYFRAME ANIMATIONS
   ================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(37, 99, 235, 0.5);
    }
}

/* ================================================
   SCROLL REVEAL ANIMATIONS
   ================================================ */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-animate].delay-100 { transition-delay: 100ms; }
[data-animate].delay-200 { transition-delay: 200ms; }
[data-animate].delay-300 { transition-delay: 300ms; }
[data-animate].delay-400 { transition-delay: 400ms; }

/* ================================================
   TESTIMONIAL SLIDER
   ================================================ */
.testimonial-slider {
    position: relative;
    overflow: hidden;
}

.testimonial-slide {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.testimonial-slide.active {
    display: block;
}

/* ================================================
   PORTFOLIO FILTER
   ================================================ */
.project-card {
    transition: all 0.4s ease-out;
}

.project-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

/* ================================================
   SKILL BARS
   ================================================ */
.skill-bar {
    transform-origin: left;
}

/* ================================================
   CUSTOM SCROLLBAR
   ================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

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

/* ================================================
   SELECTION STYLES
   ================================================ */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: #1e40af;
}

/* ================================================
   FOCUS STYLES
   ================================================ */
:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ================================================
   PAGE LOADER
   ================================================ */
#page-loader {
    transition: opacity 0.5s ease-out;
}

#page-loader.loaded {
    opacity: 0;
    pointer-events: none;
}

/* ================================================
   RESPONSIVE ADJUSTMENTS
   ================================================ */
@media (max-width: 640px) {
    .container {
        @apply px-4;
    }
}

/* ================================================
   PRINT STYLES
   ================================================ */
@media print {
    nav, footer, #back-to-top {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* ================================================
   UTILITY CLASSES
   ================================================ */
.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;
}

.text-gradient {
    @apply bg-gradient-to-r from-primary-600 to-cyan-600 bg-clip-text text-transparent;
}

.border-gradient {
    border-image: linear-gradient(to right, #2563eb, #06b6d4) 1;
}

/* ================================================
   HOVER EFFECTS
   ================================================ */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ================================================
   GRADIENT BACKGROUNDS
   ================================================ */
.bg-gradient-radial {
    background: radial-gradient(ellipse at center, var(--tw-gradient-from) 0%, var(--tw-gradient-to) 70%);
}

.gradient-mesh {
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        linear-gradient(225deg, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        linear-gradient(315deg, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
        linear-gradient(45deg, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
}

/* ================================================
   NOISE TEXTURE
   ================================================ */
.noise-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}
