/* Custom Styles for Portfolio Website */
/* Modern & Engaging Design */

/* General Styles */
:root {
    /* Primitives - Constant Color Palette */
    --color-white: #ffffff;
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    --color-slate-950: #020617;

    --color-indigo-400: #818cf8;
    --color-indigo-500: #6366f1;
    --color-indigo-600: #4f46e5;

    --color-violet-400: #a78bfa;
    --color-violet-500: #8b5cf6;
    --color-violet-600: #7c3aed;

    --color-pink-400: #f472b6;
    --color-pink-500: #ec4899;
    --color-pink-600: #db2777;

    --color-cyan-400: #22d3ee;
    --color-cyan-500: #06b6d4;

    --color-emerald-400: #34d399;
    --color-emerald-500: #10b981;
    --color-amber-500: #f59e0b;
    --color-red-500: #ef4444;

    /* Semantic Variables - Light Mode (Default) */
    --bg-body: var(--color-slate-50);
    --bg-surface: var(--color-white);
    --bg-surface-alt: var(--color-slate-100);
    --bg-glass: rgba(255, 255, 255, 0.7);

    --text-body: var(--color-slate-900);
    --text-muted: var(--color-slate-600);
    --text-light: var(--color-slate-400);

    --border-color: var(--color-slate-200);
    --border-color-hover: var(--color-indigo-400);

    --primary-color: var(--color-indigo-500);
    --primary-hover: var(--color-indigo-600);
    --secondary-color: var(--color-violet-500);
    --accent-color: var(--color-pink-500);

    --status-success: var(--color-emerald-500);
    --status-warning: var(--color-amber-500);
    --status-danger: var(--color-red-500);

    /* Gradient presets */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-hero: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --gradient-card: linear-gradient(145deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    --gradient-text: linear-gradient(135deg, var(--color-indigo-400) 0%, var(--color-violet-400) 50%, var(--color-pink-400) 100%);
    --glow-primary: 0 0 40px rgba(99, 102, 241, 0.3);
    --glow-secondary: 0 0 40px rgba(139, 92, 246, 0.3);

    /* Spacing */
    --section-padding: 6rem;
    --card-padding: 1.75rem;

    /* Shadows - Enhanced */
    --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);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15), 0 0 60px rgba(139, 92, 246, 0.1);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 30px rgba(99, 102, 241, 0.1);

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

    /* 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);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-body: var(--color-slate-950);
    --bg-surface: var(--color-slate-900);
    --bg-surface-alt: var(--color-slate-800);
    --bg-glass: rgba(15, 23, 42, 0.8);

    --text-body: var(--color-slate-50);
    --text-muted: var(--color-slate-400);
    --text-light: var(--color-slate-500);

    --border-color: var(--color-slate-800);
    --border-color-hover: var(--color-indigo-400);

    --primary-color: var(--color-indigo-400);
    --primary-hover: var(--color-indigo-500);

    --gradient-card: linear-gradient(145deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(99, 102, 241, 0.15);
}

/* Light mode overrides (explicit) */
[data-theme="light"] {
    --bg-body: var(--color-slate-50);
    --bg-surface: var(--color-white);
    --bg-surface-alt: var(--color-slate-100);

    --text-body: var(--color-slate-900);
    --text-muted: var(--color-slate-600);
    --text-light: var(--color-slate-400);

    --border-color: var(--color-slate-200);
    --primary-color: var(--color-indigo-500);
}

/* Navbar menu icon */
.navbar-menu-icon {
    font-size: 1.75rem;
    color: #1e293b;
}

[data-theme="dark"] .navbar-menu-icon {
    color: #f8fafc;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-body);
    line-height: 1.6;
    background-color: var(--bg-body);
    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 - Modern Animated Design */
.hero-section {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 40%, #24243e 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(139, 92, 246, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 80%, rgba(236, 72, 153, 0.2) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

@keyframes heroGlow {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.1) rotate(2deg);
    }
}

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

/* Floating shapes for hero */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.4) 100%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero-shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    bottom: -50px;
    left: -50px;
    animation-delay: -2s;
}

.hero-shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(99, 102, 241, 0.3) 100%);
    top: 50%;
    left: 30%;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

