* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fix overscroll color on mobile */
html {
    background-color: var(--html-bg, var(--bg-primary));
    transition: background-color 1.5s ease;
}

/* ============================================
   GLOBAL VARIABLES - Shared across themes
   ============================================ */

/* Fluid typography using clamp for responsive font sizes */
:root {
    /* Typography */
    --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);
    --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
    --font-size-xl: clamp(1.25rem, 1.125rem + 0.625vw, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --font-size-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --font-size-4xl: clamp(2.5rem, 1.75rem + 3.75vw, 4.5rem);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 40px;
    --spacing-2xl: 60px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    /* Transitions - common durations and easings */
    --transition-fast: 0.15s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
    --transition-theme: 1.2s;
    --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Effects */
    --blur-amount: 32px;
    --hover-lift: -12px;
    --hover-lift-sm: -4px;
    --hover-lift-md: -8px;
}

/* Dark Theme */
:root[data-theme="dark"] {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1419;
    --bg-tertiary: #050810;
    --bg-card: rgba(15, 23, 42, 0.15);
    --bg-card-hover: rgba(30, 41, 59, 0.25);

    --text-primary: #e8f1ff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --accent-primary: #60a5fa;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a78bfa;

    --border-color: rgba(148, 163, 184, 0.1);
    --border-hover: rgba(96, 165, 250, 0.3);

    --shadow-color: rgba(0, 0, 0, 0.3);

    --toggle-bg: rgba(15, 23, 42, 0.95);
    --toggle-color: #60a5fa;
    --toggle-shadow: rgba(96, 165, 250, 0.3);

    --gradient-start: rgba(59, 130, 246, 0.5);
    --gradient-end: rgba(139, 92, 246, 0.5);

    --html-bg: #0a0e1a;

    /* Section-specific vibrant gradient colors for dark mode */
    --section-about-1: rgba(236, 72, 153, 0.5);
    --section-about-2: rgba(244, 114, 182, 0.4);
    --section-about-3: rgba(251, 113, 133, 0.45);
    --section-about-4: rgba(249, 168, 212, 0.35);
    --section-about-line: rgba(244, 114, 182, 0.9);

    --section-projects-1: rgba(34, 211, 238, 0.5);
    --section-projects-2: rgba(56, 189, 248, 0.45);
    --section-projects-3: rgba(14, 165, 233, 0.4);
    --section-projects-line: rgba(56, 189, 248, 0.9);

    --section-publications-1: rgba(168, 85, 247, 0.5);
    --section-publications-2: rgba(192, 132, 252, 0.45);
    --section-publications-3: rgba(216, 180, 254, 0.4);
    --section-publications-4: rgba(233, 213, 255, 0.35);
    --section-publications-line: rgba(192, 132, 252, 0.9);

    --section-contact-1: rgba(251, 191, 36, 0.5);
    --section-contact-2: rgba(252, 211, 77, 0.4);
    --section-contact-3: rgba(250, 204, 21, 0.45);
    --section-contact-4: rgba(253, 224, 71, 0.35);
    --section-contact-line: rgba(252, 211, 77, 0.9);
}

/* Light Theme - Solarpunk Professional (default) */
:root,
:root[data-theme="light"] {
    /* Soft, airy backgrounds with subtle cyan-green tint */
    --bg-primary: #f0f9ff;        /* Very light blue-white */
    --bg-secondary: #e0f2fe;       /* Soft sky blue */
    --bg-tertiary: #bae6fd;        /* Light cyan */
    --bg-card: rgba(255, 255, 255, 0.25);      /* More transparent for glass effect */
    --bg-card-hover: rgba(255, 255, 255, 0.35); /* Slightly more opaque on hover */

    /* Enhanced contrast text for better readability - WCAG AAA+ */
    --text-primary: #083344;       /* Very deep teal-blue - 12:1 contrast */
    --text-secondary: #0c4a6e;     /* Deep ocean blue - 10.5:1 contrast */
    --text-muted: #075985;         /* Rich sky blue - 8.2:1 contrast */

    /* Modern & Professional - Deep Blue palette */
    --accent-primary: #2563eb;     /* Deep blue - professional and trustworthy */
    --accent-secondary: #1e40af;   /* Darker blue */
    --accent-tertiary: #3b82f6;    /* Bright blue */

    --border-color: rgba(37, 99, 235, 0.25);
    --border-hover: rgba(37, 99, 235, 0.4);

    --shadow-color: rgba(30, 64, 175, 0.08);

    --toggle-bg: rgba(255, 255, 255, 0.95);
    --toggle-color: #2563eb;
    --toggle-shadow: rgba(37, 99, 235, 0.2);

    --gradient-start: rgba(37, 99, 235, 0.25);
    --gradient-end: rgba(59, 130, 246, 0.25);

    --html-bg: #f0f9ff;

    /* Active card gradient - Bluish (universal, more pastel) */
    --active-gradient-1: rgba(147, 197, 253, 0.35);   /* Pastel light blue */
    --active-gradient-2: rgba(186, 230, 253, 0.3);    /* Very light blue */
    --active-accent-1: #3b82f6;                       /* Medium blue - better contrast */
    --active-accent-2: #2563eb;                       /* Deep blue */
    --active-accent-3: #93c5fd;                       /* Light pastel blue */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    font-display: swap;
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    font-size: var(--font-size-base);
    transition: background 1.5s cubic-bezier(0.4, 0, 0.2, 1),
                color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light mode body background */
:root[data-theme="light"] body {
    background:
        radial-gradient(ellipse at top left, rgba(103, 195, 212, 0.12), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(109, 212, 199, 0.12), transparent 50%),
        var(--bg-primary);
    background-attachment: fixed;
}

/* Dark mode body background */
:root[data-theme="dark"] body {
    background:
        radial-gradient(ellipse at top left, rgba(59, 130, 246, 0.08), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.08), transparent 50%),
        var(--bg-primary);
    background-attachment: fixed;
}

