/* Dark Theme Foundation CSS for Personal Website Template */

/* Base Styles */
* {
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-color: #111827;
    color: #f3f4f6;
}

/* Typography */
.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Dark Theme Color Scheme */
:root {
    --bg-primary: #111827;      /* bg-gray-900 */
    --bg-secondary: #1f2937;    /* bg-gray-800 */
    --border-color: #374151;    /* border-gray-700 */
    --text-primary: #f3f4f6;    /* text-gray-100 */
    --text-secondary: #9ca3af;  /* text-gray-400 */
    --text-muted: #d1d5db;      /* text-gray-300 */
    --accent-blue: #60a5fa;     /* text-blue-400 */
    --accent-emerald: #34d399;  /* text-emerald-400 */
    --code-bg: #1f2937;         /* bg-gray-800 */
    --code-text: #34d399;       /* text-green-400 */
}

/* Custom Dark Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

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

/* Enhanced Focus Styles for Accessibility */
*:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Enhanced focus styles for interactive elements */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

/* Focus-visible for better keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

/* Remove focus outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* High contrast focus for better visibility */
@media (prefers-contrast: high) {
    *:focus,
    *:focus-visible {
        outline: 3px solid #ffffff;
        outline-offset: 2px;
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.3);
    }
}

/* Screen Reader Only and Skip Link Styles */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only:focus,
.sr-only:active {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    z-index: 9999 !important;
}

/* Focus-within for skip link containers */
.focus-within\:not-sr-only:focus-within {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0.5rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* Hero Section Enhancements */
#hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* Hover Effects for Links */
a {
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-blue);
}

/* Button Base Styles */
button {
    transition: all 0.3s ease;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Enhanced Responsive Design */

/* Mobile-first approach */
@media (max-width: 640px) {
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    #hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    /* Typography scaling for mobile */
    .text-5xl {
        font-size: 2.25rem !important;
        line-height: 1.2;
    }
    
    .text-4xl {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .text-3xl {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }
    
    .text-2xl {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    .text-xl {
        font-size: 1.125rem !important;
        line-height: 1.4;
    }
    
    .text-lg {
        font-size: 1rem !important;
        line-height: 1.5;
    }
    
    /* Improved spacing for mobile */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-16 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    .mb-12 {
        margin-bottom: 2rem !important;
    }
    
    .mb-8 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Profile image scaling */
    .w-40.h-40 {
        width: 8rem !important;
        height: 8rem !important;
    }
}

/* Tablet styles */
@media (min-width: 641px) and (max-width: 1024px) {
    .text-5xl {
        font-size: 3rem;
    }
    
    .text-4xl {
        font-size: 2.5rem;
    }
    
    .text-3xl {
        font-size: 2rem;
    }
}

/* Large screen optimizations */
@media (min-width: 1025px) {
    .text-5xl {
        font-size: 3.5rem;
    }
    
    .max-w-4xl {
        max-width: 56rem;
    }
    
    .max-w-7xl {
        max-width: 80rem;
    }
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .contact-links a {
        padding: 0.75rem;
    }
}

/* Performance Optimizations */
.lazy-loading {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.lazy-loaded {
    opacity: 1;
}

/* Smooth Scrolling and Animation Styles */

/* Scroll Progress Indicator */
#scroll-progress {
    transform-origin: left center;
    will-change: width;
}

/* Fade-in Animation Styles */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: var(--animation-delay, 0ms);
}

.animate-fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation Support */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.stagger-children.animate-fade-in-up > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children > *:nth-child(6) { transition-delay: 500ms; }

/* Enhanced Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for any fixed headers */
}

/* Performance Optimized Animations */
.animate-on-scroll,
.animate-fade-in-up {
    will-change: opacity, transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Remove will-change after animation completes for better performance */
.animate-fade-in-up {
    animation-fill-mode: forwards;
}

.animate-fade-in-up.animation-complete {
    will-change: auto;
}

/* Hover Animations for Interactive Elements */
.hover-lift {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Subtle Scale Animation for Images */
.hover-scale {
    transition: transform 0.3s ease-out;
    overflow: hidden;
}

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

/* Loading Animation for Images */
.image-loading {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.image-loaded {
    opacity: 1;
}

/* Scroll Indicator Animation */
.scroll-indicator {
    animation: bounce-gentle 2s infinite;
}

@keyframes bounce-gentle {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Animation Preferences - Respect User Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .scroll-indicator {
        animation: none !important;
    }
    
    #scroll-progress {
        transition: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1a1a1a;
        --border-color: #ffffff;
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --text-muted: #ffffff;
        --accent-blue: #00ffff;
        --accent-emerald: #00ff00;
    }
    
    .text-gray-400,
    .text-gray-300 {
        color: #ffffff !important;
    }
    
    .border-gray-700 {
        border-color: #ffffff !important;
    }
}

/* Forced Colors Mode (Windows High Contrast) */
@media (forced-colors: active) {
    * {
        forced-color-adjust: auto;
    }
    
    .bg-gray-900,
    .bg-gray-800 {
        background: Canvas !important;
        color: CanvasText !important;
    }
    
    a {
        color: LinkText !important;
    }
    
    a:hover,
    a:focus {
        color: ActiveText !important;
    }
    
    button {
        background: ButtonFace !important;
        color: ButtonText !important;
        border: 1px solid ButtonText !important;
    }
}

/* Improved Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid;
    }
    
    p, blockquote {
        orphans: 3;
        widows: 3;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
    
    .scroll-indicator,
    .animate-bounce,
    nav[aria-label="Social media and contact links"] svg {
        display: none !important;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    section {
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }
}

/* Accessibility Enhancements */

/* Ensure sufficient color contrast */
.text-gray-400 {
    color: #9ca3af; /* Meets WCAG AA contrast ratio */
}

.text-gray-300 {
    color: #d1d5db; /* Meets WCAG AA contrast ratio */
}

/* Improved link styling for accessibility */
a {
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s ease;
}

a:hover,
a:focus {
    text-decoration-color: currentColor;
}

/* Better button and interactive element styling */
button,
[role="button"] {
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
}

button:disabled,
[role="button"][aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Improved form element accessibility */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Better table accessibility (if needed in future) */
table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    background-color: var(--bg-secondary);
}

/* Improved list styling */
ul,
ol {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.25rem;
}

/* Better heading hierarchy */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

/* Keyboard Navigation Enhancements */
.keyboard-navigation *:focus {
    outline: 3px solid var(--accent-blue) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.2) !important;
}

/* Touch device optimizations */
.touch-device a,
.touch-device button {
    min-height: 44px;
    min-width: 44px;
}

/* Responsive body classes */
.mobile .text-5xl {
    font-size: 2.25rem !important;
}

.mobile .text-4xl {
    font-size: 2rem !important;
}

.mobile .text-3xl {
    font-size: 1.75rem !important;
}

.tablet .text-5xl {
    font-size: 3rem !important;
}

.tablet .text-4xl {
    font-size: 2.5rem !important;
}

.desktop .text-5xl {
    font-size: 3.5rem !important;
}

/* Live region for screen readers */
#live-region {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Enhanced skip links styling */
nav[aria-label="Skip navigation links"] {
    z-index: 9999;
}

nav[aria-label="Skip navigation links"]:focus-within {
    position: fixed !important;
    top: 1rem !important;
    left: 1rem !important;
}

/* Improved keyboard navigation indicators */
.keyboard-navigation-active *:focus {
    outline: 3px solid var(--accent-blue) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.3) !important;
}

/* Enhanced responsive breakpoints */
@media (min-width: 1280px) {
    .xl\:text-6xl {
        font-size: 4rem;
        line-height: 1;
    }
    
    .xl\:max-w-8xl {
        max-width: 88rem;
    }
    
    .xl\:px-12 {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* Ultra-wide screen optimizations */
@media (min-width: 1536px) {
    .container {
        max-width: 1280px;
        margin: 0 auto;
    }
    
    .hero-content {
        max-width: 1024px;
    }
}

/* Enhanced mobile touch targets */
@media (max-width: 768px) {
    a, button, [role="button"] {
        min-height: 48px;
        min-width: 48px;
        padding: 0.75rem;
    }
    
    /* Larger touch targets for better accessibility */
    .contact-links a {
        padding: 1rem;
        margin: 0.25rem;
    }
    
    /* Improved mobile typography */
    .mobile-optimized {
        font-size: 1.125rem;
        line-height: 1.6;
    }
}

/* Tablet-specific optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    .tablet-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .tablet-text {
        font-size: 1.25rem;
        line-height: 1.5;
    }
}

/* Enhanced focus management for complex interactions */
.focus-trap {
    position: relative;
}

.focus-trap:focus-within {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Better contrast for links in high contrast mode */
@media (prefers-contrast: high) {
    a {
        text-decoration: underline !important;
        text-decoration-thickness: 2px !important;
        text-underline-offset: 4px !important;
    }
    
    a:hover,
    a:focus {
        background-color: #ffffff !important;
        color: #000000 !important;
        outline: 3px solid #000000 !important;
    }
}

/* Improved animation performance */
@media (prefers-reduced-motion: no-preference) {
    .smooth-scroll {
        scroll-behavior: smooth;
    }
    
    .performance-optimized {
        will-change: transform, opacity;
        transform: translateZ(0);
    }
}

/* Enhanced print accessibility */
@media print {
    .sr-only {
        position: static !important;
        width: auto !important;
        height: auto !important;
        clip: auto !important;
        overflow: visible !important;
    }
    
    nav[aria-label="Skip navigation links"] {
        display: none !important;
    }
    
    #live-region {
        display: none !important;
    }
    
    /* Ensure good contrast in print */
    * {
        color: #000000 !important;
        background: #ffffff !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        font-weight: bold !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Current section indicator for screen readers */
section[aria-current="location"] {
    position: relative;
}

section[aria-current="location"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--accent-blue);
    opacity: 0.7;
}

/* Enhanced focus indicators for different element types */
nav a:focus,
nav button:focus {
    background-color: rgba(96, 165, 250, 0.1);
    border-radius: 0.375rem;
}

/* Better contrast for focused elements */
@media (prefers-contrast: high) {
    .keyboard-navigation *:focus {
        outline: 4px solid #ffffff !important;
        background-color: #000000 !important;
        color: #ffffff !important;
    }
}

/* Skills Section Enhancements */
.skill-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.6), transparent);
    transition: left 0.5s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-item {
    transition: all 0.2s ease;
    padding: 0.5rem 0;
    border-left: 3px solid transparent;
    padding-left: 1rem;
    margin-left: -1rem;
}

.skill-item:hover {
    border-left-color: var(--accent-blue);
    background-color: rgba(96, 165, 250, 0.05);
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Different accent colors for each skill category */
.skill-card:nth-child(1) .skill-item:hover {
    border-left-color: var(--accent-blue);
    background-color: rgba(96, 165, 250, 0.05);
}

.skill-card:nth-child(2) .skill-item:hover {
    border-left-color: var(--accent-emerald);
    background-color: rgba(52, 211, 153, 0.05);
}

.skill-card:nth-child(3) .skill-item:hover {
    border-left-color: #fb923c; /* orange-400 */
    background-color: rgba(251, 146, 60, 0.05);
}

/* Staggered animation for skill items */
.skill-card .skill-item:nth-child(1) { animation-delay: 0.1s; }
.skill-card .skill-item:nth-child(2) { animation-delay: 0.2s; }
.skill-card .skill-item:nth-child(3) { animation-delay: 0.3s; }
.skill-card .skill-item:nth-child(4) { animation-delay: 0.4s; }
.skill-card .skill-item:nth-child(5) { animation-delay: 0.5s; }
.skill-card .skill-item:nth-child(6) { animation-delay: 0.6s; }

/* Mobile optimizations for skills section */
@media (max-width: 768px) {
    .skill-card {
        margin-bottom: 1.5rem;
    }
    
    .skill-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .skill-item:hover {
        transform: none;
    }
    
    .skill-card::before {
        display: none;
    }
}

/* Accessibility improvements for skills section */
.skill-card:focus-within {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* High contrast mode adjustments for skills */
@media (prefers-contrast: high) {
    .skill-card {
        border: 2px solid #ffffff !important;
    }
    
    .skill-item:hover {
        border-left-color: #ffffff !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
}

/* Reduced motion preferences for skills section */
@media (prefers-reduced-motion: reduce) {
    .skill-card {
        transition: none !important;
    }
    
    .skill-card:hover {
        transform: none !important;
    }
    
    .skill-item {
        transition: none !important;
    }
    
    .skill-card::before {
        display: none !important;
    }
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Better spacing for content */
p {
    margin-bottom: 1rem;
}

/* Improved code styling */
code,
pre {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--code-bg);
    color: var(--code-text);
}

code {
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

pre {
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}
/* Enhance
d Skills Section Styling */
.skill-overview-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    transition: left 0.5s ease;
    opacity: 0.6;
}

.skill-overview-card:hover::before {
    left: 100%;
}

/* Skills Detail Container */
.skills-detail-container {
    margin-top: 2rem;
    position: relative;
}

.skills-detail-panel {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.skills-detail-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Skill Badge Styling */
.skill-badge {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8) 0%, rgba(17, 24, 39, 0.9) 100%);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-badge:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.skill-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.skill-badge:hover::before {
    transform: translateX(100%);
}

/* Skill Rating Dots Animation */
.skill-badge .w-2.h-2 {
    transition: all 0.2s ease;
}

.skill-badge:hover .w-2.h-2 {
    transform: scale(1.2);
}

/* Interactive Skills Switching */
.skill-overview-card.active {
    border-color: var(--accent-blue) !important;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(31, 41, 55, 1) 100%);
}

.skill-overview-card[data-category="frontend"].active {
    border-color: #10b981 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(31, 41, 55, 1) 100%);
}

.skill-overview-card[data-category="cloud"].active {
    border-color: #f59e0b !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(31, 41, 55, 1) 100%);
}

/* Staggered animation for skill badges */
.skills-detail-panel .skill-badge:nth-child(1) { animation-delay: 0.1s; }
.skills-detail-panel .skill-badge:nth-child(2) { animation-delay: 0.2s; }
.skills-detail-panel .skill-badge:nth-child(3) { animation-delay: 0.3s; }
.skills-detail-panel .skill-badge:nth-child(4) { animation-delay: 0.4s; }
.skills-detail-panel .skill-badge:nth-child(5) { animation-delay: 0.5s; }
.skills-detail-panel .skill-badge:nth-child(6) { animation-delay: 0.6s; }

/* Mobile optimizations for enhanced skills section */
@media (max-width: 768px) {
    .skill-overview-card {
        margin-bottom: 1.5rem;
    }
    
    .skill-overview-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .skill-badge:hover {
        transform: none;
        box-shadow: none;
    }
    
    .skill-overview-card::before,
    .skill-badge::before {
        display: none;
    }
    
    .skills-detail-panel {
        margin-top: 1rem;
    }
    
    .skill-badge {
        margin-bottom: 1rem;
    }
}

/* Accessibility improvements for enhanced skills section */
.skill-overview-card:focus-within {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.skill-badge:focus-within {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* High contrast mode adjustments for enhanced skills */
@media (prefers-contrast: high) {
    .skill-overview-card,
    .skill-badge {
        border: 2px solid #ffffff !important;
        background: #000000 !important;
    }
    
    .skill-overview-card .text-gray-400,
    .skill-badge .text-gray-400 {
        color: #ffffff !important;
    }
    
    .w-2.h-2.bg-blue-400,
    .w-2.h-2.bg-emerald-400,
    .w-2.h-2.bg-orange-400 {
        background-color: #ffffff !important;
    }
    
    .w-2.h-2.bg-gray-600 {
        background-color: #666666 !important;
    }
}

/* Reduced motion preferences for enhanced skills section */
@media (prefers-reduced-motion: reduce) {
    .skill-overview-card,
    .skill-badge,
    .skills-detail-panel {
        transition: none !important;
    }
    
    .skill-overview-card:hover,
    .skill-badge:hover {
        transform: none !important;
    }
    
    .skill-overview-card::before,
    .skill-badge::before {
        display: none !important;
    }
    
    .skill-badge:hover .w-2.h-2 {
        transform: none !important;
    }
}
/*
 Experience Section Timeline Styles */
#experience {
    position: relative;
}

/* Timeline Container */
.experience-timeline {
    position: relative;
    max-width: 4rem;
    margin: 0 auto;
}

/* Timeline Line */
.experience-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #60a5fa, #3b82f6, #1d4ed8);
    z-index: 1;
}

/* Timeline Items */
.experience-item {
    position: relative;
    margin-bottom: 3rem;
}

/* Timeline Dots */
.timeline-dot {
    position: relative;
    z-index: 10;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 4px solid #111827;
    transition: all 0.3s ease;
}

.timeline-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.5);
}

/* Experience Cards */
.experience-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    opacity: 0.6;
}

.experience-card:hover::before {
    transform: translateX(100%);
}

/* Achievement List Styling */
.achievement-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    padding: 0.25rem 0;
    border-radius: 0.25rem;
}

