/* Resume Website Styles */
/* Modern, clean design with smooth animations */

/* CSS Variables - Enhanced Design System */
:root {
    /* Tech-Inspired Color Palette */
    --color-primary: #3b82f6;        /* Modern blue */
    --color-primary-dark: #1d4ed8;   /* Deep blue */
    --color-secondary: #6366f1;      /* Indigo accent */
    --color-accent: #10b981;         /* Tech green */
    --color-accent-alt: #f59e0b;     /* Warning orange */
    --color-success: #059669;
    --color-warning: #d97706;
    --color-danger: #dc2626;
    --color-info: #0ea5e9;

    /* Robotics/AI Inspired Colors */
    --color-neural: #8b5cf6;         /* Purple for AI/Neural networks */
    --color-electric: #06b6d4;       /* Cyan for electrical systems */
    --color-mechanical: #059669;     /* Green for mechanical systems */

    /* Light Theme Colors */
    --color-text: #0f172a;
    --color-text-light: #475569;
    --color-text-muted: #64748b;
    --color-heading: #020617;
    --color-background: #ffffff;
    --color-surface: #f8fafc;
    --color-surface-elevated: #ffffff;
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;

    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --glass-blur: blur(8px);

    /* Enhanced Typography - System fonts first for iOS sharpness */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', system-ui, sans-serif;
    --font-mono: 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
    --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', system-ui, sans-serif;

    /* Enhanced Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* Colored Shadows for Enhanced Depth */
    --shadow-primary: 0 10px 15px -3px rgba(59, 130, 246, 0.1), 0 4px 6px -2px rgba(59, 130, 246, 0.05);
    --shadow-secondary: 0 10px 15px -3px rgba(99, 102, 241, 0.1), 0 4px 6px -2px rgba(99, 102, 241, 0.05);
    --shadow-accent: 0 10px 15px -3px rgba(16, 185, 129, 0.1), 0 4px 6px -2px rgba(16, 185, 129, 0.05);

    /* Enhanced Border Radius */
    --radius-xs: 0.125rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;

    /* Enhanced Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Layout Variables */
    --nav-height: 80px;
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;

    /* Animation Variables */
    --animation-duration: 0.3s;
    --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --color-text: #f8fafc;
    --color-text-light: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-heading: #ffffff;
    --color-background: #0f172a;
    --color-surface: #1e293b;
    --color-surface-elevated: #334155;
    --color-border: #334155;
    --color-border-light: #475569;

    /* Dark Theme Glassmorphism */
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(148, 163, 184, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Dark Theme Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Temporarily disabled to fix scroll issue on page load */
    /* scroll-behavior: smooth; */
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Force scroll to top on load */
    scroll-behavior: auto !important;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.875rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Section */
.section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-sm);
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    width: 0%;
    z-index: 1000;
    transition: width 0.2s ease;
}

/* Navigation */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid transparent;
    z-index: 999;
    transition: var(--transition);
    height: var(--nav-height);
}

.navigation.scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.navigation.hidden {
    transform: translateY(-100%);
}

/* Navigation hover trigger area - DISABLED to fix click issues */
/* .nav-hover-trigger {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 998;
    pointer-events: none;
} */

/* Show navigation on hover trigger - DISABLED */
/* .nav-hover-trigger:hover + .navigation.hidden {
    transform: translateY(0);
} */

.navigation:hover {
    transform: translateY(0) !important;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: var(--transition);
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-right: 100px; /* Space for theme toggle */
}

.nav-link {
    color: var(--color-text);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Enhanced Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    border-radius: var(--radius-md);
    transition: var(--transition);
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background: var(--color-surface);
}

.hamburger {
    width: 24px;
    height: 3px;
    background: var(--color-text);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    transform-origin: center;
    position: absolute;
}

.hamburger:nth-child(1) {
    top: 14px;
}

.hamburger:nth-child(2) {
    top: 20px;
}

.hamburger:nth-child(3) {
    top: 26px;
}

