/* Ensure theme slider toggle is always visible and responsive */
.theme-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    height: 32px;
    padding: 0 8px;
    margin-left: 1rem;
    z-index: 10001;
}

.theme-switch .slider {
    position: relative;
    width: 48px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 24px;
    transition: background 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.theme-switch .slider::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #a78bfa 100%);
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.15);
}

.theme-switch input:checked+.slider {
    background: #fbbf24;
}

.theme-switch input:checked+.slider::before {
    transform: translateX(24px);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.theme-switch .slider {
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .theme-switch {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        height: 32px;
        padding: 0 4px;
    }

    .theme-switch .slider {
        width: 40px;
        height: 20px;
    }

    .theme-switch .slider::before {
        width: 14px;
        height: 14px;
        left: 3px;
        top: 3px;
    }

    .theme-switch input:checked+.slider::before {
        transform: translateX(16px);
    }
}

/* Modern theme slider toggle */
.theme-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    height: 32px;
    padding: 0 8px;
}

.theme-switch .slider {
    position: relative;
    width: 48px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 24px;
    transition: background 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.theme-switch .slider::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #a78bfa 100%);
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.15);
}

.theme-switch input:checked+.slider {
    background: #fbbf24;
}

.theme-switch input:checked+.slider::before {
    transform: translateX(24px);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.theme-switch .slider {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .project-card {
        padding: 0.7rem 0.5rem !important;
        border-radius: 1rem !important;
        min-width: 0;
        max-width: 100%;
    }

    .project-card .card-inner {
        padding: 0 !important;
    }

    .project-card .card-media {
        height: 110px !important;
        min-height: 70px !important;
        max-height: 120px !important;
    }

    .project-card img {
        height: 110px !important;
        min-height: 70px !important;
        max-height: 120px !important;
        object-fit: cover !important;
        border-radius: 0.7rem !important;
    }

    .project-card h3 {
        font-size: 1.05rem !important;
        margin-bottom: 0.4rem !important;
    }

    .project-card p {
        font-size: 0.93rem !important;
        margin-bottom: 0.4rem !important;
    }
}

/* Modern skill badge style for skills.html */
/* Modern vibrant skill badge */
.skill-badge {
    background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);
    border: 1.5px solid #6366f1;
    min-width: 120px;
    min-height: 48px;
    font-size: 1.08rem;
    color: #fff;
    box-shadow: 0 2px 14px rgba(96, 165, 250, 0.13);
    transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
    cursor: pointer;
    outline: none;
    margin-bottom: 0.2rem;
}

.skill-badge:hover,
.skill-badge:focus {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    border-color: #a78bfa;
    box-shadow: 0 6px 22px rgba(96, 165, 250, 0.22);
}

/* Dark mode skill badges - ensure colors are vibrant */
body.dark-mode .skill-badge {
    background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%) !important;
    border: 1.5px solid #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 14px rgba(96, 165, 250, 0.3) !important;
}

body.dark-mode .skill-badge:hover,
body.dark-mode .skill-badge:focus {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%) !important;
    border-color: #a78bfa !important;
    box-shadow: 0 6px 22px rgba(96, 165, 250, 0.5) !important;
}

.skills-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem 1.1rem;
    align-items: flex-start;
}

/* Distinct style for skills cards only */
.skills-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    border: 2px solid #a5b4fc;
    box-shadow: 0 6px 24px rgba(96, 165, 250, 0.10);
    height: 70px;
    min-width: 70px;
    max-width: 90px;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: box-shadow 0.3s, border-color 0.3s, background 0.3s;
    position: relative;
    z-index: 1;
}

.skills-card:hover,
.skills-card:focus {
    box-shadow: 0 12px 36px rgba(96, 165, 250, 0.18);
    border-color: #6366f1;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.skills-card .card-inner {
    width: 100%;
    align-items: center;
    text-align: center;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.skills-card .skill-bar {
    margin: 0.5rem 0 0.25rem 0;
    height: 10px;
    border-radius: 6px;
}

.skills-card i {
    margin-bottom: 0.2rem;
    font-size: 1.1rem !important;
}

.skills-card h3 {
    margin-bottom: 0.1rem;
    color: #3730a3;
    font-size: 0.85rem !important;
}

.skills-card p {
    color: #4b5563;
    font-size: 0.7rem !important;
}

/* Contact page two-column layout */
.contact-two-col-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 2.5rem;
}

