/* Portfolio V2 - Enhanced CSS with Dark Mode */

/* CSS Custom Properties */
:root {
    /* Light theme colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #14b8a6;
    --accent: #f59e0b;
    --dark: #0f172a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Animations */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Z-index scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
}

/* Dark theme */
[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --secondary: #2dd4bf;
    --accent: #fbbf24;
    --dark: #f9fafb;
    --gray-900: #f3f4f6;
    --gray-800: #e5e7eb;
    --gray-700: #d1d5db;
    --gray-600: #9ca3af;
    --gray-500: #6b7280;
    --gray-400: #4b5563;
    --gray-300: #374151;
    --gray-200: #1f2937;
    --gray-100: #111827;
    --gray-50: #030712;
    --white: #030712;
    
    --gradient-primary: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    --gradient-dark: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    
    --shadow-sm: 0 1px 2px 0 rgb(255 255 255 / 0.05);
    --shadow: 0 1px 3px 0 rgb(255 255 255 / 0.1), 0 1px 2px -1px rgb(255 255 255 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(255 255 255 / 0.1), 0 2px 4px -2px rgb(255 255 255 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(255 255 255 / 0.1), 0 4px 6px -4px rgb(255 255 255 / 0.1);
}

/* Automatic dark mode based on system preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary: #818cf8;
        --primary-dark: #6366f1;
        --secondary: #2dd4bf;
        --accent: #fbbf24;
        --dark: #f9fafb;
        --gray-900: #f3f4f6;
        --gray-800: #e5e7eb;
        --gray-700: #d1d5db;
        --gray-600: #9ca3af;
        --gray-500: #6b7280;
        --gray-400: #4b5563;
        --gray-300: #374151;
        --gray-200: #1f2937;
        --gray-100: #111827;
        --gray-50: #030712;
        --white: #030712;
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--white);
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

p {
    color: var(--gray-700);
    margin-bottom: 1rem;
}

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

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

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: var(--z-tooltip);
}

.loading-indicator.active {
    transform: scaleX(1);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: var(--z-fixed);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .navbar {
    background: rgba(3, 7, 18, 0.95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    min-height: 60px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

.theme-toggle i {
    font-size: 1.25rem;
    color: var(--gray-700);
    transition: transform var(--transition-base);
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

[data-theme="dark"] .theme-toggle i::before {
    content: "\f185"; /* sun icon */
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--gray-700);
    padding: 0.75rem 1rem;
    transition: all var(--transition-base);
    border-radius: 8px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--gray-50);
}

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

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-link.cta-button {
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: all var(--transition-base);
}

.nav-link.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
    color: white;
}

.nav-link.cta-button::after {
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: all var(--transition-base);
}

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 50%, var(--gray-50) 100%);
    position: relative;
    overflow: hidden;
}

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

@keyframes float {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 2rem;
    min-height: 2em;
}

.rotating-text {
    display: inline-block;
    position: relative;
    font-family: var(--font-mono);
}

.rotating-text::after {
    content: '|';
    position: absolute;
    right: -10px;
    opacity: 1;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-900);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-ghost:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 12px;
    color: var(--gray-700);
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px) rotate(5deg);
    box-shadow: var(--shadow-md);
}

/* Hero Image */
.hero-image {
    position: relative;
    flex: 0 0 35%;
    max-width: 35%;
}

.hero-image picture {
    display: block;
    position: relative;
}

.hero-image img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 4px solid var(--gray-100);
    transition: transform 0.3s ease;
}

.hero-image:hover img {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Quick Stats Section */
.quick-stats {
    padding: var(--space-xl) 0;
    background: var(--gray-50);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    position: relative;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    display: inline-block;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-block;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gray-200);
    z-index: var(--z-tooltip);
}

.scroll-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--gradient-primary);
    width: var(--scroll-progress, 0%);
    transition: width 0.1s ease;
}