/* Enhanced hamburger animation */
.mobile-menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translateY(6px);
    background: var(--color-primary);
}

.mobile-menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translateY(-6px);
    background: var(--color-primary);
}

/* Mobile menu overlay */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: none;
    z-index: 998;
    /* Allow clicks through overlay - menu has higher z-index */
    pointer-events: none;
    /* NO backdrop-filter - causes blur on iOS */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

@media (max-width: 768px) {
    .nav-menu::before {
        opacity: 0;
        visibility: hidden;
    }

    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-background) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-container {
    text-align: center;
    z-index: 1;
    position: relative;
}

.hero-name {
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.hero-title {
    color: var(--color-primary);
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.hero-tagline {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-background);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.icon {
    flex-shrink: 0;
}

/* Hero Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
    animation: fadeInUp 1s ease 0.8s forwards;
    transition: opacity 0.5s ease-out;
}

.scroll-indicator {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--color-primary);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    max-width: 350px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.image-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    border: 3px solid var(--color-primary);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.about-summary {
    font-size: 1.125rem;
    color: var(--color-text);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
}

.detail-item .icon {
    color: var(--color-primary);
}

/* Enhanced Experience Timeline */
.timeline {
    position: relative;
    padding: 3rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.left {
    left: 0;
    text-align: right;
    padding-right: 4rem;
}

.timeline-item.right {
    left: 50%;
    padding-left: 4rem;
}

.timeline-content {
    background: var(--color-surface-elevated);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    position: relative;
    border: 1px solid var(--color-border-light);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2xl);
}

.timeline-item.left .timeline-content::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 15px;
    border-color: transparent transparent transparent var(--color-surface-elevated);
    filter: drop-shadow(3px 0 5px rgba(0,0,0,0.1));
}

.timeline-item.right .timeline-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 15px 15px 0;
    border-color: transparent var(--color-surface-elevated) transparent transparent;
    filter: drop-shadow(-3px 0 5px rgba(0,0,0,0.1));
}

/* Enhanced Timeline Marker */
.timeline-marker {
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    border: 4px solid var(--color-background);
    border-radius: 50%;
    z-index: 2;
    transition: var(--transition);
    overflow: hidden;
}

.timeline-marker:hover {
    transform: translateY(-50%) scale(1.2);
    box-shadow: var(--shadow-primary);
}

.marker-pulse {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.timeline-item.left .timeline-marker {
    right: -12px;
    transform: translateY(-50%);
}

.timeline-item.right .timeline-marker {
    left: -12px;
    transform: translateY(-50%);
}

/* Timeline Header */
.timeline-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.company-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.company-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
    padding: 4px;
    background: white;
}

.timeline-info {
    flex: 1;
    min-width: 0;
}

.timeline-title {
    color: var(--color-primary);
    margin-bottom: 0.25rem;
    font-size: 1.375rem;
    font-weight: 700;
}

.timeline-company {
    color: var(--color-heading);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.timeline-period {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-expand {
    background: var(--color-surface);
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    padding: 0.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-expand:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: rotate(180deg);
}

/* Timeline Achievements */
.timeline-achievements {
    text-align: left;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--color-accent);
    transition: var(--transition);
    opacity: 0.95;
}

.achievement-item:hover {
    transform: translateX(5px);
    opacity: 1;
    box-shadow: var(--shadow-md);
}

.achievement-item.animate-in {
    animation: slideInFromRight 0.5s ease forwards;
}

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

.achievement-icon {
    width: 24px;
    height: 24px;
    background: var(--color-success);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.achievement-item p {
    margin: 0;
    line-height: 1.6;
    color: var(--color-text);
}

.achievement-item.detailed {
    margin-bottom: 1.25rem;
}

.achievements-count {
    width: 100%;
    text-align: center;
    color: var(--color-primary);
    font-weight: 600;
    font-style: italic;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px dashed var(--color-border);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.achievements-count:hover {
    background: var(--color-primary);
    color: white;
    border-style: solid;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Enhanced Projects Grid with Flip Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    padding: 1rem 0;
}

.project-card-container {
    perspective: 1000px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.project-card-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card-container.expanded {
    z-index: 100;
}

.project-card {
    position: relative;
    width: 100%;
    min-height: 450px;
    height: 450px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1), height 0.4s ease;
    display: block;
}

.project-card.flipped {
    transform: rotateY(180deg);
    z-index: 10;
    height: auto;
    min-height: 500px;
    max-height: 85vh;
}

.project-card-front,
.project-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 450px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    background: var(--color-background);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-background) 100%);
    min-height: 500px;
    height: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.project-card-container:not(.expanded) .project-card-front:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-shrink: 0;
    min-height: 40px;
}