.contact-info-section,
.interactive-card {
    min-width: 300px;
    flex: 1 1 320px;
    max-width: 520px;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .contact-two-col-layout {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-info-section,
    .interactive-card {
        max-width: 100%;
        min-width: 0;
    }
}

.contact-info-section {
    margin-bottom: 0;
}

.interactive-card {
    margin-bottom: 0;
}

/* Footer icon color matches link gradient */
.footer-enhanced a i,
.footer-enhanced a svg,
.footer-contact-details a i,
.footer-copyright a i {
    color: #e11d48 !important;
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: color 0.2s, background 0.2s;
}

.footer-enhanced a:hover i,
.footer-enhanced a:hover svg,
.footer-contact-details a:hover i,
.footer-copyright a:hover i {
    color: #fff !important;
    background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.2) drop-shadow(0 2px 8px #7c3aed66);
}

/* Make all footer links highly visible */
.footer-enhanced a,
.footer-contact-details a,
.footer-copyright a {
    color: #e11d48;
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: color 0.2s, background 0.2s;
}

.footer-enhanced a:hover,
.footer-contact-details a:hover,
.footer-copyright a:hover {
    color: #fff;
    background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: underline;
    filter: brightness(1.2) drop-shadow(0 2px 8px #7c3aed66);
}

/* Make certification 'View Certificate' link highly visible */
.cert-card a {
    color: #e11d48;
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: color 0.2s, background 0.2s;
}

.cert-card a:hover {
    color: #fff;
    background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: underline;
    filter: brightness(1.2) drop-shadow(0 2px 8px #7c3aed66);
}

/* Responsive certifications grid for certifications page */
.certifications-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    justify-items: center !important;
}

@media (min-width: 768px) {
    .certifications-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1200px) {
    .certifications-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* Only show certifications section on certifications.html */
body.certifications-only main,
body.certifications-only footer,
body.certifications-only nav {
    display: block !important;
}

body.certifications-only>*:not(nav):not(main):not(footer) {
    display: none !important;
}


/* Base reset */
* {
    box-sizing: border-box;
}

/* Theme tokens */
:root {
    --card-max-width: 360px;
    /* compact card width for modern look */
    --accent-1: #2563eb;
    /* primary blue */
    --accent-2: #7c3aed;
    /* secondary purple */
    --card-glow: rgba(37, 99, 235, 0.12);
}


html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

.card-3d:hover,
.project-card:hover,
.cert-card:hover {
    backface-visibility: hidden;
    will-change: transform;
}

input,
textarea {
    user-select: text;
    cursor: auto;
}

button:active,
a:active {
    transform: scale(0.98);
    transition: transform 0.08s
}

.card-3d:active,
.project-card:active {
    transform: scale(0.99);
    transition: transform 0.08s
}

section {
    contain: layout style paint;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* Body and backgrounds */
.cert-card:hover {
    transform: translateY(-6px) translateZ(0);
    border-color: rgba(96, 165, 250, 0.24);
    box-shadow: 0 14px 40px rgba(59, 130, 246, 0.09);
}

/* Education card design aligned with project and cert cards */
.education-card {
    background: linear-gradient(180deg, #fff, #f8fbff);
    border: 1px solid rgba(10, 14, 39, 0.05);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    box-shadow: 0 8px 28px rgba(10, 14, 39, 0.05);
}

/* Featured carousel styles */
.featured-carousel {
    width: 100%;
}

.carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 18px;
    align-items: stretch;
    padding: 14px 6px;
}

/* Carousel: make featured cards layout-aware so we can show exactly 3 cards on desktop */
.featured-card {
    min-width: 0;
    max-width: none;
    flex: 0 0 calc((100% - 36px) / 3);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #ffffff, #f7faff);
}

.featured-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(10, 14, 39, 0.03);
}

.featured-body {
    padding: 14px;
}

.featured-card .text-lg {
    color: #0f172a;
}

@media (max-width: 768px) {
    .featured-image {
        height: 120px;
    }

    /* small screens: show 1 card */
    .featured-card {
        flex: 0 0 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    /* medium screens: show 2 cards */
    .featured-card {
        flex: 0 0 calc((100% - 18px) / 2);
    }
}

/* Ensure project cards are positionable and anchor-friendly */
.project-card {
    position: relative;
}

/* Anchor cards used for featured items */
.project-card[role="listitem"] {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card[role="listitem"]:focus {
    outline: 3px solid rgba(99, 102, 241, 0.18);
    outline-offset: 4px;
}


body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    backface-visibility: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.08) 0%, transparent 50%), radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
    will-change: auto
}

body.dark-mode {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 100%);
    color: #e5e7eb
}

body.dark-mode::before {
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%), radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 40%)
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #f9fafb
}

body.dark-mode h4,
body.dark-mode h5 {
    color: #e5e7eb
}

body.dark-mode .text-gray-700 {
    color: #e5e7eb !important
}

body.dark-mode .text-gray-600 {
    color: #d1d5db !important
}