.achievement-item:hover {
    background-color: rgba(96, 165, 250, 0.05);
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

.achievement-bullet {
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-right: 0.5rem;
    margin-top: 0.375rem;
    transition: all 0.2s ease;
}

.achievement-item:hover .achievement-bullet {
    transform: scale(1.3);
    box-shadow: 0 0 8px currentColor;
}

/* Technology Tags */
.tech-tag {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.tech-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.tech-tag:hover::before {
    left: 100%;
}

/* Responsive Timeline Adjustments */
@media (max-width: 768px) {
    /* Mobile Timeline - Left Aligned */
    .experience-timeline::before {
        left: 1rem;
        transform: none;
    }
    
    .timeline-dot {
        left: 1rem;
        transform: translateX(-50%);
    }
    
    .experience-card {
        margin-left: 3rem;
        width: calc(100% - 3rem);
    }
    
    /* Simplify hover effects on mobile */
    .experience-card:hover {
        transform: none;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }
    
    .timeline-dot:hover {
        transform: translateX(-50%) scale(1.1);
    }
    
    .achievement-item:hover {
        background-color: transparent;
        padding-left: 0;
        margin-left: 0;
    }
    
    .tech-tag:hover {
        transform: none;
    }
    
    /* Remove complex animations on mobile */
    .experience-card::before,
    .tech-tag::before {
        display: none;
    }
}

@media (min-width: 769px) {
    /* Desktop Timeline - Alternating Layout */
    .experience-item:nth-child(even) .experience-card {
        margin-left: auto;
        text-align: left;
    }
    
    .experience-item:nth-child(odd) .experience-card {
        margin-right: auto;
        text-align: right;
    }
    
    /* Adjust achievement list alignment for alternating layout */
    .experience-item:nth-child(even) .achievement-item {
        justify-content: flex-start;
        text-align: left;
    }
    
    .experience-item:nth-child(odd) .achievement-item {
        justify-content: flex-end;
        text-align: right;
        flex-direction: row-reverse;
    }
    
    .experience-item:nth-child(odd) .achievement-bullet {
        margin-right: 0;
        margin-left: 0.5rem;
    }
    
    /* Adjust technology tags alignment */
    .experience-item:nth-child(even) .tech-tags {
        justify-content: flex-start;
    }
    
    .experience-item:nth-child(odd) .tech-tags {
        justify-content: flex-end;
    }
}

/* Staggered Animation for Experience Items */
.experience-item:nth-child(1) { animation-delay: 0.1s; }
.experience-item:nth-child(2) { animation-delay: 0.3s; }
.experience-item:nth-child(3) { animation-delay: 0.5s; }
.experience-item:nth-child(4) { animation-delay: 0.7s; }

/* Color Variations for Different Companies */
.experience-item:nth-child(1) .timeline-dot {
    background-color: #60a5fa; /* Blue for current role */
}

.experience-item:nth-child(2) .timeline-dot {
    background-color: #34d399; /* Emerald for previous role */
}

.experience-item:nth-child(3) .timeline-dot {
    background-color: #fb923c; /* Orange for consultant role */
}

.experience-item:nth-child(4) .timeline-dot {
    background-color: #a78bfa; /* Purple for early career */
}

/* Accessibility Improvements for Experience Section */
.experience-card:focus-within {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.timeline-dot:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 4px;
    transform: scale(1.2);
}

/* High Contrast Mode for Experience Section */
@media (prefers-contrast: high) {
    .experience-timeline::before {
        background: #ffffff !important;
    }
    
    .timeline-dot {
        background-color: #ffffff !important;
        border-color: #000000 !important;
    }
    
    .experience-card {
        border: 2px solid #ffffff !important;
        background: #000000 !important;
    }
    
    .achievement-bullet {
        background-color: #ffffff !important;
    }
    
    .tech-tag {
        border: 1px solid #ffffff !important;
        background: #000000 !important;
        color: #ffffff !important;
    }
}

/* Reduced Motion for Experience Section */
@media (prefers-reduced-motion: reduce) {
    .experience-card,
    .timeline-dot,
    .achievement-item,
    .tech-tag {
        transition: none !important;
    }
    
    .experience-card:hover,
    .timeline-dot:hover,
    .achievement-item:hover,
    .tech-tag:hover {
        transform: none !important;
    }
    
    .experience-card::before,
    .tech-tag::before {
        display: none !important;
    }
    
    .achievement-item:hover .achievement-bullet {
        transform: none !important;
        box-shadow: none !important;
    }
}

/* Enhanced Experience Section Timeline Styles */
#experience {
    position: relative;
}

/* Timeline Container with Better Spacing */
.experience-timeline {
    position: relative;
    max-width: 6rem;
    margin: 0 auto;
}

/* Enhanced Timeline Line */
.experience-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #60a5fa, #3b82f6, #1d4ed8, #1e40af);
    border-radius: 2px;
    z-index: 1;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

/* Timeline Items with Alternating Layout */
.experience-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    min-height: 200px;
}