.project-title {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin: 0;
    flex: 1;
}

.project-icon {
    color: var(--color-accent);
    opacity: 0.7;
    margin-left: 1rem;
}

.project-description,
.project-full-description {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.project-description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 0;
}

.project-full-description {
    font-size: 0.95rem;
    overflow-y: auto;
    max-height: calc(85vh - 300px);
    min-height: 150px;
    line-height: 1.6;
    padding-right: 0.5rem;
    margin-bottom: 1.5rem;
    flex: 1 1 auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary-light) transparent;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: var(--color-surface);
    color: var(--color-text-light);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.tech-tag:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.tech-tag.more {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.project-actions {
    margin-top: auto;
    padding-top: 1rem;
}

/* Ensure flipped cards have proper layering and spacing */
.project-card-container.expanded .project-card {
    position: relative;
    z-index: 50;
    height: auto;
    min-height: 500px;
    max-height: 85vh;
}

/* Custom scrollbar for webkit browsers */
.project-full-description::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.project-full-description::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.project-full-description::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: 4px;
    transition: background 0.3s ease;
    min-height: 30px;
}

.project-full-description::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Ensure smooth scrolling inside descriptions */
.project-full-description {
    scroll-behavior: smooth;
}

/* Visual indicator for scrollable content */
.project-card-back .project-full-description {
    position: relative;
}

/* Add subtle shadow to indicate scrollable area */
.project-card-back .project-full-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, rgba(255,255,255,0.1), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Ensure back content is properly contained */
.project-card-back .project-details {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Improve mobile responsiveness for flipped cards */
@media (max-width: 768px) {
    .project-card.flipped {
        max-height: 75vh;
    }

    .project-card-back {
        padding: 1.5rem;
        max-height: 75vh;
    }

    .project-full-description {
        font-size: 0.9rem;
        max-height: calc(75vh - 280px);
    }

    .project-card-container.expanded .project-card {
        max-height: 75vh;
    }
}

.btn-flip {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

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

.btn-flip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-close {
    background: var(--color-surface);
    color: var(--color-text-light);
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--color-danger);
    color: white;
    transform: rotate(90deg);
}

.project-details {
    display: flex;
    flex-direction: column;
    height: calc(100% - 60px);
    flex: 1;
    overflow: hidden;
}

.tech-stack-full {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border-light);
}