body.dark-mode .text-gray-800 {
    color: #f3f4f6 !important
}

body.dark-mode .text-gray-500 {
    color: #9ca3af !important
}

body.dark-mode .glass-effect {
    background: rgba(10, 14, 39, 0.4);
    backdrop-filter: blur(10px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    contain: layout style
}

body.dark-mode .card-3d,
body.dark-mode .project-card,
body.dark-mode .cert-card {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3)
}

body.dark-mode .footer-enhanced {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1)
}

body.dark-mode input,
body.dark-mode textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #e5e7eb !important;
    border-color: rgba(255, 255, 255, 0.1) !important
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #9ca3af !important
}

h1,
h2,
h3 {
    font-family: 'Space Grotesk', sans-serif;
    color: #1a252f
}

/* Navbar */
nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    transition: all 0.3s;
    backdrop-filter: blur(8px);
    width: 100%
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap
}

/* Global container for non-Tailwind pages: center content and add horizontal padding */
.container {
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    /* 16px */
    padding-right: 1rem;
    /* 16px */
    box-sizing: border-box;
}

body.dark-mode nav {
    background: rgba(26, 26, 46, 0.9)
}

body:not(.dark-mode) nav {
    background: rgba(248, 249, 250, 0.9)
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    contain: layout style
}

nav.glass-effect {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.1);
    contain: layout style paint
}

body.dark-mode nav.glass-effect {
    background: rgba(10, 14, 39, 0.3);
    border-bottom: 1px solid rgba(167, 139, 250, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3)
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-weight: 500;
    color: #4b5563;
    background: transparent;
    border: 1px solid transparent;
    transition: color 0.15s, background 0.15s, transform 0.15s;
    contain: layout style
}

.nav-link i {
    font-size: 1rem;
    transition: transform 0.15s
}

.nav-link:hover {
    color: #2563eb;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px)
}

.nav-link:hover i {
    transform: scale(1.05)
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2563eb, transparent);
    transform: translateX(-50%);
    transition: width 0.2s
}

.nav-link:hover::before {
    width: 80%
}

body.dark-mode .nav-link {
    color: #9ca3af
}

body.dark-mode .nav-link:hover {
    color: #60a5fa;
    background: rgba(10, 14, 39, 0.5);
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1)
}

body.dark-mode .nav-link::before {
    background: linear-gradient(90deg, transparent, #60a5fa, transparent)
}

/* Projects dropdown styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    background: transparent;
    border: none
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.12);
    border: 1px solid rgba(10, 14, 39, 0.06);
    padding: 8px 6px;
    display: none;
    z-index: 1100;
}

.nav-dropdown-menu .nav-dropdown-link {
    display: block;
    padding: 10px 14px;
    color: #0f172a;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
}

.nav-dropdown-menu .nav-dropdown-link:hover,
.nav-dropdown-menu .nav-dropdown-link:focus {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.04));
    color: #2563eb;
}

.nav-dropdown .dropdown-sep {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06), transparent);
    margin: 6px 0
}

/* show on open state (controlled by JS by toggling .open) */
.nav-dropdown.open .nav-dropdown-menu {
    display: block
}

/* Dark mode adjustments for dropdown */
body.dark-mode .nav-dropdown-menu {
    background: rgba(10, 14, 39, 0.9);
    border: 1px solid rgba(167, 139, 250, 0.08);
    color: #e5e7eb
}

body.dark-mode .nav-dropdown-menu .nav-dropdown-link {
    color: #e5e7eb
}

/* Mobile submenu styles */
.mobile-submenu {
    width: 100%;
}

.mobile-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.06);
    border: none;
    cursor: pointer;
    font-weight: 600
}

.mobile-submenu-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding-left: 8px
}

.mobile-submenu-links a {
    padding: 10px;
    border-radius: 8px;
    background: rgba(248, 249, 250, 0.6);
    text-align: left
}

@media (max-width:768px) {
    .mobile-submenu-links a {
        background: transparent
    }
}

.glass-avatar {
    position: relative;
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: transform 0.3s
}

.glass-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s
}

.glass-avatar:hover img {
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    transform: scale(1.05)
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #2563eb, #7c3aed, #2563eb) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s
}

.glass-avatar:hover .avatar-ring {
    opacity: 1;
    animation: rotate 3s linear infinite
}

@keyframes rotate {
    to {
        transform: rotate(360deg)
    }
}

body.dark-mode .glass-avatar img {
    border-color: rgba(167, 139, 250, 0.3)
}

body.dark-mode .glass-avatar:hover img {
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.4)
}

body.dark-mode .avatar-ring {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #60a5fa) border-box
}

