/* =========================================
   1. VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* Colors - Light Mode (Default) */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));

    /* iOS-style Easings */
    --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

    /* Glassmorphism Defaults */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --text: #e5e7eb;
    --text-light: #9ca3af;
    --bg: #0b0b0f;
    --bg-light: #161b22;
    --bg-card: #1c2128;
    --border: #30363d;
    --nav-bg: rgba(13, 17, 23, 0.8);
    --glass-bg: rgba(13, 17, 23, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Geist Sans', 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Silky Theme Transition */
body,
.nav-wrap,
.card,
.tech-item,
.contact-item,
.cool-project-card,
.project-content,
.form-input,
.form-textarea {
    transition: background-color 0.3s var(--ease-smooth),
                color 0.3s var(--ease-smooth),
                border-color 0.3s var(--ease-smooth),
                box-shadow 0.3s var(--ease-smooth);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   3. LAYOUT UTILITIES
   ========================================= */
.container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 4rem 0;
    position: relative;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-divider {
    height: 4px;
    width: 60px;
    background: var(--primary);
    margin: 0.5rem auto 1rem;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   4. NAVIGATION (Bubble/Pill Style)
   ========================================= */
.nav-container {
    position: fixed;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

.nav-wrap {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.nav-wrap:active {
    transform: scale(0.97);
}

/* Sliding Pill Navigation Bubble */
.bubble {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 99px;
    /* Spring animation for iOS feel */
    transition: all 0.55s cubic-bezier(0.25, 0.85, 0.15, 1.15); 
    pointer-events: none;
    z-index: 0;
}

.bubble.active {
    background: var(--primary);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.bubble.hover {
    background: rgba(120, 120, 120, 0.15);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.85, 0.15, 1.15), opacity 0.2s ease;
}

[data-theme="dark"] .bubble.hover {
    background: rgba(255, 255, 255, 0.12);
}

.nav {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav a {
    color: var(--text-light);
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 99px;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
}

.nav a:active {
    transform: scale(0.92);
}

.nav a:hover {
    color: var(--text);
}

.nav a.active {
    color: #ffffff;
}

/* Theme Toggle Button */
.theme-toggle,
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: var(--nav-bg);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 1001;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: 0.3s;
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    /* Offset for fixed nav */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Light mode mesh background */
.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(6, 182, 212, 0.06) 0px, transparent 50%);
    filter: blur(80px);
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

/* Dark mode mesh background */
[data-theme="dark"] .hero-bg::before {
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.16) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
}

[data-theme="dark"] .hero-bg::after {
    background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 1s ease-out;
}

/* Profile Image */
.profile-image-container {
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.profile-image-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--bg);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-image:hover img {
    transform: scale(1.1);
}

/* Terminal & Text */
/* Add this to styles.css if missing */
.terminal-greeting {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.1);
    /* Light blue background */
    color: var(--primary);
    /* Primary text color */
    padding: 8px 16px;
    border-radius: 20px;
    /* Rounded pill shape */
    font-family: 'Courier New', monospace;
    /* Code font */
    font-size: 0.9rem;
    margin-top: 1.5rem;
    /* Space from profile pic */
    margin-bottom: 1rem;
    /* Space from Name */
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Optional: Animation to make it fade in */
.terminal-greeting {
    animation: fadeIn 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(to right, var(--text), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    height: 30px;
    /* Prevent layout shift during typing */
}

.typing-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cursor {
    animation: blink 1s infinite;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-gradient {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.4s var(--ease-ios);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-gradient:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.btn-gradient:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

.btn-outline {
    border: 2px solid var(--border);
    color: var(--text);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

/* Social Links */
.social-links {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-light);
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: none;
    color: var(--text-light);
    animation: bounce 2s infinite;
    cursor: pointer;
}

/* Modal Gallery Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-btn i {
    font-size: 1.2rem;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* =========================================
   6. ABOUT & STATS SECTION
   ========================================= */
.about-container {
    max-width: 900px;
    margin: 0 auto;
}

.about-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.about-intro p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.highlight-cyan {
    color: #06b6d4;
    font-weight: 600;
}

.highlight-blue {
    color: #2563eb;
    font-weight: 600;
}

.highlight-purple {
    color: #9333ea;
    font-weight: 600;
}

/* Stats Grid */
.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.stat-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.5s var(--ease-spring);
    cursor: default;
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.stat-item:active {
    transform: scale(0.96);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Skills Grid */
.skills-section h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--bg-card);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-ios);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.tech-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-smooth);
    flex-shrink: 0;
}

.tech-svg {
    width: 22px;
    height: 22px;
    stroke-width: 2px;
}

.tech-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tech-info p {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.skill-level {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

/* Premium Dynamic Hover Glowing Colors */
.tech-item:hover {
    transform: translateY(-5px);
    background: var(--bg-card);
}

/* Web Accents (Blue Glow) */
.tech-item.item-web:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}
.tech-item.item-web:hover .tech-icon-box {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}
.tech-item.item-web .skill-level {
    color: #3b82f6;
}

/* Coding Accents (Purple Glow) */
.tech-item.item-coding:hover {
    border-color: #a855f7;
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.15);
}
.tech-item.item-coding:hover .tech-icon-box {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}
.tech-item.item-coding .skill-level {
    color: #a855f7;
}

/* Database Accents (Cyan Glow) */
.tech-item.item-db:hover {
    border-color: #06b6d4;
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.15);
}
.tech-item.item-db:hover .tech-icon-box {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}
.tech-item.item-db .skill-level {
    color: #06b6d4;
}

/* Support/Helpdesk Accents (Orange Glow) */
.tech-item.item-support:hover {
    border-color: #f97316;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.15);
}
.tech-item.item-support:hover .tech-icon-box {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}
.tech-item.item-support .skill-level {
    color: #f97316;
}

/* Collaboration Accents (Emerald Glow) */
.tech-item.item-collab:hover {
    border-color: #10b981;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.15);
}
.tech-item.item-collab:hover .tech-icon-box {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.tech-item.item-collab .skill-level {
    color: #10b981;
}

/* Creative/Solving Accents (Amber/Yellow Glow) */
.tech-item.item-creative:hover {
    border-color: #f59e0b;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.15);
}
.tech-item.item-creative:hover .tech-icon-box {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.tech-item.item-creative .skill-level {
    color: #f59e0b;
}

/* Git Version Accents (Pink Glow) */
.tech-item.item-git:hover {
    border-color: #ec4899;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.15);
}
.tech-item.item-git:hover .tech-icon-box {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}
.tech-item.item-git .skill-level {
    color: #ec4899;
}

/* AI Accents (Red Glow) */
.tech-item.item-ai:hover {
    border-color: #ef4444;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.15);
}
.tech-item.item-ai:hover .tech-icon-box {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.tech-item.item-ai .skill-level {
    color: #ef4444;
}

/* =========================================
   7. EXPERIENCE & EDUCATION (Portfolio Grid)
   ========================================= */
.portfolio-container {
    background: var(--bg-light);
    padding: 4rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grid-column h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    position: relative;
    transition: all 0.5s var(--ease-ios);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card:active {
    transform: scale(0.97);
}

.card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card .date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    display: block;
}

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Card Type Colors */
.card.certification {
    border-left-color: #9333ea;
}

.card.education {
    border-left-color: #06b6d4;
}

/* =========================================
   8. PROJECTS SECTION (Slider & Grid)
   ========================================= */
/* Home Page Slider */
.project-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin-top: 2rem;
    border-radius: 16px;
}

.slider-container {
    display: flex;
    width: 100%;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}

/* Hide Scrollbar */
.slider-container::-webkit-scrollbar {
    height: 8px;
}

.slider-container::-webkit-scrollbar-track {
    background: transparent;
}

.slider-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.slide {
    min-width: 300px;
    flex: 0 0 33%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: var(--shadow);
}

.slide-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 2rem 1.5rem 1.5rem;
    color: white;
}

.slide-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--primary);
    /* Lighter blue for visibility */
    font-weight: 600;
}

/* Detailed Projects (projects.html) */
.project-details {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.project-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.project-header h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-description {
    margin: 2rem 0;
    color: var(--text-light);
}

.features-list {
    margin: 2rem 0;
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
}

.features-list h4 {
    margin-bottom: 1rem;
    color: var(--text);
}

.features-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.features-list li i {
    color: var(--primary);
    margin-top: 4px;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-gallery img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* =========================================
   9. CONTACT SECTION
   ========================================= */
.contact-section {
    background: var(--bg-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* --- Click-to-Copy Button & Tooltip --- */
.btn-copy {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease-ios);
    padding: 0;
}

[data-theme="dark"] .btn-copy {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.2);
}

.btn-copy:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: scale(1.1);
}

.btn-copy:active {
    transform: scale(0.92);
}

.copy-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #10b981; /* Premium success emerald green */
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    opacity: 0;
    z-index: 100;
    white-space: nowrap;
    animation: tooltipFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #10b981 transparent transparent transparent;
}

@keyframes tooltipFadeUp {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}


.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-form-container {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
}

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

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-send {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.3s;
}

.btn-send:hover {
    opacity: 0.9;
}

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* =========================================
   10. FOOTER
   ========================================= */
.main-footer {
    background: #111827;
    /* Always dark */
    color: #e5e7eb;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: #60a5fa;
    /* Light blue */
    margin-bottom: 1.5rem;
}

.footer-nav li {
    margin-bottom: 0.8rem;
}

.footer-nav a {
    color: #9ca3af;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: white;
}

.footer-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tech-tags span {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.heart-icon {
    width: 16px;
    color: #ef4444;
    vertical-align: middle;
}

/* Simple Footer (Projects Page) */
.footer {
    background: var(--bg-card);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-social {
    margin-bottom: 1rem;
}

.footer-social a {
    font-size: 1.5rem;
    margin: 0 10px;
    color: var(--text-light);
}

.footer-social a:hover {
    color: var(--primary);
}

/* =========================================
   11. SCROLL TO TOP & ANIMATIONS
   ========================================= */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: all 0.8s var(--ease-ios);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -10px);
    }

    60% {
        transform: translate(-50%, -5px);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* =========================================
   12. MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .slide {
        flex: 0 0 50%;
        /* 2 slides per view */
    }
}

@media (max-width: 768px) {

    /* Navigation */
    .hamburger {
        display: flex;
    }

    .nav-wrap {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 80px;
        right: 20px;
        background: var(--bg-card);
        width: 250px;
        padding: 20px;
        border-radius: 16px;
        align-items: stretch;
    }

    .nav-wrap.active {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    .nav {
        flex-direction: column;
        width: 100%;
    }

    .nav a {
        width: 100%;
        text-align: center;
        padding: 12px;
        border-radius: 8px;
    }

    .bubble {
        display: none !important;
    }

    .nav a.active {
        background: var(--primary);
        color: #ffffff !important;
    }

    .theme-toggle {
        justify-content: center;
        margin-top: 10px;
        margin-left: 0;
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        padding: 0 2rem;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }

    /* Sections */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-tech-tags {
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .slide {
        flex: 0 0 85%;
        /* 1 slide with peek */
    }
}

/*=========================================
   12. project-content page
   ========================================= */

/* --- Projects Showcase Grid --- */
.project-page-top {
    padding-top: 120px;
    /* Space for the floating nav */
}

/* --- Category Filter Container & Pills --- */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: var(--shadow);
}

.filter-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* Card Filtering Animations */
.cool-project-card.hide {
    display: none !important;
}

.cool-project-card.fade-out {
    opacity: 0;
    transform: scale(0.9) translateY(15px);
    transition: all 0.35s var(--ease-smooth);
}

.cool-project-card.fade-in {
    animation: filterFadeIn 0.4s var(--ease-spring) forwards;
}

@keyframes filterFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(15px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.projects-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    padding-bottom: 5rem;
}

/* --- The "Cool" Card --- */
.cool-project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.cool-project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

/* Image Hover Effect */
.project-image-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cool-project-card:hover .project-image-wrapper img {
    transform: scale(1.1) rotate(1deg);
}

/* Badges on Image */
.project-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
}

.badge {
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Info Section */
.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.project-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Action Buttons */
.project-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-primary-sm {
    background: var(--primary);
    color: white;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-primary-sm:hover {
    background: var(--primary-dark);
}

.btn-outline-sm {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s, color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-outline-sm:hover {
    background: var(--primary);
    color: #fff;
}

.btn-download {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}

.btn-download:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.github-icon-link {
    font-size: 1.4rem;
    color: var(--text-light);
    transition: color 0.3s;
}

.github-icon-link:hover {
    color: var(--primary);
}

/* --- Project Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    overflow-y: auto;
}

.modal-content {
    background: var(--bg);
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 1100px;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 35px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    margin-top: 20px;
}

.main-image-container img {
    width: 100%;
    border-radius: 15px;
    border: 1px solid var(--border);
}

.thumbnail-grid {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail-grid img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
}

.thumbnail-grid img.active {
    opacity: 1;
    border: 2px solid var(--primary);
}

@media (max-width: 900px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}

.projects-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.cool-project-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    border: 1px solid var(--border);
}

.cool-project-card:hover {
    transform: translateY(-10px);
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg);
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 1000px;
    border-radius: 20px;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.thumbnail-grid {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail-grid img {
    width: 60px;
    height: 45px;
    cursor: pointer;
    border-radius: 5px;
    opacity: 0.6;
}

.thumbnail-grid img.active {
    opacity: 1;
    border: 2px solid var(--primary);
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}
/* =========================================
   CHAT WIDGET
   ========================================= */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Geist Sans', 'Inter', sans-serif;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s var(--ease-spring), background 0.3s var(--ease-smooth);
}

.chat-toggle-btn:hover {
    transform: scale(1.05);
    background: var(--primary-dark);
}

.chat-toggle-btn i {
    width: 24px;
    height: 24px;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s var(--ease-spring);
    transform-origin: bottom right;
}

.chat-window.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.chat-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-info h4 {
    margin: 0;
    font-weight: 600;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-close-btn:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    max-width: 85%;
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message.assistant {
    align-self: flex-start;
}

.message-content {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.chat-message.user .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .message-content {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-message.assistant.typing .message-content {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 14px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-light);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

#chat-form {
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: var(--primary);
}

#chat-submit {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

#chat-submit:hover {
    background: var(--primary-dark);
}

#chat-submit:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        position: fixed;
    }
}

/* =========================================
   TIMELINE STYLES FOR WORK EXPERIENCE
   ========================================= */
.timeline {
    position: relative;
    padding-left: 28px;
    margin-left: 8px;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.reveal.visible .timeline-item {
    animation: timelineFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes timelineFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-dot {
    position: absolute;
    left: -37px; /* -28 padding - 2 border - 7 to center 14px dot */
    top: 24px; /* aligned with card top padding */
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--border);
    z-index: 2;
    transition: all 0.4s var(--ease-spring);
    box-shadow: 0 0 0 4px var(--bg);
}

.timeline-dot.current-dot {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 4px var(--bg), 0 0 12px var(--primary);
}

.timeline-item:hover .timeline-dot {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 0 4px var(--bg), 0 0 15px rgba(37, 99, 235, 0.4);
}

.timeline-item .card {
    margin-bottom: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.timeline-item:hover .card {
    transform: translateX(6px);
    box-shadow: var(--glass-shadow-hover);
    border-color: var(--primary-light);
}


/* Certification Scrollable List */
.cert-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 700px; /* Keep it aligned roughly with the timeline height */
    overflow-y: auto;
    padding-right: 8px;
    padding-left: 2px;
    margin-right: -8px; /* Compensate for padding */
}

.cert-list::-webkit-scrollbar {
    width: 4px;
}

.cert-list::-webkit-scrollbar-track {
    background: transparent;
}

.cert-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.cert-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.cert-list .card {
    margin-bottom: 0;
}

/* Elegant Theme Switching Class */
html.theme-transition,
html.theme-transition *,
html.theme-transition *:before,
html.theme-transition *:after {
    transition: background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                stroke 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                fill 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* =========================================
   UNIVERSAL iOS PHYSICS OVERRIDES
   ========================================= */

/* Add spring transition to all cards, interactive items, and buttons */
.card,
.stat-item,
.tech-item,
.contact-item,
.form-input,
.form-textarea,
.btn-primary, 
.btn-primary-sm, 
.btn-outline, 
.btn-outline-sm, 
.btn-send, 
.btn-download {
    transition: all 0.5s cubic-bezier(0.25, 0.85, 0.15, 1.15), background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* iOS Tap Highlight Physics */
.card:active,
.stat-item:active,
.btn-primary:active, 
.btn-primary-sm:active, 
.btn-outline:active, 
.btn-outline-sm:active, 
.btn-send:active, 
.btn-download:active,
.tech-item:active {
    transform: scale(0.95) !important;
}

/* Make inputs slightly bouncy on focus */
.form-input:focus,
.form-textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15) !important;
    border-color: var(--primary) !important;
}

/* Bouncy hover states for items that didn't have it */
.tech-item:hover,
.btn-primary:hover,
.btn-primary-sm:hover,
.btn-outline-sm:hover,
.btn-send:hover {
    transform: translateY(-4px) scale(1.02);
}

/* Social links spring hover */
.social-links a,
.footer-social a {
    transition: all 0.4s cubic-bezier(0.25, 0.85, 0.15, 1.15) !important;
    display: inline-block;
}

.social-links a:hover,
.footer-social a:hover {
    transform: translateY(-5px) scale(1.15) !important;
}

.social-links a:active,
.footer-social a:active {
    transform: scale(0.85) !important;
}

/* Chat widget physics */
.chat-toggle-btn {
    transition: all 0.5s cubic-bezier(0.25, 0.85, 0.15, 1.15) !important;
}
.chat-toggle-btn:hover {
    transform: translateY(-5px) scale(1.1) !important;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4) !important;
}
.chat-toggle-btn:active {
    transform: scale(0.9) !important;
}

/* Scroll-to-top physics */
.scroll-top {
    transition: all 0.5s cubic-bezier(0.25, 0.85, 0.15, 1.15) !important;
}
.scroll-top:hover {
    transform: translateY(-5px) scale(1.1) !important;
}
.scroll-top:active {
    transform: scale(0.9) !important;
}

/* User specifically requested unique style for the third section without combining selectors */
section:nth-of-type(3) {
    background: linear-gradient(145deg, var(--bg-light) 0%, var(--bg) 100%);
    border-radius: 40px;
    margin: 4rem auto;
    max-width: 1350px;
    padding: 5rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.03), inset 0 2px 20px rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] section:nth-of-type(3) {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), inset 0 2px 20px rgba(255, 255, 255, 0.02);
}

section:nth-of-type(3)::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--gradient-primary);
    opacity: 0.8;
}

