/* Final Accurate Portfolio Styles */

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors - Professional & Elegant Palette */
    --primary-50: #f8fafc;
    --primary-100: #f1f5f9;
    --primary-200: #e2e8f0;
    --primary-300: #cbd5e1;
    --primary-400: #94a3b8;
    --primary-500: #64748b;
    --primary-600: #475569;
    --primary-700: #334155;
    --primary-800: #1e293b;
    --primary-900: #0f172a;
    
    --accent-blue: #1e40af;
    --accent-blue-light: #3b82f6;
    --accent-blue-dark: #1e3a8a;
    
    --success: #059669;
    --warning: #d97706;
    --error: #dc2626;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Borders & Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-modal: 1050;
    --z-toast: 1100;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-50: #0f172a;
    --primary-100: #1e293b;
    --primary-200: #334155;
    --primary-300: #475569;
    --primary-400: #64748b;
    --primary-500: #94a3b8;
    --primary-600: #cbd5e1;
    --primary-700: #e2e8f0;
    --primary-800: #f1f5f9;
    --primary-900: #f8fafc;
    
    --accent-blue: #3b82f6;
    --accent-blue-light: #60a5fa;
    --accent-blue-dark: #2563eb;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-50);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

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

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

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-300);
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-4);
}

.loading-text {
    font-size: var(--text-lg);
    font-weight: 500;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--primary-700);
    background-color: var(--primary-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--accent-blue);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform var(--transition-fast);
    transform: translate(-50%, -50%);
}

.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent-blue);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.4;
    transition: transform var(--transition-normal);
    transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
    .cursor,
    .cursor-trail {
        display: none;
    }

    .shortcuts-content {
        margin: var(--space-4);
        padding: var(--space-6);
    }

    .shortcut-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
}

/* ===== FLOATING BACKGROUND ===== */
.floating-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    color: var(--primary-200);
    font-size: var(--text-3xl);
    opacity: 0.05;
    animation: float 30s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) rotate(180deg);
    }
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--primary-200);
    z-index: var(--z-dropdown);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(248, 250, 252, 0.95);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.9);
    border-bottom-color: var(--primary-800);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
}

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

.nav-logo {
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--primary-900);
    cursor: pointer;
    transition: transform var(--transition-normal);
}

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

.logo-text {
    position: relative;
    z-index: 2;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-8);
}

.nav-link {
    position: relative;
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-sm);
    padding: var(--space-2) 0;
    transition: color var(--transition-normal);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width var(--transition-normal);
}

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

.nav-controls {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.contact-icons {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.contact-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.contact-icon-link:hover {
    background: var(--primary-100);
    transform: translateY(-2px);
}

.contact-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.theme-toggle,
.lang-toggle {
    background: none;
    border: 1px solid var(--primary-300);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    color: var(--primary-600);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: var(--text-sm);
    font-weight: 500;
}

.theme-toggle:hover,
.lang-toggle:hover {
    background: var(--primary-100);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    gap: 3px;
}

.nav-hamburger span {
    width: 20px;
    height: 2px;
    background: var(--primary-600);
    transition: all var(--transition-normal);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .contact-icons {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary-50);
        flex-direction: column;
        padding: var(--space-6);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        border-bottom: 1px solid var(--primary-200);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-hamburger {
        display: flex;
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-20) 0;
    position: relative;
    z-index: 10;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.hero-greeting {
    font-size: var(--text-lg);
    color: var(--primary-500);
    margin-bottom: var(--space-4);
    font-weight: 400;
}

.hero-name {
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: var(--space-2);
    line-height: 1.1;
}

.hero-title {
    font-size: var(--text-2xl);
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: var(--space-8);
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--primary-600);
    line-height: 1.7;
    margin-bottom: var(--space-6);
    max-width: 500px;
}

.competitive-programming {
    font-size: var(--text-base);
    color: var(--primary-500);
    line-height: 1.6;
}

.competitive-programming a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.competitive-programming a:hover {
    color: var(--accent-blue-dark);
    text-decoration: underline;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-container {
    position: relative;
    width: 320px;
    height: 320px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-100);
    transition: all var(--transition-normal);
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.profile-frame {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    z-index: -1;
    opacity: 0.1;
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }

    .hero-name {
        font-size: var(--text-4xl);
    }

    .hero-title {
        font-size: var(--text-xl);
    }

    .profile-container {
        width: 250px;
        height: 250px;
    }
}

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

section {
    padding: var(--space-20) 0;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: var(--space-4);
}

/* ===== EXPERIENCE SECTION ===== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-300);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--space-8);
    cursor: pointer;
}

.timeline-marker {
    position: absolute;
    left: 12px;
    top: 24px;
    width: 18px;
    height: 18px;
    background: var(--accent-blue);
    border: 3px solid var(--primary-50);
    border-radius: 50%;
    z-index: 2;
}

.timeline-content {
    margin-left: var(--space-16);
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition-normal);
}

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

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.company-info {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex: 1;
}

.company-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    object-fit: contain;
    border: 1px solid var(--primary-200);
    background: white;
    padding: 4px;
}

.company-name {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--primary-900);
    margin-bottom: var(--space-1);
}

.job-title {
    font-size: var(--text-base);
    color: var(--primary-600);
    margin-bottom: var(--space-1);
}

.job-period {
    font-size: var(--text-sm);
    color: var(--primary-500);
    font-family: var(--font-mono);
}

.expand-indicator {
    font-size: var(--text-xl);
    color: var(--primary-500);
    transition: transform var(--transition-normal);
    font-weight: 300;
}

.timeline-item.expanded .expand-indicator {
    transform: rotate(45deg);
}

.timeline-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    color: var(--primary-600);
    line-height: 1.6;
}

.timeline-item.expanded .timeline-details {
    max-height: 300px;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--primary-200);
}

.experience-links {
    margin-top: var(--space-4);
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.experience-link {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.experience-link:hover {
    background: var(--accent-blue-dark);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 10px;
    }

    .timeline-marker {
        left: 2px;
        width: 16px;
        height: 16px;
    }

    .timeline-content {
        margin-left: var(--space-8);
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .company-info {
        width: 100%;
    }
}

/* ===== RESEARCH SECTION ===== */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-8);
    max-width: 1100px;
    margin: 0 auto;
}