/* Enhanced Timeline Dots */
.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 4px solid #111827;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

.timeline-dot:hover {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.6), 0 0 0 6px rgba(96, 165, 250, 0.3);
}

/* Timeline Flag Nodes */
.timeline-flag-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.95);
    border: 3px solid #374151;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.timeline-flag-node:hover {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4), 0 0 0 4px rgba(96, 165, 250, 0.2), 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: #60a5fa;
}

.timeline-flag {
    font-size: 1.125rem;
    line-height: 1;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.timeline-flag-node:hover .timeline-flag {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Experience Cards with Alternating Positioning */
.experience-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    margin: 0 2rem;
}

/* Left Side Cards (Odd Items) */
.experience-item:nth-child(odd) .experience-card {
    margin-left: 0;
    margin-right: auto;
    transform-origin: right center;
}

.experience-item:nth-child(odd) .experience-card::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid rgba(31, 41, 55, 0.9);
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    z-index: 5;
}

/* Right Side Cards (Even Items) */
.experience-item:nth-child(even) .experience-card {
    margin-left: auto;
    margin-right: 0;
    transform-origin: left center;
}

.experience-item:nth-child(even) .experience-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-right: 15px solid rgba(31, 41, 55, 0.9);
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    z-index: 5;
}

/* Enhanced Hover Effects */
.experience-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.experience-item:nth-child(odd) .experience-card:hover {
    transform: translateY(-8px) scale(1.02) translateX(-10px);
}

.experience-item:nth-child(even) .experience-card:hover {
    transform: translateY(-8px) scale(1.02) translateX(10px);
}

/* Animated Border Effect */
.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    opacity: 0.8;
}

.experience-card:hover::before {
    transform: translateX(100%);
}

/* Content Alignment for Alternating Layout */
.experience-item:nth-child(odd) .experience-card .flex.flex-col {
    align-items: flex-start;
    text-align: left;
}

.experience-item:nth-child(even) .experience-card .flex.flex-col {
    align-items: flex-end;
    text-align: right;
}

/* Achievement List Styling with Alternating Alignment */
.achievement-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
    border-radius: 0.375rem;
}

/* Left-aligned achievements (odd items) */
.experience-item:nth-child(odd) .achievement-item {
    justify-content: flex-start;
    text-align: left;
}

.experience-item:nth-child(odd) .achievement-item:hover {
    background-color: rgba(96, 165, 250, 0.08);
    padding-left: 0.75rem;
    margin-left: -0.75rem;
    border-left: 3px solid rgba(96, 165, 250, 0.5);
}

/* Right-aligned achievements (even items) */
.experience-item:nth-child(even) .achievement-item {
    justify-content: flex-end;
    text-align: right;
    flex-direction: row-reverse;
}

.experience-item:nth-child(even) .achievement-item:hover {
    background-color: rgba(96, 165, 250, 0.08);
    padding-right: 0.75rem;
    margin-right: -0.75rem;
    border-right: 3px solid rgba(96, 165, 250, 0.5);
}

/* Achievement Bullets */
.achievement-bullet {
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-top: 0.375rem;
    transition: all 0.3s ease;
}

.experience-item:nth-child(odd) .achievement-bullet {
    margin-right: 0.75rem;
}

.experience-item:nth-child(even) .achievement-bullet {
    margin-left: 0.75rem;
}

.achievement-item:hover .achievement-bullet {
    transform: scale(1.5);
    box-shadow: 0 0 12px currentColor;
}

/* Technology Tags with Alternating Alignment */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.experience-item:nth-child(odd) .tech-tags {
    justify-content: flex-start;
}

.experience-item:nth-child(even) .tech-tags {
    justify-content: flex-end;
}

.tech-tag {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.tech-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.tech-tag:hover::before {
    left: 100%;
}

/* Responsive Timeline Adjustments */
@media (max-width: 768px) {
    /* Mobile Timeline - Simplified Left Aligned */
    .experience-timeline::before {
        left: 1.5rem;
        transform: none;
        width: 2px;
    }
    
    .timeline-dot {
        left: 1.5rem;
        transform: translateX(-50%);
        width: 1rem;
        height: 1rem;
    }
    
    .timeline-dot:hover {
        transform: translateX(-50%) scale(1.2);
    }
    
    /* Mobile Timeline Flag Nodes */
    .timeline-flag-node {
        left: 1.5rem;
        transform: translateX(-50%);
        width: 1.75rem;
        height: 1.75rem;
        border: 2px solid #374151;
    }
    
    .timeline-flag-node:hover {
        transform: translateX(-50%) scale(1.15);
    }
    
    .timeline-flag {
        font-size: 1rem;
    }
    
    .experience-item {
        margin-bottom: 2.5rem;
        min-height: auto;
    }
    
    .experience-card {
        margin-left: 4rem !important;
        margin-right: 1rem !important;
        max-width: none;
        width: calc(100% - 5rem);
    }
    
    /* Remove arrows on mobile */
    .experience-card::after {
        display: none;
    }
    
    /* Simplify hover effects on mobile */
    .experience-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    }
    
    /* Reset alignment for mobile */
    .experience-item:nth-child(odd) .experience-card .flex.flex-col,
    .experience-item:nth-child(even) .experience-card .flex.flex-col {
        align-items: flex-start;
        text-align: left;
    }
    
    .experience-item:nth-child(odd) .achievement-item,
    .experience-item:nth-child(even) .achievement-item {
        justify-content: flex-start;
        text-align: left;
        flex-direction: row;
    }
    
    .experience-item:nth-child(odd) .achievement-item:hover,
    .experience-item:nth-child(even) .achievement-item:hover {
        background-color: rgba(96, 165, 250, 0.05);
        padding-left: 0.5rem;
        margin-left: -0.5rem;
        padding-right: 0;
        margin-right: 0;
        border-left: 2px solid rgba(96, 165, 250, 0.4);
        border-right: none;
    }
    
    .experience-item:nth-child(odd) .achievement-bullet,
    .experience-item:nth-child(even) .achievement-bullet {
        margin-right: 0.5rem;
        margin-left: 0;
    }
    
    .experience-item:nth-child(odd) .tech-tags,
    .experience-item:nth-child(even) .tech-tags {
        justify-content: flex-start;
    }
    
    .tech-tag:hover {
        transform: none;
    }
    
    /* Remove complex animations on mobile */
    .experience-card::before,
    .tech-tag::before {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet adjustments */
    .experience-card {
        max-width: 420px;
        margin: 0 1.5rem;
    }
    
    .experience-item {
        margin-bottom: 3.5rem;
    }
}

/* Staggered Animation for Experience Items */
.experience-item:nth-child(1) { 
    animation-delay: 0.1s; 
}
.experience-item:nth-child(2) { 
    animation-delay: 0.3s; 
}
.experience-item:nth-child(3) { 
    animation-delay: 0.5s; 
}
.experience-item:nth-child(4) { 
    animation-delay: 0.7s; 
}

/* Enhanced Color Variations for Different Companies */
.experience-item:nth-child(1) .timeline-dot {
    background-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

.experience-item:nth-child(2) .timeline-dot {
    background-color: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.experience-item:nth-child(3) .timeline-dot {
    background-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.2);
}

.experience-item:nth-child(4) .timeline-dot {
    background-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.2);
}

/* Accessibility Improvements for Experience Section */
.experience-card:focus-within {
    outline: 3px solid var(--accent-blue);
    outline-offset: 3px;
}

.timeline-dot:focus {
    outline: 3px solid var(--accent-blue);
    outline-offset: 6px;
    transform: translateX(-50%) scale(1.3);
}

/* High Contrast Mode for Experience Section */
@media (prefers-contrast: high) {
    .experience-timeline::before {
        background: #ffffff !important;
        box-shadow: none !important;
    }
    
    .timeline-dot {
        background-color: #ffffff !important;
        border-color: #000000 !important;
        box-shadow: 0 0 0 4px #ffffff !important;
    }
    
    .experience-card {
        border: 3px solid #ffffff !important;
        background: #000000 !important;
    }
    
    .experience-card::after {
        border-left-color: #000000 !important;
        border-right-color: #000000 !important;
    }
    
    .achievement-bullet {
        background-color: #ffffff !important;
    }
    
    .tech-tag {
        border: 2px solid #ffffff !important;
        background: #000000 !important;
        color: #ffffff !important;
    }
}

/* Reduced Motion for Experience Section */
@media (prefers-reduced-motion: reduce) {
    .experience-card,
    .timeline-dot,
    .achievement-item,
    .tech-tag {
        transition: none !important;
    }
    
    .experience-card:hover,
    .timeline-dot:hover,
    .achievement-item:hover,
    .tech-tag:hover {
        transform: none !important;
    }
    
    .experience-card::before,
    .tech-tag::before {
        display: none !important;
    }
    
    .achievement-item:hover .achievement-bullet {
        transform: none !important;
        box-shadow: none !important;
    }
}

/* Projects Section Styles */
.project-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

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

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    opacity: 0.6;
}