.glass-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.625rem 1.25rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 10;
    flex-shrink: 0
}

.glass-button::before {
    content: '';
    position: absolute;
    inset: 0 -100% 0 -100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s
}

.glass-button:hover::before {
    left: 100%
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
    transform: translateY(-2px)
}

body.dark-mode .glass-button {
    background: rgba(10, 14, 39, 0.4);
    border-color: rgba(167, 139, 250, 0.2)
}

body.dark-mode .glass-button:hover {
    background: rgba(10, 14, 39, 0.6);
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.3)
}

#home {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;

    /* Hide all sections except #home for single-page view */
    section:not(#home) {
        display: none !important;
    }
}

#home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(96, 165, 250, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(167, 139, 250, 0.1) 0%, transparent 50%), radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0
}

#home>* {
    position: relative;
    z-index: 1
}

body.dark-mode #home {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.3) 0%, rgba(26, 17, 71, 0.2) 100%)
}

body.dark-mode #home::before {
    background: radial-gradient(circle at 20% 30%, rgba(96, 165, 250, 0.15) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(167, 139, 250, 0.15) 0%, transparent 50%), radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 60%)
}

#home .glass-effect {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    transition: all 0.3s;
    position: relative;
    overflow: hidden
}

#home .glass-effect:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.3);
    transform: translateY(-2px)
}

#home .glass-effect>* {
    position: relative;
    z-index: 1
}

body.dark-mode #home .glass-effect {
    background: rgba(10, 14, 39, 0.4);
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 8px 32px rgba(167, 139, 250, 0.2)
}

body.dark-mode #home .glass-effect:hover {
    background: rgba(10, 14, 39, 0.5);
    border: 1px solid rgba(167, 139, 250, 0.4);
    box-shadow: 0 8px 32px rgba(167, 139, 250, 0.3)
}

.gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(37, 99, 235, 0.4), 0 0 60px rgba(37, 99, 235, 0.2);
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.3))
}

body.dark-mode .gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(96, 165, 250, 0.5), 0 0 80px rgba(96, 165, 250, 0.3);
    filter: drop-shadow(0 4px 12px rgba(96, 165, 250, 0.4))
}

.neon-glow {
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3)
}

.neon-glow:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4)
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3), transparent);
    margin: 60px 0
}

.card-3d,
.project-card {
    background: white;
    border-radius: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
    max-width: 420px;
    min-width: 320px;
    min-height: 420px;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Interactive card enhancements: tilt, subtle glow and focus styles */
.interactive-card {
    perspective: 1200px;
    transform-style: preserve-3d;
    position: relative;
    overflow: visible;
    cursor: pointer;
}

.interactive-card .card-inner {
    transform-style: preserve-3d;
    transition: transform 400ms cubic-bezier(.2, .9, .2, 1);
    will-change: transform;
    padding: 0.25rem;
    border-radius: 12px;
}

.interactive-card::before {
    /* subtle gradient border */
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.08), rgba(167, 139, 250, 0.08));
    z-index: -1;
    opacity: 0;
    transition: opacity 300ms ease, transform 300ms ease;
    transform: scale(0.98);
}

.interactive-card:hover::before,
.interactive-card:focus::before,
.interactive-card:focus-within::before {
    opacity: 1;
    transform: scale(1);
}

.interactive-card:focus {
    outline: none;
}

.interactive-card:focus .card-inner,
.interactive-card:focus-within .card-inner {
    box-shadow: 0 18px 60px rgba(37, 99, 235, 0.12);
    transform: translateY(-6px) rotateX(2deg) rotateY(4deg);
}

.interactive-card .card-media {
    transform-style: preserve-3d;
    will-change: transform;
}

/* small layered parallax for child elements with data-layer attribute */
.interactive-card [data-layer] {
    transform-style: preserve-3d;
    transition: transform 450ms cubic-bezier(.2, .9, .2, 1);
}

/* reset / prefer-reduced-motion */
@media (prefers-reduced-motion: reduce) {

    .interactive-card .card-inner,
    .interactive-card [data-layer] {
        transition: none !important;
        transform: none !important;
    }
}

/* Center cards in grid cells and add stronger hover visuals */
.interactive-card {
    justify-self: center;
    /* centers the card inside grid cell */
    width: 100%;
    max-width: 420px;
    min-width: 320px;
    min-height: 420px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
    -webkit-tap-highlight-color: transparent;
}

.project-card,
.card-3d {
    margin-left: auto;
    margin-right: auto;
}

.interactive-card:hover .card-inner {
    /* gentle lift + slight scale for a modern feel; tilt handled by JS when available */
    transform: translateY(-10px) rotateX(2deg) rotateY(4deg);
    box-shadow: 0 30px 70px var(--card-glow);
    filter: saturate(1.03) drop-shadow(0 10px 30px rgba(37, 99, 235, 0.06));
}