/* =========================================
   CREDENTIALS (BENTO BOX LAYOUT)
   ========================================= */
.credentials-section {
    padding: 5rem 0;
    background: var(--bg);
}

.credentials-bento {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    max-width: 1250px;
    margin: 0 auto;
}

.bento-box {
    background: var(--bg-card);
    border-radius: 32px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.5s cubic-bezier(0.25, 0.85, 0.15, 1.15);
    position: relative;
    overflow: hidden;
}

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

.bento-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text);
}

.bento-title i {
    color: var(--primary);
}

/* Education Cards */
.bento-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.new-edu-card {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem !important;
    margin: 0 !important;
    border-left: none !important;
    background: var(--bg-light);
}

.edu-icon {
    background: var(--gradient-primary);
    color: white;
    padding: 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

/* Certifications Grid */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

.mini-cert {
    padding: 1.5rem !important;
    margin: 0 !important;
    border-left: 3px solid #9333ea !important;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

.mini-cert h4 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.mini-cert .date {
    font-size: 0.8rem;
    position: relative;
    z-index: 2;
    margin: 0;
}

.cert-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -15px;
    width: 80px;
    height: 80px;
    opacity: 0.04;
    transform: rotate(-15deg);
    z-index: 1;
    pointer-events: none;
}

[data-theme="dark"] .cert-bg-icon {
    opacity: 0.08;
}

@media (max-width: 992px) {
    .credentials-bento {
        grid-template-columns: 1fr;
    }
}

/* Ensure timeline is centered properly now that it's isolated */
.experience-section .timeline {
    width: 100%;
    margin: 0 auto;
    padding-left: 10px;
}
.experience-section {
    padding: 2rem 0; /* Let the section nth-of-type(3) padding handle the rest */
}

/* Bootcamp Featured Badge Styles */
.bootcamp-bento {
    grid-column: 1 / -1; /* Span full width */
    background: linear-gradient(135deg, var(--bg-card), var(--bg-light));
}

.bootcamp-content {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.bootcamp-image-col {
    flex: 0 0 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bootcamp-badge-img {
    width: 100%;
    max-width: 250px;
    filter: drop-shadow(0 15px 30px rgba(37, 99, 235, 0.25));
    transition: transform 0.5s cubic-bezier(0.25, 0.85, 0.15, 1.15);
}

.bootcamp-bento:hover .bootcamp-badge-img {
    transform: scale(1.05) rotate(-2deg);
}

.bootcamp-details {
    flex: 1;
}

.bootcamp-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.bootcamp-issuer {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.bootcamp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.bootcamp-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 50px;
    border: 1px solid var(--border);
}

.bootcamp-desc {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.bootcamp-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.bootcamp-skills .badge {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
}

@media (max-width: 992px) {
    .credentials-bento {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bootcamp-content {
        flex-direction: column;
        text-align: center;
    }
    .bootcamp-meta {
        justify-content: center;
    }
    .bootcamp-skills {
        justify-content: center;
    }
}

/* =========================================
   FEATURED PROJECTS CONTAINER (PREMIUM STYLING & FEATURES)
   ========================================= */
section#projects:nth-of-type(5) > div:nth-of-type(1) {
    background: var(--bg-card);
    background-image: radial-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    border-radius: 40px;
    padding: 5rem 3rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05), inset 0 2px 20px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(37, 99, 235, 0.15);
    position: relative;
    max-width: 1350px;
    margin: 4rem auto;
    overflow: hidden;
}

/* Dark theme specific container styles */
[data-theme="dark"] section#projects:nth-of-type(5) > div:nth-of-type(1) {
    background-color: var(--bg-card);
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), inset 0 2px 20px rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Feature 1: Ambient Animated Glow Orb */
section#projects:nth-of-type(5) > div:nth-of-type(1)::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -20%;
    width: 70%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    transform: rotate(-45deg);
    z-index: 0;
    pointer-events: none;
    animation: projectsOrbDrift 20s infinite alternate ease-in-out;
}

[data-theme="dark"] section#projects:nth-of-type(5) > div:nth-of-type(1)::before {
    background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.15) 0%, rgba(20, 20, 25, 0) 70%);
}