.tech-stack-full h4 {
    color: var(--color-heading);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag-detailed {
    padding: 0.4rem 0.8rem;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.tech-tag-detailed:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* Enhanced Skills Section */
.skills-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skills-category {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-light);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    transform-style: preserve-3d;
}

.skills-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.skills-category:hover::before {
    transform: scaleX(1);
}

.skills-category::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.skills-category:hover::after {
    opacity: 1;
}

.category-title {
    color: var(--color-heading);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.category-title::before {
    content: '';
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.skills-category:hover .category-title {
    transform: translateY(-2px);
    color: var(--color-primary);
}

.skills-category:hover .category-title::before {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.skills-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

/* Skill Category Icons */
.skills-category:nth-child(1) .category-title::before { content: '💻'; }
.skills-category:nth-child(2) .category-title::before { content: '🤖'; }
.skills-category:nth-child(3) .category-title::before { content: '🚀'; }
.skills-category:nth-child(4) .category-title::before { content: '⚡'; }
.skills-category:nth-child(5) .category-title::before { content: '☁️'; }
.skills-category:nth-child(6) .category-title::before { content: '🔧'; }
.skills-category:nth-child(7) .category-title::before { content: '⚙️'; }

.category-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
}

.skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

/* Modern Skill Items */
.skill-item {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.skill-item::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.6s ease;
}

.skill-item:hover {
    transform: translateY(-2px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

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

.skills-category:hover .skill-item {
    transform: translateY(-1px);
}

.skills-category:hover .skill-item:hover {
    transform: translateY(-3px) scale(1.03);
}

.skill-header {
    display: block;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

.skill-category {
    font-weight: 600;
    color: var(--color-heading);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.skill-item:hover .skill-category {
    color: var(--color-primary);
}






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

.skill-details {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Staggered animations for skill categories */
.skills-category {
    opacity: 0;
    animation: skillCardIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.skills-category:nth-child(1) { animation-delay: 0.1s; }
.skills-category:nth-child(2) { animation-delay: 0.2s; }
.skills-category:nth-child(3) { animation-delay: 0.3s; }
.skills-category:nth-child(4) { animation-delay: 0.4s; }
.skills-category:nth-child(5) { animation-delay: 0.5s; }
.skills-category:nth-child(6) { animation-delay: 0.6s; }
.skills-category:nth-child(7) { animation-delay: 0.7s; }

/* Enhanced Professional Skills */
.skill-item.professional {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: 1px solid var(--color-border-light);
}

.skill-item.professional:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.skill-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.skill-content {
    flex: 1;
}


.skill-description {
    color: var(--color-text);
    line-height: 1.5;
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

/* Enhanced Language Skills */
.skill-item.language {
    padding: 1rem 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    transition: var(--transition);
}

.skill-item.language:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.language-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.language-name {
    font-weight: 600;
    color: var(--color-heading);
    font-size: 1rem;
}

.language-level {
    color: var(--color-text-light);
    font-weight: 400;
    font-size: 0.9rem;
    text-transform: capitalize;
}



/* Legacy skill styles for compatibility */
.skill-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    line-height: 1.6;
}

.skill-bullet {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

/* Contact Section */
.contact {
    background: var(--color-surface);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    font-size: 1.125rem;
    color: var(--color-text);
    margin-bottom: 3rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--color-background);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    color: var(--color-text);
    position: relative;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-primary);
}

.contact-item:hover .copy-btn {
    opacity: 1;
    transform: translateX(0);
}

.contact-item .icon {
    color: var(--color-primary);
}

/* Copy Button Styles */
.copy-btn {
    position: absolute;
    right: 0.75rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition);
    cursor: pointer;
    width: 32px;
    height: 32px;
}

.copy-btn:hover {
    background: var(--color-primary-dark);
    transform: translateX(0) scale(1.1);
}

.copy-btn.copied {
    background: var(--color-success);
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: translateX(0) scale(1); }
    50% { transform: translateX(0) scale(1.2); }
    100% { transform: translateX(0) scale(1); }
}

/* Enhanced animations for typing effect */
.hero-tagline {
    min-height: 1.5em;
    font-family: var(--font-mono);
}

/* Particle canvas positioning */
#hero canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-background);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.social-links a:hover .icon {
    fill: white;
}

/* Education Section - Stunning Modern Design */
.education-card {
    position: relative;
    margin-bottom: 3rem;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--glass-bg), rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 20px 40px -12px rgba(0, 0, 0, 0.08),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .education-card {
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.95),
        rgba(51, 65, 85, 0.85));
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow:
        0 20px 40px -12px rgba(0, 0, 0, 0.3),
        0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.education-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 30px 60px -15px rgba(59, 130, 246, 0.25),
        0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

/* Glowing background effect */
.education-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(59, 130, 246, 0.1) 0%,
        transparent 70%
    );
    animation: pulse-glow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.education-content-wrapper {
    padding: 2.5rem;
    position: relative;
    z-index: 1;
}

.education-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

/* Logo Container with glow effect */
.education-logo-container {
    position: relative;
    flex-shrink: 0;
}

.education-logo {
    width: 300px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.education-card:hover .education-logo {
    transform: scale(1.05);
    filter: drop-shadow(0 8px 12px rgba(59, 130, 246, 0.2));
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.2) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.education-card:hover .logo-glow {
    opacity: 1;
    animation: logo-pulse 2s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.education-icon-default {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 20px;
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.3);
}

.education-icon-default svg {
    color: white;
}

/* Title Section */
.education-title-section {
    flex: 1;
}

.education-institution {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.education-degree {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.education-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.education-period {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    background: var(--color-surface);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.education-period:hover {
    background: var(--color-primary);
    color: white;
    transform: translateX(4px);
}

.education-period .icon {
    width: 18px;
    height: 18px;
}

/* Achievement Badge - Animated and Eye-catching */
.achievement-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow:
        0 10px 25px -5px rgba(245, 158, 11, 0.4),
        0 4px 6px -2px rgba(0, 0, 0, 0.1);
    animation: badge-float 3s ease-in-out infinite;
    transition: all 0.3s ease;
    z-index: 10;
}

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

.achievement-badge:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow:
        0 20px 40px -10px rgba(245, 158, 11, 0.5),
        0 8px 12px -4px rgba(0, 0, 0, 0.15);
}

.badge-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(
        circle,
        rgba(251, 191, 36, 0.4) 0%,
        transparent 70%
    );
    animation: badge-glow-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes badge-glow-pulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.9); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

.trophy-icon {
    stroke: white;
    fill: none;
}

.achievement-text {
    position: relative;
    z-index: 1;
}

/* Coursework Section - Interactive Grid */
.coursework-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.coursework-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coursework-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
    border-radius: 2px;
}

.coursework-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.course-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.05),
        rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--color-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .course-pill {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.1),
        rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.course-pill::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%) translateX(-100%);
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(59, 130, 246, 0.1),
        transparent);
    transition: transform 0.6s ease;
}

