@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
    --primary: #2ea043;
    --primary-hover: #3fb950;
    --secondary: #0d1117;
    --accent: #58a6ff;
    --accent-rgb: 88, 166, 255;

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #21262d;
    --bg-glass: rgba(33, 38, 45, 0.7);
    --border-color: #30363d;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.45);
    --success: #28a745;
    --error: #dc3545;
}

.light-mode {
    --primary: #2ea043;
    --primary-hover: #3fb950;
    --secondary: #f6f8fa;
    --accent: #0969da;
    --accent-rgb: 9, 105, 218;

    --text-primary: #24292f;
    --text-secondary: #4b5563;
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --border-color: #d1d5db;
    --shadow-sm: 0 3px 6px rgba(140, 149, 159, 0.15);
    --shadow-md: 0 3px 12px rgba(140, 149, 159, 0.2);
    --shadow-lg: 0 8px 24px rgba(140, 149, 159, 0.25);
    --success: #28a745;
    --error: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-secondary);
}

.brand-repo {
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: 'Tajawal', 'Inter', 'Noto Sans SC', sans-serif;
    font-size: 1.07em;
    padding: 0 0.18em;
    border-radius: 5px;
    background: linear-gradient(90deg, #2ea043 30%, #58a6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
}

body {
    font-family: 'Inter', 'Tajawal', 'Noto Sans SC', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    opacity: 1;
}

body.loaded {
    opacity: 0;
    transition: opacity 0.8s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-.895 3-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='currentColor' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-card));
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-logo {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .site-logo {
    transform: scale(1.1);
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link i {
    font-size: 1.1em;
}

.nav-link:hover {
    color: var(--accent);
    background-color: var(--bg-card);
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background-color: var(--accent);
    border-radius: 50%;
}

/* Navbar Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-icon {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.theme-toggle button {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle button:hover {
    background-color: var(--bg-card);
    color: var(--accent);
    transform: rotate(30deg);
}

/* Language Toggle */
.language-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.language-toggle button {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Tajawal', 'Inter', sans-serif;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-toggle button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(88, 166, 255, 0.4);
    background: linear-gradient(145deg, var(--accent), var(--primary));
    color: var(--text-primary);
}

.language-toggle button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

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

.language-toggle .dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.language-toggle.active .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-toggle .dropdown option {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-toggle .dropdown option:hover {
    background: rgba(var(--accent-rgb), 0.6);
    color: var(--text-primary);
    border-radius: 12px;
}

.language-toggle .dropdown option.selected {
    border-radius: 12px;
    background: linear-gradient(145deg, var(--accent), var(--primary));
    font-weight: 600;
}

.nav-close {
    display: none;
}

@media (max-width: 992px) {
    .navbar {
        padding: 0.8rem 1.5rem;
        position: relative;
        z-index: 1001;
    }
    .navbar-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100vw; /* استخدام vw بدلاً من % */
        width: min(280px, 80vw); /* responsive width */
        max-width: 320px;
        height: 100vh;
        height: 100dvh; /* dynamic viewport height للتلفونات الحديثة */
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 1.5rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1002;
        transition: right 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        overflow-y: auto;
        overflow-x: hidden;
        /* إخفاء كامل */
        display: none;
        opacity: 0;
        visibility: hidden;
        /* منع scroll للخلفية */
        overscroll-behavior: contain;
        /* إزالة أي margins أو paddings غريبة */
        margin: 0;
        box-sizing: border-box;
        /* منع النص من الانتقال للخارج */
        word-wrap: break-word;
        /* تأكيد عدم وجود borders */
        border: none;
        outline: none;
    }
    
    .nav-links.active {
        display: flex;
        right: 0;
        opacity: 1;
        z-index: 1002;
        visibility: visible;
        /* منع scroll الخلفية */
        position: fixed;
    }
    
    .nav-link {
        width: 100%;
        max-width: 100%;
        padding: 0.9rem 1.25rem;
        margin: 0.25rem 0;
        border-radius: 12px;
        font-size: 1.05rem;
        font-weight: 500;
        color: var(--text-primary);
        text-decoration: none;
        display: flex;
        align-items: center;
        transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
        background: transparent;
        border: none;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        box-sizing: border-box;
        /* منع النص من الخروج */
        white-space: nowrap;
    }
    
    .nav-link i {
        width: 24px;
        min-width: 24px;
        text-align: center;
        margin-left: 8px;
        font-size: 1.1em;
        color: var(--text-secondary);
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    
    .nav-link:hover {
        background: var(--bg-secondary);
        transform: translateX(4px);
    }
    
    .nav-link.active {
        background: rgba(var(--accent-rgb), 0.1);
        color: var(--accent);
        font-weight: 600;
    }
    .mobile-menu-btn {
        display: block;
        z-index: 1003;
    }
    
    .mobile-menu-btn.active {
        z-index: 1;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
/* Navigation Close Button */
.nav-close.active {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.nav-close:hover.active {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.nav-close:focus.active {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* For light mode */
.light-mode .nav-close.active {
    color: #333;
}

.light-mode .nav-close:hover.active {
    background: rgba(0, 0, 0, 0.05);
}
    
    
    .nav-actions {
        position: relative;
        justify-content: flex-end;
        align-items: center;
    }
    
    /* Overlay للخلفية */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(2px);
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* منع scroll للبودي لما القائمة مفتوحة */
    body.nav-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* إزالة أي خطوط أو borders غريبة */
    .navbar,
    .nav-links,
    .nav-link {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* تأكيد reset للمسافات */
    .nav-links * {
        box-sizing: border-box;
    }
}

/* Media query إضافية للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .nav-links {
        width: min(260px, 85vw);
        padding: 4rem 1rem 2rem;
    }
    
    .nav-link {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}

/* Media query للشاشات الكبيرة جداً عشان نتأكد إن القائمة مخفية */
@media (min-width: 993px) {
    .nav-links {
        position: static !important;
        display: flex !important;
        right: auto !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        flex-direction: row !important;
        padding: 0 !important;
        box-shadow: none !important;
        z-index: auto !important;
        transition: none !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .mobile-only {
        display: none !important;
    }
    
    .nav-overlay {
        display: none !important;
    }
}

@media (max-width: 576px) {
    
    .site-logo {
        width: 35px;
        height: 35px;
    }
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: border-color 0.7s cubic-bezier(0.77, 0, 0.175, 1);
}

.site-logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.theme-toggle button,
.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, background-color, color;
}

.theme-toggle button:hover {
    background: var(--bg-card);
    color: var(--accent);
    transform: scale(1.1);
}

.github-icon {
    font-size: 2rem;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.github-icon:hover {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary);
}

.navbar h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent), var(--primary));
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Old navigation styles - keeping for reference */
.back-to-home {
    display: none; /* Hide old navigation links */
}

.main-container {
    max-width: 1200px;
    margin: 1.5rem auto 0 auto;
    padding: 2rem;
}

.about-section,
.team-section,
.contact-section,
.project-section {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    overflow: visible;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.light-mode .about-section,
.light-mode .team-section,
.light-mode .contact-section,
.light-mode .project-section {
    backdrop-filter: blur(4px);
}

.animate-section.loaded {
    opacity: 1;
    transform: translateY(0);
}

.about-section::before,
.team-section::before,
.contact-section::before,
.project-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.15) 0%, rgba(88, 166, 255, 0) 70%);
    transition: opacity 0.5s ease;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    border-radius: 16px;
}

.about-section:hover::before,
.team-section:hover::before,
.contact-section:hover::before,
.project-section:hover::before {
    opacity: 1;
}

.about-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--accent), var(--primary));
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.about-description,
.project-description,
.contact-section p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

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

.feature-item {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.95);
    will-change: transform, box-shadow;
}

.light-mode .feature-item {
    backdrop-filter: blur(4px);
}

.animate-card {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.feature-icon {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover .feature-icon {
    transform: scale(1.3) rotate(5deg);
    color: var(--primary);
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-item p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.team-members {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
    min-height: 300px;
    margin: 0 auto;
}

.team-member {
    text-align: center;
    justify-content: center;
    width: 280px;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    margin: 0 auto;
    will-change: transform, box-shadow;
}

.light-mode .team-member {
    backdrop-filter: blur(4px);
}

.team-member:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.team-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    border: 3px solid var(--accent);
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-member:hover .team-avatar {
    transform: scale(1.15);
    box-shadow: 0 8px 20px rgba(88, 166, 255, 0.4);
}

.team-member h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.team-member p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    position: relative;
    z-index: 10;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.2) rotate(5deg);
    box-shadow: 0 6px 15px rgba(88, 166, 255, 0.5);
}

.social-link i {
    font-size: 1.6rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.discord-link {
    background: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
    color: white !important;
    box-shadow: 0 2px 10px rgba(88, 101, 242, 0.2);
}

.email-link {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white !important;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.2);
}

.phone-link {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.contact-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.discord-link:hover {
    background: linear-gradient(135deg, #7289DA 0%, #5865F2 100%);
}

.phone-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
    background: linear-gradient(135deg, #7c2be8 0%, #3d8bfd 100%);
}

.contact-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.contact-link i {
    font-size: 1.2rem;
    color: currentColor;
}

.contact-text {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

.contact-links {
    margin-top: 16px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1rem 0.5rem;
    font-size: 1.2rem;
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.project-link:hover {
    color: #fff;
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.4);
}

.project-link i {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: scale(1.2);
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-mode .form-group input,
.light-mode .form-group textarea {
    backdrop-filter: blur(4px);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(88, 166, 255, 0.3);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 300px;
}

.form-submit {
    background: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: center;
    will-change: transform, box-shadow;
}

.form-submit:hover {
    background: var(--primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 12px rgba(88, 166, 255, 0.4);
    animation: pulse 1.5s ease-in-out infinite;
}

.form-message {
    font-size: 1rem;
    text-align: center;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.form-message.success {
    color: var(--success);
    opacity: 1;
}

.form-message.error {
    color: var(--error);
    opacity: 1;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    padding: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.logo-link .site-logo {
    width: 40px;
    height: 40px;
}

.hero-logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 3rem auto 2rem;
    padding: 1.5rem;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent), var(--primary));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: floatAndScale 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    z-index: 1;
    will-change: transform, box-shadow;
}

.hero-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: linear-gradient(45deg, var(--accent), var(--primary));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 0.5em;
    border-radius: 50%;
    animation: rotateBorder 10s linear infinite;
    opacity: 0.8;
}

.hero-logo:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    background: linear-gradient(45deg, var(--primary), var(--accent));
}

.hero-logo:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent);
    transform: scale(1.03);
}

/* Animations */
@keyframes floatAndScale {
    0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
    50% { transform: translateY(-15px) scale(1.02); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); }
}

@keyframes rotateBorder {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-logo {
        max-width: 300px;
        margin: 2rem auto 1.5rem;
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        max-width: 250px;
        margin: 1.5rem auto 1rem;
        padding: 1rem;
    }
}

/* Additional hover effects */
.hero-logo:hover::before {
    opacity: 1;
    transform: rotate(360deg) scale(1.02);
}

.hero-logo:active {
    transform: scale(0.98) translateY(0px) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Smooth transition for all states */
.hero-logo,
.hero-logo::before {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem;
    }

    .about-section,
    .team-section,
    .contact-section,
    .project-section {
        padding: 2rem;
    }

    .about-title {
        font-size: 2rem;
    }

    .about-description,
    .project-description,
    .contact-section p {
        font-size: 1.1rem;
    }

    .feature-item {
        width: 100%;
    }

    .team-member {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-form {
        margin: 1.5rem auto;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.95rem;
    }

    .form-submit {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .about-features {
        grid-template-columns: 1fr;
    }

    .team-avatar {
        width: 120px;
        height: 120px;
    }

    .contact-link,
    .project-link {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .social-link i {
        font-size: 1.4rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-message {
        font-size: 0.9rem;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(135deg, var(--bg-secondary), rgba(88, 166, 255, 0.1));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

.scrollable {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-secondary);
}

.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.9), rgba(88, 166, 255, 0.1));
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.page-loading.active {
    display: flex;
    opacity: 1;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse 2s ease-in-out infinite;
}

.spinner-core {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.7), 0 0 30px rgba(88, 166, 255, 0.4);
    animation: scaleCore 1.5s ease-in-out infinite;
}

.spinner-orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    box-shadow: 0 0 10px rgba(46, 160, 67, 0.5);
}

.orbit-1 {
    border-top-color: var(--primary);
    animation: spinOrbit 1.2s linear infinite;
}

.orbit-2 {
    border-bottom-color: var(--primary-hover);
    animation: spinOrbit 1.2s linear infinite reverse;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes scaleCore {
    0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(88, 166, 255, 0.7); }
    50% { transform: scale(1.2); box-shadow: 0 0 25px rgba(88, 166, 255, 1); }
}

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

/* Responsive Navbar */
@media (min-width: 1024px) {
    .navbar {
        padding: 1rem 2rem;
    }
    .theme-toggle {
        margin-left: 1rem;
    }
    .back-to-home {
        margin-left: auto;
        margin-right: 1.5rem;
    }
}

@media (max-width: 1023px) and (min-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    .theme-toggle,
    .back-to-home {
        margin-left: 0.5rem;
    }
    .back-to-home {
        margin-right: 0.5rem;
    }
}

@media (max-width: 767px) {
    .navbar {
        padding: 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .theme-toggle,
    .back-to-home {
        margin: 0 0.25rem;
    }
    .back-to-home {
        padding: 0.5rem;
        border-radius: 50%;
    }
    .back-to-home span {
        display: none;
    }
    .back-to-home i {
        font-size: 1.2rem;
    }
}

/* Footer Styling */
footer {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.light-mode footer {
    backdrop-filter: blur(4px);
}

footer p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
}

footer #footer-text {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(45deg, var(--accent), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* Footer Link Styling */
.footer-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer-link i {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.footer-link:hover {
    color: var(--primary);
    text-decoration: underline;
    transform: translateY(-2px);
}

.footer-link:hover i {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.7rem 1rem;
    }
    .site-logo {
        width: 35px;
        height: 35px;
    }
    .language-toggle button {
        padding: 0.5rem;
        border-radius: 50%;
    }
    .language-toggle button i {
        font-size: 1rem;
    }
    .language-toggle button span {
        display: none;
    }
    .language-toggle .dropdown {
        min-width: 120px;
        right: -5px;
    }
    .language-toggle .dropdown option {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .nav-link.active::after {
        display: none;
    }
}