:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --accent-color: #60a5fa;
    --text-primary: #ffffff;
    --text-secondary: #bfdbfe;
    --glass-bg: rgba(59, 130, 246, 0.1);
    --glass-border: rgba(96, 165, 250, 0.2);
    
    /* Theme switcher variables */
    --c-glass: #60a5fa;
    --c-light: #ffffff;
    --c-dark: #1e3a8a;
    --c-content: #1e40af;
    --c-action: #3b82f6;
    --c-bg: #dbeafe;
    --glass-reflex-dark: 1;
    --glass-reflex-light: 1;
    --saturation: 150%;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-primary);
    transition: background 400ms cubic-bezier(1, 0, 0.4, 1), color 400ms cubic-bezier(1, 0, 0.4, 1);
}

/* Animated background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    transition: background 400ms cubic-bezier(1, 0, 0.4, 1);
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

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

/* Glass morphism container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
    to { text-shadow: 0 0 30px rgba(96, 165, 250, 0.8); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    animation: fadeInUp 1s ease-out 0.7s both;
}

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

/* Floating elements */
.floating-element {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    animation: floatAround 15s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.floating-element:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 10s;
}

@keyframes floatAround {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-10px); }
    75% { transform: translateY(-30px) translateX(5px); }
}

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

.section-title {
    font-size: 3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, #ffffff, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Skills grid */
.skill-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Experience timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #60a5fa, #3b82f6);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

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

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

.timeline-content {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: var(--glass-bg);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: var(--glass-bg);
}

/* Contact section */
.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
}

.social-links a {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    line-height: 60px;
    text-align: center;
    margin: 0 1rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    background: linear-gradient(45deg, #60a5fa, #3b82f6);
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Mobile button spacing */
    .hero-content .mt-4 {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-content .btn {
        width: 100%;
        max-width: 280px;
        margin: 0 !important;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 3rem !important;
        padding-right: 0 !important;
        text-align: left !important;
    }
    
    .timeline-content::before {
        left: -20px !important;
        border-right-color: var(--glass-bg) !important;
        border-left-color: transparent !important;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Theme Switcher Styles */
.switcher {
    position: fixed;
    z-index: 1000;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 244px;
    max-width: 244px;
    height: 70px;
    box-sizing: border-box;
    padding: 8px 12px 10px;
    border: none;
    border-radius: 99em;
    font-size: var(--fz);
    background-color: color-mix(in srgb, var(--c-glass) 12%, transparent);
    backdrop-filter: blur(8px) saturate(var(--saturation));
    -webkit-backdrop-filter: blur(8px) saturate(var(--saturation));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 10%), transparent),
        inset 1.8px 3px 0px -2px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 90%), transparent),
        inset -2px -2px 0px -2px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 80%), transparent),
        inset -3px -8px 1px -6px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 60%), transparent),
        inset -0.3px -1px 4px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 12%), transparent),
        inset -1.5px 2.5px 0px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
        inset 0px 3px 4px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
        inset 2px -6.5px 1px -4px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
        0px 1px 5px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
        0px 6px 16px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 8%), transparent);
    transition: background-color 400ms cubic-bezier(1, 0, 0.4, 1), box-shadow 400ms cubic-bezier(1, 0, 0.4, 1);
}