.course-pill:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-color: transparent;
    box-shadow:
        0 10px 20px -5px rgba(59, 130, 246, 0.4),
        0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.course-pill:hover::before {
    transform: translateY(-50%) translateX(100%);
}

.course-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.course-pill:hover .course-dot {
    background: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: dot-pulse 1s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.5); }
}

.course-name {
    font-weight: 500;
}

/* GPA Badge */
.education-gpa-container {
    margin-top: 1.5rem;
    display: flex;
}

.gpa-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.1),
        rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.gpa-badge:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, var(--color-accent), var(--color-mechanical));
    border-color: transparent;
    box-shadow: 0 8px 16px -4px rgba(16, 185, 129, 0.3);
}

.star-icon {
    color: var(--color-accent);
    transition: all 0.3s ease;
}

.gpa-badge:hover .star-icon {
    color: white;
    transform: rotate(360deg);
}

.gpa-text {
    font-weight: 600;
    color: var(--color-text);
    transition: all 0.3s ease;
}

.gpa-badge:hover .gpa-text {
    color: white;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .education-card {
        margin-bottom: 2rem;
    }

    .education-content-wrapper {
        padding: 1.5rem;
    }

    .education-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .education-logo {
        width: 260px;
    }

    .education-institution {
        font-size: 1.5rem;
    }

    .education-degree {
        font-size: 1.1rem;
    }

    .achievement-badge {
        position: static;
        margin: 1.5rem auto;
        display: inline-flex;
    }

    .coursework-grid {
        justify-content: center;
    }

    .education-title-section {
        width: 100%;
    }

    .education-meta {
        justify-content: center;
    }
}