.project-card:hover::before {
    transform: translateX(100%);
}

/* Project Card Content Layout */
.project-card .relative.z-10 {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Project Header Adjustments for 3-column */
.project-card .flex.items-start.justify-between {
    margin-bottom: 1rem;
}

.project-card .w-12.h-12 {
    width: 2.5rem;
    height: 2.5rem;
}

.project-card .w-12.h-12 svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Project Title Adjustments */
.project-card h3 {
    font-size: 1.125rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.project-card .text-sm {
    font-size: 0.75rem;
}

/* Project Description */
.project-card .text-gray-300.mb-6 {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

/* Technology Stack Section */
.project-card .mb-6:has(.text-sm.font-medium.text-gray-400) {
    margin-bottom: 1rem;
}

.project-card .text-sm.font-medium.text-gray-400 {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Technology Tags */
.project-card .px-3.py-1 {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Project Links */
.project-card .flex.flex-wrap.gap-3 {
    gap: 0.5rem;
    margin-top: auto;
}

.project-card .inline-flex.items-center {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.project-card .inline-flex.items-center svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Project Technology Tags */
.project-card .px-3.py-1 {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.project-card .px-3.py-1:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.project-card .px-3.py-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.project-card .px-3.py-1:hover::before {
    left: 100%;
}

/* Project Link Buttons */
.project-card a {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.project-card a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.4s ease;
}

.project-card a:hover::before {
    left: 100%;
}

/* Project Icon Animations */
.project-card .w-12.h-12 {
    transition: all 0.3s ease;
}

.project-card:hover .w-12.h-12 {
    transform: scale(1.1) rotate(5deg);
}

/* Staggered Animation for Project Cards */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.3s; }
.project-card:nth-child(3) { animation-delay: 0.5s; }
.project-card:nth-child(4) { animation-delay: 0.7s; }

/* Color-specific hover effects for different project types */
.project-card:hover .text-blue-400 {
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.project-card:hover .text-emerald-400 {
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.project-card:hover .text-orange-400 {
    text-shadow: 0 0 10px rgba(251, 146, 60, 0.5);
}

.project-card:hover .text-purple-400 {
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

/* Responsive adjustments for projects section */
@media (max-width: 768px) {
    .project-card {
        margin-bottom: 2rem;
    }
    
    .project-card:hover {
        transform: none;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }
    
    .project-card .px-3.py-1:hover {
        transform: none;
    }
    
    .project-card:hover .w-12.h-12 {
        transform: scale(1.05);
    }
    
    /* Remove complex animations on mobile */
    .project-card::before,
    .project-card .px-3.py-1::before,
    .project-card a::before {
        display: none;
    }
    
    /* Improve touch targets on mobile */
    .project-card a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Stack project links vertically on small screens */
    .project-card .flex.flex-wrap.gap-3 {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .project-card .flex.flex-wrap.gap-3 a {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility improvements for projects section */
.project-card:focus-within {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.project-card a:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* High contrast mode adjustments for projects */
@media (prefers-contrast: high) {
    .project-card {
        border: 2px solid #ffffff !important;
        background: #000000 !important;
    }
    
    .project-card .text-gray-300,
    .project-card .text-gray-400 {
        color: #ffffff !important;
    }
    
    .project-card .px-3.py-1 {
        border: 1px solid #ffffff !important;
        background: #000000 !important;
        color: #ffffff !important;
    }
    
    .project-card a {
        border: 1px solid #ffffff !important;
        background: #000000 !important;
        color: #ffffff !important;
    }
    
    .project-card .text-blue-400,
    .project-card .text-emerald-400,
    .project-card .text-orange-400,
    .project-card .text-purple-400 {
        color: #ffffff !important;
    }
}

/* Reduced motion preferences for projects section */
@media (prefers-reduced-motion: reduce) {
    .project-card,
    .project-card .px-3.py-1,
    .project-card a,
    .project-card .w-12.h-12 {
        transition: none !important;
    }
    
    .project-card:hover,
    .project-card .px-3.py-1:hover,
    .project-card:hover .w-12.h-12 {
        transform: none !important;
    }
    
    .project-card::before,
    .project-card .px-3.py-1::before,
    .project-card a::before {
        display: none !important;
    }
    
    .project-card:hover .text-blue-400,
    .project-card:hover .text-emerald-400,
    .project-card:hover .text-orange-400,
    .project-card:hover .text-purple-400 {
        text-shadow: none !important;
    }
}

/* Print styles for projects section */
@media print {
    .project-card {
        border: 1px solid #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .project-card .text-gray-100,
    .project-card .text-gray-300,
    .project-card .text-gray-400 {
        color: #000000 !important;
    }
    
    .project-card .text-blue-400,
    .project-card .text-emerald-400,
    .project-card .text-orange-400,
    .project-card .text-purple-400 {
        color: #000000 !important;
    }
    
    .project-card .px-3.py-1 {
        border: 1px solid #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .project-card a {
        color: #000000 !important;
        text-decoration: underline;
    }
    
    .project-card a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
    
    /* Hide decorative elements in print */
    .project-card .w-12.h-12,
    .project-card svg {
        display: none !important;
    }
}

/* Print Styles for Experience Section */
@media print {
    .experience-timeline::before {
        background: #000000 !important;
    }
    
    .timeline-dot {
        background-color: #000000 !important;
        border-color: #ffffff !important;
    }
    
    .experience-card {
        border: 1px solid #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
        margin-bottom: 1rem !important;
    }
    
    .tech-tag {
        border: 1px solid #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .achievement-bullet {
        background-color: #000000 !important;
    }
}/* Contact S
ection Styles */
#contact {
    position: relative;
}

.contact-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    opacity: 0.6;
}

.contact-card:hover::before {
    transform: translateX(100%);
}

/* Contact Icon Animation */
.contact-card .w-16.h-16 {
    transition: all 0.3s ease;
}

.contact-card:hover .w-16.h-16 {
    transform: scale(1.1);
}

/* Contact Link Styling */
.contact-link {
    transition: all 0.2s ease;
    position: relative;
}

.contact-link:hover {
    transform: translateY(-1px);
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.contact-link:hover::after,
.contact-link:focus::after {
    width: 100%;
}

/* Social Icons in Contact Section */
.contact-social-icon {
    transition: all 0.2s ease;
}

.contact-social-icon:hover {
    transform: scale(1.1);
}

/* Call to Action Buttons */
.cta-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Mobile optimizations for contact section */
@media (max-width: 768px) {
    .contact-card {
        margin-bottom: 1.5rem;
    }
    
    .contact-card:hover {
        transform: none;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }
    
    .contact-card::before {
        display: none;
    }
    
    .contact-card:hover .w-16.h-16 {
        transform: scale(1.05);
    }
    
    .cta-button:hover {
        transform: none;
        box-shadow: none;
    }
    
    .cta-button::before {
        display: none;
    }
    
    .contact-social-icon:hover {
        transform: none;
    }
}

/* Accessibility improvements for contact section */
.contact-card:focus-within {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.contact-link:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    border-radius: 0.375rem;
}

/* High contrast mode adjustments for contact section */
@media (prefers-contrast: high) {
    .contact-card {
        border: 2px solid #ffffff !important;
        background: #000000 !important;
    }
    
    .contact-card .text-gray-400 {
        color: #ffffff !important;
    }
    
    .cta-button {
        border: 2px solid #ffffff !important;
    }
    
    .contact-social-icon {
        color: #ffffff !important;
    }
}

/* Reduced motion preferences for contact section */
@media (prefers-reduced-motion: reduce) {
    .contact-card,
    .contact-link,
    .contact-social-icon,
    .cta-button {
        transition: none !important;
    }
    
    .contact-card:hover,
    .contact-link:hover,
    .contact-social-icon:hover,
    .cta-button:hover {
        transform: none !important;
    }
    
    .contact-card::before,
    .cta-button::before {
        display: none !important;
    }
    
    .contact-card:hover .w-16.h-16 {
        transform: none !important;
    }
}

/* Enhanced Contact Information Display */
.contact-info {
    position: relative;
}

.contact-info .contact-email {
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.contact-info .contact-email:hover {
    transform: translateY(-1px);
}

.contact-info .contact-email::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.contact-info .contact-email:hover::before,
.contact-info .contact-email:focus::before {
    width: 100%;
}

/* Contact Section Background Pattern Animation */
#contact .absolute.inset-0 {
    animation: contact-pattern-drift 20s ease-in-out infinite;
}

@keyframes contact-pattern-drift {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(10px) translateY(-5px);
    }
    50% {
        transform: translateX(-5px) translateY(10px);
    }
    75% {
        transform: translateX(5px) translateY(-10px);
    }
}

/* Disable pattern animation for reduced motion */
@media (prefers-reduced-motion: reduce) {
    #contact .absolute.inset-0 {
        animation: none !important;
    }
}
/* Lightweight Chat Interface Styles - THE SOLUTION */

/* Chat Widget Container */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    z-index: 1000;
}

/* Chat Toggle Button */
.chat-toggle {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 1001;
}

.chat-toggle:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.chat-toggle:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* Chat Window - THE KEY FIX */
.chat-window {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    width: 32rem;
    height: 32rem;
    max-width: calc(100vw - 3rem);
    max-height: calc(100vh - 6rem);
    background: rgba(31, 41, 55, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    transform-origin: bottom right;
}

.chat-window.hidden {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    pointer-events: none;
}

.chat-window.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
    background: rgba(31, 41, 55, 0.9);
    border-radius: 1rem 1rem 0 0;
}

.chat-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #f3f4f6;
    margin: 0;
}

.chat-subtitle {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.chat-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-close:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* THE CRITICAL FIX: Messages Container with Proper Flexbox */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Important for Firefox */
    background: rgba(17, 24, 39, 0.5);
    scrollbar-width: thin;
    scrollbar-color: #4b5563 #1f2937;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Messages Wrapper - Simplified, no extra padding */
.messages-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

/* Message Bubbles */
.message {
    max-width: 95%;
    word-wrap: break-word;
    animation: slideIn 0.3s ease-out;
}

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

.ai-bubble {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: #f3f4f6;
    border-radius: 1rem 1rem 1rem 0.25rem;
    border: 1px solid rgba(75, 85, 99, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.message-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Typing Indicator */
.typing-indicator {
    align-self: flex-start;
    max-width: 80%;
    animation: slideIn 0.3s ease-out;
}

.typing-bubble {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border-radius: 1rem 1rem 1rem 0.25rem;
    padding: 0.875rem 1.125rem;
    border: 1px solid rgba(75, 85, 99, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.typing-text {
    color: #9ca3af;
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dots span {
    width: 0.375rem;
    height: 0.375rem;
    background-color: #6b7280;
    border-radius: 50%;
    animation: typingDots 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes typingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Chat Input Area */
.chat-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid rgba(75, 85, 99, 0.3);
    background: rgba(31, 41, 55, 0.9);
    border-radius: 0 0 1rem 1rem;
}

.chat-input-area input {
    flex: 1;
    background: #374151;
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: #f3f4f6;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.chat-input-area input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chat-input-area input::placeholder {
    color: #9ca3af;
}

.chat-send {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.chat-send:disabled {
    background: #374151;
    color: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-toggle {
        bottom: 1.5rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
    }
    
    .chat-window {
        bottom: 1.5rem;
        right: 1rem;
        left: 1rem;
        width: calc(100vw - 2rem);
        height: calc(100vh - 8rem);
        max-height: calc(100vh - 8rem);
    }
    
    .chat-messages {
        padding: 0.5rem;
    }
    
    .chat-input-area {
        padding: 0.75rem;
    }
    
    .avatar {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .chat-toggle {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .chat-window {
        border: 2px solid #ffffff !important;
        background: #000000 !important;
    }

    .ai-bubble {
        background: #333333 !important;
        border: 1px solid #ffffff !important;
        color: #ffffff !important;
    }
    
    .chat-input-area input {
        border: 1px solid #ffffff !important;
        background: #000000 !important;
        color: #ffffff !important;
    }
    
    .chat-send {
        border: 1px solid #ffffff !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .chat-toggle,
    .chat-window,
    .message,
    .typing-indicator {
        animation: none !important;
        transition: none !important;
    }
    
    .chat-window.show {
        transform: none !important;
    }
    
    @keyframes slideIn {
        from, to {
            opacity: 1;
            transform: none;
        }
    }
    
    @keyframes typingDots {
        from, to {
            transform: none;
            opacity: 1;
        }
    }
}
/* Enh
anced Chat Interface Integration */

/* Ensure chat interface matches dark theme */
#ai-chat-interface {
    color: #f3f4f6;
}

/* Chat toggle button enhanced styling */
#chat-toggle-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

#chat-toggle-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

#chat-toggle-btn:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* Chat messages styling for dark theme */
.user-message {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-radius: 1rem 1rem 0.25rem 1rem;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    margin-left: auto;
    max-width: 80%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Message content styling */

.message-timestamp {
    font-size: 0.75rem;
    color: rgba(156, 163, 175, 0.8);
    margin-top: 0.25rem;
}

/* Chat input styling */
#chat-input {
    background-color: #1f2937;
    border: 1px solid #374151;
    color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.75rem;
    resize: none;
    transition: all 0.2s ease;
}

#chat-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#chat-input::placeholder {
    color: #9ca3af;
}

/* Send button styling */
#send-message-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

#send-message-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#send-message-btn:disabled {
    background: #374151;
    color: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Close button styling */
#close-chat-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

#close-chat-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Typing indicator styling */
#typing-indicator {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #9ca3af;
    font-style: italic;
}

.typing-dots {
    display: inline-flex;
    margin-left: 0.5rem;
}

.typing-dots span {
    width: 0.25rem;
    height: 0.25rem;
    background-color: #9ca3af;
    border-radius: 50%;
    margin: 0 0.125rem;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

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

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Character counter styling */
.char-counter {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: right;
    margin-top: 0.25rem;
}

.char-limit-warning {
    color: #f59e0b;
}

.char-limit-exceeded {
    color: #ef4444;
}

/* Error message styling */
.error-message {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.error-message svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

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

/* Enhanced mobile responsiveness */
@media (max-width: 640px) {
    .user-message,
    #chat-input {
        font-size: 1rem; /* Prevent zoom on iOS */
    }
    
    #ai-chat-window {
        width: calc(100vw - 2rem) !important;
        height: calc(100vh - 8rem) !important;
        max-height: calc(100vh - 8rem) !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #chat-toggle-btn {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .user-message {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    #chat-input {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    #chat-toggle-btn,
    #send-message-btn,
    .user-message,
    #ai-chat-window {
        transition: none !important;
        animation: none !important;
    }
    
    .typing-dots span {
        animation: none !important;
    }
    
    .chat-window-enter,
    .chat-window-exit {
        animation: none !important;
    }
}/* Fix 
Chat Interface Positioning */
#ai-chat-window {
    position: fixed !important;
    bottom: 2.5rem !important;
    right: 1.5rem !important;
    left: auto !important;
    width: 32rem !important;
    height: 36rem !important;
    max-width: calc(100vw - 3rem) !important;
    max-height: calc(100vh - 8rem) !important;
}

#ai-chat-toggle {
    position: fixed !important;
    bottom: 2.5rem !important;
    right: 1.5rem !important;
    z-index: 1001 !important;
}

/* Mobile positioning fix */
@media (max-width: 640px) {
    #ai-chat-window {
        bottom: 2rem !important;
        right: 1rem !important;
        left: 1rem !important;
        width: calc(100vw - 2rem) !important;
        height: calc(100vh - 8rem) !important;
        max-height: calc(100vh - 8rem) !important;
        max-width: calc(100vw - 2rem) !important;
    }
    
    #ai-chat-toggle {
        bottom: 2rem !important;
        right: 1rem !important;
    }
    
    #chat-messages {
        padding: 0.5rem;
    }
    
    #chat-form {
        padding: 0.75rem;
    }
}

/* Enhanced Message Bubble Styles */
.user-message {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
    animation: slideInFromRight 0.3s ease-out;
}

.user-message  {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 1.125rem 1.125rem 0.375rem 1.125rem;
    padding: 0.75rem 1rem 0.5rem 1rem;
    max-width: 75%;
    word-wrap: break-word;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.25);
    position: relative;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.message-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: 85%;
}

.avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.message-timestamp {
    font-size: 0.625rem;
    color: rgba(156, 163, 175, 0.6);
    margin-top: 0.25rem;
    font-weight: 400;
    text-align: right;
}

.message-timestamp {
    text-align: left;
}

/* Message entrance animations */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Enhanced typing indicator */
#typing-indicator {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0.5rem 0;
    animation: slideInFromLeft 0.3s ease-out;
}

#typing-indicator .avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    border: 2px solid rgba(99, 102, 241, 0.2);
}

#typing-indicator .typing-bubble {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border-radius: 1.125rem 1.125rem 1.125rem 0.375rem;
    border: 1px solid rgba(75, 85, 99, 0.3);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#typing-indicator .typing-text {
    color: #9ca3af;
    font-size: 0.875rem;
}

#typing-indicator .typing-dots {
    display: flex;
    gap: 0.25rem;
}

#typing-indicator .typing-dots span {
    width: 0.375rem;
    height: 0.375rem;
    background-color: #6b7280;
    border-radius: 50%;
    animation: typingDots 1.4s infinite ease-in-out;
}

#typing-indicator .typing-dots span:nth-child(1) { animation-delay: -0.32s; }
#typing-indicator .typing-dots span:nth-child(2) { animation-delay: -0.16s; }
#typing-indicator .typing-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes typingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Mobile message adjustments */
@media (max-width: 640px) {
    .user-message {
        max-width: 85%;
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
        border-radius: 1rem 1rem 0.25rem 1rem;
    }
    
    .avatar {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .message-timestamp {
        font-size: 0.625rem;
        margin-top: 0.25rem;
    }

    .messages-wrapper {
        gap: 0.375rem;
    }
}

/* AI Download and Progress Modal Styles */

/* Modal Base Styles */
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.ai-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Modal Backdrop */
.ai-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

/* Modal Content */
.ai-modal-content,
.ai-progress-content {
    position: relative;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.98) 0%, rgba(17, 24, 39, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    max-width: 28rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-modal.hidden .ai-modal-content,
.ai-modal.hidden .ai-progress-content {
    transform: scale(0.95);
}

/* Modal Header */
.ai-modal-header,
.ai-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
    margin-bottom: 1.5rem;
}

.ai-modal-header h3,
.ai-progress-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f3f4f6;
    margin: 0;
}

.ai-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-modal-close:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

/* Modal Body */
.ai-modal-body,
.ai-progress-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    text-align: center;
}

/* Modal Icon */
.ai-modal-icon,
.ai-progress-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    border: 2px solid rgba(59, 130, 246, 0.2);
}

.ai-progress-icon {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Modal Text */
.ai-modal-text,
.ai-progress-text {
    color: #d1d5db;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Modal Info Lists */
.ai-modal-info {
    background: rgba(17, 24, 39, 0.5);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(75, 85, 99, 0.2);
}

.ai-modal-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.ai-modal-info li {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-modal-info li:last-child {
    margin-bottom: 0;
}

/* Progress Bar Styles */
.ai-progress-bar-container {
    margin: 1.5rem 0;
}

.ai-progress-bar {
    width: 100%;
    height: 0.75rem;
    background: rgba(75, 85, 99, 0.3);
    border-radius: 0.375rem;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 0.375rem;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ai-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.ai-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

#ai-progress-percent {
    font-weight: 600;
    color: #60a5fa;
}

#ai-progress-size {
    color: #9ca3af;
}

/* Progress Info */
.ai-progress-info {
    background: rgba(17, 24, 39, 0.5);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(75, 85, 99, 0.2);
    text-align: left;
}

.ai-progress-info p {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.ai-progress-info p:last-child {
    margin-bottom: 0;
}

.ai-progress-info strong {
    color: #f3f4f6;
}

/* Requirements Section */
.ai-modal-requirements {
    text-align: left;
    background: rgba(17, 24, 39, 0.5);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(75, 85, 99, 0.2);
}

.ai-modal-requirements h4 {
    color: #f3f4f6;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.ai-modal-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.ai-modal-requirements li {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.ai-modal-requirements li::before {
    content: '•';
    color: #60a5fa;
    position: absolute;
    left: 0;
    top: 0;
}

.ai-modal-requirements li:last-child {
    margin-bottom: 0;
}

/* Modal Links */
.ai-modal-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ai-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.ai-link:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.5);
    transform: translateY(-1px);
}

/* Modal Actions */
.ai-modal-actions,
.ai-progress-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(75, 85, 99, 0.2);
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Styles */
.ai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.ai-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.ai-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.ai-btn-secondary {
    background: rgba(75, 85, 99, 0.3);
    color: #d1d5db;
    border: 1px solid rgba(75, 85, 99, 0.5);
}

.ai-btn-secondary:hover {
    background: rgba(75, 85, 99, 0.5);
    border-color: rgba(75, 85, 99, 0.7);
    transform: translateY(-1px);
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-modal-content,
    .ai-progress-content {
        max-width: calc(100vw - 2rem);
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .ai-modal-header,
    .ai-progress-header,
    .ai-modal-body,
    .ai-progress-body,
    .ai-modal-actions,
    .ai-progress-actions {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .ai-modal-actions,
    .ai-progress-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ai-btn {
        width: 100%;
        min-width: auto;
    }
    
    .ai-modal-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ai-link {
        justify-content: center;
    }
    
    .ai-modal-icon,
    .ai-progress-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .ai-modal-text,
    .ai-progress-text {
        font-size: 0.875rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ai-modal-content,
    .ai-progress-content {
        background: #000000 !important;
        border: 2px solid #ffffff !important;
    }
    
    .ai-modal-backdrop {
        background: rgba(0, 0, 0, 0.9) !important;
    }
    
    .ai-modal-header h3,
    .ai-progress-header h3,
    .ai-modal-text,
    .ai-progress-text {
        color: #ffffff !important;
    }
    
    .ai-modal-info,
    .ai-progress-info,
    .ai-modal-requirements {
        background: #000000 !important;
        border: 1px solid #ffffff !important;
    }
    
    .ai-modal-info li,
    .ai-progress-info p,
    .ai-modal-requirements li {
        color: #ffffff !important;
    }
    
    .ai-btn-primary {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .ai-btn-secondary {
        background: #000000 !important;
        color: #ffffff !important;
        border: 2px solid #ffffff !important;
    }
    
    .ai-progress-bar {
        background: #333333 !important;
        border: 1px solid #ffffff !important;
    }
    
    .ai-progress-fill {
        background: #ffffff !important;
    }
    
    .ai-link {
        color: #ffffff !important;
        border-color: #ffffff !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ai-modal,
    .ai-modal-content,
    .ai-progress-content,
    .ai-btn,
    .ai-link,
    .ai-modal-close {
        transition: none !important;
        animation: none !important;
    }
    
    .ai-progress-fill::after {
        display: none !important;
    }
    
    .ai-btn:hover,
    .ai-link:hover,
    .ai-modal-close:hover {
        transform: none !important;
    }
    
    .ai-btn::before {
        display: none !important;
    }
    
    @keyframes shimmer {
        0%, 100% {
            transform: none;
        }
    }
}

/* Focus Management for Modals */
.ai-modal[aria-hidden="false"] {
    display: flex;
}

.ai-modal[aria-hidden="true"] {
    display: none;
}

.ai-btn:focus,
.ai-link:focus,
.ai-modal-close:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* Loading State for Buttons */
.ai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.ai-btn:disabled::before {
    display: none;
}

/* Success State Styling */
.ai-progress-success {
    color: #10b981;
}

.ai-progress-success .ai-progress-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* Error State Styling */
.ai-progress-error {
    color: #ef4444;
}

.ai-progress-error .ai-progress-fill {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* Teaser Modal Enhancements */
.ai-requirements-section {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
    transform: translateY(-20px);
}

.ai-requirements-section:not(.hidden) {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
}

.ai-requirements-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(75, 85, 99, 0.5), transparent);
    margin: 1.5rem 0;
}

.ai-requirements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ai-requirements-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ai-requirement-item {
    background: rgba(17, 24, 39, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid rgba(75, 85, 99, 0.2);
    transition: all 0.2s ease;
}

.ai-requirement-item:hover {
    background: rgba(17, 24, 39, 0.5);
    border-color: rgba(75, 85, 99, 0.4);
    transform: translateY(-1px);
}

.ai-requirement-item.ai-not-supported {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.ai-requirement-item.ai-not-supported:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.ai-requirement-item strong {
    color: #f3f4f6;
    font-size: 0.875rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.ai-requirement-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-requirement-item li {
    color: #9ca3af;
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
    padding-left: 1rem;
    position: relative;
}

.ai-requirement-item li::before {
    content: '•';
    color: #60a5fa;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}

.ai-requirement-item.ai-not-supported li::before {
    color: #f87171;
    content: '✕';
}

.ai-requirement-item li:last-child {
    margin-bottom: 0;
}

/* Tell Me More Button Animation */
#ai-tell-me-more {
    position: relative;
    overflow: hidden;
}

#ai-tell-me-more::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
}

#ai-tell-me-more.expanded::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Personal Introduction Card Styles */
.personal-card-content {
    max-width: 36rem;
    width: 100%;
}

.personal-card-body {
    text-align: center;
    padding: 1.5rem;
}

.personal-card-avatar {
    margin-bottom: 1.5rem;
    position: relative;
}

.personal-card-avatar img {
    transition: all 0.3s ease;
    border-width: 3px;
    border-style: solid;
    border-image: linear-gradient(135deg, #60a5fa, #3b82f6) 1;
    animation: avatarGlow 3s ease-in-out infinite alternate;
}

@keyframes avatarGlow {
    0% {
        box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 30px rgba(96, 165, 250, 0.5);
        transform: scale(1.02);
    }
}

.personal-card-intro {
    max-width: 32rem;
    margin: 0 auto;
}

.personal-intro-text {
    text-align: left;
    margin-bottom: 2rem;
}

.personal-intro-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.personal-intro-text p:last-child {
    margin-bottom: 0;
}

.personal-card-highlights {
    background: rgba(17, 24, 39, 0.3);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(31, 41, 55, 0.3);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.highlight-item:hover {
    background: rgba(31, 41, 55, 0.5);
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.highlight-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.6), transparent);
    transition: left 0.5s ease;
}

.highlight-item:hover::before {
    left: 100%;
}

.highlight-icon {
    font-size: 1.5rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.highlight-item:hover .highlight-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.highlight-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    text-align: center;
    transition: color 0.3s ease;
}

.highlight-item:hover .highlight-text {
    color: #f3f4f6;
}

/* Personal Card Animation */
.personal-card-content {
    animation: personalCardSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Mobile Responsive for Personal Card */
@media (max-width: 768px) {
    .personal-card-content {
        max-width: calc(100vw - 2rem);
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .personal-card-body {
        padding: 1rem;
    }
    
    .personal-card-avatar {
        margin-bottom: 1rem;
    }
    
    .personal-card-avatar img {
        width: 4rem;
        height: 4rem;
    }
    
    .personal-intro-text {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .personal-card-highlights {
        padding: 1rem;
        margin-top: 1.5rem;
    }
    
    .highlight-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .highlight-item {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 0.75rem;
    }
    
    .highlight-icon {
        font-size: 1.25rem;
        flex-shrink: 0;
    }
    
    .highlight-text {
        font-size: 0.8125rem;
        text-align: left;
        margin-left: 0.5rem;
    }
}

/* Enhanced Mobile Responsiveness for Requirements */
@media (max-width: 768px) {
    .ai-requirements-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ai-requirement-item {
        padding: 0.75rem;
    }
    
    .ai-requirement-item strong {
        font-size: 0.8125rem;
    }
    
    .ai-requirement-item li {
        font-size: 0.75rem;
        padding-left: 0.75rem;
    }
}

/* High Contrast Mode for Requirements */
@media (prefers-contrast: high) {
    .ai-requirements-section {
        background: #000000 !important;
        border: 1px solid #ffffff !important;
    }
    
    .ai-requirement-item {
        background: #000000 !important;
        border: 2px solid #ffffff !important;
        color: #ffffff !important;
    }
    
    .ai-requirement-item.ai-not-supported {
        border-color: #ff0000 !important;
    }
    
    .ai-requirement-item strong,
    .ai-requirement-item li {
        color: #ffffff !important;
    }
    
    .ai-requirement-item li::before {
        color: #ffffff !important;
    }
    
    .ai-requirement-item.ai-not-supported li::before {
        color: #ff0000 !important;
    }
}

/* Reduced Motion for Requirements */
@media (prefers-reduced-motion: reduce) {
    .ai-requirements-section {
        transition: none !important;
        transform: none !important;
    }
    
    .ai-requirement-item {
        transition: none !important;
    }
    
    .ai-requirement-item:hover {
        transform: none !important;
    }
    
    #ai-tell-me-more::after {
        transition: none !important;
    }
}

/* Contact Form Styles */
.contact-form-container {
    /* Base styles are handled by Tailwind classes in the HTML */
}

/* Form Group Styling */
.form-group {
    position: relative;
    text-align: left;
}

/* Form Input and Textarea Styling */
.form-group input,
.form-group textarea {
    transition: all 0.3s ease;
    background-color: #1f2937;
    border: 1px solid #4b5563;
    color: #f3f4f6;
}

/* Label Styling */
.form-group label {
    transition: color 0.3s ease;
    text-align: left;
    display: block;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #111827;
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input:valid,
.form-group textarea:valid {
    border-color: #10b981;
}

/* Label Styling */
.form-group label {
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: #3b82f6;
}

/* Error Message Styling */
.field-error {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.25rem;
}

.field-error:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

/* Form Message Container */
.form-message {
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: all 0.3s ease;
    transform: translateY(-10px);
    opacity: 0;
}

.form-message:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

.form-message.success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.form-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.form-message.info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

/* Submit Button States */
#contact-submit-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

#contact-submit-btn:hover:not(:disabled)::before {
    left: 100%;
}

#contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

#contact-submit-btn:disabled::before {
    display: none;
}

/* Loading State */
#contact-submit-btn.loading .submit-text {
    opacity: 0.7;
}

#contact-submit-btn.loading .submit-icon {
    display: none;
}

#contact-submit-btn.loading .loading-spinner {
    display: block;
}

/* Character Counter */
#message-counter {
    transition: color 0.3s ease;
}

#message-counter.warning {
    color: #f59e0b;
}

#message-counter.danger {
    color: #ef4444;
}

/* Form Animations */
@keyframes formSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: formSlideIn 0.4s ease-out;
}

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

/* Responsive Form Styling */
@media (max-width: 768px) {
    .contact-form-container {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 1rem; /* Prevent zoom on iOS */
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    #contact-submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* High Contrast Mode for Contact Form */
@media (prefers-contrast: high) {
    .form-group input,
    .form-group textarea {
        background-color: #000000 !important;
        border: 2px solid #ffffff !important;
        color: #ffffff !important;
    }
    
    .form-group input:focus,
    .form-group textarea:focus {
        border-color: #ffffff !important;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
    }
    
    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: #cccccc !important;
    }
    
    .form-group label {
        color: #ffffff !important;
    }
    
    .field-error {
        color: #ff6666 !important;
    }
    
    .form-message.success {
        background-color: #003300 !important;
        border-color: #00ff00 !important;
        color: #00ff00 !important;
    }
    
    .form-message.error {
        background-color: #330000 !important;
        border-color: #ff0000 !important;
        color: #ff0000 !important;
    }
    
    #contact-submit-btn {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    #contact-submit-btn:hover:not(:disabled) {
        background: #cccccc !important;
    }
}

/* Reduced Motion for Contact Form */
@media (prefers-reduced-motion: reduce) {
    .form-group,
    .field-error,
    .form-message,
    #contact-submit-btn {
        animation: none !important;
        transition: none !important;
    }
    
    .field-error:not(.hidden),
    .form-message:not(.hidden) {
        transform: none !important;
    }
    
    #contact-submit-btn::before {
        display: none !important;
    }
    
    @keyframes formSlideIn {
        from, to {
            opacity: 1;
            transform: none;
        }
    }
}

/* Fun AI Download Animation Styles */
.ai-download-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
}