@keyframes projectsOrbDrift {
    0% { transform: rotate(-45deg) translate(0, 0) scale(1); }
    100% { transform: rotate(-45deg) translate(15%, 15%) scale(1.1); }
}

/* Feature 2: Subtle Top Edge Highlight Ribbon */
section#projects:nth-of-type(5) > div:nth-of-type(1)::after {
    content: '';
    position: absolute;
    top: 0; 
    left: 10%; 
    right: 10%; 
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 10px 10px;
    opacity: 0.8;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

/* Ensure inner contents sit above the decorative background elements */
section#projects:nth-of-type(5) > div:nth-of-type(1) > * {
    position: relative;
    z-index: 1;
}

/* Adjust the slider inside the new container for better breathing room */
section#projects:nth-of-type(5) > div:nth-of-type(1) .project-slider {
    margin-top: 3.5rem;
}

/* =========================================
   INTERACTIVE SLIDER CONTAINER STYLES 
   ========================================= */
section#projects:nth-of-type(5) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(1) {
    /* Create faded edges for a seamless scrolling effect */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    padding: 1rem 0 3rem 0; /* Extra bottom padding for the custom scrollbar */
    perspective: 1000px;
}

/* Custom High-Tech Scrollbar just for this container */
section#projects:nth-of-type(5) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(1)::-webkit-scrollbar {
    height: 12px;
}