/* Footer */
.footer {
    background: var(--color-heading);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin: 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    background: var(--color-primary-dark);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section.visible {
    animation: fadeInUp 0.8s ease forwards;
}

[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 2rem;
}

.error-message h2 {
    color: var(--color-danger);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        right: -100%;
        top: var(--nav-height);
        flex-direction: column;
        background: #ffffff;
        border: 1px solid var(--glass-border);
        width: 280px;
        height: calc(100vh - var(--nav-height));
        padding: 2rem;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        z-index: 999;
        /* iOS blur fix: NO transitions on container */
        transition: none;
        /* iOS-specific rendering fixes - NO blur, NO filters! */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        /* Disable ALL filters and transforms that cause blur on iOS */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        filter: none;
        transform: none;
        will-change: auto;
        perspective: none;
    }

    [data-theme="dark"] .nav-menu {
        background: #0f172a;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        padding: 1rem 0;
        font-size: 18px; /* Use whole pixels instead of rem for iOS */
        line-height: 28px; /* Whole pixels - prevents subpixel blur */
        font-weight: 600;
        color: var(--color-heading);
        border-bottom: 1px solid var(--color-border-light);
        /* Remove ALL transitions - causes blur on iOS */
        transition: none;
        /* iOS-specific text rendering fixes */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        /* Prevent any transforms or filters */
        transform: none;
        filter: none;
        will-change: auto;
    }

    .nav-menu a:hover {
        color: var(--color-primary);
        /* NO transform on mobile - causes blur on iOS */
    }

    .nav-menu a::after {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
    }

    /* Ensure all nav links have 44px minimum touch targets */
    .nav-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    /* Back to top button touch target */
    #backToTop {
        min-width: 44px;
        min-height: 44px;
    }

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

    .about-image {
        margin: 0 auto;
    }

    /* Remove timeline on mobile - match Projects section width */
    .timeline {
        padding: 0;
        overflow: visible;
        width: 100%;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 0 1.5rem 0 !important;
        left: 0 !important;
        text-align: left !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .timeline-marker {
        display: none;
    }

    .timeline-content::after {
        display: none;
    }

    .timeline-content {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        margin: 0;
        width: 100%;
        padding: 1.5rem 1.25rem;
        box-sizing: border-box;
    }

    /* Ensure section uses full width */
    #experience {
        overflow-x: hidden;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-methods {
        flex-direction: column;
        align-items: center;
    }

    .contact-item {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 3rem 0;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .timeline-item {
        padding: 0;
        margin-bottom: 1.25rem;
    }

    .timeline-content {
        padding: 1.25rem 1.125rem;
    }

    /* Mobile scroll indicator adjustments */
    .hero-scroll {
        bottom: -1.5rem;
    }

    .hero-cta {
        margin-bottom: 5rem;
        flex-direction: column;
        align-items: center;
    }

    .scroll-indicator {
        width: 32px;
        height: 52px;
        border-width: 3px;
    }

    .scroll-indicator::after {
        width: 8px;
        height: 8px;
    }
}

/* Hero Scroll Indicator - Enhanced Design & Positioning */
.hero-scroll {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    z-index: 5;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

/* Entrance animation class */
.hero-scroll.animate-in {
    opacity: 1;
    animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-scroll a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    outline: none;
    position: relative;
}

/* Focus ring for accessibility */
.hero-scroll a::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: subtract;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-scroll a:hover,
.hero-scroll a:focus-visible {
    color: var(--color-primary);
    transform: translateY(-3px);
}

.hero-scroll a:focus-visible::before {
    opacity: 1;
}

.hero-scroll a:active {
    transform: translateY(-1px);
}

.scroll-indicator {
    width: 28px;
    height: 48px;
    border: 2px solid currentColor;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
}

.scroll-indicator::after {
    content: '';
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: smoothScrollDot 2.8s ease-in-out infinite;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

/* Enhanced hover and focus states */
.hero-scroll:hover .scroll-indicator {
    border-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.05);
}

.hero-scroll:hover .scroll-indicator::after {
    background: var(--color-primary);
    animation-duration: 2s;
}

.hero-scroll:focus-within .scroll-indicator {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Progressive fade-out with smooth transition */
.hero-scroll.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    pointer-events: none;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Refined scroll indicator animations */
@keyframes gentleBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

@keyframes smoothScrollDot {
    0%, 20% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    80%, 100% {
        transform: translateX(-50%) translateY(22px);
        opacity: 0;
    }
}

/* Enhanced fade-in animation for better loading experience */
@keyframes fadeInUpDelayed {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* New slideInUp animation for entrance */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Respect reduced motion preferences for scroll indicator */
@media (prefers-reduced-motion: reduce) {
    .hero-scroll {
        transition: opacity 0.3s ease !important;
        animation: none !important;
    }

    .hero-scroll.animate-in {
        opacity: 1;
        animation: none !important;
    }

    .hero-scroll.fade-out {
        transition: opacity 0.5s ease !important;
        transform: translateX(-50%) !important;
    }

    .hero-scroll a {
        transition: color 0.2s ease !important;
    }

    .hero-scroll a:hover,
    .hero-scroll a:focus-visible {
        transform: none !important;
    }

    .scroll-indicator,
    .scroll-indicator::after {
        animation: none !important;
    }

    /* Stop the bouncing animation for reduced motion */
    @keyframes gentleBounce {
        0%, 100% {
            transform: translateX(-50%) translateY(0);
        }
    }

    @keyframes smoothScrollDot {
        0%, 100% {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
    }
}

/* Enhanced mobile scroll indicator responsiveness */
@media (max-width: 640px) {
    .hero-scroll {
        bottom: -1rem;
    }

    .hero-scroll a {
        padding: 0.5rem 0.25rem;
    }

    .scroll-indicator {
        width: 24px;
        height: 40px;
    }

    .scroll-indicator::after {
        width: 4px;
        height: 4px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-scroll {
        color: var(--color-heading);
    }

    .scroll-indicator {
        border-width: 3px;
        background: transparent;
    }

    .hero-scroll:hover .scroll-indicator,
    .hero-scroll:focus-within .scroll-indicator {
        background: var(--color-primary);
        border-color: var(--color-heading);
    }

    .hero-scroll a:focus-visible::before {
        opacity: 1;
        background: var(--color-primary);
    }
}

/* ================================================================
   🚀 EPIC THEME TOGGLE BUTTON ANIMATIONS
   The most mind-blowing toggle button you've ever seen!
   ================================================================ */

/* Theme Toggle Container */
.theme-toggle {
    position: fixed;
    top: 50%;
    right: 2rem;
    width: 64px;
    height: 64px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    transform: translateY(-50%);

    /* Epic background gradient */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Dynamic shadow that changes with theme */
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);

    /* Smooth transitions for everything */
    transition:
        transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.3s ease,
        background 0.5s ease;

    /* Perfect centering */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Slight hover lift */
    transform: translateY(-50%);
}

/* Hover state - prepare for magic */
.theme-toggle:hover {
    transform: translateY(-50%) translateX(-4px) scale(1.05);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 32px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Active state - the moment of magic */
.theme-toggle:active {
    transform: translateY(-50%) translateX(-2px) scale(0.95);
}

/* Icon container for perfect centering */
.theme-toggle svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
    position: absolute;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Sun icon styles - blazing glory */
.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
    animation: sunRays 8s linear infinite;
}

/* Moon icon styles - mystical beauty */
.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0.8);
    color: #e2e8f0;
    filter: drop-shadow(0 0 8px rgba(226, 232, 240, 0.6));
}

/* Dark theme state - moon takes over */
[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0.8);
    animation-play-state: paused;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    animation: moonGlow 6s ease-in-out infinite;
}

/* Dark theme button styling */
[data-theme="dark"] .theme-toggle {
    background: linear-gradient(135deg, #2d1b69 0%, #0f0c29 100%);
}

[data-theme="dark"] .theme-toggle:hover {
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 32px rgba(45, 27, 105, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* EPIC KEYFRAME ANIMATIONS */

/* Sun rays rotation */
@keyframes sunRays {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.05); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Moon gentle glow */
@keyframes moonGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(226, 232, 240, 0.6));
        transform: rotate(0deg) scale(1);
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(226, 232, 240, 0.8));
        transform: rotate(5deg) scale(1.02);
    }
}

/* Particle explosion effect */
@keyframes particleExplode {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.5) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(3) rotate(360deg);
    }
}