.interactive-card:active .card-inner {
    transform: translateY(-4px) scale(0.995);
}

/* Accent glow on hover */
.interactive-card:hover::before {
    opacity: 1;
    transform: scale(1.02);
    filter: blur(6px);
}

/* subtle moving shine effect */
.interactive-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.0) 0%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.0) 100%);
    transform: translateX(-110%);
    transition: transform 650ms cubic-bezier(.2, .9, .2, 1), opacity 300ms;
    opacity: 0;
    pointer-events: none;
}

.interactive-card:hover::after,
.interactive-card:focus::after {
    transform: translateX(110%);
    opacity: 1;
}

/* accent border glow using CSS variable colors */
.interactive-card::before {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.06));
}

/* Make sure project-images don't overflow and keep layered parallax subtle */
.interactive-card .card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 450ms cubic-bezier(.2, .9, .2, 1);
}

/* Project cards: on wide screens place media and body side-by-side so content can expand */
@media (min-width: 1024px) {
    .project-card .card-inner {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        min-height: 420px;
    }

    .project-card .card-media {
        height: 220px;
        min-height: 180px;
        max-height: 240px;
        border-radius: 14px;
        overflow: hidden;
    }

    .project-card h3 {
        margin-top: 0;
    }
}

/* Header and footer interactive wrapper tweaks: keep tilt subtle and non-intrusive */
.site-header-interactive .card-inner,
.site-footer-interactive .card-inner {
    transition: transform 420ms cubic-bezier(.2, .9, .2, 1), box-shadow 420ms ease;
}

/* Small visual cue for header/footer when hovered/focused */
.site-header-interactive:hover .card-inner,
.site-footer-interactive:hover .card-inner {
    transform: translateY(-4px);
}

/* Allow header interactive card to span the full nav container so internal
   flex (.flex.justify-between) can position the nav links to the right.
   This overrides the global .interactive-card max-width which is useful
   for cards elsewhere but limits header layout. */
.site-header-interactive {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    box-shadow: none;
    /* keep header subtle, inner card handles visuals */
}

/* Slight color variation for focused state to aid keyboard users */
.interactive-card:focus .card-inner,
.interactive-card:focus-within .card-inner {
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.16);
}

/* About section: profile circle and content box */
.about-profile-card {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 14px 40px rgba(16, 24, 40, 0.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.about-profile-card img.about-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.about-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(250, 250, 250, 0.75));
    color: #0f172a;
}

/* Responsive grid for About: fixed-ish image column + fluid content column */
.about-grid {
    display: grid;
    grid-template-columns: minmax(110px, 180px) 1fr;
    /* image column then content column */
    gap: 1.5rem;
    align-items: center;
}

.about-grid .about-profile-card {
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

.about-content {
    max-width: none;
    /* allow content to expand */
    padding: 1.25rem;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Large screens: make the image column a bit smaller so content gets more space */
@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: minmax(120px, 160px) 1fr;
    }

    .about-profile-card {
        width: 150px;
        height: 150px;
    }
}

/* Medium screens: moderate image size */
@media (min-width: 768px) and (max-width: 1023px) {
    .about-grid {
        grid-template-columns: minmax(110px, 140px) 1fr;
    }
}

/* Small screens: stack vertically */
@media (max-width: 767px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-grid .about-profile-card {
        margin-bottom: 0.75rem;
    }

    .about-content {
        padding: 1rem;
    }
}

body.dark-mode .about-content {
    background: rgba(255, 255, 255, 0.02);
    color: #e5e7eb;
}

@media (max-width: 767px) {
    .about-profile-card {
        width: 110px;
        height: 110px;
    }
}

/* Explicit responsive grid rules for skills and projects to ensure 1/2/3 columns
   independent of Tailwind runtime (fixes single-column issues) */
.skills-grid,
.projects-grid,
.projects-grid .projects-grid,
.skills-grid .skills-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    /* matches tailwind gap-8 roughly */
    justify-items: center !important;
}

@media (min-width: 768px) {

    /* tablet: 2 columns */
    .skills-grid,
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1024px) {

    /* desktop: skills -> 3 columns, projects -> 3 columns */
    .skills-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .projects-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

.card-3d.about-card {
    max-width: none
}

.card-3d:hover {
    transform: translateY(-8px) translateZ(0);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15)
}

.project-card:hover {
    transform: translateY(-10px) translateZ(0);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.2)
}

.skill-bar {
    animation: fillBar 2s ease-out;
    will-change: width;
    transform: translateZ(0)
}