section#projects:nth-of-type(5) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(1)::-webkit-scrollbar-track {
    background: rgba(37, 99, 235, 0.05);
    border-radius: 10px;
    margin: 0 5%; /* Keep track within the visible unmasked area */
}

section#projects:nth-of-type(5) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(1)::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

/* Make the slides inside this container pop with a slight 3D rotation on hover */
section#projects:nth-of-type(5) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(1) > .slide {
    transition: all 0.6s cubic-bezier(0.25, 0.85, 0.15, 1.15);
    border: 1px solid rgba(255,255,255,0.1);
}

section#projects:nth-of-type(5) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(1) > .slide:hover {
    transform: translateY(-15px) scale(1.02) rotateX(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 0 0 2px var(--primary);
    z-index: 10;
}

/* =========================================
   QUICK VIEW BUTTON & SLIDE ACTIONS
   ========================================= */
.slide-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 1rem;
}

.quick-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-ios);
    backdrop-filter: blur(10px);
}

.quick-view-btn:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-2px);
}

/* =========================================
   QUICK VIEW MODAL STYLES
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-ios);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 800px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 80px rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.85, 0.15, 1.15);
    opacity: 0;
}

.modal-overlay.active .modal-content,
.modal[style*="display: block"] .modal-content,
.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    color: var(--text);
    transition: all 0.3s ease;
}

[data-theme="dark"] .modal-close {
    background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
    background: var(--gradient-primary);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
}

.modal-image-container {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

#modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    padding: 2.5rem;
}

#modal-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

#modal-desc {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
    .modal-image-container {
        width: 45%;
        height: auto;
        min-height: 400px;
    }
    .modal-details {
        width: 55%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* =========================================
   CONTACT SECTION CONTAINER (PREMIUM STYLING)
   ========================================= */
section#contact:nth-of-type(6) > div:nth-of-type(1) {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-light) 100%);
    border-radius: 40px;
    padding: 5rem 3rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05), inset 0 2px 20px rgba(255, 255, 255, 0.4);
    border: 1px solid var(--border);
    position: relative;
    max-width: 1350px;
    margin: 4rem auto;
    overflow: hidden;
}

[data-theme="dark"] section#contact:nth-of-type(6) > div:nth-of-type(1) {
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.8) 0%, rgba(30, 30, 35, 0.6) 100%);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), inset 0 2px 20px rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Feature: Animated Gradient Mesh Background for Contact */
section#contact:nth-of-type(6) > div:nth-of-type(1)::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.1) 0%, rgba(255, 255, 255, 0) 50%);
    z-index: 0;
    pointer-events: none;
    animation: contactOrbPulse 15s infinite alternate ease-in-out;
}