/* Ripple effect */
@keyframes rippleExpand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Magic toggle animation class */
.theme-toggle.magic-active {
    animation: magicToggle 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes magicToggle {
    0% { transform: translateY(-50%) translateX(-4px) scale(1.05) rotateY(0deg); }
    25% { transform: translateY(-50%) translateX(-8px) scale(1.1) rotateY(90deg); }
    50% { transform: translateY(-50%) translateX(-12px) scale(1.15) rotateY(180deg); }
    75% { transform: translateY(-50%) translateX(-8px) scale(1.1) rotateY(270deg); }
    100% { transform: translateY(-50%) translateX(-4px) scale(1.05) rotateY(360deg); }
}

/* Particle effects container */
.theme-toggle::before,
.theme-toggle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Ripple effect on click */
.theme-toggle::before {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
}

.theme-toggle::after {
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
}

/* Active ripple states */
.theme-toggle.ripple::before {
    animation: rippleExpand 0.6s ease-out;
}

.theme-toggle.ripple::after {
    animation: rippleExpand 0.8s ease-out 0.1s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-toggle {
        top: 20px;
        left: 50%;
        right: auto;
        width: 48px;
        height: 48px;
        transform: translateX(-50%);
    }

    .theme-toggle:hover {
        transform: translateX(-50%) translateY(-2px) scale(1.05);
    }

    .theme-toggle:active {
        transform: translateX(-50%) translateY(0) scale(0.95);
    }

    /* Fix magic animation for mobile - keep centered horizontally */
    .theme-toggle.magic-active {
        animation: magicToggleMobile 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    @keyframes magicToggleMobile {
        0% { transform: translateX(-50%) scale(1.05) rotateY(0deg); }
        25% { transform: translateX(-50%) scale(1.1) rotateY(90deg); }
        50% { transform: translateX(-50%) scale(1.15) rotateY(180deg); }
        75% { transform: translateX(-50%) scale(1.1) rotateY(270deg); }
        100% { transform: translateX(-50%) scale(1.05) rotateY(360deg); }
    }

    .theme-toggle svg {
        width: 24px;
        height: 24px;
    }
}

/* Accessibility - respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .theme-toggle,
    .theme-toggle svg {
        transition: none;
        animation: none;
    }

    .theme-toggle .sun-icon,
    .theme-toggle .moon-icon {
        animation: none;
    }
}

/* ========================================
   MOBILE-SPECIFIC BREAKPOINTS
   ======================================== */

/* Small mobile devices (320px - iPhone SE) */
@media (max-width: 428px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 1.25rem;
    }

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

    .section-title {
        font-size: 1.75rem;
    }

    .education-logo {
        width: 220px;
    }

    .container {
        padding: 0 1rem;
    }
}

/* Very small mobile devices (320px - iPhone SE, smallest) */
@media (max-width: 375px) {
    .hero-name {
        font-size: 1.75rem;
    }

    .education-logo {
        width: 200px;
    }

    .company-logo {
        width: 40px;
        height: 40px;
    }

    .nav-menu {
        width: 260px;
    }
}

/* Ultra-small mobile devices (320px and below) */
@media (max-width: 320px) {
    .hero-name {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 1.1rem;
    }

    .education-logo {
        width: 180px;
    }

    .company-logo {
        width: 36px;
        height: 36px;
    }

    .nav-menu {
        width: 240px;
    }

    .container {
        padding: 0 0.75rem;
    }
}