/* AI Brain Animation Container */
.ai-brain-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
}

/* AI Brain Shape */
.ai-brain {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brain-left,
.brain-right {
    width: 50px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50px 50px 30px 30px;
    position: absolute;
    opacity: 0.8;
}

.brain-left {
    left: 15px;
    transform: rotate(-10deg);
    animation: brainPulse 2s ease-in-out infinite;
}

.brain-right {
    right: 15px;
    transform: rotate(10deg);
    animation: brainPulse 2s ease-in-out infinite 0.5s;
}

@keyframes brainPulse {
    0%, 100% {
        opacity: 0.6;
        transform: rotate(-10deg) scale(1);
    }
    50% {
        opacity: 1;
        transform: rotate(-10deg) scale(1.05);
    }
}

.brain-right {
    animation-name: brainPulseRight;
}

@keyframes brainPulseRight {
    0%, 100% {
        opacity: 0.6;
        transform: rotate(10deg) scale(1);
    }
    50% {
        opacity: 1;
        transform: rotate(10deg) scale(1.05);
    }
}

/* Data Streams Animation */
.ai-data-streams {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.data-stream {
    position: absolute;
    width: 3px;
    background: linear-gradient(to bottom, transparent, #60a5fa, transparent);
    border-radius: 2px;
    opacity: 0.7;
}

.data-stream.stream-1 {
    height: 40px;
    top: 10px;
    left: 30px;
    animation: dataFlow 1.5s ease-in-out infinite;
}

.data-stream.stream-2 {
    height: 35px;
    top: 15px;
    right: 25px;
    animation: dataFlow 1.5s ease-in-out infinite 0.3s;
}

.data-stream.stream-3 {
    height: 30px;
    bottom: 20px;
    left: 40px;
    animation: dataFlow 1.5s ease-in-out infinite 0.6s;
}

.data-stream.stream-4 {
    height: 38px;
    bottom: 15px;
    right: 35px;
    animation: dataFlow 1.5s ease-in-out infinite 0.9s;
}

@keyframes dataFlow {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0) scaleY(0.8);
    }
    50% {
        opacity: 0.9;
        transform: translateY(-5px) scaleY(1.2);
    }
}

/* Loading Dots Animation */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.loading-dots .dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.loading-dots .dot-1 {
    animation-delay: -0.32s;
}

.loading-dots .dot-2 {
    animation-delay: -0.16s;
}

.loading-dots .dot-3 {
    animation-delay: 0s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
    .ai-brain-container {
        width: 100px;
        height: 100px;
        margin-bottom: 1.5rem;
    }
    
    .brain-left,
    .brain-right {
        width: 40px;
        height: 50px;
    }
    
    .brain-left {
        left: 12px;
    }
    
    .brain-right {
        right: 12px;
    }
    
    .data-stream {
        width: 2px;
    }
    
    .data-stream.stream-1 {
        height: 30px;
        left: 25px;
    }
    
    .data-stream.stream-2 {
        height: 28px;
        right: 20px;
    }
    
    .data-stream.stream-3 {
        height: 25px;
        left: 32px;
    }
    
    .data-stream.stream-4 {
        height: 30px;
        right: 28px;
    }
    
    .loading-dots .dot {
        width: 10px;
        height: 10px;
    }
}

/* High Contrast Mode for Animation */
@media (prefers-contrast: high) {
    .brain-left,
    .brain-right {
        background: #ffffff !important;
        border: 2px solid #000000 !important;
    }
    
    .data-stream {
        background: linear-gradient(to bottom, transparent, #ffffff, transparent) !important;
    }
    
    .loading-dots .dot {
        background: #ffffff !important;
        border: 2px solid #000000 !important;
    }
}

/* Reduced Motion Support for Animation */
@media (prefers-reduced-motion: reduce) {
    .brain-left,
    .brain-right,
    .data-stream,
    .loading-dots .dot {
        animation: none !important;
    }
    
    .brain-left,
    .brain-right {
        opacity: 0.8 !important;
        transform: none !important;
    }
    
    .data-stream {
        opacity: 0.5 !important;
        transform: none !important;
    }
    
    .loading-dots .dot {
        opacity: 0.8 !important;
        transform: none !important;
    }
}

/* AI Progress Modal Specific Adjustments */
.ai-progress-content .ai-download-animation {
    padding: 1rem 0;
}

.ai-progress-content .ai-brain-container {
    margin-bottom: 1.5rem;
}

/* Enhanced Animation with Additional Effects */
.ai-brain-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border: 2px solid rgba(96, 165, 250, 0.2);
    border-radius: 50%;
    animation: brainGlow 3s ease-in-out infinite;
}

.ai-brain-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    border-radius: 50%;
    animation: brainGlow 3s ease-in-out infinite 1s;
}