.hero-section h1 {
    animation: fadeInUp 1s ease;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-section h2 {
    background: linear-gradient(135deg, var(--color-indigo-400) 0%, var(--color-violet-400) 50%, var(--color-pink-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 500px;
}

.hero-section .btn {
    transition: all var(--transition-slow);
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
}

.hero-section .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.hero-section .btn:hover::before {
    left: 100%;
}

.hero-section .btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.hero-section .btn-dark {
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.hero-section .btn-dark:hover {
    background: rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.4);
}

.hero-section .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
}

/* Hero profile image */
.hero-profile-wrapper {
    position: relative;
    display: inline-block;
}

.hero-profile-wrapper::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-violet-500) 50%, var(--color-pink-500) 100%);
    border-radius: 50%;
    animation: profilePulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes profilePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Card Styles - Modern Glassmorphism */
.card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--bg-surface);
    overflow: hidden;
    color: var(--text-body);
    box-shadow: var(--shadow-card);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-indigo-500), var(--color-violet-500), var(--color-pink-500));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-card-hover);
    border-color: transparent;
}

.card-body {
    padding: var(--card-padding);
}

/* Glass card variant */
.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .card-glass {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Project cards - Enhanced */
.project-card {
    overflow: hidden;
    position: relative;
}

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

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

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

.project-card img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Project card overlay */
.project-card .card-img-overlay {
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.project-card:hover .card-img-overlay {
    opacity: 1;
}

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

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

/* Buttons - Modern Design */
.btn {
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-width: 2px;
    padding: 0.75rem 1.75rem;
    font-size: 0.938rem;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-violet-500) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-indigo-600) 0%, var(--color-violet-600) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: white;
}

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

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
    position: relative;
    z-index: 1;
}

.btn-outline-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-violet-500) 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-outline-primary:hover {
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

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

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

.btn-sm {
    padding: 0.5rem 1.25rem;
    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 var(--bg-surface);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.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
    ============================================ */

/* Tablet - 992px and below */
@media (max-width: 992px) {
    :root {
        --section-padding: 4.5rem;
        --card-padding: 1.5rem;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .section-header h2 {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }

    .cta-section {
        padding: 4.5rem 0;
    }
}

/* Small tablets / Large phones - 768px and below */
@media (max-width: 768px) {
    :root {
        --section-padding: 3.5rem;
        --card-padding: 1.25rem;
    }

    .hero-section {
        text-align: center;
        min-height: auto;
        padding: 6rem 0 4rem;
    }

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

    .hero-section .lead {
        font-size: 1.1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-section .btn {
        padding: 0.875rem 2rem;
    }

    /* Hide floating shapes on tablet */
    .hero-shape {
        display: none;
    }

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

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

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    /* Timeline adjustments */
    .timeline {
        padding-left: 1.5rem;
    }

    .timeline .card {
        margin-left: 0.75rem;
    }

    .timeline .card::before {
        left: -2rem;
        width: 12px;
        height: 12px;
    }

    /* CTA section */
    .cta-section {
        padding: 3.5rem 0;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .cta-section p {
        font-size: 1.1rem;
    }

    /* Skill cards */
    .skill-card {
        padding: 1.5rem;
    }

    .skill-card .skill-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-card::before {
        font-size: 3.5rem;
    }
}

/* Mobile phones - 576px and below */
@media (max-width: 576px) {
    :root {
        --section-padding: 2.5rem;
        --card-padding: 1rem;
    }

    .hero-section {
        padding: 5rem 0 2rem;
    }

    /* Less padding for about section on mobile */
    .about-preview-section {
        padding-top: 1.5rem !important;
    }

    .about-preview-section .container {
        padding-top: 1rem !important;
    }

    .hero-section .row {
        min-height: auto !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

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

    .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem !important;
    }

    /* Smaller profile image on mobile */
    .hero-profile-img {
        max-width: 120px !important;
        width: 120px !important;
        height: 120px !important;
        object-fit: cover !important;
    }

    .hero-profile-placeholder {
        width: 120px !important;
        height: 120px !important;
    }

    .hero-profile-placeholder i {
        font-size: 50px !important;
    }

    .hero-profile-wrapper {
        margin-bottom: 0.5rem !important;
    }

    .hero-profile-wrapper::before {
        inset: -4px;
    }

    .hero-section .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .hero-section .d-flex.gap-3 {
        flex-direction: column;
        gap: 0 !important;
    }

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

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

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header h2::after {
        width: 40px;
        height: 3px;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    /* Card adjustments */
    .card {
        border-radius: var(--radius-lg);
    }

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

    /* Timeline */
    .timeline {
        padding-left: 1rem;
    }

    .timeline::before {
        width: 2px;
    }

    .timeline .card {
        margin-left: 0.5rem;
    }

    .timeline .card::before {
        left: -1.5rem;
        width: 10px;
        height: 10px;
    }

    /* CTA */
    .cta-section {
        padding: 2.5rem 0;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Skill cards */
    .skill-card {
        padding: 1.25rem;
    }

    .skill-card .skill-icon {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 1.25rem;
    }

    .testimonial-card .testimonial-content {
        font-size: 1rem;
    }

    .testimonial-card .testimonial-avatar {
        width: 48px;
        height: 48px;
    }

    /* Service cards */
    .service-card .price {
        font-size: 2rem;
    }

    /* Badges and tech tags */
    .badge {
        font-size: 0.75rem;
        padding: 0.4em 0.8em;
    }

    .tech-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }

    /* Form controls */
    .form-control {
        padding: 0.65rem 0.875rem;
        font-size: 1rem; /* Prevents iOS zoom */
    }

    /* Fixed buttons (theme toggle, back-to-top) */
    .theme-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        bottom: 70px;
        right: 15px;
    }

    /* Project cards overlay */
    .project-card .card-img-overlay {
        padding: 1rem;
    }
}

/* Extra small phones - 380px and below */
@media (max-width: 380px) {
    :root {
        --section-padding: 2rem;
        --card-padding: 0.875rem;
    }

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

    .section-header h2 {
        font-size: 1.35rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.7rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* 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-hover)) !important;
    box-shadow: var(--shadow-sm);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-surface-alt) 0%,
        var(--bg-surface) 50%,
        var(--bg-surface-alt) 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: var(--bg-surface) !important;
    opacity: 0.95;
    color: var(--text-body);
}

.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: var(--bg-surface);
    opacity: 0.7;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

/* 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(--border-color);
    padding: 0.75rem 1rem;
    transition: all var(--transition);
    background-color: var(--bg-surface);
    color: var(--text-body);
}

.form-control::placeholder {
    color: var(--text-muted);
}

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

/* 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);
}

/* ============================================
    MODERN SECTION STYLES
    ============================================ */

/* Section base styles */
section {
    position: relative;
}

/* Section headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-indigo-500), var(--color-violet-500), var(--color-pink-500));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, var(--color-indigo-400) 0%, var(--color-violet-400) 50%, var(--color-pink-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section backgrounds */
.section-gradient {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-surface-alt) 100%);
}

.section-dark {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.section-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 60% 40% at 10% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 90% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* Skills section */
.skills-section {
    background: var(--bg-surface-alt);
}

.skill-card {
    text-align: center;
    padding: 2rem;
}

.skill-card .skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
    background: var(--gradient-card);
    font-size: 2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--glow-primary);
}