/* Section Indicator - Shows current section */
.section-indicator {
    position: fixed;
    top: 80px;
    right: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: calc(var(--z-sticky) - 10);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.section-indicator.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.section-label {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

[data-theme="dark"] .section-indicator {
    background: rgba(3, 7, 18, 0.95);
    border-color: rgba(129, 140, 248, 0.2);
}

/* Mobile section indicator */
@media (max-width: 768px) {
    .section-indicator {
        top: 70px;
        right: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .section-label {
        font-size: 0.75rem;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gray-900);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: var(--z-fixed);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-content p {
    flex: 1;
    margin: 0;
    color: var(--gray-200);
}

.cookie-link {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Enhanced Floating Back-to-Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(100px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999; /* Ensure it's above everything */
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
    /* Ensure minimum touch target size for mobile */
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-1px) scale(0.98);
}

/* Ensure button is clickable */
button.scroll-to-top {
    user-select: none;
    touch-action: manipulation;
}

button.scroll-to-top.show {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.scroll-to-top i {
    font-size: 1.25rem;
    animation: floatArrow 2s ease-in-out infinite;
}

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

/* Mobile optimization for back-to-top */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
    }
    
    .scroll-to-top i {
        font-size: 1.125rem;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-image {
        flex: 0 0 auto;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        z-index: var(--z-fixed);
    }
    
    [data-theme="dark"] .nav-menu {
        background: var(--gray-50);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .theme-toggle {
        position: absolute;
        right: 60px;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero {
        min-height: auto;
        padding: 6rem 0 3rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .cookie-banner,
    .scroll-to-top,
    .theme-toggle,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* Additional Section Styles */

/* Discuss Section */
.discuss-section {
    padding: var(--space-3xl) 0;
    background: var(--gray-50);
}

.discuss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.discuss-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-base);
}

.discuss-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.discuss-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 20px;
    color: white;
    font-size: 2rem;
}

/* About Section */
.about {
    padding: var(--space-3xl) 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Skills Section */
.skills {
    padding: var(--space-3xl) 0;
    background: var(--white);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: 12px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.skill-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 2s ease;
    animation: progressBar 2s ease-out;
}

@keyframes progressBar {
    from { width: 0; }
}

[data-theme="dark"] .skills {
    background: var(--gray-50);
}

[data-theme="dark"] .skill-item {
    background: var(--gray-100);
}

[data-theme="dark"] .skill-header {
    color: var(--gray-900);
}

[data-theme="dark"] .skill-bar {
    background: var(--gray-300);
}

/* Industries Section */
.industries {
    padding: var(--space-3xl) 0;
    background: var(--gray-50);
}

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

.industry-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

.industry-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.industry-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 16px;
    color: white;
    font-size: 1.75rem;
}

/* Tech Stack Section */
.tech-stack {
    padding: var(--space-3xl) 0;
}

.tech-categories {
    display: grid;
    gap: 3rem;
}

.tech-category {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.tech-category h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
}

.tech-item {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
}

.tech-item:hover {
    transform: translateY(-5px);
    background: var(--gradient-primary);
    color: white;
}

.tech-item:hover span {
    color: white;
}

.tech-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    font-weight: 700;
}

.tech-item span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: color var(--transition-base);
}

/* Projects Section */
.projects {
    padding: var(--space-3xl) 0;
    background: var(--gray-50);
}

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

.project-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

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

.project-image {
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.project-content {
    padding: 2rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-700);
}

.project-impact,
.project-links {
    margin-top: 1.5rem;
}

.impact-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 500;
}

/* Achievements Section */
.achievements {
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.achievement-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.achievement-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.achievement-card p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.achievement-year {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

[data-theme="dark"] .achievements {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
}

[data-theme="dark"] .achievement-card {
    background: var(--gray-100);
}

[data-theme="dark"] .achievement-card h3 {
    color: var(--gray-900);
}

[data-theme="dark"] .achievement-year {
    background: var(--gray-200);
}

/* Experience Timeline */
.experience {
    padding: var(--space-3xl) 0;
    background: var(--white);
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--gray-300);
}

.timeline-item {
    position: relative;
    padding: 2rem 0;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

.timeline-marker {
    position: absolute;
    top: 2rem;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 4px solid var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -8px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -8px;
}

.timeline-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.timeline-date {
    background: var(--gray-100);
    color: var(--primary);
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Golu Section */
.golu-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.golu-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.funny-incidents {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.funny-incidents h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.funny-incidents ul {
    list-style: none;
}

.funny-incidents li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.funny-incidents li::before {
    content: '🐾';
    position: absolute;
    left: 0;
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Schedule Section */
.schedule-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    text-align: center;
}

.schedule-content {
    max-width: 600px;
    margin: 0 auto;
}

.schedule-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2.5rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    border-radius: 50px;
}

.schedule-info {
    margin-top: 1.5rem;
    color: var(--gray-500);
    font-size: 0.95rem;
}

/* Contact Section */
.contact {
    padding: var(--space-3xl) 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.contact-item i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 10px;
    color: white;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: var(--space-2xl) 0 var(--space-xl);
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

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

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-800);
    border-radius: 10px;
    color: var(--gray-400);
    transition: all var(--transition-base);
}

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

.footer-copyright {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-tooltip);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 16px;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: transform var(--transition-base);
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

/* Animation Classes */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="fade-right"] {
    transform: translateX(-30px);
}

[data-animate="fade-left"] {
    transform: translateX(30px);
}

[data-animate="zoom-in"] {
    transform: scale(0.9);
}

[data-animate="zoom-in"].animated {
    transform: scale(1);
}

/* Dark mode specific fixes */
[data-theme="dark"] .golu-section {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

[data-theme="dark"] .funny-incidents {
    background: var(--gray-100);
    color: var(--gray-900);
}

[data-theme="dark"] .funny-incidents h3 {
    color: var(--gray-900);
}

[data-theme="dark"] .funny-incidents ul li {
    color: var(--gray-800);
}

/* Fix spacing in Golu section */
.golu-section .section-header {
    margin-bottom: 2rem; /* Reduced from default */
}

.golu-text p:first-of-type {
    margin-top: 0;
}

[data-theme="dark"] .experience {
    background: var(--gray-50);
}

/* Comprehensive Responsive Breakpoints */

/* Extra Large Devices (1200px - 1440px) */
@media (max-width: 1440px) {
    .container {
        max-width: 1280px;
    }
}

/* Large Devices (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .tech-grid,
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium Devices / Tablets (768px - 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .industries-grid,
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Devices / Large Phones (576px - 767px) */
@media (max-width: 767px) {
    /* Typography adjustments */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    /* Touch-friendly spacing */
    .btn {
        padding: 0.875rem 1.5rem;
        min-height: 48px;
        min-width: 48px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        min-height: 48px;
    }
    
    /* Layout adjustments */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .skill-category {
        margin-bottom: 0;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 3rem !important;
        padding-right: 0 !important;
        left: 0 !important;
    }
    
    .timeline-marker {
        left: 7px !important;
        right: auto !important;
    }
    
    .golu-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    /* Mobile optimizations */
    .section-header {
        margin-bottom: 2rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .tech-categories {
        gap: 2rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .tech-item {
        padding: 0.5rem;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

/* Extra Small Devices / Small Phones (320px - 575px) */
@media (max-width: 575px) {
    /* Container padding */
    .container {
        padding: 0 1rem;
    }
    
    /* Typography for small screens */
    h1 { 
        font-size: 1.75rem; 
        line-height: 1.2;
    }
    
    h2 { 
        font-size: 1.5rem; 
        line-height: 1.3;
    }
    
    h3 { 
        font-size: 1.125rem; 
    }
    
    body {
        font-size: 0.875rem;
    }
    
    /* Hero adjustments */
    .hero {
        padding: 5rem 0 3rem;
        min-height: auto;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Navigation */
    .nav-brand {
        font-size: 1rem;
    }
    
    .nav-logo {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    /* Sections spacing */
    section {
        padding: 3rem 0;
    }
    
    /* Stats */
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Industries */
    .industries-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Projects */
    .project-card {
        padding: 1.5rem;
    }
    
    /* Schedule section */
    .schedule-content {
        padding: 2rem 1.5rem;
    }
    
    /* Contact */
    .contact-item {
        padding: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1.5rem;
    }
    
    /* Golu gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Ultra Small Devices (320px - 374px) */
@media (max-width: 374px) {
    /* Even smaller adjustments */
    .container {
        padding: 0 0.75rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.75rem 1.25rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
}

/* Mobile Touch Target & Accessibility Enhancements */
@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    button, a, .clickable {
        cursor: default;
    }
    
    /* Increase tap target sizes */
    .nav-link, .btn, .social-link {
        position: relative;
    }
    
    /* Invisible tap target extension */
    .nav-link::after, .btn::after, .social-link::after {
        content: '';
        position: absolute;
        top: -8px;
        right: -8px;
        bottom: -8px;
        left: -8px;
    }
}

/* Remove tap highlight and improve mobile experience */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Allow text selection on content */
p, h1, h2, h3, h4, h5, h6, li, td, th, span {
    -webkit-user-select: text;
    user-select: text;
}

/* Samsung-specific fixes */
@supports (-webkit-overflow-scrolling: touch) {
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* Smooth scrolling for mobile */
@media (max-width: 991px) {
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

/* Enhanced focus states for accessibility */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-to-top i {
        animation: none;
    }
    
    .section-label::before {
        animation: none;
    }
}

/* iOS-specific viewport height units */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: 100vh;
        min-height: calc(var(--vh, 1vh) * 100);
    }
    
    .nav-menu {
        height: calc(100vh - 60px);
        height: calc(var(--vh, 1vh) * 100 - 60px);
    }
    
    /* Full height sections */
    .full-height {
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
    }
}