@keyframes fillBar {
    from {
        width: 0%
    }
}

.cert-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-width: 280px;
    margin: 0 auto;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden
}

.cert-card:hover {
    transform: translateY(-8px) translateZ(0);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15)
}

.cert-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transform: translateZ(0)
}

.btn-resume,
.project-link {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden
}

.btn-resume:hover,
.project-link:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%)
}

.project-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px
}

.project-link {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    gap: 6px;
    font-weight: 500
}

.video-modal {
    animation: fadeIn 0.3s
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1
    }

    to {
        transform: translateX(400px);
        opacity: 0
    }
}

@keyframes profileRise {
    from {
        transform: translateY(-100px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

@keyframes profilePulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3)
    }

    50% {
        box-shadow: 0 6px 25px rgba(37, 99, 235, 0.5)
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@keyframes blink {

    0%,
    50% {
        border-color: #2563eb
    }

    51%,
    100% {
        border-color: transparent
    }
}

/* Header underline / pop-in animation */
.section-title-anim {
    position: relative;
    display: inline-block;
    transform-origin: center;
    animation: headerPop 650ms cubic-bezier(.2, .9, .2, 1) forwards;
}

.section-title-anim::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    border-radius: 4px;
    transform: translateX(-50%);
    transition: width 420ms cubic-bezier(.2, .9, .2, 1);
}

.section-title-anim.visible::after,
.section-title-anim:hover::after {
    width: 60%;
}

/* Reusable responsive section header used across About / Skills / Projects / Certifications */
.section-header {
    display: block;
    width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-weight: 700;
    color: inherit;
    margin-bottom: 1rem;
    /* default spacing similar to existing mb-4 */
}

/* Responsive sizes: small screens -> slightly smaller, md+ -> larger */
.section-header {
    font-size: 2rem;
    /* ~text-4xl fallback */
}

@media (min-width: 640px) {
    .section-header {
        font-size: 2.5rem;
    }

    /* ~text-5xl */
}

@media (min-width: 768px) {
    .section-header {
        font-size: 3rem;
    }

    /* ~text-6xl */
}

@keyframes headerPop {
    0% {
        transform: translateY(-8px) scale(0.98);
        opacity: 0;
    }

    60% {
        transform: translateY(4px) scale(1.02);
        opacity: 1;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Profile float + ring on hover */
@keyframes floatY {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

.about-profile-card {
    transition: transform 420ms cubic-bezier(.2, .9, .2, 1), box-shadow 420ms;
}

.about-profile-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 28px 80px rgba(37, 99, 235, 0.12);
}

.about-profile-card::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.12), transparent 40%);
    opacity: 0;
    transition: opacity 360ms;
    pointer-events: none;
}

.about-profile-card:hover::after {
    opacity: 1;
}

/* Badges micro-interaction */
.badges-container span,
.about-content .badges-container span {
    transition: transform 220ms cubic-bezier(.2, .9, .2, 1), box-shadow 220ms, background 220ms;
}

.badges-container span:hover,
.about-content .badges-container span:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.08);
}

/* Footer social icons stronger interactive glow */
.footer-social-icon {
    transition: transform 260ms cubic-bezier(.2, .9, .2, 1), box-shadow 260ms, background 260ms;
}

.footer-social-icon:hover {
    transform: translateY(-6px) scale(1.06);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.12);
}

/* Ensure section title animation triggers after load if JS isn't used */
.section-title-anim {
    opacity: 0;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%)
    }

    to {
        transform: translateX(0)
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

/* Advanced Mesh Network Background */

body {
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: radial-gradient(circle at 20% 30%, #0f172a, #000);
}

#mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none
}

#icons-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10000px;
    z-index: -1;
    pointer-events: none
}

.icon {
    position: absolute;
    width: 8px !important;
    height: 8px !important;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 0 2px #60a5fa44);
    opacity: 0.95;
    transition: filter 0.2s;
}

@media(max-width:768px) {
    .tech-icon {
        width: 50px;
        height: 50px;
        opacity: 0.6
    }
}

.profile-photo-nav {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box, linear-gradient(135deg, #2563eb, #1e40af) border-box;
    animation: profileRise 1s ease-out, profilePulse 3s ease-in-out infinite 1s;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3)
}

.profile-photo-nav:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4)
}

.profile-photo-nav img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

/* Profile design box used on home page when editing via code (transparent) */
.profile-design-box {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background-color: transparent;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s, box-shadow 0.3s;
}

.profile-design-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 50px rgba(37, 99, 235, 0.12);
}

@media (min-width: 768px) {
    .profile-design-box {
        width: 220px;
        height: 220px;
    }
}