/* Simplified, minimal background gradient - no animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, var(--gradient-start) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--gradient-end) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, var(--gradient-start) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   LOADING SCREEN - Theme aware
   ============================================ */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--transition-slow) ease,
                visibility var(--transition-slow) ease,
                background var(--transition-theme) ease;
}

/* Dark mode loading screen */
:root[data-theme="dark"] .loading-screen {
    background: radial-gradient(ellipse at center,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 50%,
        #000205 100%);
}

/* Light mode loading screen */
:root[data-theme="light"] .loading-screen {
    background: radial-gradient(ellipse at center,
        var(--bg-primary) 0%,
        var(--bg-secondary) 50%,
        #e0f2fe 100%);
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: var(--accent-primary);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid transparent;
    border-radius: 50%;
    margin: 0 auto var(--spacing-lg);
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    transition: border-color var(--transition-theme) ease,
                box-shadow var(--transition-theme) ease;
}

/* Dark mode spinner */
:root[data-theme="dark"] .loading-spinner {
    border: 3px solid rgba(96, 165, 250, 0.15);
    border-top: 3px solid var(--accent-primary);
    border-right: 3px solid var(--accent-secondary);
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.3);
}

/* Light mode spinner */
:root[data-theme="light"] .loading-spinner {
    border: 3px solid rgba(8, 145, 178, 0.15);
    border-top: 3px solid var(--accent-primary);
    border-right: 3px solid var(--accent-secondary);
    box-shadow: 0 0 20px rgba(8, 145, 178, 0.2);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
    90% { transform: rotate(-5deg); }
}

@keyframes profileSpin {
    0% {
        transform: rotate(0deg) scaleX(1);
        animation-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53);
    }
    50% {
        transform: rotate(720deg) scaleX(1);
        animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    100% {
        transform: rotate(1080deg) scaleX(-1);
    }
}

@keyframes profileSpinReverse {
    0% {
        transform: rotate(0deg) scaleX(-1);
        animation-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53);
    }
    50% {
        transform: rotate(720deg) scaleX(-1);
        animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    100% {
        transform: rotate(1080deg) scaleX(1);
    }
}

.loading-content p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg,
        var(--accent-primary),
        var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Error States */
.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-message {
    color: #ff6b6b !important;
    font-weight: 500;
    margin-bottom: 20px !important;
}

.retry-button {
    background: linear-gradient(135deg, #4da6ff, #00bfff);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(77, 166, 255, 0.3);
}

/* ============================================
   UTILITY CLASSES - Reusable patterns
   ============================================ */

/* Glass morphism effect - used on all cards */
.glass-effect {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    border: 1px solid var(--border-color);
}

/* Standard card hover animation */
.hover-lift {
    transition: transform var(--transition-slow) var(--easing-smooth),
                background var(--transition-theme) var(--easing-smooth),
                box-shadow var(--transition-theme) var(--easing-smooth);
}

.hover-lift:hover {
    transform: translateY(var(--hover-lift));
    background: var(--bg-card-hover);
    box-shadow: 0 24px 48px var(--shadow-color);
}

/* Smooth theme transitions */
.theme-transition {
    transition: color var(--transition-theme) var(--easing-smooth),
                background var(--transition-theme) var(--easing-smooth),
                border-color var(--transition-theme) var(--easing-smooth);
}

/* Text gradient effect */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    background: #4da6ff;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    z-index: 1000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 8px;
}

/* Enhanced focus styles for better accessibility - WCAG 2.2 compliant */
.card:focus,
.nav-btn:focus,
button:focus,
a:focus {
    outline: 2px solid #4da6ff;
    outline-offset: 2px;
}

/* Modern focus-visible for keyboard navigation only */
.card:focus-visible,
.nav-btn:focus-visible,
button:focus-visible,
a:focus-visible,
.skill-tag:focus-visible,
.cookie-btn:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
    border-radius: 4px;
}

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