@keyframes brainGlow {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Disable glow effects on mobile for performance */
@media (max-width: 768px) {
    .ai-brain-container::before,
    .ai-brain-container::after {
        display: none;
    }
}

/* Disable glow effects for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ai-brain-container::before,
    .ai-brain-container::after {
        display: none !important;
    }
}

/* Print Styles for Contact Form */
@media print {
    .contact-form-container {
        background: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
    }
    
    .form-group input,
    .form-group textarea {
        background: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
    }
    
    .form-group label {
        color: #000000 !important;
        font-weight: bold;
    }
    
    #contact-submit-btn {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .form-message {
        border: 1px solid #000000 !important;
        color: #000000 !important;
    }
    
    /* Hide interactive elements in print */
    .loading-spinner,
    #message-counter {
        display: none !important;
    }
}

/* Inline AI Teaser Section */
#ai-teaser-section {
    animation: slideInUp 0.5s ease-out;
}

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

/* Expandable Requirements Section - Inline Version */
.requirements-section {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-10px);
}

.requirements-section:not(.hidden) {
    max-height: 800px;
    opacity: 1;
    transform: translateY(0);
}

/* Tell Me More Button - Inline Version */
#ai-tell-me-more-inline svg {
    transition: transform 0.3s ease;
}

#ai-tell-me-more-inline.expanded svg {
    transform: rotate(180deg);
}