[data-theme="dark"] section#contact:nth-of-type(6) > div:nth-of-type(1)::before {
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.2) 0%, rgba(20, 20, 25, 0) 60%);
}

@keyframes contactOrbPulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.5; }
    100% { transform: scale(1.5) translate(-10%, 10%); opacity: 1; }
}

/* Ensure contents stay above background */
section#contact:nth-of-type(6) > div:nth-of-type(1) > * {
    position: relative;
    z-index: 1;
}

/* Adjust internal grid for better spacing within new container */
section#contact:nth-of-type(6) > div:nth-of-type(1) .contact-grid {
    margin-top: 4rem;
}

/* =========================================
   FORM SUCCESS ANIMATION
   ========================================= */
.form-status {
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.success-animation {
    width: 24px;
    height: 24px;
    display: inline-block;
}

.checkmark {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: block;
    stroke-width: 4;
    stroke: #22c55e;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #22c55e;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 4;
    stroke-miterlimit: 10;
    stroke: #22c55e;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px rgba(34, 197, 94, 0.1);
    }
}

.status-text {
    opacity: 0;
    animation: fadeInText 0.5s ease 0.8s forwards;
}

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

/* =========================================
   CONTACT SECTION INNER ELEMENTS FIX (PREMIUM)
   ========================================= */

/* Make Contact Items Translucent Glass */
section#contact:nth-of-type(6) > div:nth-of-type(1) .contact-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: all 0.4s var(--ease-ios);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] section#contact:nth-of-type(6) > div:nth-of-type(1) .contact-item {
    background: rgba(20, 20, 25, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

section#contact:nth-of-type(6) > div:nth-of-type(1) .contact-item:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05), 0 0 15px rgba(37, 99, 235, 0.1);
}

/* Premium Icon Boxes */
section#contact:nth-of-type(6) > div:nth-of-type(1) .icon-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.02) 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.2);
    width: 56px;
    height: 56px;
    border-radius: 16px;
    flex-shrink: 0;
    transition: all 0.4s var(--ease-ios);
}

[data-theme="dark"] section#contact:nth-of-type(6) > div:nth-of-type(1) .icon-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(37, 99, 235, 0.05) 100%);
    box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.05);
}

section#contact:nth-of-type(6) > div:nth-of-type(1) .contact-item:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-primary);
    color: white;
}

/* Fix Lucide Icons in Contact Info */
section#contact:nth-of-type(6) > div:nth-of-type(1) .icon-box svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
}

/* Contact Form Container Glass Effect */
section#contact:nth-of-type(6) > div:nth-of-type(1) .contact-form-container {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    padding: 3rem;
}

[data-theme="dark"] section#contact:nth-of-type(6) > div:nth-of-type(1) .contact-form-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Premium Inputs */
section#contact:nth-of-type(6) > div:nth-of-type(1) .form-input,
section#contact:nth-of-type(6) > div:nth-of-type(1) .form-textarea {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 16px;
    font-size: 1rem;
    transition: all 0.3s var(--ease-ios);
}

[data-theme="dark"] section#contact:nth-of-type(6) > div:nth-of-type(1) .form-input,
[data-theme="dark"] section#contact:nth-of-type(6) > div:nth-of-type(1) .form-textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

section#contact:nth-of-type(6) > div:nth-of-type(1) .form-input:focus,
section#contact:nth-of-type(6) > div:nth-of-type(1) .form-textarea:focus {
    background: var(--bg-card);
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1) !important;
}

/* Send Button Enhancement */
section#contact:nth-of-type(6) > div:nth-of-type(1) .btn-send {
    border-radius: 12px;
    padding: 16px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

section#contact:nth-of-type(6) > div:nth-of-type(1) .btn-send:hover {
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.3);
}


/* =========================================
   CONTACT SOCIAL ICONS (PREMIUM)
   ========================================= */
section#contact:nth-of-type(6) > div:nth-of-type(1) .social-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 1.2rem;
    transition: all 0.4s var(--ease-ios);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

[data-theme="dark"] section#contact:nth-of-type(6) > div:nth-of-type(1) .social-icon-btn {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

section#contact:nth-of-type(6) > div:nth-of-type(1) .social-icon-btn.linkedin:hover {
    background: #0077b5;
    color: #ffffff;
    border-color: #0077b5;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 119, 181, 0.4);
}

section#contact:nth-of-type(6) > div:nth-of-type(1) .social-icon-btn.github:hover {
    background: #333333;
    color: #ffffff;
    border-color: #333333;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(51, 51, 51, 0.4);
}

[data-theme="dark"] section#contact:nth-of-type(6) > div:nth-of-type(1) .social-icon-btn.github:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3);
}

section#contact:nth-of-type(6) > div:nth-of-type(1) .social-icon-btn.email:hover {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
}

/* Fix Boxicons size in icon-boxes */
section#contact:nth-of-type(6) > div:nth-of-type(1) .icon-box i {
    font-size: 24px;
}

/* =========================================
   HIDE REDUNDANT EMAIL CONTACT ITEM
   ========================================= */
section#contact:nth-of-type(6) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(1) > div:nth-of-type(1) {
    display: none !important;
}

/* =========================================
   STATIC CV MODAL FIX
   ========================================= */
div#static-cv-modal .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

[data-theme="dark"] div#static-cv-modal .modal-content {
    background: #161b22;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

div#static-cv-modal .modal-body {
    background: var(--bg);
}

[data-theme="dark"] div#static-cv-modal .modal-body {
    background: #0b0b0f;
}

div#static-cv-modal .modal-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] div#static-cv-modal .modal-header {
    background: #161b22;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

div#static-cv-modal .modal-close {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
}

[data-theme="dark"] div#static-cv-modal .modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

div#static-cv-modal .modal-close:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Ensure CV document is always light mode for printing and preview */
#static-cv-document {
    background-color: #ffffff !important;
    color: #333333 !important;
}
#static-cv-document h1, 
#static-cv-document h2, 
#static-cv-document h3, 
#static-cv-document h4, 
#static-cv-document p, 
#static-cv-document span, 
#static-cv-document li, 
#static-cv-document div {
    color: inherit;
}
#static-cv-document h1 {
    color: #111111 !important;
}
#static-cv-document h3 {
    color: #2563eb !important;
}
#static-cv-document h4 {
    color: #111111 !important;
}
#static-cv-document p {
    color: #444444 !important;
}
#static-cv-document .bx {
    color: #2563eb !important;
}
[data-theme="dark"] #static-cv-document {
    background-color: #ffffff !important;
    color: #333333 !important;
}
[data-theme="dark"] #static-cv-document * {
    text-shadow: none !important;
}

