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

:root {
    /* Main Accent - The "Clean Yellow" we picked */
    --accent-primary: #facc15;
    --accent-primary-hover: #eab308;
    /* Shadows & Tags - Subtle amber glow instead of flat gray */
    --shadow: rgba(0, 0, 0, 0.4);
    --tag-background: rgba(250, 204, 21, 0.1);
    /* Gradient - Deep charcoal to dark slate */
    --gradient-primary: linear-gradient(135deg, #1f2937, #111827);
    /* Icon Filter */
    --icon-fillter-accent-primary: brightness(0) saturate(100%) invert(77%) sepia(95%) saturate(1816%) hue-rotate(345deg) brightness(100%) contrast(97%);
    /* Layout & Surface - High contrast "OLED" style */
    --border-color: #262626;
    --primary-bg: #0a0a0a;
    --secondary-bg: #141414;
    --header-bg: rgba(10, 10, 10, 0.85); /* Blurred dark header */
    --card-bg: #1a1a1a;
    /* Typography */
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-nav-link-normal: #d1d5db;
    --text-muted: #6b7280;
    /* Language Dropdown */
    --language-dropdown-option-selected-bg: #262626; /* Matches your card-bg */
    --language-dropdown-option-hover-bg: #262626; /* Subtle lift when hovering */
    --language-dropdown-text-hover: #facc15; /* Text turns yellow on hover */
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    height:100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    margin-bottom:60px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none !important;
    color: var(--accent-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-nav-link-normal) !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    cursor: pointer !important;
}

/* Centered navigation */
.nav-center {
    display: flex;
    justify-content: center;
    flex: 1;
}

/* Right-aligned buttons */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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


.hidden{
    display:none !important;
}

.resume-btn {
    background: var(--accent-primary);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease;
    cursor: pointer;
}

.resume-btn:hover {
    background: var(--accent-primary-hover) !important;
}

.language-btn {
    position: relative;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.language-btn.active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Desktop Language Dropdown */
.desktop-language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    z-index: 1000;
    min-width: 200px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.desktop-language-dropdown.active {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
}

.language-dropdown {
    position: relative;
    width: 80%;
    margin: 1rem auto;
    max-width: 300px;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-dropdown.active {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
}

/* Default LTR */
#desktop-language-dropdown {
    direction: ltr;
    text-align: left;
    left: 0; /* stick to the left edge of button */
    left: auto;
}

/* When site is in Arabic (RTL) */
html[dir="rtl"] #desktop-language-dropdown {
    direction: rtl;
    text-align: right;
    left: 0; /* stick to the right edge of button */
    right: auto;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    color: var(--language-dropdown-text-hover);
    background: var(--language-dropdown-option-hover-bg);
}

.language-option.selected {
    background: var(--language-dropdown-option-selected-bg);
    color: var(--accent-primary);
}

.flag-icon {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.language-name {
    flex: 1;
    text-align: left;
}

.language-code {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: bold;
}


/* Ensure buttons don't wrap */
.resume-btn, .language-btn {
    white-space: nowrap;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu {
    display: none;
}

.hamburger span {
    height: 3px;
    width: 100%;
    background-color: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Main Content */
.main-content {
    /* Header height offset */
    margin-top: 80px;
}

.main-content-wrapper {
}

.section {
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 15px var(--accent-primary-hover), 0 0 30px var(--accent-primary-hover), 0 0 45px var(--accent-primary-hover);
}


.hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-primary);
    font-weight:bold;
    color: white;
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }

    .language-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {

    .nav-container {
        padding: 0 1rem;
    }

    .hamburger {
        display: flex;
    }

    .hamburger-menu {
        display:flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
    }

    .language-btn {
        display: none;
    }

    .mobile-language-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        background: transparent;
        color: var(--text-secondary);
        border: 2px solid var(--border-color);
        padding: 0.8rem;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 200px;
        margin: 0.5rem 0;
    }

    .mobile-language-btn:hover {
        border-color: var(--accent-primary);
        color: var(--accent-primary);
    }

    .mobile-language-dropdown {
        position: relative;
        width: 100%;
        margin: 0;
        max-width: none;
    }

    .mobile-language-dropdown {
        padding: 0 1rem;
    }

    .language-dropdown {
        position: static;
        border: none;
        background: var(--secondary-bg);
        border-radius: 8px;
        margin-top: 0.5rem;
    }

    .language-dropdown.active {
        position: static;
        transform: none;
    }

    .resume-btn {
        display: none;
    }

    .mobile-resume-btn {
        display: block;
        background: var(--accent-primary);
        color: white !important;
        padding: 0.5rem 1rem;
        border: none;
        border-radius: 8px;
        text-decoration: none;
        transition: background 0.3s ease;
        cursor: pointer;
        width: 100%;
        margin: 1rem auto;
        text-align: center;
    }

    .mobile-resume-btn:hover {
        background: var(--accent-primary-hover);
    }

    .logo {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }


    .profile-photo {
        width: 200px;
        height: 200px;
        font-size: 3rem;
    }

    .about-content h2 {
        font-size: 2rem;
    }

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

    .skills-categories {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skills-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .skill-item {
        padding: 1rem;
    }

    .skill-icon {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        margin: 0 -1rem 2rem;
        padding-left: 1rem;
    }

    .tab-btn {
        flex-shrink: 0;
        margin-right: 0.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 1.5rem;
    }

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

    .section {
        padding: 1rem 0;
    }

    .hero {
        padding: 4rem 0;
    }

    .featured-projects {
        padding: 3rem 0;
    }


    .project-details-modal {
        padding: 1rem;
    }

    .modal-content {
        margin: 1rem auto;
    }


    .features-grid {
        grid-template-columns: 1fr;
    }

    .project-links-detailed {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .nav-container {
        flex-wrap: wrap;
    }

    .skills-list {
        grid-template-columns: repeat(2, 1fr);
    }
}



/* Animation for page transitions */
.section {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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