#ai-tell-me-more-inline:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Mobile Responsive for Inline Teaser */
@media (max-width: 768px) {
    #ai-teaser-section {
        margin-top: 1.5rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    #ai-teaser-section .bg-gradient-to-br {
        padding: 1rem;
    }
    
    .requirements-section .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .requirements-section h4 {
        font-size: 1rem;
    }
    
    .requirements-section .flex.flex-wrap {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .requirements-section a {
        justify-content: center;
        width: 100%;
    }
}

/* High Contrast Mode for Inline Teaser */
@media (prefers-contrast: high) {
    #ai-teaser-section .bg-gradient-to-br {
        background: #000000 !important;
        border: 2px solid #ffffff !important;
    }
    
    #ai-teaser-section .text-gray-100,
    #ai-teaser-section .text-gray-300 {
        color: #ffffff !important;
    }
    
    #ai-teaser-section .text-blue-400,
    #ai-teaser-section .text-blue-300 {
        color: #ffffff !important;
    }
    
    #ai-tell-me-more-inline {
        border: 1px solid #ffffff !important;
        background: #000000 !important;
        color: #ffffff !important;
    }
    
    .requirements-section .bg-gray-800\/50 {
        background: #000000 !important;
        border: 1px solid #ffffff !important;
    }
    
    .requirements-section .bg-red-900\/20 {
        background: #660000 !important;
        border: 1px solid #ff0000 !important;
    }
    
    .requirements-section h5,
    .requirements-section li {
        color: #ffffff !important;
    }
    
    .requirements-section .text-red-300,
    .requirements-section .text-red-200 {
        color: #ff6666 !important;
    }
}

/* 3D Flip Card Styles */
.flip-card-container {
    perspective: 1000px;
    width: 100%;
    max-width: 56rem;
    height: auto;
    min-height: 380px;
    margin: 0 auto;
}

.perspective-1000 {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    min-height: 380px;
}

