/* ==========================================================================
   CSS Variables & Theming
   ========================================================================== */
:root {
    --bg-dark: #0a0e17;
    --bg-darker: #06080e;
    --bg-card: rgba(15, 23, 42, 0.6);
    --bg-card-hover: rgba(15, 23, 42, 0.8);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --primary-color: #d4af37;
    --primary-hover: #fcd34d;
    --primary-glow: rgba(212, 175, 55, 0.3);

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
    
    --border-color: rgba(255, 255, 255, 0.08);
    
    --font-heading: 'Amiri', serif;
    --font-body: 'Tajawal', sans-serif;
    
    --transition-fast: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color var(--transition-fast);
}

p {
    color: var(--text-muted);
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
.text-gold { color: var(--primary-color); }
.text-center { text-align: center; }
.mr-2 { margin-right: 0.5rem; }

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

.divider {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin-top: 1rem;
    border-radius: 2px;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.bg-alt {
    background-color: var(--bg-darker);
}

.section-container {
    position: relative;
    z-index: 2;
}

.section-header {
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-main);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.btn-primary:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(10, 14, 23, 0.9);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo span {
    color: var(--primary-color);
}

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

.nav-links li a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-color);
}

.login-link {
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.login-link:hover {
    background: var(--primary-color);
    color: var(--bg-dark) !important;
}

.login-link::after {
    display: none !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 1.5rem;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(6, 8, 14, 0.9)), url('https://images.unsplash.com/photo-1590602847861-e35969d963e1?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 14, 23, 0.7) 0%, rgba(10, 14, 23, 1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-avatar {
    width: 220px;
    height: 220px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 30px var(--primary-glow), inset 0 0 20px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.hero-title {
    font-size: 4rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-muted);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-15px) translateX(-50%); }
    60% { transform: translateY(-7px) translateX(-50%); }
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* ==========================================================================
   Cards & Glassmorphism
   ========================================================================== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition-fast);
    margin-bottom: 1.5rem;
}

.hover-glow:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-glow);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Education Section
   ========================================================================== */
#education .card {
    display: flex;
    align-items: center;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-left: 2rem;
    background: rgba(212, 175, 55, 0.1);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.card-year {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.card-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.card-location {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Experience Timeline Section
   ========================================================================== */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-group {
    margin-bottom: 4rem;
}

.group-title {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-right: 3.5rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timeline-item {
    position: relative;
    padding-right: 4rem;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    right: 14px;
    top: 30px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
    z-index: 2;
}

.timeline-content h4 {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.styled-list {
    list-style: none;
}

.styled-list li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-right: 1.5rem;
}

.styled-list li::before {
    content: '\f104';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    color: var(--primary-color);
}

/* ==========================================================================
   Works Section
   ========================================================================== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.work-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.work-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.work-card h4 {
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

/* ==========================================================================
   Awards Section
   ========================================================================== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.award-card {
    padding: 3rem 2rem;
}

.award-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.award-icon .material-symbols-outlined {
    font-size: 3rem;
    color: var(--primary-color);
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.award-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Honors Section
   ========================================================================== */
.honors-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.honor-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.honor-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(-5px);
}

.honor-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    border-radius: 50%;
}

.honor-icon .material-symbols-outlined {
    font-size: 1.5rem;
    color: var(--bg-dark);
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.honor-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-main);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-darker);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    width: 100%;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all var(--transition-slow);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .grid-2 { grid-template-columns: 1fr; }
    .hero-title { font-size: 3rem; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: var(--bg-darker);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right var(--transition-slow);
        z-index: 1001;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1002;
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(5px);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-fast);
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .hero-title { font-size: 2.2rem; }
    
    #education .card {
        flex-direction: column;
        text-align: center;
    }

    .card-icon {
        margin-left: 0;
        margin-bottom: 1.5rem;
    }

    .timeline::before {
        right: 15px;
    }

    .timeline-dot {
        right: 9px;
    }

    .timeline-item {
        padding-right: 3rem;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}