.switcher__legend {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

.switcher__input {
    clip: rect(0 0 0 0);
    clip-path: inset(100%);
    height: 1px;
    width: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
}

.switcher__icon {
    display: block;
    width: 100%;
    transition: scale 200ms cubic-bezier(0.5, 0, 0, 1);
}

.switcher__filter {
    position: absolute;
    width: 0;
    height: 0;
    z-index: -1;
}

.switcher__option {
    --c: var(--c-content);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 16px;
    width: 68px;
    height: 100%;
    box-sizing: border-box;
    border-radius: 99em;
    opacity: 1;
    transition: all 160ms;
}

.switcher__option:hover {
    --c: var(--c-action);
    cursor: pointer;
}

.switcher__option:hover .switcher__icon {
    scale: 1.2;
}

.switcher__option:has(input:checked) {
    --c: var(--c-content);
    cursor: auto;
}

.switcher__option:has(input:checked) .switcher__icon {
    scale: 1;
}

.switcher::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    display: block;
    width: 84px;
    height: calc(100% - 10px);
    border-radius: 99em;
    background-color: color-mix(in srgb, var(--c-glass) 36%, transparent);
    z-index: -1;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 10%), transparent),
        inset 2px 1px 0px -1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 90%), transparent),
        inset -1.5px -1px 0px -1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 80%), transparent),
        inset -2px -6px 1px -5px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 60%), transparent),
        inset -1px 2px 3px -1px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
        inset 0px -4px 1px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
        0px 3px 6px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 8%), transparent);
}

.switcher:has(input[c-option="1"]:checked)::after {
    translate: 0 0;
    transform-origin: right;
    transition: background-color 400ms cubic-bezier(1, 0, 0.4, 1), box-shadow 400ms cubic-bezier(1, 0, 0.4, 1), translate 400ms cubic-bezier(1, 0, 0.4, 1);
    animation: scaleToggle 440ms ease;
}

.switcher:has(input[c-option="2"]:checked)::after {
    translate: 76px 0;
    transition: background-color 400ms cubic-bezier(1, 0, 0.4, 1), box-shadow 400ms cubic-bezier(1, 0, 0.4, 1), translate 400ms cubic-bezier(1, 0, 0.4, 1);
    animation: scaleToggle2 440ms ease;
}

.switcher[c-previous="1"]:has(input[c-option="2"]:checked)::after {
    transform-origin: left;
}

.switcher[c-previous="3"]:has(input[c-option="2"]:checked)::after {
    transform-origin: right;
}

.switcher:has(input[c-option="3"]:checked)::after {
    translate: 152px 0;
    transform-origin: left;
    transition: background-color 400ms cubic-bezier(1, 0, 0.4, 1), box-shadow 400ms cubic-bezier(1, 0, 0.4, 1), translate 400ms cubic-bezier(1, 0, 0.4, 1);
    animation: scaleToggle3 440ms ease;
}

@keyframes scaleToggle {
    0% { scale: 1 1; }
    50% { scale: 1.1 1; }
    100% { scale: 1 1; }
}

@keyframes scaleToggle2 {
    0% { scale: 1 1; }
    50% { scale: 1.2 1; }
    100% { scale: 1 1; }
}

@keyframes scaleToggle3 {
    0% { scale: 1 1; }
    50% { scale: 1.1 1; }
    100% { scale: 1 1; }
}

/* Theme Variations */

/* Light Theme (Default Blueish) */
body:has(input[value="light"]:checked) {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --accent-color: #60a5fa;
    --text-primary: #ffffff;
    --text-secondary: #bfdbfe;
    --glass-bg: rgba(59, 130, 246, 0.1);
    --glass-border: rgba(96, 165, 250, 0.2);
    
    --c-glass: #60a5fa;
    --c-light: #ffffff;
    --c-dark: #1e3a8a;
    --c-content: #1e40af;
    --c-action: #3b82f6;
    --c-bg: #dbeafe;
    --glass-reflex-dark: 1;
    --glass-reflex-light: 1;
    --saturation: 150%;
    
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: #ffffff;
}

