/* Custom Styles for Saayd Et-Taqi Portfolio */

/* Typography */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rotating shadow animation for cards */
@keyframes rotateShadow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Infinite rotating shadow animation */
@keyframes rotateShadow {
    0% {
        transform: rotate(0deg);
        background: linear-gradient(0deg, #14B8A6, #FBBF24);
    }
    25% {
        transform: rotate(90deg);
        background: linear-gradient(90deg, #14B8A6, #FBBF24);
    }
    50% {
        transform: rotate(180deg);
        background: linear-gradient(180deg, #14B8A6, #FBBF24);
    }
    75% {
        transform: rotate(270deg);
        background: linear-gradient(270deg, #14B8A6, #FBBF24);
    }
    100% {
        transform: rotate(360deg);
        background: linear-gradient(360deg, #14B8A6, #FBBF24);
    }
}

/* Alternative: Moving shadow around card */
@keyframes moveShadow {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        background-position: 0% 0%;
    }
    25% {
        transform: translate(-50%, -50%) rotate(90deg);
        background-position: 100% 0%;
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg);
        background-position: 100% 100%;
    }
    75% {
        transform: translate(-50%, -50%) rotate(270deg);
        background-position: 0% 100%;
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
        background-position: 0% 0%;
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(12deg);
    }
    50% {
        transform: translateY(-20px) rotate(12deg);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0) rotate(-12deg);
    }
    50% {
        transform: translateY(-15px) rotate(-12deg);
    }
}

@keyframes scroll {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Lump Circle - Soft Transparent Border */
.lump-circle-border {
    border: 2px solid rgba(251, 191, 36, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Lump Light Animation - Allumé/Éteint - Soft Border */
@keyframes lump-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 
            0 0 15px rgba(251, 191, 36, 0.4),
            0 0 30px rgba(251, 191, 36, 0.3),
            0 0 45px rgba(251, 191, 36, 0.2),
            inset 0 0 20px rgba(251, 191, 36, 0.1);
        border-color: rgba(251, 191, 36, 0.25);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
        box-shadow: 
            0 0 20px rgba(251, 191, 36, 0.5),
            0 0 40px rgba(251, 191, 36, 0.4),
            0 0 60px rgba(251, 191, 36, 0.3),
            0 0 80px rgba(251, 191, 36, 0.2),
            inset 0 0 25px rgba(251, 191, 36, 0.15);
        border-color: rgba(251, 191, 36, 0.4);
    }
}

/* Animation Classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
}

.animate-scroll {
    animation: scroll 2s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

.animate-lump-glow {
    animation: lump-glow 2s ease-in-out infinite;
}

.animate-lump-pulse {
    animation: lump-pulse 1.5s ease-in-out infinite;
}

.animate-shimmer {
    animation: shimmer 3s infinite;
}

/* Writing Vertical Text */
.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation Styles */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    color: #1f2937;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #14B8A6;
}

.nav-link.active {
    background-color: #14B8A6;
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
}

.nav-link.active:hover {
    background-color: #0D9488 !important;
    color: white !important;
    opacity: 1 !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

/* Skill Bars Animation */
.skill-bar {
    width: 0;
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

.skill-bar.animated {
    width: var(--skill-width);
}

.skill-bar.animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* Fade In Up Animation for Scroll */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #14B8A6 0%, #0D9488 50%, #0F766E 100%);
}

.bg-gradient-accent {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 50%, #B45309 100%);
}

.bg-gradient-luxury {
    background: linear-gradient(135deg, #14B8A6 0%, #F59E0B 100%);
}

/* Portfolio Filter */
.portfolio-item {
    display: block;
}

.portfolio-item.hidden {
    display: none;
}

.filter-btn {
    position: relative;
    padding: 0.5rem 1.5rem;
    color: #1f2937;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: #14B8A6;
}

.filter-btn.active {
    background-color: #14B8A6;
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
}

.filter-btn.active:hover {
    background-color: #0D9488 !important;
    color: white !important;
    opacity: 1 !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

/* Form Validation */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #14B8A6;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    /* Better spacing on mobile */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Touch-friendly buttons */
    button, a.button-like {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Mobile navigation */
    #navbar {
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
    
    /* Better form inputs on mobile */
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Statistics grid on mobile */
    .stats-grid {
        gap: 1.5rem;
    }
    
    .stats-grid > div {
        border-left: none !important;
        padding-left: 0 !important;
    }
    
    /* Portfolio cards on mobile */
    .portfolio-item {
        margin-bottom: 1rem;
    }
    
    /* Services cards spacing */
    #services .grid > div {
        margin-bottom: 1rem;
    }
    
    /* Hero section mobile adjustments */
    #accueil {
        min-height: auto;
        padding-top: 6rem;
        padding-bottom: 4rem;
    }
    
 
}

/* Tablet Optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
    /* Better grid spacing on tablet */
    .grid {
        gap: 1.5rem;
    }
    
    /* Portfolio grid 2 columns on tablet */
    #portfolio .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Services grid 2 columns on tablet */
    #services .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #14B8A6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* Pink/Red color for skills, contact and portfolio */
.bg-pink-500 {
    background-color: #ec4899;
}

.text-pink-500 {
    color: #ec4899;
}

.hover\:bg-pink-600:hover {
    background-color: #db2777;
}

/* Red color for Data Visualization */
.text-red-500 {
    color: #ef4444;
}

/* Green color for LinkedIn */
.bg-green-600 {
    background-color: #16a34a;
}

.hover\:bg-green-700:hover {
    background-color: #15803d;
}

/* Skill tabs styling */
.skill-tab {
    position: relative;
    padding: 0.5rem 1.5rem;
    color: #1f2937;
    transition: all 0.3s ease;
}

.skill-tab:hover {
    color: #14B8A6;
}

.skill-tab i {
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.skill-tab:hover i {
    color: #14B8A6;
}

.skill-tab.active {
    background-color: #14B8A6 !important;
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
}

.skill-tab.active i {
    color: white !important;
}

.skill-tab.active:hover {
    background-color: #0D9488 !important;
    color: white !important;
    opacity: 1 !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

.skill-tab.active:hover i {
    color: white !important;
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid #14B8A6;
    outline-offset: 2px;
}

/* Body Background - Clean base */
body {
    position: relative;
    background: #FAFAF8;
}

/* Very subtle transparent gradient - No contrast */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(20, 184, 166, 0.02) 0%,
        rgba(251, 191, 36, 0.02) 50%,
        rgba(20, 184, 166, 0.02) 100%
    );
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

/* Ensure all sections are transparent to show body background */
section {
    position: relative;
    z-index: 1;
}

/* Colored Shadows for Cards */
.shadow-pink {
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.3), 0 10px 10px -5px rgba(236, 72, 153, 0.2);
}

.hover\:shadow-pink-xl:hover {
    box-shadow: 0 20px 40px -10px rgba(236, 72, 153, 0.4), 0 10px 20px -5px rgba(236, 72, 153, 0.3);
}

.shadow-amber {
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.3), 0 10px 10px -5px rgba(245, 158, 11, 0.2);
}

.hover\:shadow-amber-xl:hover {
    box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.4), 0 10px 20px -5px rgba(245, 158, 11, 0.3);
}

.shadow-teal {
    box-shadow: 0 10px 25px -5px rgba(20, 184, 166, 0.3), 0 10px 10px -5px rgba(20, 184, 166, 0.2);
}

.hover\:shadow-teal-xl:hover {
    box-shadow: 0 20px 40px -10px rgba(20, 184, 166, 0.4), 0 10px 20px -5px rgba(20, 184, 166, 0.3);
}

.shadow-rose {
    box-shadow: 0 10px 25px -5px rgba(251, 113, 133, 0.3), 0 10px 10px -5px rgba(251, 113, 133, 0.2);
}

.hover\:shadow-rose-xl:hover {
    box-shadow: 0 20px 40px -10px rgba(251, 113, 133, 0.4), 0 10px 20px -5px rgba(251, 113, 133, 0.3);
}

/* Portfolio Card Gradient Shadow on Hover */
.portfolio-card-gradient-shadow {
    position: relative;
}

.portfolio-card-gradient-shadow::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(245, 158, 11, 0.3));
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.5s ease;
    z-index: -1;
    pointer-events: none;
}

.portfolio-card-gradient-shadow:hover::after {
    opacity: 1;
}

/* Portfolio Card Discover Button - Non Responsive */
.portfolio-discover-btn {
    display: inline-block !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    width: auto !important;
    min-width: fit-content !important;
    flex: none !important;
}

.portfolio-discover-btn:hover {
    transform: scale(1.05);
}

/* Portfolio Card Images - Responsive */
.portfolio-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}



/* Line Clamp for Portfolio Card Descriptions */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Print Styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
}