@media (min-width: 1200px) {
    .profile-design-box {
        width: 260px;
        height: 260px;
    }
}

.footer-enhanced {
    background: white;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

body.about-page .footer-enhanced {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.footer-enhanced .footer-social-links,
.footer-enhanced .footer-contact-details,
.footer-enhanced .footer-copyright {
    margin: 8px 0 !important;
}

body.about-page .footer-enhanced .footer-social-links,
body.about-page .footer-enhanced .footer-contact-details,
body.about-page .footer-enhanced .footer-copyright {
    margin: 4px 0 !important;
}

.footer-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 12px 0;
    width: 100%;
    text-align: center;
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    background: none !important;
    padding: 0;
    border: none;
    box-shadow: none;
    transition: opacity 0.2s ease;
}

.footer-social-links a:hover {
    opacity: 0.7;
}

.footer-social-links i {
    font-size: 1em;
}

.footer-contact-details,
.footer-copyright {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.footer-social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    color: #2c3e50;
    font-size: 1.3rem;
    transition: all 0.3s;
    border: 2px solid rgba(0, 0, 0, 0.1)
}

body.dark-mode .footer-social-icon {
    background: #333;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1)
}

.footer-social-icon:hover {
    transform: translateY(-5px);
    border-color: currentColor
}

.footer-social-icon.github:hover {
    background: #333;
    color: white;
    box-shadow: 0 5px 20px rgba(51, 51, 51, 0.3)
}

.footer-social-icon.linkedin:hover {
    background: #0077b5;
    color: white;
    box-shadow: 0 5px 20px rgba(0, 119, 181, 0.3)
}

.footer-social-icon.whatsapp:hover {
    background: #25D366;
    color: white;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.3)
}

.footer-social-icon.email:hover {
    background: #ea4335;
    color: white;
    box-shadow: 0 5px 20px rgba(234, 67, 53, 0.3)
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.2), transparent);
    margin: 20px 0
}

.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.2)
}

.dark-mode-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5)
}

.dark-mode-toggle i {
    color: white;
    font-size: 1.2rem
}

body.dark-mode .dark-mode-toggle {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3)
}

body.dark-mode .dark-mode-toggle:hover {
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5)
}

.message-popup {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10001;
    max-width: 400px;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.4s;
    display: flex;
    align-items: center;
    gap: 15px
}

.message-popup.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white
}

.message-popup.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white
}

.message-popup i {
    font-size: 1.5rem
}

.message-popup .close-btn {
    margin-left: auto;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: opacity 0.3s
}

.message-popup .close-btn:hover {
    opacity: 1
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite
}

.typing-container {
    display: inline-block;
    min-height: 60px
}

.typing-text {
    display: inline-block;
    border-right: 3px solid #2563eb;
    padding-right: 5px;
    animation: blink 0.7s infinite;
    min-width: 20px
}

.typed-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: #2563eb;
    animation: blink 0.7s infinite;
    margin-left: 2px
}

.mobile-menu-btn {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3)
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5)
}

/* Ensure the mobile menu button sits above other fixed layers and is clickable */
.mobile-menu-btn {
    position: relative;
    z-index: 10002;
    /* above nav (1000) and dark-mode toggle (10000) to ensure visibility */
    pointer-events: auto;
}

body.dark-mode .mobile-menu-btn {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    box-shadow: 0 2px 8px rgba(167, 139, 250, 0.3)
}

body.dark-mode .mobile-menu-btn:hover {
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.5)
}

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 9998;
    padding: 80px 20px 20px;
    overflow-y: auto;
    animation: slideInLeft 0.3s
}

body.dark-mode .mobile-menu {
    background: rgba(26, 26, 46, 0.98)
}

.mobile-menu.active {
    display: block
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #667eea;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
    color: #f5576c
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem
}

.mobile-menu-links a,
.mobile-menu-toggle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.1);
    transition: all 0.3s;
    text-align: center
}

body.dark-mode .mobile-menu-links a,
body.dark-mode .mobile-menu-toggle {
    color: #e5e7eb;
    background: rgba(167, 139, 250, 0.1)
}

.mobile-menu-links a:hover,
.mobile-menu-toggle:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(10px)
}

.mobile-menu-toggle {
    cursor: pointer;
    border: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem
}