body:has(input[value="light"]:checked) .bg-animation {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

/* Dark Theme */
body:has(input[value="dark"]:checked) {
    --primary-color: #1e40af;
    --secondary-color: #0f172a;
    --accent-color: #3b82f6;
    --text-primary: #e1e1e1;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(30, 64, 175, 0.15);
    --glass-border: rgba(59, 130, 246, 0.3);
    
    --c-glass: #3b82f6;
    --c-light: #ffffff;
    --c-dark: #0f172a;
    --c-content: #e1e1e1;
    --c-action: #60a5fa;
    --c-bg: #0f172a;
    --glass-reflex-dark: 2;
    --glass-reflex-light: 0.3;
    --saturation: 150%;
    
    background: linear-gradient(135deg, #1e40af 0%, #0f172a 100%);
    color: #e1e1e1;
}

body:has(input[value="dark"]:checked) .bg-animation {
    background: linear-gradient(135deg, #1e40af 0%, #0f172a 100%);
}

/* Golden Hour Theme (Warm Purple/Pink) */
body:has(input[value="dim"]:checked) {
    --primary-color: #a855f7;
    --secondary-color: #7c3aed;
    --accent-color: #c084fc;
    --text-primary: #ffffff;
    --text-secondary: #e9d5ff;
    --glass-bg: rgba(168, 85, 247, 0.15);
    --glass-border: rgba(192, 132, 252, 0.3);
    
    --c-light: #fef3c7;
    --c-dark: #581c87;
    --c-glass: #c084fc;
    --c-content: #7c3aed;
    --c-action: #a855f7;
    --c-bg: #581c87;
    --glass-reflex-dark: 2;
    --glass-reflex-light: 0.7;
    --saturation: 200%;
    
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 50%, #581c87 100%);
    color: #ffffff;
}

body:has(input[value="dim"]:checked) .bg-animation {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 50%, #581c87 100%);
}

/* Enhanced Button Styles with Liquid Glass */
.btn.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn.glass-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    background: color-mix(in srgb, var(--c-glass) 20%, transparent);
}

/* Mini Game Styles */
.mini-game-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.game-info {
    margin-bottom: 1.5rem;
}

.game-instruction {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.9;
}

.score-display {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.score, .high-score {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.game-area {
    position: relative;
    height: 200px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to right, #8B4513, #A0522D);
    border-top: 2px solid #654321;
}

.character {
    position: absolute;
    bottom: 20px;
    left: 50px;
    font-size: 2rem;
    transition: transform 0.1s ease;
    z-index: 10;
    transform: scaleX(-1); /* Flip kangaroo to face right */
}

.character.jumping {
    animation: jump 0.6s ease-in-out;
}

.obstacle {
    position: absolute;
    bottom: 20px;
    right: -50px;
    font-size: 1.5rem;
    z-index: 5;
}

.obstacle {
    will-change: transform;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.game-controls .btn {
    font-size: 0.9rem;
    min-width: 100px;
}

@keyframes jump {
    0% {
        transform: scaleX(-1) translateY(0);
    }
    50% {
        transform: scaleX(-1) translateY(-60px);
    }
    100% {
        transform: scaleX(-1) translateY(0);
    }
}

/* Obstacle movement now handled by JavaScript physics */

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    z-index: 20;
    display: none;
}

.game-over.show {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Mobile game adjustments */
@media (max-width: 768px) {
    .game-area {
        height: 150px;
        max-width: 350px;
    }
    
    .character {
        font-size: 1.5rem;
        left: 30px;
    }
    
    .obstacle {
        font-size: 1.2rem;
    }
    
    .score-display {
        gap: 1rem;
        font-size: 0.8rem;
    }
    
    .score, .high-score {
        padding: 0.4rem 0.8rem;
    }
    
    .game-instruction {
        font-size: 1rem;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .game-controls .btn {
        width: 120px;
    }
    
    /* Mobile theme switcher adjustments */
    .switcher {
        top: 15px;
        right: 15px;
        width: 200px;
        height: 60px;
        padding: 6px 10px 8px;
    }
    
    .switcher__option {
        width: 56px;
        padding: 0 12px;
    }
    
    .switcher::after {
        width: 68px;
    }
    
    .switcher:has(input[c-option="2"]:checked)::after {
        translate: 60px 0;
    }
    
    .switcher:has(input[c-option="3"]:checked)::after {
        translate: 120px 0;
    }
}
