/* ===== CSS Variables ===== */
:root {
    /* Light Mode (Default) */
    --color-bg: #f5f5f0;
    --color-surface: #ffffff;
    --color-text: #1a2e1a;
    --color-text-muted: #4a5d4a;
    --color-accent: #1a5f4a;
    --color-accent-hover: #0d4a38;
    --color-accent-light: rgba(26, 95, 74, 0.1);
    --color-border: #d4d9d4;
    --color-gold: #b8860b;
    --color-hero-overlay: rgba(26, 46, 26, 0.75);
    --nav-bg: rgba(26, 46, 26, 0.95);
    --nav-text: #f5f5f0;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    --color-bg: #0d1a14;
    --color-surface: #142420;
    --color-text: #e8ede8;
    --color-text-muted: #9aaa9a;
    --color-accent: #4ecca3;
    --color-accent-hover: #6fe4b8;
    --color-accent-light: rgba(78, 204, 163, 0.15);
    --color-border: #2a3d34;
    --color-gold: #d4a520;
    --color-hero-overlay: rgba(13, 26, 20, 0.8);
    --nav-bg: rgba(13, 26, 20, 0.95);
    --nav-text: #e8ede8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navigation - Full Width ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--nav-text);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: var(--transition);
}

.logo:hover {
    color: var(--color-gold);
}

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

.nav-links a {
    color: var(--nav-text);
    opacity: 0.85;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--color-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: width 0.3s ease;
}

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

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--nav-text);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--color-gold);
}

/* ===== Hero Section with Background Image ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-hero-overlay);
    z-index: 1;
}

/* Subtle geometric pattern overlay - Islamic inspired */
.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M30 0l30 30-30 30L0 30z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Picture */
.profile-picture {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.profile-picture:hover {
    transform: scale(1.05);
    border-color: var(--color-gold);
}

/* Profile picture placeholder if no image */
.profile-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: white;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

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

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    stroke: rgba(255, 255, 255, 0.6);
}

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

/* ===== Main Content ===== */
main {
    background: var(--color-bg);
}

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

/* ===== Section Titles ===== */
.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-gold);
    margin: 1rem auto 0;
}

/* ===== Project Filter ===== */
.project-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.filter-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* ===== Projects Grid ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}

.project-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-image-wrapper {
    overflow: hidden;
    position: relative;
}

.project-category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.project-description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Hidden class for filtering */
.project-card.hidden {
    display: none;
}

/* ===== Document Pages (Resume, CV) ===== */
.document-page {
    padding-top: 80px;
}

.document-header {
    text-align: center;
    padding: 4rem 2rem 2rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.document-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.document-subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.document-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.document-section {
    margin-bottom: 3rem;
}

.document-section h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.document-section h3 {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.document-section p,
.document-section li {
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.document-section ul {
    list-style-position: inside;
    padding-left: 1rem;
}

/* Document Download Section */
.document-actions {
    text-align: center;
    padding: 2rem;
    background: var(--color-accent-light);
    border-radius: 12px;
    margin-top: 3rem;
}

.document-actions p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

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

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

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

.btn-secondary:hover {
    background: var(--color-accent);
    color: white;
}

/* ===== Contact Page ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
}

.contact-card svg {
    width: 48px;
    height: 48px;
    stroke: var(--color-accent);
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.contact-card a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* ===== Footer ===== */
footer {
    background: var(--nav-bg);
    color: var(--nav-text);
    text-align: center;
    padding: 2rem;
}

footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

footer a {
    color: var(--color-gold);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== Google Docs Embed ===== */
.google-docs-embed {
    width: 100%;
    height: 800px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin: 2rem 0;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .profile-picture,
    .profile-placeholder {
        width: 140px;
        height: 140px;
    }

    .profile-placeholder {
        font-size: 2.5rem;
    }

    .container {
        padding: 3rem 1.5rem;
    }

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

    .document-content {
        padding: 2rem 1.5rem;
    }

    .project-filter {
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: 1.25rem;
    }

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

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}