/* Fix for CV document bleeding out of modal container */
div#static-cv-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh !important;
}

div#static-cv-modal .modal-body {
    flex: 1;
    overflow-y: auto !important;
    padding: 2rem !important;
}

#static-cv-document {
    /* Ensure it doesn't break out of the flex container */
    max-width: 100%;
    overflow: hidden;
    height: auto !important;
    display: block;
}

/* Additional fail-safes for the paper element */
#static-cv-document {
    height: max-content !important;
    min-height: 100% !important;
}

/* Additional styles to ensure newly injected DOM elements in the CV match the design */
#static-cv-document h4 {
    color: #111 !important;
}
#static-cv-document ul {
    color: #444 !important;
}

/* Stagger Animation Trigger Classes */
.project-slide-stagger {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s cubic-bezier(0.25, 0.85, 0.15, 1.15);
}

.project-slide-stagger.in-view {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Dynamic multi-layered drop shadow on hover for project slides */
#projects .slide.project-slide-stagger.in-view {
    transition: transform 0.5s cubic-bezier(0.25, 0.85, 0.15, 1.15), box-shadow 0.5s cubic-bezier(0.25, 0.85, 0.15, 1.15) !important;
}

#projects .slide.project-slide-stagger.in-view:hover {
    transform: translateY(-12px) !important;
    /* Light Theme Multi-layered Shadow */
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.05),
        0 15px 30px rgba(37, 99, 235, 0.15),
        0 30px 60px rgba(37, 99, 235, 0.1) !important;
    z-index: 10;
}

/* Dark Theme Multi-layered Shadow */
[data-theme="dark"] #projects .slide.project-slide-stagger.in-view:hover {
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.5),
        0 15px 30px rgba(96, 165, 250, 0.2),
        0 30px 60px rgba(96, 165, 250, 0.15) !important;
}

/* =========================================
   PRINT SPECIFIC MEDIA QUERY (A4 CV)
   ========================================= */
@media print {
    @page {
        size: A4 portrait;
        margin: 15mm;
    }

    /* Hide the rest of the website */
    body * {
        visibility: hidden;
    }

    /* Ensure modal overlays don't interfere */
    #static-cv-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        background: transparent !important;
    }

    #static-cv-modal .modal-content {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    #static-cv-modal .modal-body {
        padding: 0 !important;
        overflow: visible !important;
    }

    /* Explicitly hide UI controls */
    #static-cv-modal .modal-header,
    #static-cv-modal .modal-close,
    nav, 
    footer, 
    section,
    .nav-container {
        display: none !important;
    }

    /* Reveal only the CV document and its children */
    #static-cv-document, 
    #static-cv-document * {
        visibility: visible;
    }

    /* Position the document perfectly for standard A4 */
    #static-cv-document {
        position: absolute;
        left: 0;
        top: 0;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        background-color: #fff !important;
        color: #000 !important;
    }

    /* Prevent awkward page breaks */
    #static-cv-document h1, 
    #static-cv-document h2, 
    #static-cv-document h3, 
    #static-cv-document h4 {
        page-break-after: avoid;
    }
    
    #static-cv-document p, 
    #static-cv-document ul, 
    #static-cv-document li,
    #static-cv-document div {
        page-break-inside: avoid;
    }

    /* Force background colors and exact colors to print (bypasses browser defaults) */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* =========================================
   RAUL DRONCA NAV REPLACEMENT
   ========================================= */
:root {
  --nav-black: #0f0f0f;
  --nav-gray: #3f3f3f;
  --nav-white: #fff;
}

.nav-container {
    padding-top: 20px;
}