.flip-card-inner.flipped {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 0.75rem;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.flip-card-front {
    transform: rotateY(0deg);
}

.flip-card-back {
    transform: rotateY(180deg);
}

.flip-card-back .bg-gradient-to-br {
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 0.75rem;
}

.flip-card-back .h-full {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    overflow: hidden;
}

.flip-card-back .personal-intro-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.flip-card-back .personal-intro-text p {
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.flip-card-back .personal-intro-text p:last-child {
    margin-bottom: 0;
}

/* Personal Card Small Highlights */
.highlight-item-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(31, 41, 55, 0.3);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.highlight-item-small:hover {
    background: rgba(31, 41, 55, 0.5);
    border-color: rgba(52, 211, 153, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.highlight-item-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.6), transparent);
    transition: left 0.5s ease;
}

.highlight-item-small:hover::before {
    left: 100%;
}

.highlight-icon-small {
    font-size: 1.25rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.highlight-item-small:hover .highlight-icon-small {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.highlight-text-small {
    font-size: 0.75rem;
    font-weight: 500;
    color: #d1d5db;
    text-align: center;
    transition: color 0.3s ease;
}

.highlight-item-small:hover .highlight-text-small {
    color: #f3f4f6;
}

/* Avatar styling for flip card */
.personal-card-avatar img {
    transition: all 0.3s ease;
    border-width: 2px;
    border-style: solid;
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* Flip card entrance animation */
.flip-card-container {
    animation: flipCardEntrance 0.5s ease-out;
}

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

/* Mobile responsive adjustments for flip card */
@media (max-width: 768px) {
    .flip-card-container {
        min-height: 280px;
    }
    
    .flip-card-inner {
        min-height: 280px;
    }
    
    .flip-card-front,
    .flip-card-back {
        min-height: 280px;
    }
    
    .flip-card-back .bg-gradient-to-br {
        padding: 0.75rem;
    }
    
    .flip-card-back .personal-intro-text {
        padding: 0.25rem 0;
    }
    
    .flip-card-back .personal-intro-text p {
        font-size: 0.8125rem;
        margin-bottom: 0.625rem;
        line-height: 1.4;
    }
    
    .flip-card-back .personal-intro-text p:last-child {
        margin-bottom: 0;
    }
    
    .flip-card-back .text-center.mt-4 {
        margin-top: 0.5rem;
        flex-shrink: 0;
    }
}

/* Tablet responsive adjustments for flip card */
@media (min-width: 769px) and (max-width: 1024px) {
    .flip-card-container {
        min-height: 380px;
    }
    
    .flip-card-inner {
        min-height: 380px;
    }
    
    .flip-card-front,
    .flip-card-back {
        min-height: 380px;
    }
    
    .flip-card-back .personal-intro-text p {
        font-size: 0.875rem;
        margin-bottom: 0.875rem;
        line-height: 1.6;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .flip-card-container {
        min-height: 320px;
    }
    
    .flip-card-inner {
        min-height: 320px;
    }
    
    .flip-card-front,
    .flip-card-back {
        min-height: 320px;
    }
    
    .flip-card-back .bg-gradient-to-br {
        padding: 0.875rem;
    }
    
    .flip-card-back .personal-intro-text p {
        font-size: 0.75rem;
        margin-bottom: 0.625rem;
        line-height: 1.4;
    }
    
    .flip-card-front h3 {
        font-size: 1.125rem;
    }
    
    .flip-card-front p {
        font-size: 0.8125rem;
    }
    
    .flip-card-front .flex.flex-col.sm\:flex-row {
        gap: 0.5rem;
    }
    
    .flip-card-front button {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }
}

/* High contrast mode for flip card */
@media (prefers-contrast: high) {
    .flip-card-front .bg-gradient-to-br,
    .flip-card-back .bg-gradient-to-br {
        background: #000000 !important;
        border: 2px solid #ffffff !important;
    }
    
    .flip-card-back .text-gray-100,
    .flip-card-back .text-gray-300 {
        color: #ffffff !important;
    }
    
    .highlight-item-small {
        background: #000000 !important;
        border: 1px solid #ffffff !important;
        color: #ffffff !important;
    }
    
    .highlight-text-small {
        color: #ffffff !important;
    }
    
    .personal-card-avatar img {
        border-color: #ffffff !important;
    }
}

/* Reduced motion for flip card */
@media (prefers-reduced-motion: reduce) {
    .flip-card-inner {
        transition: none !important;
    }
    
    .flip-card-container {
        animation: none !important;
    }
    
    .highlight-item-small {
        transition: none !important;
    }
    
    .highlight-item-small:hover {
        transform: none !important;
    }
    
    .highlight-item-small::before {
        display: none !important;
    }
    
    .highlight-icon-small {
        transition: none !important;
    }
    
    .highlight-item-small:hover .highlight-icon-small {
        transform: none !important;
        filter: none !important;
    }
    
    @keyframes flipCardEntrance {
        from, to {
            opacity: 1;
            transform: none;
        }
    }
}

/* Reduced Motion for Inline Teaser */
@media (prefers-reduced-motion: reduce) {
    #ai-teaser-section {
        animation: none !important;
    }
    
    .requirements-section {
        transition: none !important;
        transform: none !important;
    }
    
    .requirements-section:not(.hidden) {
        transform: none !important;
    }
    
    #ai-tell-me-more-inline svg {
        transition: none !important;
    }
    
    #ai-tell-me-more-inline.expanded svg {
        transform: none !important;
    }
    
    @keyframes slideInUp {
        from, to {
            opacity: 1;
            transform: none;
        }
    }
}

/* Word Rotation Animation Styles */
#rotating-word {
    display: inline-block;
    position: relative;
    min-width: 6rem; /* Prevents layout shift during word changes */
    text-align: center;
    transition: opacity 500ms ease-in-out;
    font-weight: inherit;
    color: inherit;
}

/* Ensure consistent spacing and prevent layout shifts */
#rotating-word::before {
    content: attr(data-word);
    visibility: hidden;
    height: 0;
    overflow: hidden;
    display: block;
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
    font-family: inherit;
}

/* Smooth transition between words */
.rotating-word-transition {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optional: Add subtle glow effect on word change */
.rotating-word-highlight {
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
    transition: text-shadow 0.5s ease;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    #rotating-word {
        min-width: 5rem;
        font-size: inherit;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    #rotating-word {
        min-width: 6.5rem;
    }
}

/* Large screen adjustments */
@media (min-width: 1025px) {
    #rotating-word {
        min-width: 7rem;
    }
}

/* High contrast mode support for rotating word */
@media (prefers-contrast: high) {
    #rotating-word {
        color: #ffffff !important;
        text-shadow: 0 0 2px #000000 !important;
    }
    
    .rotating-word-highlight {
        text-shadow: 0 0 4px #000000 !important;
    }
}

/* Reduced motion support - disable transitions */
@media (prefers-reduced-motion: reduce) {
    #rotating-word {
        transition: none !important;
    }
    
    .rotating-word-transition {
        transition: none !important;
    }
    
    .rotating-word-highlight {
        text-shadow: none !important;
        transition: none !important;
    }
}

/* Print support for rotating word */
@media print {
    #rotating-word {
        color: #000000 !important;
        text-shadow: none !important;
        transition: none !important;
    }
    
    #rotating-word::after {
        content: " (Software Engineer)";
        font-size: 0.875em;
        color: #666666;
    }
}

/* Focus styles for rotating word (for accessibility) */
#rotating-word:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    border-radius: 0.25rem;
    background-color: rgba(96, 165, 250, 0.1);
}

/* Enhanced accessibility for screen readers */
#rotating-word[aria-live="polite"] {
    /* Ensure screen readers can announce word changes */
    position: relative;
}

/* Touch device optimizations */
@media (max-width: 768px) and (pointer: coarse) {
    #rotating-word {
        /* Prevent zoom on tap for iOS */
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* Dark theme specific adjustments */
.dark #rotating-word {
    color: #60a5fa; /* Maintain blue-400 color in dark theme */
}

/* Ensure proper color inheritance from parent */
#rotating-word {
    color: inherit;
    font-family: inherit;
    font-weight: inherit;
    font-style: inherit;
    text-decoration: inherit;
}

/* Enhanced transition effects for smooth word swapping */
.word-fade-out {
    opacity: 0;
    transform: translateY(-5px);
}

.word-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Optional subtle scaling effect */
.word-transition-scale {
    transform: scale(0.95);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.word-transition-scale.active {
    transform: scale(1);
    opacity: 1;
}

/* Prevent flickering during transitions */
#rotating-word {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Improved animation performance */
.rotating-word-container {
    will-change: contents;
    contain: style layout;
}

/* Remove will-change after animation completes */
#rotating-word.animation-complete {
    will-change: auto;
}

/* Chat Interface Loading States */
.initialization-loading {
    align-self: flex-start;
    max-width: 80%;
    animation: slideIn 0.3s ease-out;
}

.loading-bubble {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border-radius: 1rem 1rem 1rem 0.25rem;
    padding: 0.875rem 1.125rem;
    border: 1px solid rgba(75, 85, 99, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.loading-text {
    color: #9ca3af;
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.loading-dots {
    display: flex;
    gap: 0.25rem;
}

.loading-dots span {
    width: 0.375rem;
    height: 0.375rem;
    background-color: #6b7280;
    border-radius: 50%;
    animation: loadingDots 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Error and Success Bubble Styles */
.error-bubble {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #ffffff;
}

.success-bubble {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #ffffff;
}

/* Reduced Motion for Loading States */
@media (prefers-reduced-motion: reduce) {
    .initialization-loading {
        animation: none !important;
    }
    
    .loading-dots span {
        animation: none !important;
        opacity: 0.8 !important;
        transform: none !important;
    }
    
    @keyframes loadingDots {
        from, to {
            transform: none;
            opacity: 0.8;
        }
    }
}

/* High Contrast Mode for Loading States */
@media (prefers-contrast: high) {
    .loading-bubble,
    .error-bubble,
    .success-bubble {
        background: #000000 !important;
        border: 2px solid #ffffff !important;
        color: #ffffff !important;
    }
    
    .loading-text {
        color: #ffffff !important;
    }
    
    .loading-dots span {
        background-color: #ffffff !important;
    }
}

/* Mobile responsive adjustments for loading states */
@media (max-width: 768px) {
    .loading-bubble {
        padding: 0.75rem 1rem;
    }
    
    .loading-text {
        font-size: 0.8125rem;
    }
    
    .loading-dots span {
        width: 0.3125rem;
        height: 0.3125rem;
    }
}