.research-card {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

.research-badge {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: var(--accent-blue);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 600;
}

.research-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--primary-900);
    margin-bottom: var(--space-3);
    line-height: 1.4;
    padding-right: var(--space-16);
}

.research-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-normal);
}

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

.research-authors {
    font-size: var(--text-sm);
    color: var(--primary-600);
    margin-bottom: var(--space-2);
    line-height: 1.5;
}

.research-acceptance {
    font-size: var(--text-sm);
    color: var(--primary-600);
    margin-bottom: var(--space-4);
    line-height: 1.5;
    font-style: italic;
}

.research-links {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.research-link {
    padding: var(--space-2) var(--space-4);
    background: var(--primary-100);
    border: 1px solid var(--primary-300);
    border-radius: var(--radius-md);
    color: var(--primary-700);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.research-link:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

@media (max-width: 768px) {
    .research-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== EDUCATION SECTION ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-8);
    max-width: 1000px;
    margin: 0 auto;
}

.education-card {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    display: flex;
    gap: var(--space-4);
    transition: all var(--transition-normal);
}

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

.education-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 1px solid var(--primary-200);
    flex-shrink: 0;
}

.education-content {
    flex: 1;
}

.education-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--primary-900);
    margin-bottom: var(--space-2);
}

.education-period {
    font-size: var(--text-sm);
    color: var(--primary-500);
    font-family: var(--font-mono);
    margin-bottom: var(--space-2);
}

.education-institution {
    font-size: var(--text-base);
    color: var(--primary-700);
    margin-bottom: var(--space-1);
}

.education-advisor {
    font-size: var(--text-sm);
    color: var(--primary-600);
    margin-bottom: var(--space-1);
}

.education-gpa {
    font-size: var(--text-sm);
    color: var(--primary-600);
    font-family: var(--font-mono);
    margin-bottom: var(--space-2);
}

.education-activities {
    font-size: var(--text-sm);
    color: var(--primary-600);
}

@media (max-width: 768px) {
    .education-grid {
        grid-template-columns: 1fr;
    }

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

/* ===== WORKS SECTION ===== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-8);
    max-width: 1000px;
    margin: 0 auto;
}

.work-card {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-normal);
}

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

.work-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    margin-bottom: var(--space-4);
}

.work-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--primary-900);
    margin-bottom: var(--space-3);
}

.work-description {
    font-size: var(--text-base);
    color: var(--primary-600);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.work-links {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.work-link {
    padding: var(--space-2) var(--space-4);
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.work-link:hover {
    background: var(--accent-blue-dark);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== CONTACT SECTION ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-6);
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-6);
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: var(--primary-700);
    transition: all var(--transition-normal);
    gap: var(--space-3);
}

.contact-card:hover {
    background: var(--primary-100);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.contact-card-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.contact-card span {
    font-weight: 500;
    font-size: var(--text-sm);
}

/* ===== HIDDEN GAME (EASTER EGG) ===== */
.game-easter-egg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Prevent background scrolling */
    overflow: hidden;
}