.nav-wrap {
  border: 1px solid var(--nav-gray) !important;
  width: fit-content !important;
  margin: 0 auto !important;
  border-radius: 500px !important;
  position: relative !important;
  box-shadow: inset 10px 0 10px black !important;
  background: linear-gradient(0deg, #141414, #242424) !important;
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.nav-wrap:after {
  content: "";
  display: block;
  position: absolute;
  inset: -5px;
  background: linear-gradient(180deg, var(--nav-gray), #212121);
  border-radius: 500px;
  z-index: -1;
}

.nav {
  width: fit-content !important;
  anchor-name: --nav;
  margin: 6.7px !important;
  display: flex !important;
  align-items: center;
  gap: 0 !important;
}

.nav a {
  z-index: 10 !important;
  position: relative !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 12px 24px !important; /* Adjusted from 20x50 to fit the page */
  color: white !important;
  text-decoration: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.nav a:before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  opacity: 0.2;
}

.nav a.active {
  anchor-name: --active;
  color: black !important;
}

.nav a:hover:before {
  anchor-name: --nav;
}

.nav-wrap .bubble {
  background: white !important;
  top: anchor(top) !important;
  right: anchor(right) !important;
  bottom: anchor(bottom) !important;
  left: anchor(left) !important;
  position: absolute !important;
  transition: all 0.2s !important;
  border-radius: 500px !important;
  opacity: 1 !important;
  pointer-events: none;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.nav-wrap .bubble.active {
  position-anchor: --active;
  z-index: 2 !important;
  background: linear-gradient(180deg, #f2f2f2, #b3b3b3) !important;
  box-shadow: inset 0 2px 7px #fff !important;
}

.nav-wrap .bubble.hover {
  z-index: 1 !important;
  background: linear-gradient(180deg, var(--nav-gray), #212121) !important;
  box-shadow: inset 0 2px 7px #ffffff29 !important;
  position-anchor: --nav;
  opacity: 1 !important; /* Let CSS anchor handle it, wait: does it only show on hover? */
}

/* Fallback for browsers that don't support CSS Anchor Positioning */
@supports not (anchor-name: --nav) {
    .nav-wrap .bubble {
        display: none !important;
    }
    .nav a.active {
        background: white !important;
        color: black !important;
        border-radius: 500px !important;
    }
    .nav a:hover {
        background: rgba(255,255,255,0.1) !important;
        border-radius: 500px !important;
    }
}

/* Ensure mobile menu still looks somewhat okay or overrides */
@media (max-width: 768px) {
    .nav-wrap {
        border-radius: 16px !important;
    }
    .nav-wrap:after {
        border-radius: 20px !important;
    }
    .nav {
        flex-direction: column !important;
    }
    .nav a {
        padding: 15px !important;
        width: 100% !important;
    }
}

/* The Theme Toggle */
#theme-toggle {
    color: white !important;
}

/* =========================================
   LIQUID GLASS NAV UPGRADE
   ========================================= */
.nav-wrap {
    /* Core glass properties */
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(24px) saturate(250%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(250%) !important;
    
    /* Glass reflections and physical depth */
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.1) !important;
        
    /* Thin, bright glass edge */
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

/* Dark Mode Liquid Glass */
[data-theme="dark"] .nav-wrap {
    background: rgba(20, 20, 20, 0.4) !important;
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        inset 0 -1px 1px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Remove the old solid opaque backing/border */
.nav-wrap:after {
    display: none !important;
}

/* Update text to adapt to the transparent glass */
.nav a {
    color: var(--text) !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5) !important;
}

[data-theme="dark"] .nav a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
}

.nav a.active {
    color: #000 !important; 
    text-shadow: none !important;
}

/* Soften the sliding bubbles to match the glass aesthetic */
.nav-wrap .bubble.active {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1), 
        inset 0 1px 2px rgba(255, 255, 255, 1) !important;
}

[data-theme="dark"] .nav-wrap .bubble.active {
    background: rgba(255, 255, 255, 0.9) !important;
}

.nav-wrap .bubble.hover {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.2) !important;
}

/* =========================================
   THEME TOGGLE RELOCATION (Top Right & Glassmorphism)
   ========================================= */
#theme-toggle {
    position: fixed !important;
    top: 20px !important; /* Align with nav container */
    right: 20px !important; /* Move to the right side of the screen */
    bottom: auto !important; /* Override the inline bottom style */
    
    /* Apply liquid glass aesthetic to match the nav */
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(24px) saturate(250%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(250%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: var(--text) !important;
    
    /* Smooth hover effect */
    transition: all 0.3s ease !important;
}

#theme-toggle:hover {
    transform: scale(1.05) !important;
}

[data-theme="dark"] #theme-toggle {
    background: rgba(20, 20, 20, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* =========================================
   FOOTER UPGRADE (Premium Adaptive & Glassmorphic)
   ========================================= */
.main-footer {
    background: var(--bg-light) !important;
    color: var(--text) !important;
    padding: 5rem 0 2rem !important;
    position: relative;
    border-top: 1px solid var(--border) !important;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 400px;
    background: radial-gradient(ellipse at top, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

[data-theme="dark"] .main-footer::before {
    background: radial-gradient(ellipse at top, rgba(37, 99, 235, 0.15) 0%, transparent 60%);
}

.main-footer .container {
    position: relative;
    z-index: 1;
}

.footer-section h3 {
    color: var(--text) !important;
    margin-bottom: 1.2rem !important;
    font-size: 1.7rem !important;
    font-weight: 700 !important;
}

.footer-section p {
    color: var(--text-light) !important;
    line-height: 1.7 !important;
}

.footer-section h4 {
    color: var(--primary) !important;
    margin-bottom: 1.5rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 0.95rem !important;
}

.footer-nav li {
    margin-bottom: 1rem !important;
}

.footer-nav a {
    color: var(--text-light) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.85, 0.15, 1.15) !important;
    display: inline-flex !important;
    align-items: center;
}

.footer-nav a:hover {
    color: var(--primary) !important;
    transform: translateX(6px) !important;
}

.footer-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px !important;
}

.footer-tech-tags span {
    background: rgba(37, 99, 235, 0.08) !important;
    border: 1px solid rgba(37, 99, 235, 0.15) !important;
    color: var(--primary) !important;
    padding: 6px 14px !important;
    border-radius: 99px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    transition: all 0.3s cubic-bezier(0.25, 0.85, 0.15, 1.15) !important;
}

[data-theme="dark"] .footer-tech-tags span {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-light) !important;
}

.footer-tech-tags span:hover {
    background: var(--primary) !important;
    color: white !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25) !important;
    border-color: var(--primary) !important;
}

.footer-divider {
    height: 1px !important;
    background: var(--border) !important;
    margin: 4rem 0 2rem !important;
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light) !important;
    font-size: 0.95rem !important;
    font-weight: 500;
}

.heart-icon {
    color: #ef4444 !important;
    display: inline-block;
    width: 16px !important;
    height: 16px !important;
    margin: 0 4px;
    vertical-align: text-bottom;
    animation: heartPulse 2s infinite cubic-bezier(0.25, 0.85, 0.15, 1.15);
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    10% { transform: scale(1.25); }
    20% { transform: scale(1); }
    30% { transform: scale(1.25); }
    40% { transform: scale(1); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
    .bottom-flex {
        flex-direction: column !important;
        gap: 1.5rem !important;
        text-align: center !important;
    }
}

/* =========================================
   TILTED "!" NAV LAYOUT (Capsule + Circle)
   ========================================= */
.nav-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important; /* Space between pill and dot */
    position: fixed !important;
    top: 20px !important;
    width: 100% !important;
    z-index: 1000 !important;
    pointer-events: none; /* Let clicks pass through empty space */
}

/* Re-enable pointer events for the actual interactive elements */
.nav-wrap, .hamburger, #theme-toggle {
    pointer-events: auto !important;
}

#theme-toggle {
    position: relative !important; /* Remove fixed positioning so it sits in the flex row */
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 46px !important; /* Perfect circle matching nav height */
    height: 46px !important;
    margin: 0 !important;
    
    /* Keep Liquid Glass aesthetic */
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(24px) saturate(250%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(250%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] #theme-toggle {
    background: rgba(20, 20, 20, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        inset 0 -1px 1px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* Ensure the nav-wrap capsule matches height logic visually */
.nav-wrap {
    margin: 0 !important; /* Remove auto centering to work with flex gap */
}

/* =========================================
   HAMBURGER MENU ANIMATION FIX
   ========================================= */
.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

#btn-print-static-cv:hover {
    background: rgba(37, 99, 235, 0.1) !important;
}
[data-theme="dark"] #btn-print-static-cv {
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}
[data-theme="dark"] #btn-print-static-cv:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* =========================================
   PERFECT CENTER ALIGNMENT FIX
   ========================================= */
.nav-container {
    /* Use a grid with 3 equal columns to ensure true dead-center alignment */
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    gap: 12px !important;
    position: fixed !important;
    top: 20px !important;
    width: 100% !important;
    z-index: 1000 !important;
    pointer-events: none;
}

/* Place the nav pill exactly in the center column */
.nav-wrap {
    grid-column: 2 / 3 !important;
    margin: 0 !important;
}

/* Place the theme toggle in the right column, aligned to the left of that column */
#theme-toggle {
    grid-column: 3 / 4 !important;
    justify-self: start !important;
    
    position: relative !important; 
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 46px !important;
    height: 46px !important;
    margin: 0 !important;
}

/* Remove rogue BR tags from HTML to fix vertical alignment */