/* Enhanced card transitions */
.card-preview,
.card-details {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                display 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.expandable-card {
    transform-origin: center top;
    will-change: transform;
}

.expandable-card.expanded {
    animation: cardExpand 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cardExpand {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Performance optimizations */
.card,
.nav-btn,
.skill-tag {
    will-change: transform, box-shadow;
}

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

/* Cookie Consent Banner - Simplified and less intrusive */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
    max-width: 420px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.25) 0%, rgba(30, 41, 59, 0.25) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 16px;
    padding: 20px;
    z-index: 99999;
    pointer-events: auto;
    transform: translateX(500px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.cookie-consent:not(.hidden) {
    transform: translateX(0);
}

.cookie-consent.hidden {
    transform: translateX(500px);
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cookie-text p {
    color: #b3c8e1;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 6px;
    border: 1px solid;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    min-height: 44px; /* WCAG 2.2 touch target minimum */
}

.cookie-btn.accept {
    background: linear-gradient(135deg, #4da6ff, #00bfff);
    border-color: #4da6ff;
    color: white;
}

.cookie-btn.accept:hover {
    background: linear-gradient(135deg, #3d95ee, #0099dd);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 166, 255, 0.3);
}

.cookie-btn.decline {
    background: rgba(179, 200, 225, 0.15);
    border-color: rgba(179, 200, 225, 0.6);
    color: #e0f2fe;
    font-weight: 600;
}

.cookie-btn.decline:hover {
    background: rgba(179, 200, 225, 0.25);
    border-color: rgba(179, 200, 225, 0.8);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Mobile responsiveness for cookie banner */
@media (max-width: 768px) {
    .cookie-consent {
        padding: 16px;
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }

    .cookie-consent-content {
        gap: 14px;
    }

    .cookie-text p {
        font-size: 0.85rem;
    }

    .cookie-actions {
        justify-content: space-between;
    }

    .cookie-btn {
        flex: 1;
        min-height: 48px;
        padding: 14px 20px;
        font-size: 0.9rem;
    }
}

/* Ensure expandable cards have proper touch targets */
.expandable-card {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(96, 165, 250, 0.2);
}

/* Add safe click/tap area for all interactive elements */
.nav-btn,
.skill-tag,
.cookie-btn,
.hamburger-btn,
.expandable-card {
    -webkit-tap-highlight-color: rgba(96, 165, 250, 0.2);
    -webkit-touch-callout: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .loading-spinner {
        animation: none;
        border: 3px solid #64b5f6;
    }

    .card,
    .nav-btn,
    .skill-tag {
        will-change: auto;
    }
}

#canvas-container {
    display: none; /* 3D grid removed */
}

.content-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Ensure all child elements in cards are positioned correctly */
.contact-card > * {
    position: relative;
    z-index: 2;
}

.section {
    min-height: 100vh;
    padding: 150px 40px 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* Navigation */
.nav-menu {
    position: fixed;
    top: 30px;
    right: 40px;
    z-index: 100;
    display: flex;
    gap: 20px;
}

.hamburger-btn {
    display: flex !important;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.25) 0%, rgba(15, 23, 42, 0.25) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    flex-direction: column;
    gap: 4px;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.hamburger-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hamburger-btn:hover::before {
    opacity: 1;
}

.hamburger-btn:hover {
    border-color: rgba(96, 165, 250, 0.5);
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: #60a5fa;
    transition: all 0.3s ease;
    border-radius: 1px;
    position: relative;
    z-index: 1;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.25) 0%, rgba(15, 23, 42, 0.25) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    min-height: 44px; /* WCAG 2.2 touch target minimum */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-btn:hover::before {
    opacity: 1;
}

.nav-btn:hover {
    border-color: rgba(96, 165, 250, 0.5);
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #93c5fd;
}

/* Hero Section - Redesigned for Impact */
.hero {
    text-align: center;
    padding: 160px 40px 140px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-image-container {
    margin-bottom: 48px;
    display: flex;
    justify-content: center;
    position: relative;
}

.profile-image-container::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0.3;
    border-radius: 50%;
    z-index: -1;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow:
        0 0 0 1px var(--border-color),
        0 8px 32px var(--accent-secondary),
        inset 0 0 20px var(--shadow-color);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    position: relative;
    z-index: 1;
    cursor: pointer;
    user-select: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Name - MUCH LARGER */
.hero-name {
    font-size: 4.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -3px;
    line-height: 1;
    transition: background 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Position/Title */
.hero-position {
    font-size: 1.75rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tagline */
.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stats Grid - Prominent Display */
.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 900px;
    margin: 32px 0;
}

.hero-stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px 20px;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hero-stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-color);
    border-color: var(--border-hover);
}

.hero-stat-box:hover::before {
    opacity: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Description */
.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 16px auto 0;
    font-weight: 400;
    line-height: 1.7;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Box styling to match stats boxes */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px 36px;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 4px 16px var(--shadow-color);
}

/* Section Titles - MUCH LARGER */
.section-title {
    font-size: 3.5rem;
    margin-bottom: 80px;
    margin-top: 100px;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -2px;
    position: relative;
    transition: background 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.1;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
    border-radius: 2px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 32px;
    margin-top: 60px;
    align-items: start;
}

/* ============================================
   CARDS - Main content containers
   Variables used: --bg-card, --border-color, --blur-amount
   ============================================ */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    transition: all var(--transition-slow) var(--easing-smooth),
                background var(--transition-theme) var(--easing-smooth),
                border-color var(--transition-theme) var(--easing-smooth),
                box-shadow var(--transition-theme) var(--easing-smooth),
                color var(--transition-theme) var(--easing-smooth);
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 8px 32px var(--shadow-color);
    color: var(--text-primary);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 20px;
    z-index: 0;
    pointer-events: none;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    transition: left 0.8s ease;
    z-index: 2;
}

/* Dark mode - Blue sliding line */
:root[data-theme="dark"] .card::after {
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.8), transparent);
}

/* Light mode - Unified teal-green sliding line (cleaner, simpler) */
:root[data-theme="light"] .card::after {
    background: linear-gradient(90deg, transparent, var(--accent-tertiary), transparent);
}

.card > * {
    position: relative;
    z-index: 2;
}

.card:hover::before {
    opacity: 0;
}

.card:hover::after {
    left: 100%;
}

/* Unified hover and active states for all cards and card-like elements */
.card:hover,
.stats-bar:hover,
.contact-card:hover,
.availability-card:hover {
    transform: translateY(-12px);
    background: var(--bg-card-hover);
    box-shadow: 0 24px 48px var(--shadow-color);
}

.stats-bar:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow-color);
}

.availability-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px var(--shadow-color);
}

.skill-tag:hover {
    transform: translateY(-3px) scale(1.05);
    background: var(--bg-card-hover);
    box-shadow: 0 8px 24px var(--shadow-color);
    color: var(--accent-secondary);
}

.expandable-card {
    cursor: pointer;
    user-select: none;
}

.expandable-card.expanded {
    background: var(--bg-card-hover);
    box-shadow: 0 16px 32px var(--shadow-color);
    position: relative;
}

/* Light mode only - remove borders and outlines when active/hovered/expanded */
:root[data-theme="light"] .card:hover,
:root[data-theme="light"] .card:active,
:root[data-theme="light"] .card:focus,
:root[data-theme="light"] .card:focus-visible,
:root[data-theme="light"] .stats-bar:hover,
:root[data-theme="light"] .contact-card:hover,
:root[data-theme="light"] .availability-card:hover,
:root[data-theme="light"] .skill-tag:hover,
:root[data-theme="light"] .expandable-card.expanded,
:root[data-theme="light"] .card.expanded {
    border: none !important;
    outline: none !important;
}

.expandable-card.expanded::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

.expandable-card.expanded > * {
    position: relative;
    z-index: 1;
}

/* Universal blue gradient for all cards in light mode */
:root[data-theme="light"] .card:hover::before,
:root[data-theme="light"] .expandable-card.expanded::before {
    background: linear-gradient(135deg, var(--active-gradient-1) 0%, var(--active-gradient-2) 100%);
    opacity: 1;
}

/* Universal blue colors for elements inside hovered and expanded cards */
:root[data-theme="light"] .card:hover .card-header h3,
:root[data-theme="light"] .expandable-card.expanded .card-header h3 {
    background: linear-gradient(135deg, var(--active-accent-1) 0%, var(--active-accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

:root[data-theme="light"] .card:hover .item-header strong,
:root[data-theme="light"] .expandable-card.expanded .item-header strong,
:root[data-theme="light"] .card:hover .main-description strong,
:root[data-theme="light"] .expandable-card.expanded .main-description strong,
:root[data-theme="light"] .card:hover .metric-item strong,
:root[data-theme="light"] .expandable-card.expanded .metric-item strong {
    color: var(--active-accent-1);
}

:root[data-theme="light"] .card:hover .highlight-item,
:root[data-theme="light"] .expandable-card.expanded .highlight-item {
    border-left-color: var(--active-accent-1);
}

:root[data-theme="light"] .card:hover .item-year,
:root[data-theme="light"] .expandable-card.expanded .item-year,
:root[data-theme="light"] .card:hover .highlight-item a,
:root[data-theme="light"] .expandable-card.expanded .highlight-item a {
    color: var(--active-accent-2);
    border-color: rgba(59, 130, 246, 0.3);
}

:root[data-theme="light"] .card:hover .click-indicator,
:root[data-theme="light"] .expandable-card.expanded .click-indicator {
    background: linear-gradient(135deg, var(--active-gradient-1), var(--active-gradient-2));
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--active-accent-2);
}

.click-indicator {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
    text-align: center;
    padding: 6px;
    background: transparent;
    border-radius: 6px;
    border: none;
    opacity: 0.6;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: auto;
    flex-shrink: 0;
}

.expandable-card:hover .click-indicator {
    opacity: 0.8;
    color: var(--accent-secondary);
}

.card-header {
    margin-bottom: 24px;
    flex-shrink: 0;
}

.card-header h3 {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.card-header h3::first-letter {
    font-size: 1.1em;
}

/* Expertise cards use inline colors - disable gradient for them */
.expertise-header h3 {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    /* Inline color from Card.js will now work */
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-preview {
    color: var(--text-secondary);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    flex: 1;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-description strong,
.main-description b {
    color: var(--accent-primary);
    font-weight: 600;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-details {
    color: var(--text-secondary);
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-content {
    color: var(--text-secondary);
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-item {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(77, 166, 255, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.item-header strong {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1.1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-year {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--bg-card);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-institution {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-organization {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-details, .item-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 6px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-advisor {
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.metrics-grid {
    display: grid;
    gap: 12px;
    border: none !important;
    padding-bottom: 0 !important;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--gradient-start);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-item strong {
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-item span {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-highlights {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.highlight-item {
    padding: 12px 16px;
    background: var(--gradient-start);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.highlight-item a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease,
                color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.highlight-item a:hover {
    color: var(--accent-tertiary);
    border-bottom-color: var(--accent-tertiary);
}

.highlight-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 4px;
}

/* Skills */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.skill-tag {
    padding: 10px 18px;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 2px 8px var(--shadow-color);
    min-height: 36px; /* Readable minimum for tags */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-tag:hover::before {
    opacity: 1;
}

.level-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 12px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Light mode - blue gradient for skill tags */
:root[data-theme="light"] .skill-tag::before {
    background: linear-gradient(135deg,
        var(--active-gradient-1) 0%,
        var(--active-gradient-2) 100%);
}


/* Contact Section */
.contact-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    margin-bottom: 60px;
}

.contact-intro p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

/* Prominent LinkedIn CTA Button */
.linkedin-cta {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 48px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.35), rgba(59, 130, 246, 0.3));
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: 16px;
    border: 2px solid rgba(96, 165, 250, 0.4);
    text-decoration: none;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    /* Add shiny glow effect as if light is behind - applies to both themes */
    box-shadow:
        0 0 10px rgba(96, 165, 250, 0.2),
        0 0 20px rgba(96, 165, 250, 0.15),
        0 0 30px rgba(96, 165, 250, 0.1),
        0 8px 24px rgba(96, 165, 250, 0.15),
        inset 0 0 20px rgba(96, 165, 250, 0.05);
    animation: pulseGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.linkedin-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.3), rgba(139, 92, 246, 0.25));
    opacity: 0;
    transition: opacity 0.6s ease;
}

.linkedin-cta:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.6);
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.4), rgba(59, 130, 246, 0.35));
    /* Brighter glow on hover */
    box-shadow:
        0 0 40px rgba(96, 165, 250, 0.8),
        0 0 60px rgba(96, 165, 250, 0.6),
        0 0 100px rgba(96, 165, 250, 0.4),
        0 12px 32px rgba(96, 165, 250, 0.4),
        inset 0 0 50px rgba(96, 165, 250, 0.2);
}

.linkedin-cta:hover::before {
    opacity: 1;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow:
            0 0 10px rgba(96, 165, 250, 0.2),
            0 0 20px rgba(96, 165, 250, 0.15),
            0 0 30px rgba(96, 165, 250, 0.1),
            0 8px 24px rgba(96, 165, 250, 0.15),
            inset 0 0 20px rgba(96, 165, 250, 0.05);
    }
    50% {
        box-shadow:
            0 0 15px rgba(96, 165, 250, 0.25),
            0 0 25px rgba(96, 165, 250, 0.18),
            0 0 35px rgba(96, 165, 250, 0.12),
            0 8px 24px rgba(96, 165, 250, 0.15),
            inset 0 0 25px rgba(96, 165, 250, 0.07);
    }
}

.cta-icon {
    font-size: 3rem;
    position: relative;
    z-index: 1;
}

.cta-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.cta-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.contact-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: clamp(16px, 4vw, 30px);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                background 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start;
    gap: clamp(12px, 3vw, 20px);
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 8px 32px var(--shadow-color);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 20px;
    z-index: 0;
}

.contact-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    transition: left 0.8s ease;
    z-index: 1;
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-card:hover::after {
    left: 100%;
}

/* Light mode - yellowish/orange gradient for contact cards */
:root[data-theme="light"] .contact-card::before {
    background: linear-gradient(135deg,
        var(--section-contact-1) 0%,
        var(--section-contact-2) 100%);
}


.contact-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    color: var(--accent-primary);
    position: relative;
    z-index: 2;
}

.contact-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 2;
}

.contact-content h3 {
    color: var(--accent-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-content a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease,
                color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
    display: inline-block;
    margin-bottom: 6px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-content a:hover {
    color: var(--accent-tertiary);
    border-bottom-color: var(--accent-tertiary);
    transform: translateX(4px);
}

.contact-content span {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    display: inline-block;
    margin-bottom: 6px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.availability-section {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.availability-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border-color);
    text-align: center;
    max-width: 600px;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 8px 32px var(--shadow-color);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.availability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 20px;
    z-index: 0;
}

.availability-card > * {
    position: relative;
    z-index: 1;
}

.availability-card:hover::before {
    opacity: 1;
}

/* Light mode - yellowish/orange gradient for availability card */
:root[data-theme="light"] .availability-card::before {
    background: linear-gradient(135deg,
        var(--section-contact-1) 0%,
        var(--section-contact-2) 100%);
}


.availability-card h3 {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.availability-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-info {
    text-align: center;
    font-size: 1.1rem;
    line-height: 2.2;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info p {
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-info a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-info a:hover {
    color: var(--accent-tertiary);
    border-bottom-color: var(--accent-tertiary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
        gap: 28px;
    }

    /* Optimize animations for medium screens */
    .card:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px max(24px, env(safe-area-inset-right)) 60px max(24px, env(safe-area-inset-left));
    }

    .hero {
        padding: max(120px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 100px max(24px, env(safe-area-inset-left));
    }

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

    .hero-name {
        font-size: 2rem;
        letter-spacing: -1px;
    }

    .hero-position {
        font-size: 1.2rem;
    }

    .hero-tagline {
        font-size: 0.95rem;
    }

    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin: 24px 0;
    }

    .hero-stat-box {
        padding: 20px 16px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .hero-description {
        font-size: 1rem;
        padding: 24px 20px;
        max-width: 100%;
    }

    /* Mobile stats bar */
    .stats-bar {
        flex-direction: column;
        gap: 8px;
        padding: 16px 24px;
        margin: 20px auto 28px;
    }

    .stat-divider {
        display: none;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 50px;
        margin-top: 60px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .nav-menu {
        flex-direction: column;
        gap: 12px;
        top: 20px;
        right: 20px;
    }

    /* WCAG 2.2 Touch Target Improvements */
    .nav-btn {
        padding: 15px 26px;
        min-height: 48px; /* Increase for better mobile touch */
        min-width: 48px;
        font-size: 1rem;
    }

    .hamburger-btn {
        min-width: 56px;
        min-height: 56px;
        padding: 16px;
    }

    .cookie-btn {
        padding: 14px 26px;
        min-height: 48px;
        font-size: 1rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Mobile: Hide skills list by default, show on expand */
    .expertise-card .skills-list {
        display: none;
    }

    .expertise-card.expanded .skills-list {
        display: flex;
    }

    /* Disable sliding line effect on expertise cards for mobile */
    .expertise-card::after {
        display: none;
    }

    .card {
        padding: 24px;
        margin: 0 8px;
    }

    .card-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .card-header h3 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .item-header strong {
        font-size: 1rem;
        line-height: 1.4;
    }

    .item-year {
        align-self: flex-start;
        font-size: 0.8rem;
    }

    .main-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .item-details, .item-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .project-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .highlight-item {
        padding: 10px 12px;
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .metric-item {
        padding: 10px;
    }

    .metric-item strong {
        font-size: 0.85rem;
    }

    .metric-item span {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .skill-tag {
        padding: 12px 18px;
        font-size: 0.85rem;
        min-height: 44px; /* WCAG 2.2 compliant touch target */
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Ensure all interactive links meet touch target minimum */
    .contact-content a,
    .highlight-item a {
        padding: 8px 4px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .contact-card {
        margin: 0;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .contact-content h3 {
        font-size: 1.1rem;
    }

    .contact-content a,
    .contact-content span {
        font-size: 0.95rem;
    }

    .contact-intro p {
        font-size: 1.1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .linkedin-cta {
        padding: 20px 32px;
    }

    .cta-icon {
        font-size: 2.5rem;
    }

    .cta-text {
        font-size: 1.3rem;
    }

    .cta-subtitle {
        font-size: 0.85rem;
    }

    .availability-card {
        padding: 24px 16px;
        margin: 0 8px;
    }

    .availability-card h3 {
        font-size: 1.2rem;
    }

    .availability-card p {
        font-size: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .section {
        padding: 80px max(20px, env(safe-area-inset-right)) 60px max(20px, env(safe-area-inset-left));
    }

    .hero {
        padding: max(120px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 100px max(20px, env(safe-area-inset-left));
    }

    .card {
        padding: 20px;
        margin: 0;
    }

    .contact-card {
        margin: 0;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-icon {
        align-self: center;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .contact-content {
        text-align: center;
    }

    /* Font sizes handled by fluid typography - no overrides needed */

    .item-header {
        gap: 6px;
    }

    .highlight-item {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .availability-card {
        padding: 20px 12px;
    }
}

/* Advanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Simplified card appearance - no staggered animation */
.card {
    opacity: 1;
}

/* Profile image - no animation for cleaner look */
.profile-image {
    /* animation: float 6s ease-in-out infinite; */
}

.card.featured {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.25) 0%, rgba(30, 41, 59, 0.2) 100%);
}

.card.featured::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6, #8b5cf6, #a78bfa, #60a5fa);
    background-size: 300% 300%;
    border-radius: 20px;
    z-index: -1;
    animation: gradientRotate 6s linear infinite;
    filter: blur(8px);
}

@keyframes gradientRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Scroll-triggered fade-in */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Enhanced section dividers */
.section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.3), transparent);
    opacity: 0.5;
}

.section:last-child::after {
    display: none;
}

/* Parallax effect hint */
.section {
    position: relative;
}

/* Removed solid section color coding to preserve transparency */

/* Improved focus states for accessibility - WCAG 2.2 Enhanced Focus Indicator */
*:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Enhanced focus for interactive elements */
button:focus-visible,
a:focus-visible,
.nav-btn:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.2);
}

/* Smooth scroll indicator */

/* Enhanced link hover effects */
a {
    position: relative;
    transition: all 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #8b5cf6);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* Modern cursor effects for interactive elements */
.card,
.nav-btn,
.skill-tag,
.contact-card {
    cursor: pointer;
    user-select: none;
}

/* Animated gradient text for emphasis */
.gradient-text-animated {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 25%, #8b5cf6 50%, #a78bfa 75%, #60a5fa 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 8s ease-in-out infinite;
}


/* Stagger animation for lists */
.stagger-item {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }

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

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(30, 41, 59, 0.4) 25%,
        rgba(96, 165, 250, 0.1) 50%,
        rgba(30, 41, 59, 0.4) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}


/* Touch device optimizations - WCAG 2.2 Enhanced */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover animations on touch devices */
    .card:hover {
        transform: none;
    }

    /* Make touch targets larger - 48x48px for better mobile UX */
    .nav-btn {
        padding: 16px 28px;
        min-height: 48px;
        min-width: 48px;
    }

    .skill-tag {
        padding: 14px 20px;
        min-height: 44px;
    }

    .hamburger-btn {
        min-width: 56px;
        min-height: 56px;
    }

    /* Increase spacing between touch targets */
    .nav-links {
        gap: 16px;
    }

    .skills-list {
        gap: 14px;
    }

    /* Disable magnetic effects on touch */
    .nav-btn:hover,
    .skill-tag:hover {
        animation: none;
    }

    /* Simplify card effects */
    .card {
        transition: all 0.3s ease;
    }

    .card:active {
        /* Removed wobble effect */
    }

    /* Remove cursor glow on touch devices */
    .cursor-glow {
        display: none !important;
    }

    /* Add visual feedback for touch */
    .nav-btn:active,
    .skill-tag:active,
    .cookie-btn:active {
        transform: scale(0.95);
        opacity: 0.9;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark mode */
    body {
        color-scheme: dark;
    }
}

/* Light mode specific transparent backgrounds */
:root[data-theme="light"] .hamburger-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(224, 242, 254, 0.35) 100%);
    border-color: rgba(8, 145, 178, 0.3);
}

:root[data-theme="light"] .nav-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(224, 242, 254, 0.35) 100%);
    border-color: rgba(8, 145, 178, 0.3);
    color: var(--accent-primary);
}

:root[data-theme="light"] .cookie-consent {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(224, 242, 254, 0.35) 100%);
    border-color: rgba(8, 145, 178, 0.4);
}

:root[data-theme="light"] .cookie-text p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .cookie-btn.decline {
    background: rgba(8, 145, 178, 0.12);
    border-color: rgba(8, 145, 178, 0.5);
    color: #0c4a6e;
}

:root[data-theme="light"] .cookie-btn.decline:hover {
    background: rgba(8, 145, 178, 0.2);
    border-color: rgba(8, 145, 178, 0.7);
    color: #0a3a56;
}

:root[data-theme="light"] .glass-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(224, 242, 254, 0.3));
}

:root[data-theme="light"] .card.featured {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(224, 242, 254, 0.3) 100%);
}

:root[data-theme="light"] [data-tooltip]::before {
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    border: 1px solid rgba(8, 145, 178, 0.3);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid rgba(96, 165, 250, 0.6);
    }

    .nav-btn {
        border: 2px solid rgba(96, 165, 250, 0.6);
    }

    .section-title::after {
        height: 4px;
    }
}

/* Print styles */
@media print {
    body::before,
    #canvas-container,
    .nav-menu,
    .loading-screen,
    .cookie-consent {
        display: none !important;
    }

    .section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .card {
        box-shadow: none;
        border: 1px solid #333;
    }
}

/* Modern scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.5), rgba(139, 92, 246, 0.5));
    border-radius: 6px;
    border: 2px solid rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.8), rgba(139, 92, 246, 0.8));
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 165, 250, 0.5) rgba(15, 23, 42, 0.5);
}

/* Selection styling */
::selection {
    background: rgba(96, 165, 250, 0.3);
    color: #e8f1ff;
}

::-moz-selection {
    background: rgba(96, 165, 250, 0.3);
    color: #e8f1ff;
}

/* Performance hints */
.card,
.nav-btn,
.skill-tag,
.profile-image {
    will-change: transform;
}

/* Ensure smooth animations on all devices */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Add subtle texture overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.03"/></svg>');
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
    opacity: 0.5;
}

/* Enhanced card micro-interactions */
.card:active {
    /* Removed wobble effect */
}

.card .card-header h3 {
    transition: all 0.3s ease;
}

.card:hover .card-header h3 {
    transform: translateX(5px);
}

/* Skill tag ripple effect */
.skill-tag {
    position: relative;
    overflow: hidden;
}

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

.skill-tag:active::after {
    width: 200px;
    height: 200px;
}

/* Navigation button press effect */
.nav-btn:active {
    transform: scale(0.95) translateY(-2px);
}

/* Contact card enhanced hover */
.contact-card .contact-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover .contact-icon {
    transform: scale(1.15) rotate(10deg);
}

/* Smooth section transitions */
.section {
    opacity: 1;
    transition: opacity 0.6s ease;
}

/* Code block styling if present */
code {
    background: rgba(96, 165, 250, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9em;
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

/* Horizontal rule styling */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.3), transparent);
    margin: 40px 0;
}

/* Badge/Tag styling */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(96, 165, 250, 0.3);
    font-size: 0.85rem;
    font-weight: 500;
    color: #60a5fa;
}

/* Tooltip styling */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    color: #93c5fd;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(96, 165, 250, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* Enhanced loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(96, 165, 250, 0.2);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

/* Smooth image loading */
img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded,
img[src] {
    opacity: 1;
}

/* Enhanced button group */
.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Accent lines */
.accent-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, #60a5fa, transparent);
    margin: 20px 0;
}

/* Status indicators */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 8px #60a5fa;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Glass panel variant */
.glass-panel {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.25), rgba(30, 41, 59, 0.2));
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 24px;
}

/* Highlight effect */
.highlight {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(139, 92, 246, 0.1));
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

/* View Selector Buttons */
.view-selector {
    display: flex;
    gap: 6px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    flex-wrap: wrap;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.viz-btn {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease,
                color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    white-space: nowrap;
}

.viz-btn span {
    font-size: 1rem;
}

.viz-btn:hover {
    background: var(--gradient-start);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.viz-btn.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-primary);
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* Skills Views Container */
.skills-views-container {
    width: 100%;
}

.skills-view {
    width: 100%;
}

/* Skills Network Container */
.skills-network-container,
.skills-radial-container,
.skills-clustered-container,
.skills-tree-container {
    width: 100%;
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 8px 32px var(--shadow-color);
    overflow: hidden;
}

.network-legend {
    z-index: 10;
}

/* Skills Network Container - Mobile */
.skills-network-container,
.skills-radial-container,
.skills-clustered-container,
.skills-tree-container {
    -webkit-overflow-scrolling: touch;
}

/* Network legend - mobile positioning */
@media (max-width: 768px) {
    .network-legend {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin: 20px auto;
        max-width: 100%;
    }

    .skills-network-container {
        height: 500px !important;
    }

    .skills-radial-container {
        height: 500px !important;
    }

    .skills-clustered-container {
        height: auto !important;
        max-height: 600px;
    }

    .skills-tree-container {
        height: auto !important;
        max-height: 600px;
    }
}

/* Responsive selector */
@media (max-width: 768px) {
    .view-selector {
        width: 100%;
        justify-content: center;
    }

    .viz-btn {
        flex: 1;
        min-width: 70px;
        justify-content: center;
        padding: 12px 8px;
        font-size: 0.75rem;
        gap: 4px;
    }

    .viz-btn span {
        font-size: 0.9rem;
    }

    /* Hide text on very small screens, show only icons */
    @media (max-width: 600px) {
        .viz-btn {
            padding: 12px 10px;
            min-width: 48px;
        }
    }
}

@media (max-width: 480px) {
    .viz-btn {
        padding: 10px 6px;
        font-size: 0.7rem;
    }

    .viz-btn span {
        font-size: 0.85rem;
    }

    /* Stack selector vertically on very small screens */
    .view-selector {
        flex-direction: column;
        gap: 8px;
    }

    .viz-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 16px;
        font-size: 0.85rem;
    }
}