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

:root {
    --bg-primary: #fff;
    --bg-secondary: #f8fafc;
    --bg-gradient-start: #059669;
    --bg-gradient-end: #047857;
    --text-primary: #333;
    --text-secondary: #1e293b;
    --text-light: #666;
    --border-color: #eee;
    --card-bg: #fff;
    --card-hover: #f9fafb;
    --shadow: rgba(0, 0, 0, 0.1);
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --accent-color: #059669;
    --accent-light: #10b981;
    --accent-dark: #047857;
}

body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-gradient-start: #334155;
    --bg-gradient-end: #1e293b;
    --text-primary: #e4e4e7;
    --text-secondary: #f1f5f9;
    --text-light: #a1a1aa;
    --border-color: #3f3f46;
    --card-bg: #27272a;
    --card-hover: #3f3f46;
    --shadow: rgba(0, 0, 0, 0.3);
    --navbar-bg: rgba(39, 39, 42, 0.95);
    --accent-color: #475569;
    --accent-light: #64748b;
    --accent-dark: #334155;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 1rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
    z-index: 3;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 5;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.1rem;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
    z-index: 1;
    padding-right: 12.5rem;
    padding-left: 0.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--text-secondary);
    opacity: 0.8;
}

.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.mobile-dark-mode-toggle {
    display: none;
}