/* Ensure perfect alignment on mobile */
@media (max-width: 768px) {
    .nav-container {
        /* Revert grid on mobile so theme toggle can just float next to hamburger */
        display: flex !important;
        justify-content: flex-start !important;
        padding-left: 20px;
    }
    
    #theme-toggle {
        /* Float the theme toggle independently on mobile so it doesn't conflict with hamburger */
        position: fixed !important;
        top: 20px !important;
        left: 20px !important;
        grid-column: auto !important;
    }
    
    .nav-wrap.active {
        /* When mobile menu opens, it takes over the screen */
        top: 80px !important;
        right: 20px !important;
        left: 20px !important;
        width: auto !important;
    }
}

/* =========================================
   PREMIUM CHAT UI UPGRADE
   ========================================= */
.chat-messages {
    flex: 1;
    padding: 24px 20px !important;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px !important;
    
    /* Subtle inner shadow and background pattern for depth */
    background-color: var(--bg-card);
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 20px 20px;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.02);
}

[data-theme="dark"] .chat-messages {
    background-color: var(--bg-card);
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.2);
}

.chat-message {
    display: flex;
    max-width: 90% !important;
    animation: messagePop 0.4s cubic-bezier(0.25, 0.85, 0.15, 1.15) forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes messagePop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message.assistant {
    align-self: flex-start;
}

.message-content {
    padding: 12px 18px !important;
    border-radius: 18px !important;
    font-size: 0.95rem;
    line-height: 1.5 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, var(--primary), #3b82f6) !important;
    color: white !important;
    border-bottom-right-radius: 4px !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25) !important;
}

.chat-message.assistant .message-content {
    background: var(--bg-light) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-bottom-left-radius: 4px !important;
    /* Glass feel */
    backdrop-filter: blur(8px);
}

[data-theme="dark"] .chat-message.assistant .message-content {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Ensure the chat widget stays fixed and doesn't cause overflow jumping */
.chat-widget {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 1000 !important;
}

.chat-window {
    /* Lock the chat window to the bottom right, expanding upwards */
    position: absolute !important;
    bottom: 80px !important; 
    right: 0 !important;
    top: auto !important;
    margin: 0 !important;
}

/* Mobile specific fixes to lock to screen */
@media (max-width: 768px) {
    .chat-window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important; /* Dynamic viewport height to prevent safari keyboard issues */
        border-radius: 0 !important;
        z-index: 1001 !important;
    }
}

/* Fix chat window height for shorter screens (like the AI Studio preview iframe) */
.chat-window {
    height: 500px !important;
    max-height: calc(100vh - 120px) !important; /* Ensure it never bleeds off the top of the screen */
    display: flex !important;
    flex-direction: column !important;
}

/* Override the previous dotted chat background with a much cleaner premium frosted look */
.chat-messages {
    background-image: none !important;
    background-color: var(--bg-light) !important;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02) !important;
}

[data-theme="dark"] .chat-messages {
    background-image: none !important;
    background-color: rgba(0, 0, 0, 0.2) !important;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2) !important;
}

/* Make the assistant bubble look a bit more distinct and softer */
.chat-message.assistant .message-content {
    background: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .chat-message.assistant .message-content {
    background: var(--bg-card) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Enhance hover effect for clickable cert cards */
a.card.certification {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.85, 0.15, 1.15) !important;
}

a.card.certification:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 0 0 2px var(--primary) !important;
}

[data-theme="dark"] a.card.certification:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 0 2px var(--primary) !important;
}

/* Ensure the arrow changes on hover */
a.card.certification:hover .date {
    color: var(--text) !important;
}

[data-theme="dark"] a.card.certification:hover .date {
    color: white !important;
}

/* =========================================
   MODAL NAVIGATION BUTTONS
   ========================================= */
.modal-nav-buttons {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none; /* Let clicks pass through the container */
    z-index: 15;
    padding: 0 10px;
}

.modal-nav-btn {
    pointer-events: auto; /* Re-enable clicks for the buttons */
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.85, 0.15, 1.15);
}

.modal-nav-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

@media (max-width: 768px) {
    .modal-nav-buttons {
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        gap: 15px;
    }
}

/* =========================================
   PREMIUM SKILLS BENTO
   ========================================= */
.premium-skills-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 2.5rem;
}

@media (max-width: 900px) {
    .premium-skills-bento {
        grid-template-columns: 1fr 1fr;
    }
    .core-dev {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .premium-skills-bento {
        grid-template-columns: 1fr;
    }
}

.skill-bento-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.4s cubic-bezier(0.25, 0.85, 0.15, 1.15);
    z-index: 1;
}

.skill-bento-card:hover {
    transform: translateY(-8px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

[data-theme="dark"] .skill-bento-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.15);
}

.bento-bg-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    transition: all 0.6s ease;
}

[data-theme="dark"] .bento-bg-glow {
    background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 70%);
}

.skill-bento-card:hover .bento-bg-glow {
    transform: scale(1.8);
    background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%);
}

.bento-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 5px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.85, 0.15, 1.15);
}

[data-theme="dark"] .bento-icon {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.skill-bento-card:hover .bento-icon {
    transform: scale(1.1) rotate(-5deg);
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.skill-bento-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.skill-bento-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex: 1; /* Pushes tags to bottom */
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.skill-tags span {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.25, 0.85, 0.15, 1.15);
    cursor: default;
}

[data-theme="dark"] .skill-tags span {
    background: rgba(255,255,255,0.03);
}

.skill-tags span:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.25);
}

/* Fixed Skills Section Styling since it is now its own distinct section */
.skills-section {
    padding-top: 40px; /* Gives it breathing room as its own section */
}

.skills-section h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.skills-subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* =========================================
   LIVE PREVIEW MODS
   ========================================= */
.live-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 10;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}



.cool-project-card .live-preview-wrapper::after {
    /* Glass sheen over the iframe so it feels like a card */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

/* Improve slider iframe interactivity on hover */


/* Ensure the slide overlay stays on top of the iframe */
.slide-overlay {
    z-index: 10;
}

/* =========================================
   CLEAR CARD SLIDER MODS
   ========================================= */
.clear-card-slide {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.clear-card-slide .slide-image {
    height: 220px;
    width: 100%;
    position: relative;
}

.slide-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-card);
    position: relative; /* Normal document flow, not overlay! */
}

.slide-content h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
    font-weight: 700;
}

.slide-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.slide-content .slide-actions {
    margin-top: 15px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.slide-content .quick-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.slide-content .quick-view-btn:hover {
    background: var(--primary);
    color: white;
}

.slide-content .slide-link {
    margin: 0;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s;
}

.slide-content .slide-link:hover {
    opacity: 0.8;
}

/* Add a Live icon to the first thumbnail if it's a web app */
.thumbnail-grid {
    position: relative;
}
.thumbnail-grid .live-thumb-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #ef4444;
    color: white;
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
    pointer-events: none;
    z-index: 10;
}
