/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark theme (default) */
    --primary-color: #ffffff;
    --secondary-color: #000000;
    --accent-color: #6366f1;
    --accent-hover: #818cf8;
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #1f1f1f;
    --border-color: #2a2a2a;
    --border-hover: #3a3a3a;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    /* Light theme */
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-hover: #4f46e5;
    --text-primary: #0a0a0a;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
    overflow-x: hidden;
}

/* Loading Screen */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

[data-theme="light"] .loader-overlay {
    background: rgba(255, 255, 255, 0.9);
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-spinner {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.spinner-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    animation: spinner-bounce 1.4s ease-in-out infinite both;
}

.spinner-circle:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-circle:nth-child(2) {
    animation-delay: -0.16s;
}

.spinner-circle:nth-child(3) {
    animation-delay: 0s;
}

@keyframes spinner-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    color: var(--text-primary);
}

.mobile-menu-toggle svg {
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
    background: var(--bg-card);
}

.mobile-menu-toggle:hover svg {
    transform: rotate(90deg);
}

.mobile-menu-toggle.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--secondary-color);
}

.mobile-menu-toggle.active svg {
    transform: rotate(90deg);
}

/* Mobile Side Menu */
.mobile-side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

.mobile-side-menu.active {
    pointer-events: all;
    opacity: 1;
    display: block;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 0;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.mobile-side-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.mobile-menu-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
    transform: rotate(90deg);
}

.mobile-menu-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-lang-switcher,
.mobile-theme-switcher {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-lang-switcher .lang-switcher {
    width: 100%;
    justify-content: stretch;
}

.mobile-lang-switcher .lang-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.mobile-theme-switcher .theme-toggle.mobile {
    width: 100%;
    height: 48px;
    justify-content: center;
    border-radius: 10px;
}

/* Controls (Language & Theme) */
.controls {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.lang-switcher {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.theme-toggle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    position: relative;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.theme-icon {
    position: absolute;
    transition: var(--transition);
}

.theme-icon.sun {
    opacity: 0;
    transform: rotate(90deg);
}

.theme-icon.moon {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="light"] .theme-icon.sun {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="light"] .theme-icon.moon {
    opacity: 0;
    transform: rotate(-90deg);
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

.lang-btn.active {
    color: var(--accent-color);
    background: var(--bg-primary);
    font-weight: 600;
}

/* Header */
.header {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.8);
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.8);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-family: 'Rubik 80s Fade', 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section */
.hero {
    padding: 8rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--accent-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Section Styles */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* About Section */
.about {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.about .section-title {
    color: var(--text-primary) !important;
}

.about .section-text {
    color: var(--text-secondary) !important;
}

/* Tech Stack Section */
.tech-stack {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.tech-stack .section-title {
    color: var(--text-primary) !important;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: var(--transition);
    text-align: center;
    backdrop-filter: blur(10px);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.tech-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.tech-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    padding: 12px;
}

.tech-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tech-item:hover .tech-icon {
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
    transform: scale(1.1);
}

.tech-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Projects Section */
.projects .section-title {
    color: var(--text-primary) !important;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #8b5cf6);
    transform: scaleX(0);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
    background: var(--bg-card);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-status {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    color: var(--secondary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.project-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Team Section */
.team {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.team .section-title {
    color: var(--text-primary) !important;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    justify-items: center;
}

.team-member {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    width: 100%;
    max-width: 320px;
    backdrop-filter: blur(10px);
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
    background: var(--bg-card);
}

.member-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    border: 3px solid var(--border-color);
    transition: var(--transition);
}

.team-member:hover .member-avatar {
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.member-initial {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: 0.05em;
}

.member-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.member-role {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.member-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.member-link:hover {
    color: var(--accent-hover);
}

.member-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.member-link:hover::after {
    width: 100%;
}

/* Social Section */
.social .section-title {
    color: var(--text-primary) !important;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    min-width: 160px;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
    background: var(--bg-card);
}

.social-link svg {
    width: 24px;
    height: 24px;
}

.social-link.discord:hover {
    background: #5865f2;
    color: white;
    border-color: #5865f2;
}

.social-link.telegram:hover {
    background: #0088cc;
    color: white;
    border-color: #0088cc;
}

.social-link.github:hover {
    background: #24292e;
    color: white;
    border-color: #24292e;
}

[data-theme="dark"] .social-link.github:hover {
    background: #ffffff;
    color: #24292e;
}

/* Join Us Section */
.join-us {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    margin: 4rem 2rem;
}

[data-theme="light"] .join-us {
    background: linear-gradient(135deg, var(--accent-color) 0%, #8b5cf6 100%);
}

.join-us::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.15)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
}

.join-us::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.join-us .container {
    position: relative;
    z-index: 1;
}

.join-us .section-title {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: clamp(2rem, 4vw, 3rem);
}

.join-us .section-text {
    color: #ffffff !important;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 3rem;
    background: #ffffff;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0.4);
    font-size: 1.125rem;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.3);
    background: #ffffff;
    color: #4f46e5;
}

.btn-primary:active {
    transform: translateY(-2px) scale(1);
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    text-align: center;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-side-menu {
        display: block;
    }

    .controls {
        display: none;
    }
    
    .theme-toggle {
        width: 44px;
        height: 44px;
    }

    .header {
        padding: 2rem 0;
    }

    .logo-text {
        font-size: 2rem;
    }


    .hero {
        padding: 4rem 0;
    }

    section {
        padding: 4rem 0;
    }

    .join-us {
        border-radius: 20px;
        margin: 2rem 1rem;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }

    .social-link {
        width: 100%;
        max-width: 280px;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .projects-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.6s ease-out;
}

/* Smooth transitions for theme changes */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