@media(max-width:768px) {
    .mobile-menu-btn {
        display: block
    }

    /* Show dark mode toggle inside mobile menu, hide only the fixed floating toggle */
    .dark-mode-toggle {
        display: flex !important;
        position: static;
        width: auto;
        height: auto;
        margin-left: 0.5rem;
        margin-top: 0;
        background: none;
        box-shadow: none;
        border: none;
        border-radius: 8px;
        padding: 0.5rem 0.7rem;
        align-items: center;
        justify-content: center;
    }

    .dark-mode-toggle i {
        color: #1e293b;
        font-size: 1.2rem;
    }

    body.dark-mode .dark-mode-toggle i {
        color: #fbbf24;
    }

    h1 {
        font-size: 2.5rem !important
    }

    .typing-container {
        min-height: 40px
    }

    .typing-container p {
        font-size: 1.25rem !important
    }

    nav {
        padding: 0
    }

    nav .container {
        flex-wrap: nowrap;
        padding-left: 1rem;
        padding-right: 1rem
    }

    .profile-photo-nav {
        width: 40px;
        height: 40px
    }

    .project-links {
        flex-direction: column;
        gap: 0.7rem;
        width: 100%;
        align-items: stretch;
    }

    .project-link {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 1rem;
        padding: 0.9rem 0.5rem;
        border-radius: 10px;
        margin: 0;
        min-width: 0;
        box-sizing: border-box;
    }

    .project-links .project-link i {
        margin-right: 0.5em;
    }

    section {
        position: relative;
        z-index: 1
    }

    .card-3d:hover,
    .project-card:hover {
        transform: translateY(-4px) translateZ(0)
    }

    /* Improve mobile spacing for skills and projects grids */
    .skills-category-list {
        gap: 0.7rem 0.7rem;
        padding: 0.5rem 0;
    }

    .skills-categories-grid,
    .skills-grid,
    .projects-grid {
        gap: 1.2rem !important;
        padding: 0.5rem 0;
    }
}

@media(max-width:480px) {
    h1 {
        font-size: 2rem !important
    }

    .typing-container p {
        font-size: 1rem !important
    }
}


.link-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200000;
    animation: fadeIn 0.3s;
    align-items: center;
    justify-content: center;
}

.link-modal.active {
    display: flex;
}

.link-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 200001;
}

.link-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
    overflow: hidden;
    z-index: 200002;
}

body.dark-mode .link-modal-content {
    background: #1e293b
}

.link-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(245, 87, 108, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: #f5576c;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center
}

.link-modal-close:hover {
    background: #f5576c;
    color: white;
    transform: rotate(90deg)
}

.link-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    gap: 15px
}

body.dark-mode .link-modal-header {
    border-bottom-color: rgba(167, 139, 250, 0.2)
}

.link-modal-icon {
    font-size: 1.8rem;
    color: #667eea
}

body.dark-mode .link-modal-icon {
    color: #a78bfa
}

.link-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0
}

body.dark-mode .link-modal-title {
    color: #f1f5f9
}

.link-modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa
}

body.dark-mode .link-modal-body {
    background: #0f172a
}

#linkModalFrame {
    width: 100%;
    height: 60vh;
    border: none
}

#linkModalImage {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain
}

.link-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    gap: 15px;
    justify-content: flex-end
}

body.dark-mode .link-modal-footer {
    border-top-color: rgba(167, 139, 250, 0.2)
}

.link-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px
}

.link-modal-btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea
}

.link-modal-btn-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px)
}

body.dark-mode .link-modal-btn-secondary {
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa
}

body.dark-mode .link-modal-btn-secondary:hover {
    background: rgba(167, 139, 250, 0.2)
}

.link-modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white
}

.link-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3)
}

@media(max-width:768px) {
    .link-modal-content {
        width: 95%;
        max-height: 90vh
    }

    .link-modal-header {
        padding: 20px 20px 15px
    }

    .link-modal-footer {
        padding: 15px 20px;
        flex-direction: column
    }

    .link-modal-btn {
        width: 100%;
        justify-content: center
    }

    #linkModalFrame,
    #linkModalImage {
        height: 50vh;
        max-height: 50vh
    }
}

/* GitHub icon visibility in both modes */
.fab.fa-github {
    color: #24292e;
    /* GitHub dark color for light mode */
}

body.dark-mode .fab.fa-github {
    color: #fff;
    /* White for dark mode */
}


img {
    max-width: 100%;
    height: auto;
}

.glass-effect,
.project-card,
.cert-card,
.education-card {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Live Badges Section Styles */
#badges {
    margin-bottom: 4rem;
}

.badge-wrapper {
    display: inline-block;
    text-align: center;
    transition: transform 0.3s ease;
}

.badge-wrapper:hover {
    transform: translateY(-8px);
}

.oracle-badge-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    transition: all 0.3s ease;
}

.oracle-badge-img:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.3);
}

.badge-wrapper p {
    max-width: 150px;
    word-wrap: break-word;
    line-height: 1.4;
}

body.dark-mode .badge-wrapper p {
    color: #e5e7eb;
}

#live-badges-container {
    min-height: 300px;
}