/* Custom Styles for Portfolio Website */

/* General Styles */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Spacing */
    --section-padding: 5rem;
    --card-padding: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    
}

/* Dark mode variables */
[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --dark-color: #f8fafc;
    --light-color: #1e293b;
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #f8fafc;
    
}
[data-theme="light"] {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --dark-color:#1e293b ;
    --light-color:#f8fafc ;
    --gray-50: #f1f5f9;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #0f172a;
    --gray-900: #f8fafc;
   
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    background-color: var(--gray-50);
    transition: background-color var(--transition), color var(--transition);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)" /></svg>');
    opacity: 0.3;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    animation: fadeInUp 1s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-section .btn {
    transition: all var(--transition-slow);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-lg);
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-section .btn-light:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Card Styles */
.card {
    transition: all var(--transition-slow);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background-color: white;
    overflow: hidden;
}

[data-theme="dark"] .card {
    background-color: var(--gray-100);
    border-color: var(--gray-200);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl) !important;
    border-color: var(--primary-light);
}

.project-card {
    overflow: hidden;
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(99, 102, 241, 0.1));
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.project-card:hover::after {
    opacity: 1;
}

.project-card img {
    transition: transform var(--transition-slow);
}

.project-card:hover img {
    transform: scale(1.1);
}

/* Progress Bars */
.progress {
    background-color: #e9ecef;
}

.progress-bar {
    transition: width 1s ease;
}

/* Buttons */
.btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition);
    border-width: 2px;
    padding: 0.625rem 1.5rem;
    font-size: 0.938rem;
    letter-spacing: 0.025em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.063rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

footer a:hover {
    color: var(--primary-color) !important;
    transform: scale(1.1);
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

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

:root[data-scroll-animations="pending"] section,
:root[data-scroll-animations="pending"] .card,
:root[data-scroll-animations="ready"] section:not(.fade-in),
:root[data-scroll-animations="ready"] .card:not(.fade-in) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
    visibility: visible !important;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Timeline for Experience/Education */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.timeline .card {
    position: relative;
    margin-left: 1rem;
}

.timeline .card::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    z-index: 1;
}

[data-theme="dark"] .timeline .card::before {
    border-color: var(--gray-100);
}

.timeline .card:hover::before {
    transform: scale(1.3);
    background: var(--secondary-color);
    transition: all var(--transition);
}

/* Social Links */
.social-links a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    opacity: 0.8;
}

/* Utility Classes */
.text-justify {
    text-align: justify;
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    box-shadow: var(--shadow-lg);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 999;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: var(--shadow-xl);
}

/* Badge Improvements */
.badge {
    font-weight: 600;
    padding: 0.5em 0.875em;
    border-radius: var(--radius);
    font-size: 0.813rem;
    letter-spacing: 0.025em;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    box-shadow: var(--shadow-sm);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-200) 0%,
        var(--gray-100) 50%,
        var(--gray-200) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
    width: 60%;
}

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* Enhanced Navbar */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .navbar {
    background-color: rgba(30, 41, 59, 0.9) !important;
}

.navbar-brand {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass-effect {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Section Dividers */
.section-divider {
    height: 2px;
    width: 60px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 0 auto 2rem;
    border-radius: 2px;
}

/* Improved Forms */
.form-control {
    border-radius: var(--radius-md);
    border: 2px solid var(--gray-200);
    padding: 0.75rem 1rem;
    transition: all var(--transition);
    background-color: white;
}

[data-theme="dark"] .form-control {
    background-color: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-900);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

/* Pulse Animation for New Items */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Image Zoom on Hover */
.image-zoom-hover {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.image-zoom-hover img {
    transition: transform var(--transition-slow);
}

.image-zoom-hover:hover img {
    transform: scale(1.05);
}
/* ============================================
    THEME UTILITIES
    ============================================ */

/* Navbar that adapts to the selected theme */
.theme-navbar {
    background-color: var(--gray-900);
    transition: background-color var(--transition), color var(--transition);
}

[data-theme="light"] .theme-navbar {
    background-color: var(--gray-50);
}

.theme-navbar .navbar-brand,
.theme-navbar .nav-link {
    color: var(--dark-color) !important;
}

[data-theme="light"] .theme-navbar .navbar-brand,
[data-theme="light"] .theme-navbar .nav-link {
    color: var(--dark-color) !important;
}

.theme-navbar .nav-link:hover,
.theme-navbar .nav-link.active {
    color: var(--primary-color) !important;
}

.theme-navbar .navbar-toggler {
    border: none;
}

.theme-navbar .navbar-toggler-icon {
    filter: invert(0);
    transition: filter var(--transition);
}

[data-theme="light"] .theme-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* Opt-in text colors for theme-aware sections */
.theme-text {
    color: var(--light-color);
}

[data-theme="dark"] .theme-text {
    color: var(--dark-color);
}

.theme-text h1,
.theme-text h2,
.theme-text h3,
.theme-text h4,
.theme-text h5,
.theme-text h6,
.theme-text .h1,
.theme-text .h2,
.theme-text .h3,
.theme-text .h4,
.theme-text .h5,
.theme-text .h6,
.theme-text p,
.theme-text small,
.theme-text li,
.theme-text label {
    color: var(--dark-color) !important;
}
.theme-text .dark-color {
    color: var(--dark-color) !important;
}

.theme-text .text-muted {
    color: var(--dark-color) !important;
}

[data-theme="dark"] .theme-text .text-muted {
    color: var(--dark-color) !important;
}

.theme-text input::placeholder,
.theme-text textarea::placeholder {
    color: var(--dark-color);
}

[data-theme="dark"] .theme-text input::placeholder,
[data-theme="dark"] .theme-text textarea::placeholder {
    color: var(--dark-color);
}