/* Apple-style toggle switch */
.toggle-track {
    width: 52px;
    height: 28px;
    background: #e5e7eb;
    border-radius: 14px;
    position: relative;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    padding: 2px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.dark-mode .toggle-track {
    background: #374151;
}

.toggle-thumb {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    position: absolute;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.dark-mode .toggle-thumb {
    left: 26px;
    background: #1f2937;
}

.toggle-icon-moon,
.toggle-icon-sun {
    position: absolute;
    transition: all 0.3s ease;
}

.toggle-icon-moon {
    color: #6b7280;
    opacity: 1;
}

.toggle-icon-sun {
    color: #fbbf24;
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

.dark-mode .toggle-icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

.dark-mode .toggle-icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.dark-mode-toggle:hover .toggle-track {
    background: #d1d5db;
}

.dark-mode .dark-mode-toggle:hover .toggle-track {
    background: #4b5563;
}

.dark-mode-toggle:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 14px;
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 3;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media (max-width: 800px) {
    .nav-container {
        align-items: center;
    }

    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--navbar-bg);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px var(--shadow);
        padding: 1rem 0 2rem 0;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-right: 0;
        padding-left: 0;
        z-index: 4; /* Ensure menu overlays logo/actions so first item (Home) is clickable */
        flex: 0 0 auto;
    }
    
    .nav-menu.active {
        display: flex;
        left: 0;
    }
    /* Staggered reveal for menu items */
    .nav-menu.active li:nth-child(1) a { transition-delay: 0.02s; opacity: 1; transform: translateY(0); }
    .nav-menu.active li:nth-child(2) a { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
    .nav-menu.active li:nth-child(3) a { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
    .nav-menu.active li:nth-child(4) a { transition-delay: 0.11s; opacity: 1; transform: translateY(0); }
    .nav-menu.active li:nth-child(5) a { transition-delay: 0.14s; opacity: 1; transform: translateY(0); }
    .nav-menu.active li:nth-child(6) a { transition-delay: 0.17s; opacity: 1; transform: translateY(0); }
    .nav-menu.active li:nth-child(7) a { transition-delay: 0.20s; opacity: 1; transform: translateY(0); }
    .nav-menu.active li:nth-child(8) a { transition-delay: 0.23s; opacity: 1; transform: translateY(0); }
    .nav-menu.active li:nth-child(9) a { transition-delay: 0.26s; opacity: 1; transform: translateY(0); }
    
    .nav-menu li {
        margin: 0.25rem 0;
    }

    .nav-menu li:first-child a {
        padding-top: 1.25rem; /* extra breathing room for first item */
    }
    
    .nav-menu a {
        font-size: 1.2rem;
        padding: 1rem;
        display: block;
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.25s ease, transform 0.25s ease;
        border-radius: 8px;
    }

    .nav-menu a:hover {
        transform: translateY(0) scale(1.02);
        background: var(--card-hover);
    }

    .nav-menu a:focus-visible {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
        transform: translateY(0) scale(1.02);
        background: var(--card-hover);
    }

    .mobile-dark-mode-toggle {
        display: block;
        margin: 0.25rem 0;
        padding: 0 1rem;
    }

    .mobile-dark-mode-toggle .dark-mode-toggle {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        background: none;
        border: none;
        padding: 1rem;
        margin: 0;
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.25s ease, transform 0.25s ease;
        justify-content: center;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text-primary);
        cursor: pointer;
        border-radius: 8px;
    }

    .nav-menu.active .mobile-dark-mode-toggle .dark-mode-toggle {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.29s;
    }

    .mobile-dark-mode-toggle .dark-mode-toggle:hover {
        transform: translateY(0) scale(1.02);
        background: var(--card-hover);
    }

    .mobile-dark-mode-toggle .dark-mode-toggle:focus-visible {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
        transform: translateY(0) scale(1.02);
        background: var(--card-hover);
    }

    .mobile-dark-mode-toggle .toggle-track {
        width: 44px;
        height: 24px;
    }

    .mobile-dark-mode-toggle .toggle-thumb {
        width: 20px;
        height: 20px;
    }

    .dark-mode .mobile-dark-mode-toggle .toggle-thumb {
        left: 22px;
    }

    .nav-actions {
        gap: 0.5rem;
        position: static;
        transform: none;
        justify-content: flex-end;
        margin-left: auto;
        z-index: 6;
    }

    .dark-mode-toggle {
        display: none;
    }

    .language-selector label {
        display: none;
    }

    /* Make language selector compact - show only flag when closed */
    .language-selector select {
        padding: 0.3rem 0.75rem;
        padding-left: 2.2rem;
        font-size: 1.3rem;
        min-width: 2.4rem;
        width: 2.4rem;
        min-height: 2.2rem; /* improve tap target on mobile */
        border: 1px solid var(--border-color);
        text-align: center;
        background-color: var(--bg-secondary);
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        overflow: hidden;
        text-overflow: clip;
        white-space: nowrap;
        direction: ltr;
        color: transparent; /* hide text when closed; flag shown via ::after */
    }

    /* Keep compact width when focused to avoid layout shift */
    .language-selector select:focus,
    .language-selector select:active {
        width: 2.4rem;
        min-width: 2.4rem;
        overflow: visible;
        color: transparent; /* still rely on flag overlay */
    }

    /* Show full text in option dropdown on mobile */
    .language-selector option {
        font-size: 1rem;
        padding: 0.5rem;
        text-align: left;
        direction: ltr;
    }

    /* Show emoji flag on mobile when closed */
    .language-selector[data-selected-flag]::after {
        content: attr(data-selected-flag);
        position: absolute;
        left: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        font-size: 1.3rem;
        display: block;
    }

    /* Make dark mode toggle smaller on mobile */
    .toggle-track {
        width: 44px;
        height: 24px;
    }

    .toggle-thumb {
        width: 20px;
        height: 20px;
    }

    .dark-mode .toggle-thumb {
        left: 22px;
    }

    .toggle-icon-moon,
    .toggle-icon-sun {
        font-size: 0.6rem;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    @media (max-width: 800px) {
        .nav-menu { transition: none; }
        .nav-menu a { transition: none; opacity: 1; transform: none; }
        .nav-menu.active li a { opacity: 1; transform: none; }
        body.menu-open::after { transition: none; }
    }
}

/* Backdrop overlay when mobile menu is open */
@media (max-width: 800px) {
    body.menu-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        backdrop-filter: blur(2px);
        z-index: 3; /* below nav-menu (z-index: 4) */
        transition: opacity 0.2s ease;
    }
    body.dark-mode.menu-open::after {
        background: rgba(0,0,0,0.5);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: white;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    color: white;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.8;
    color: white;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    border-color: white;
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.stat p {
    opacity: 0.8;
    color: white;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

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

.about-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-picture {
    width: 200px;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    align-self: flex-start;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.profile-picture:hover img {
    filter: grayscale(0%);
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: 15px;
}

.profile-placeholder i {
    font-size: 3rem;
    color: var(--text-light);
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.highlight {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.highlight i {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.highlight h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.highlight p {
    color: var(--text-light);
}

/* Awards Section */
.awards {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.awards h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.award-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow);
    border: 2px solid var(--accent-color);
    transition: all 0.3s;
}

.award-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow), 0 0 15px var(--accent-color);
    background: var(--card-hover);
    border-color: var(--accent-light);
}

.award-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.award-icon i {
    font-size: 1.5rem;
    color: white;
}

.award-card h3 {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.award-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Timeline Section */
.timeline {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.timeline h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    width: 120px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-content {
    flex: 1;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 0 2rem;
    border-left: 4px solid var(--text-secondary);
    position: relative;
}

.timeline-item.current .timeline-content {
    background: var(--accent-color);
    color: white;
    border-left-color: var(--accent-light);
}

.timeline-item.current .timeline-date {
    color: var(--accent-light);
    font-weight: 700;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.timeline-item.current .timeline-content h3 {
    color: white;
}

.timeline-content p {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.timeline-item.current .timeline-content p {
    color: rgba(255, 255, 255, 0.9);
}

.timeline-location {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.timeline-item.current .timeline-location {
    color: white;
}

.timeline-date::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-date::after {
    right: auto;
    left: -6px;
}

.timeline-item.current .timeline-date::after {
    background: var(--accent-light);
    width: 16px;
    height: 16px;
}

.timeline-date {
    position: relative;
}

/* Future role styling - blurred until reveal date */
.timeline-item.future-role .timeline-content {
    position: relative;
    user-select: none;
    pointer-events: none;
    transition: all 0.6s ease;
}

.timeline-item.future-role .timeline-content h3,
.timeline-item.future-role .timeline-content p,
.timeline-item.future-role .timeline-location {
    filter: blur(10px) !important;
    opacity: 0.2 !important;
    transition: all 0.6s ease;
    color: transparent !important;
    text-shadow: 0 0 12px var(--text-primary) !important;
}

.timeline-item.future-role .timeline-date {
    filter: blur(6px);
    opacity: 0.4;
    transition: all 0.6s ease;
}

.timeline-item.future-role.revealed .timeline-content h3,
.timeline-item.future-role.revealed .timeline-content p,
.timeline-item.future-role.revealed .timeline-location,
.timeline-item.future-role.revealed .timeline-date {
    filter: blur(0) !important;
    opacity: 1 !important;
    color: inherit !important;
    text-shadow: none !important;
}

.timeline-item.future-role.revealed .timeline-content {
    user-select: auto;
    pointer-events: auto;
}

.timeline-item.future-role .timeline-content::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    z-index: 10;
    transition: all 0.6s ease;
    opacity: 1;
}

.timeline-item.future-role.revealed .timeline-content::after {
    content: '🎉';
    animation: celebrate 1s ease forwards;
}

@keyframes celebrate {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* Localization Section */
.localization {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
}

.localization h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: white;
}

.localization-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.localization-intro p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

.vip-projects h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: white;
}

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

.game-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid var(--accent-color);
    transition: all 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    border-color: var(--accent-light);
    box-shadow: 0 0 15px var(--accent-color);
}

.game-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--card-hover);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.image-placeholder p {
    font-weight: 600;
    color: var(--text-light);
}

.game-info h4 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.game-info p {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.game-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.game-tags span {
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.localization-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.localization-stats .stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.localization-stats .stat p {
    opacity: 0.8;
    font-size: 1rem;
}

.localization-cta {
    text-align: center;
    margin-top: 2rem;
}

.btn-localization {
    background: var(--accent-color);
    color: white;
    border: 2px solid var(--accent-color);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-localization:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px var(--shadow);
    transition: all 0.3s;
    border: 2px solid var(--accent-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow), 0 0 15px var(--accent-color);
    background: var(--card-hover);
    border-color: var(--accent-light);
}

.project-card.featured {
    border: 2px solid var(--accent-light);
    background: var(--card-hover);
    box-shadow: 0 0 20px var(--accent-color);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.4rem;
    color: var(--text-secondary);
}

.project-tag {
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.project-features span {
    background: var(--accent-light);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

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

.project-tech i {
    font-size: 1.5rem;
    color: white;
    background: var(--accent-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.btn-demo {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-demo:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow), 0 0 0 2px var(--accent-color);
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.skills h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

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

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px var(--shadow);
    text-align: center;
    border: 1px solid var(--border-color);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.skill-items span {
    background: var(--accent-color);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.skill-items.languages span {
    font-weight: 600;
}

.skill-items .native {
    background: var(--accent-color);
}

.skill-items .c2 {
    background: var(--accent-color);
}

.skill-items .c1 {
    background: var(--accent-color);
}

.skill-items .n5 {
    background: var(--accent-color);
}

/* Contact Section */
.contact {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.language-selector label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
}

.language-selector[data-selected-flag]::after {
    content: attr(data-selected-flag);
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1.25rem;
    display: none;
}

.language-selector select {
    padding: 0.4rem 1.2rem;
    padding-left: 1.2rem;
    border: 1.5px solid var(--text-light);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 3.5rem;
    width: auto;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow);
}

.language-selector select:focus,
.language-selector select:active {
    color: var(--text-primary);
    text-shadow: none;
    caret-color: auto;
}

.language-selector select:hover {
    box-shadow: 0 4px 14px var(--shadow);
    border-color: var(--text-secondary);
    background: var(--card-hover);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--text-secondary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.language-selector option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.contact-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link,
button.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 50px;
    transition: all 0.3s;
    background: var(--accent-color);
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.contact-link:hover,
button.contact-link:hover,
.contact-link:focus-visible,
button.contact-link:focus-visible {
    background: white;
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

body:not(.dark-mode) .contact-modal-content {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-color);
    backdrop-filter: blur(6px);
}

.modal-content * {
    color: var(--text-primary);
}

.modal-content h2 {
    color: var(--text-secondary) !important;
    margin-bottom: 1rem;
    font-weight: 600;
}

.modal-content h3 {
    color: var(--text-secondary) !important;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.modal-content h4 {
    color: var(--text-secondary) !important;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-content p {
    color: var(--text-primary) !important;
    margin-bottom: 1rem;
}

.modal-content ul {
    color: var(--text-primary) !important;
}

.modal-content li {
    color: var(--text-primary) !important;
    margin-bottom: 0.5rem;
}

.modal-content strong {
    color: var(--text-secondary) !important;
    font-weight: 600;
}

.modal-content span {
    color: var(--text-primary) !important;
}

.modal-content div {
    color: var(--text-primary);
}

.project-description {
    font-size: 1.1rem;
    color: var(--text-light);
}

.project-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.genre-list li,
.feature-list li,
.impact-list li {
    color: var(--text-primary);
}

.spec-tag,
.tech-tag {
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    display: inline-block;
    margin: 4px;
    font-size: 0.9rem;
    border: 1px solid var(--accent-color);
}

body:not(.dark-mode) .spec-tag,
body:not(.dark-mode) .tech-tag {
    background: #059669 !important;
    border: 1px solid #059669 !important;
    color: white !important;
}

body:not(.dark-mode) .modal-content .spec-tag,
body:not(.dark-mode) .modal-content .tech-tag,
body:not(.dark-mode) .tech-tags .tech-tag {
    background: #059669 !important;
    border: 1px solid #059669 !important;
    color: white !important;
}

.localization-projects {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

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

.modal-content .localization-projects .project-item,
.modal-content .project-item {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
}

body:not(.dark-mode) .modal-content .project-item,
body:not(.dark-mode) .modal-content .localization-projects .project-item {
    background: #ffffff !important;
    border: 2px solid #059669 !important;
}

.modal-content .project-item h4 {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.modal-content .project-item p {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-content .genre-list,
.modal-content .feature-list,
.modal-content .impact-list {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-content .architecture-info {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    margin-top: 1rem;
    color: var(--text-primary);
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--text-primary);
}

/* Contact Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body:not(.dark-mode) .form-group input,
body:not(.dark-mode) .form-group textarea {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 24px rgba(15, 23, 42, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

body:not(.dark-mode) .form-group input::placeholder,
body:not(.dark-mode) .form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.1);
}

.btn-submit {
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--accent-light);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#form-status {
    width: 100%;
    display: block;
}

.success-message {
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #10b981;
    margin-top: 1rem;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.error-message {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    margin-top: 1rem;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

#contact-form-btn {
    background: var(--accent-color);
    color: white;
    border: 2px solid white;
    cursor: pointer;
    font-family: inherit;
}

#contact-form-btn:hover,
#contact-form-btn:focus-visible {
    background: white !important;
    color: var(--accent-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
    border: 2px solid white;
}

/* Form Validation Styles */
.error-message {
    display: none;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

body:not(.dark-mode) .form-group.has-error input,
body:not(.dark-mode) .form-group.has-error textarea {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.form-group.has-error .error-message {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 400;
    margin-left: 0.5rem;
}

body:not(.dark-mode) .char-count {
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 80px 20px 40px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 3rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat h3 {
        font-size: 2rem;
    }
    
    .about {
        padding: 60px 0;
    }
    
    .about h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-left {
        align-items: center;
        text-align: center;
    }
    
    .about-text p {
        font-size: 0.95rem;
    }
    
    .profile-picture {
        width: 150px;
        height: 150px;
        align-self: center;
    }
    
    .highlight-card {
        padding: 1.25rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact {
        padding: 60px 0;
    }
    
    .contact-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .contact-info {
        align-items: center;
    }
    
    .games-showcase {
        grid-template-columns: 1fr;
    }
    
    .localization-stats {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .timeline-container::before {
        left: 15px;
    }
    
    .timeline-item {
        flex-direction: column !important;
        padding-left: 0;
        align-items: flex-start !important;
        margin-left: 35px;
    }
    
    .timeline-item::before {
        left: -20px !important;
    }
    
    .timeline-date {
        width: auto;
        font-size: 0.9rem;
        text-align: left;
        font-weight: 700;
        margin-bottom: 0.75rem;
        display: flex;
        align-items: center;
        gap: 10px;
        position: relative;
        padding-left: 0;
    }
    
    .timeline-date::after {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        order: -1;
    }
    
    .timeline-content {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        border-left: 4px solid var(--text-secondary);
        padding-left: 20px;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }
}

/* Demos Section */
.demos {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.demos h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.demos-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.demo-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--accent-color);
}

.demo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 12px var(--shadow), 0 0 15px var(--accent-color);
    border-color: var(--accent-light);
}

.demo-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
    overflow: hidden;
}

.demo-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.demo-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.demo-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
}

.demo-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.demo-tech span {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

body.dark-mode .demo-tech span {
    background: var(--accent-color);
}

.demo-impact {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.demo-impact p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

@media (max-width: 768px) {
    .demos {
        padding: 60px 0;
    }

    .demos h2 {
        font-size: 1.8rem;
    }

    .demos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .demo-info {
        padding: 1rem;
    }

    .demo-info h3 {
        font-size: 1.1rem;
    }
}