/* Prevent body scroll when game is active */
body.game-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.game-overlay {
    position: relative;
    background: var(--primary-50);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    box-shadow: var(--shadow-xl);
    max-width: 90vw;
    max-height: 90vh;
}

#gameCanvas {
    display: block;
    border-radius: var(--radius-lg);
    background: #1a1a2e;
    border: 2px solid var(--primary-200);
    /* Make canvas responsive */
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    /* Prevent context menu and selection */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Smooth edges */
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    /* Touch optimization */
    touch-action: none;
}

/* Mobile game improvements */
@media (max-width: 768px) {
    .game-overlay {
        padding: var(--space-2);
        margin: var(--space-2);
        max-width: 95vw;
        max-height: 95vh;
    }
    
    #gameCanvas {
        max-height: 60vh;
        width: 100%;
        height: auto;
    }
    
    .game-hint {
        font-size: 12px;
        padding: var(--space-2);
    }
}

@media (max-width: 480px) {
    .game-overlay {
        padding: var(--space-1);
        margin: var(--space-1);
    }
    
    #gameCanvas {
        max-height: 50vh;
        border: 1px solid var(--primary-200);
    }
}

.game-close {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: var(--text-lg);
    font-weight: bold;
    transition: all var(--transition-normal);
}

.game-close:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.game-hint {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-800);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    white-space: nowrap;
}

/* ===== CAREER GAME ICON ===== */
.career-game-icon {
    position: fixed;
    bottom: calc(var(--space-6) + 60px);
    right: var(--space-6);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    user-select: none;
    border: 3px solid rgba(255, 255, 255, 0.2);
    animation: gameIconPulse 2s infinite ease-in-out;
}

.career-game-icon:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
    animation: gameIconBounce 0.6s ease-in-out;
}

.career-game-icon:active {
    transform: scale(0.95);
}

@keyframes gameIconPulse {
    0%, 100% {
        box-shadow: var(--shadow-lg), 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
        box-shadow: var(--shadow-xl), 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

@keyframes gameIconBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: scale(1.1) translateY(0);
    }
    40% {
        transform: scale(1.1) translateY(-5px);
    }
    60% {
        transform: scale(1.1) translateY(-3px);
    }
}

@media (max-width: 768px) {
    .career-game-icon {
        bottom: calc(var(--space-4) + 50px);
        right: var(--space-4);
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* ===== SCROLL PROGRESS INDICATOR ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-200);
    z-index: calc(var(--z-dropdown) + 1);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.scroll-progress.visible {
    opacity: 1;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-blue-light));
    width: 0%;
    transition: width 0.1s ease;
}

/* ===== KEYBOARD SHORTCUTS HELP ===== */
.shortcuts-help {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.shortcuts-content {
    background: var(--primary-50);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--primary-200);
}

.shortcuts-content h3 {
    margin-bottom: var(--space-6);
    color: var(--primary-900);
    font-size: var(--text-xl);
    text-align: center;
}

.shortcuts-list {
    display: grid;
    gap: var(--space-3);
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-2) 0;
}

.shortcut-item kbd {
    background: var(--primary-200);
    border: 1px solid var(--primary-300);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary-700);
    min-width: 24px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.shortcuts-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: var(--text-lg);
    font-weight: bold;
    transition: all var(--transition-normal);
}

.shortcuts-close:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 50px;
    height: 50px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: var(--text-lg);
    font-weight: bold;
    transition: all var(--transition-normal);
    opacity: 0;
    visibility: hidden;
    z-index: var(--z-dropdown);
}

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

.back-to-top:hover {
    background: var(--accent-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== UTILITY CLASSES ===== */
.lang-en,
.lang-ja {
    display: none;
}

.lang-en.active,
.lang-ja.active {
    display: inline;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

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

/* Responsive Typography */
@media (max-width: 768px) {
    .section-title {
        font-size: var(--text-3xl);
    }
    
    .hero-description,
    .competitive-programming {
        font-size: var(--text-base);
    }
}

/* Focus States for Accessibility */
button:focus,
a:focus,
.profile-img:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Enhanced focus for keyboard users */
.using-keyboard button:focus,
.using-keyboard a:focus,
.using-keyboard .nav-link:focus,
.using-keyboard .timeline-item:focus {
    outline: 3px solid var(--accent-blue);
    outline-offset: 3px;
    box-shadow: 0 0 0 1px var(--primary-50), 0 0 0 4px var(--accent-blue);
}

/* Print Styles */
@media print {
    .navbar,
    .floating-bg,
    .cursor,
    .cursor-trail,
    .back-to-top,
    .game-easter-egg {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}