/* Testimonials - Modern Quote Style */
.testimonial-card {
    padding: 2rem;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 5rem;
    font-family: Georgia, serif;
    line-height: 1;
    opacity: 0.1;
    color: var(--primary-color);
}

.testimonial-card .testimonial-content {
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.testimonial-card .testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-card .testimonial-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.testimonial-card .testimonial-info h6 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.testimonial-card .testimonial-info small {
    color: var(--text-muted);
}

/* Star rating */
.star-rating {
    color: #fbbf24;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* CTA Section - Modern Gradient */
.cta-section {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.2) 0%, transparent 25%),
        radial-gradient(circle at 70% 50%, rgba(139, 92, 246, 0.2) 0%, transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 25%);
    animation: ctaGlow 10s ease-in-out infinite alternate;
}

@keyframes ctaGlow {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(2%, 2%) rotate(5deg);
    }
}

.cta-section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.cta-section p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.cta-section .btn {
    position: relative;
    z-index: 1;
}

/* Services section */
.service-card {
    height: 100%;
}

.service-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.02);
}

.service-card.featured::before {
    transform: scaleX(1);
}

/* Badge improvements */
.badge {
    font-weight: 600;
    padding: 0.5em 1em;
    border-radius: 50px;
    font-size: 0.8rem;
    letter-spacing: 0.025em;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--color-indigo-500), var(--color-violet-500)) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, var(--color-emerald-400), var(--color-emerald-500)) !important;
}

/* Tech badges */
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--bg-surface-alt);
    color: var(--text-body);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.tech-badge:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}
/* ============================================
    THEME UTILITIES
    ============================================ */

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

.theme-navbar .navbar-brand,
.theme-navbar .nav-link {
    color: var(--text-body) !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="dark"] .theme-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* Helper for text color adaptation */
.text-body {
    color: var(--text-body) !important;
}

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

/* Theme switch icon adaptation */
[data-theme="light"] .theme-toggle i {
    transform: rotate(0deg);
}
[data-theme="dark"] .theme-toggle i {
    transform: rotate(180deg);
}
