/* Root Variables */
:root {
    --font-primary: 'Inter', 'Tajawal', sans-serif;
    --font-heading: 'Cairo', 'Inter', sans-serif;
    --deep-green: #006C4C;
    --deep-green-dark: #004d36;
    --royal-gold: #FFD700;
    --royal-gold-dark: #D4AF37;
    --white: #FFFFFF;
    --black: #000000;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #FFFFFF;
    --card-bg: #FFFFFF;
    --section-bg: #FFFFFF;
    --section-alt-bg: #F8F9FA;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.1);
    --transition-standard: all 0.3s ease;
    
    /* Story mode colors */
    --story-bg: #111111;
    --story-bg-alt: #131313;
    --story-text: #e0e0e0;
    --story-section-border: rgba(255, 255, 255, 0.05);
    --story-card-bg: rgba(255, 255, 255, 0.05);
    --story-card-border: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-gray);
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Story mode body styles */
body.story-mode {
    background-color: var(--story-bg);
    /* color: var(--story-text); */
}

body.story-mode section {
    background-color: var(--story-bg);
    /* color: var(--story-text); */
    border-bottom: 1px solid var(--story-section-border);
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.story-mode section:nth-child(odd) {
    background-color: var(--story-bg-alt);
}

body.story-mode section:nth-child(even) {
    background-color: var(--story-bg);
}

body.story-mode .section-title {
    color: var(--royal-gold);
    opacity: 1 !important;
}

body.story-mode p {
    color: var(--royal-gold-dark);
    opacity: 1 !important;
}

body.story-mode .about-text {
    color: var(--royal-gold);
}

body.story-mode .testimonial-author h4 {
    color: var(--royal-gold);
}

body.story-mode .testimonial-author p {
    color: rgba(255, 255, 255, 0.8);
}

body.story-mode .testimonial-carousel {
    background: var(--story-card-bg);
    border: 1px solid var(--story-card-border);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

section {
    padding: 100px 0 80px;
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1; /* Change from 0 to 1 to make sections visible by default */
    transform: translateY(0); /* Change from translateY(30px) to position correctly */
    transition: opacity 0.8s ease, transform 0.8s ease;
    background-color: var(--section-bg, #fff); /* Add background color to ensure content is visible */
    display: block; /* Ensure sections are displayed as blocks */
    z-index: 1; /* Ensure proper stacking */
}

/* More specific display rules for sections */
body section {
    display: block !important;
}

section:not(:last-child) {
    margin-bottom: 20px;
}

section:nth-child(odd) {
    background-color: var(--white);
}

section:nth-child(even) {
    background-color: var(--light-gray);
}

section.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    display: block !important;
}

/* Ensure section content is visible */
section.visible .container,
section.visible .section-container,
section.visible .section-title,
section.visible p,
section.visible .about-content,
section.visible .timeline,
section.visible .vision-grid,
section.visible .projects-grid,
section.visible .contact-content,
section.visible .books-grid,
section.visible .testimonials-slider,
section.visible .message-content,
section.visible .stats-grid {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--deep-green);
    transition: var(--transition-standard);
}

/* Section Title */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    color: #006C4C;
    margin-bottom: 3rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-title::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 30px;
    height: 30px;
    border-top: 3px solid var(--deep-green);
    border-left: 3px solid var(--deep-green);
    opacity: 0.3;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--deep-green);
    border-radius: 2px;
}

.rtl .section-title::before {
    left: auto;
    right: -15px;
    border-left: none;
    border-right: 3px solid var(--deep-green);
}

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

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 700px;
    margin: -2rem auto 2.5rem;
    font-weight: 400;
}

.section-container {
    text-align: center;
    position: relative;
    margin-bottom: 60px;
}

.visible .section-title {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition-standard);
}

/* Story mode header styling */
.story-mode-header {
    background: rgba(17, 17, 17, 0.8);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

/* Header when scrolled in story mode */
.story-mode-header.scrolled {
    background: rgba(17, 17, 17, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Header when scrolled in normal mode */
header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.story-mode-header .logo,
.story-mode-header .nav-links a {
    /* color: var(--white); */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.story-mode-header.scrolled .logo,
.story-mode-header.scrolled .nav-links a {
    /* color: var(--white); */
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.story-mode-header .nav-links a:hover {
    color: var(--royal-gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.story-mode-header .nav-links a::after {
    background-color: var(--royal-gold);
}

.story-mode-header .menu-toggle span {
    background-color: white;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--deep-green);
}

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

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    font-size: 0.95rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--deep-green);
    transition: var(--transition-standard);
}

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

.nav-links a:hover {
    color: var(--deep-green);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--deep-green);
    transition: var(--transition-standard);
}

/* Home Section */
.home-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../assets/images/background.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    padding: 0;
    overflow: hidden;
    /* Add padding-top to account for the fixed header */
    padding-top: 80px;
}

.home-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 77, 54, 0.75) 0%, rgba(0, 108, 76, 0.75) 100%);
    z-index: 1;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.home-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    margin: 0 auto;
    /* Ensure content starts below the header */
    padding-top: 2rem;
}

.portrait {
    margin-bottom: 40px;
    position: relative;
    animation: floatAnimation 6s ease-in-out infinite;
    margin-top: 20px; /* Add top margin to ensure it's not covered by header */
}

.portrait-placeholder {
    width: 220px; /* Increase size slightly */
    height: 220px; /* Increase size slightly */
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--royal-gold);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.4);
    position: relative;
    background-color: transparent;
    transition: all 0.5s ease;
    z-index: 5; /* Ensure it's above other elements */
}

.portrait-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 70%);
    z-index: 2;
    pointer-events: none;
}

.portrait-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    animation: shine 8s infinite;
    z-index: 2;
}

.portrait-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.portrait:hover .portrait-placeholder {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.6);
}

.portrait:hover img {
    transform: scale(1.1);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
    position: relative;
    z-index: 2;
    text-shadow: none;
    transition: var(--transition-standard);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0%, 100% {
        color: var(--white);
    }
    50% {
        color: var(--royal-gold);
    }
}

.logo-subtitle {
    font-size: 1.5rem;
    color: var(--royal-gold);
    margin-bottom: 25px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: all 0.3s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.5rem;
    max-width: 800px;
    position: relative;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.9s;
}

.bio-brief {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 700px;
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 3px solid var(--royal-gold);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 1.1s;
}

.role-title {
    color: var(--royal-gold);
    font-weight: 600;
}

.tech-highlight {
    color: var(--royal-gold);
    font-weight: 600;
}

.cta-button {
    padding: 18px 38px;
    background: linear-gradient(45deg, var(--royal-gold), #ffdf33);
    color: var(--deep-green);
    border: none;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: pulse-button 2s infinite;
}

@keyframes pulse-button {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    background: linear-gradient(45deg, #ffdf33, var(--royal-gold));
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-25deg);
    transition: all 0.7s ease;
}

.cta-button:hover::after {
    left: 100%;
    transition: all 0.7s ease;
}

/* Keyframe Animations */
@keyframes float {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) translateX(20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) translateX(-15px) rotate(240deg);
    }
    100% {
        transform: translateY(-15px) translateX(10px) rotate(360deg);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    20% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .home-section {
        padding: 50px 0;
    }
    
    .portrait-placeholder {
        width: 150px;
        height: 150px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .logo-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}

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

/* Vision Section */
.vision-section {
    background-color: var(--section-bg, #f7f7f7);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    z-index: 1; /* Ensure section is visible */
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.vision-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    opacity: 1 !important;
    transform: translateY(0) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    min-height: 280px;
    z-index: 5; /* Ensure cards appear on top */
}

.vision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--deep-green), var(--royal-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.vision-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.vision-card:hover::before {
    transform: scaleX(1);
}

.vision-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: transparent;
    background: linear-gradient(135deg, #FFD700, #FFC107);
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
    position: relative;
}

.vision-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(255, 215, 0, 0) 70%);
    animation: pulse 2s infinite;
    z-index: -1;
}

.vision-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--deep-green);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress[data-value="85"] {
    background: linear-gradient(90deg, #FFD700, #FFA000);
}

.progress[data-value="70"] {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.progress[data-value="90"] {
    background: linear-gradient(90deg, #2196F3, #03A9F4);
}

.progress[data-value="80"] {
    background: linear-gradient(90deg, #9C27B0, #E040FB);
}

.progress {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.vision-card p {
    color: var(--royal-gold-dark);
    line-height: 1.6;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    opacity: 1;
}

/* Animation for vision icon pulse */
@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.7;
    }
}

/* Final Loop Section */
.final-loop-section {
    position: relative;
    min-height: 40vh;
    background: linear-gradient(135deg, #0b1623 0%, #0e1c2c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}

.quote-overlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    text-align: center;
    padding: 3.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.final-quote {
    font-size: 2.5rem;
    font-weight: 700;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.4;
    position: relative;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.final-quote::before {
    content: open-quote;
    position: absolute;
    font-size: 6rem;
    color: #006C4C;
    opacity: 0.5;
    top: -3.5rem;
    left: -2rem;
    text-shadow: none;
}

.back-to-top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #004d36 0%, #006C4C 100%);
    color: #fff;
    text-decoration: none;
    margin-top: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.back-to-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #006C4C 0%, #004d36 100%);
}

/* Project Cards */
.projects-section {
background-color: var(--section-alt-bg, #000);     /* Dark background for projects section */
    /* color: var(--text-light, #fff); */
    padding: 80px 0;
}

.projects-section .section-title {
    color: #006C4C;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 800;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: rgba(0, 30, 26, 0.75); /* Darker background for better text contrast */
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    opacity: 1;
    transform: translateY(0);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 108, 76, 0.3);
}

.project-card p {
    /* color: rgba(255, 255, 255, 0.9); Brighter text for better visibility */
    /* color: rgba(255, 255, 255, 0.95); Increased opacity for better contrast */
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    opacity: 1;
    flex-grow: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); /* Increased text shadow for better readability */
    font-weight: 500; /* Make text slightly bolder */
}

.project-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    color: #006C4C;
    text-shadow: 0 0 15px rgba(0, 108, 76, 0.6); 
}

.project-card h3 {
    color: var(--deep-green-dark);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.project-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, #006C4C, #FFD700);
    border-radius: 1.5px;
}

.project-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-btn {
    padding: 8px 16px;
    background: rgba(0, 230, 160, 0.2); /* Brighter background for better visibility */
    /* color: #ffffff; White text for better contrast */
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500; /* Slightly bolder text */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    border: 1px solid rgba(0, 230, 160, 0.4); /* Brighter border */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Add text shadow for readability */
}

.project-btn:hover {
    background: #00E6A0; /* Bright green on hover */
    color: #000; /* Black text on hover for contrast */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 230, 160, 0.4);
    font-weight: 600;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 500;
}

.form-group input, 
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    background-color: var(--white);
    transition: var(--transition-standard);
    font-family: var(--font-primary);
    color: var(--text-primary);
}

.form-group input:focus, 
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--deep-green);
    box-shadow: 0 0 0 3px rgba(0, 108, 76, 0.1);
}

.submit-btn {
    padding: 14px 30px;
    background: var(--deep-green);
    color: var(--white);
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #007d57;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #001e1a 0%, #004d36 100%);
    color: #fff;
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #FFD700, #006C4C, #FFD700);
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.footer-tagline {
    font-size: 1.1rem;
    color: var(--royal-gold);
    margin-top: 0.5rem;
    font-weight: 500;
    text-shadow: none;
}

.footer-links {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-nav h4,
.footer-social h4 {
    color: #FFD700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.footer-nav h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #FFD700;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav ul li {
    margin-bottom: 10px;
}

.footer-nav ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.footer-nav ul li a:hover {
    color: #FFD700;
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: #FFD700;
    color: #004d36;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-links {
        gap: 40px;
    }
    
    .footer-logo {
        font-size: 1.8rem;
    }
}

/* Media Queries */
@media (max-width: 992px) {
    .about-content, .contact-content {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: var(--transition-standard);
        z-index: 1000;
        align-items: center;
        text-align: center;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 1002;
    }
    
    /* Make the logo centered in mobile view */
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }
    
    /* Ensure menu toggle is visible and positioned correctly */
    .menu-toggle {
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .vision-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
    
    nav {
        padding: 15px 20px;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    /* Make language switcher not interfere with menu */
    .language-switcher {
        top: 85px;
        right: 20px;
        z-index: 999;
    }
    
    /* Improve the mobile menu items spacing */
    .nav-links a {
        padding: 12px 15px;
        display: block;
        width: 100%;
        font-size: 1.1rem;
    }
    
    .nav-links li {
        width: 100%;
        margin: 0;
    }
    
    /* Menu toggle improvements */
    .menu-toggle {
        width: 40px;
        height: 30px;
        margin-left: auto;
        z-index: 1002;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 60px 0;
    }
}

/* Animations and Particles Effects */
@keyframes float {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) translateX(20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) translateX(-15px) rotate(240deg);
    }
    100% {
        transform: translateY(-15px) translateX(10px) rotate(360deg);
    }
}

/* Word animation for hero title */
.hero-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* Section animations */
section {
    opacity: 1; /* Change from 0 to 1 to make sections visible by default */
    transform: translateY(0); /* Change from translateY(30px) to position correctly */
    transition: opacity 0.8s ease, transform 0.8s ease;
    background-color: var(--section-bg, #fff); /* Add background color to ensure content is visible */
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card animations */
.vision-card,
.project-card,
.book-card,
.stat-card,
.timeline-item .certificate {
    /* background: var(--white); */
    background: linear-gradient(135deg, rgba(0, 108, 76, 0.03), rgba(0, 108, 76, 0.08));

    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    opacity: 1 !important;
    transform: translateY(0) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.vision-card:hover,
.project-card:hover,
.book-card:hover,
.stat-card:hover,
.timeline-item .certificate:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.vision-card::before,
.project-card::before,
.book-card::before,
.stat-card::before,
.timeline-item .certificate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--deep-green), var(--royal-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.vision-card:hover::before,
.project-card:hover::before,
.book-card:hover::before,
.stat-card:hover::before,
.timeline-item .certificate:hover::before {
    transform: scaleX(1);
}

/* Progress bar animation */
.progress {
    position: relative;
    height: 6px;
    width: 0;
    background: linear-gradient(to right, var(--royal-gold), var(--deep-green));
    border-radius: 3px;
    transition: width 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 8px rgba(0, 108, 76, 0.3);
}

/* Button hover effects */
.cta-button {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background-color: var(--deep-green);
    color: white;
}

/* Tech highlight and role title animations */
.tech-highlight,
.role-title {
    position: relative;
    display: inline-block;
    color: var(--royal-gold);
    font-weight: 600;
}

.tech-highlight::after,
.role-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--royal-gold);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.tech-highlight:hover::after,
.role-title:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Portrait image styling */
.portrait {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 3px solid white;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portrait:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.portrait img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.portrait:hover img {
    transform: scale(1.05);
}

/* Logo subtitle styling */
.logo-subtitle {
    display: block;
    margin-top: 5px;
    font-size: 16px;
    color: var(--royal-gold);
    letter-spacing: 1px;
    opacity: 0.9;
    transform: translateY(10px);
}

/* Timeline Styles */
.timeline {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 50px;
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--deep-green), transparent);
    opacity: 0.3;
    transform: translateX(-50%);
}

.timeline-item {
    width: 100%;
    max-width: 340px;
    margin-bottom: 40px;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), 
                opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 40px;
    right: -30px;
    width: 20px;
    height: 20px;
    background: var(--deep-green);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(0, 108, 76, 0.1);
}

.timeline-item:nth-child(even) {
    margin-top: 100px;
}

.visible .timeline-item,
.timeline-item.visible {
    transform: translateY(0);
    opacity: 1;
}

.visible .timeline-item:nth-child(1),
.timeline-item:nth-child(1).visible {
    transition-delay: 0.2s;
}

.visible .timeline-item:nth-child(2),
.timeline-item:nth-child(2).visible {
    transition-delay: 0.4s;
}

.visible .timeline-item:nth-child(3),
.timeline-item:nth-child(3).visible {
    transition-delay: 0.6s;
}

.certificate {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition-standard);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.certificate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--deep-green), var(--royal-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.certificate:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.certificate:hover::before {
    transform: scaleX(1);
}

/* Certificate shine animation */
.certificate.animate-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    animation: certificateShine 3s ease-in-out infinite;
}

@keyframes certificateShine {
    0% {
        left: -100%;
    }
    20%, 100% {
        left: 100%;
    }
}

.cert-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: linear-gradient(135deg, var(--deep-green), var(--royal-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Icon pulse animation */
.cert-icon.pulse-effect {
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.year-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--deep-green), var(--royal-gold));
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.certificate h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--deep-green);
    font-weight: 600;
}

.certificate p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        max-width: 100%;
        padding-left: 40px;
    }
    
    .timeline-item::before {
        left: 10px;
        right: auto;
    }
}

/* Experience Section */
.experience-section {
    position: relative;
    overflow: hidden;
    background-color: var(--white);
}

.experience-section .section-title {
    margin-bottom: 2rem;
}

/* Books Section */
.books-section {
    position: relative;
    overflow: hidden;
    background-color: var(--white);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.book-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition-standard);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), 
                opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.3s ease;
}

.visible .book-card,
.book-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.visible .book-card:nth-child(1),
.book-card:nth-child(1).visible {
    transition-delay: 0.2s;
}

.visible .book-card:nth-child(2),
.book-card:nth-child(2).visible {
    transition-delay: 0.4s;
}

.visible .book-card:nth-child(3),
.book-card:nth-child(3).visible {
    transition-delay: 0.6s;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

/* Book covers styling */
.book-cover {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 10px;
    background-color: #f5f5f5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.book-card:nth-child(1) .book-cover {
    background-image: url('../assets/images/book1.png');
    background-size: cover;
    background-position: center;
}

.book-card:nth-child(2) .book-cover {
    background-image: url('../assets/images/book2.png');
    background-size: cover;
    background-position: center;
}

.book-card:nth-child(3) .book-cover {
    background-image: url('../assets/images/book3.png');
    background-size: cover;
    background-position: center;
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.3));
    z-index: 1;
}

.book-cover::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(30deg);
    transition: transform 0.7s ease;
}

.book-cover:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.book-cover:hover::after {
    transform: rotate(30deg) translateX(300%);
}

.book-card:hover .book-cover::before {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4));
}

.book-details {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-details h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--deep-green);
    font-weight: 600;
}

.book-details p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex: 1;
}

.book-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.book-btn {
    display: inline-block;
    padding: 8px 10px;
    font-size: 0.85rem;
    text-align: center;
    border-radius: 20px;
    transition: var(--transition-standard);
    white-space: nowrap;
}

.book-btn.preview {
    background-color: rgba(0, 108, 76, 0.1);
    color: var(--deep-green);
}

.book-btn.download {
    background-color: rgba(0, 108, 76, 0.2);
    color: var(--deep-green);
}

.book-btn.listen {
    background-color: rgba(255, 215, 0, 0.2);
    color: #a87900;
}

.book-btn.order {
    background-color: rgba(255, 215, 0, 0.3);
    color: #a87900;
}

.book-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.book-btn.preview:hover {
    background-color: var(--deep-green);
    color: white;
}

.book-btn.download:hover {
    background-color: var(--deep-green);
    color: white;
}

.book-btn.listen:hover, 
.book-btn.order:hover {
    background-color: var(--royal-gold);
    color: var(--deep-green);
}

/* Book Quote Styles */
.book-quotes {
    margin-top: 60px;
    position: relative;
    text-align: center;
    width: 100%;
    padding: 30px 0;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.quotes-title {
    color: var(--deep-green);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.quotes-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--deep-green), var(--royal-gold));
    border-radius: 3px;
}

.quote-slider {
    position: relative;
    min-height: 180px;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: linear-gradient(to right, rgba(0, 108, 76, 0.02), rgba(0, 108, 76, 0.08), rgba(0, 108, 76, 0.02));
    border-radius: var(--border-radius);
    overflow: hidden;
}

.quote-slider::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 25px;
    width: 50px;
    height: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23006C4C' opacity='0.2'%3E%3Cpath d='M6.5 10c-.223 0-.437.034-.65.065.069-.232.14-.468.254-.68.114-.308.292-.575.469-.844.148-.291.409-.488.601-.737.201-.242.475-.403.692-.604.213-.21.492-.315.714-.463.232-.133.434-.28.65-.35.208-.086.39-.16.539-.222.302-.125.474-.197.474-.197L9.758 4.03c0 0-.218.052-.597.144C8.97 4.222 8.737 4.278 8.472 4.345c-.271.05-.56.187-.882.312C7.272 4.799 6.904 4.895 6.562 5.123c-.344.218-.741.4-1.091.692C5.132 6.116 4.723 6.377 4.421 6.76c-.33.358-.656.734-.909 1.162C3.219 8.33 3.02 8.778 2.81 9.221c-.19.443-.343.896-.468 1.336-.237.882-.343 1.72-.384 2.437-.034.718-.014 1.315.028 1.747.015.204.043.402.063.539.017.109.025.168.025.168l.026-.006C2.535 17.474 4.338 19 6.5 19c2.485 0 4.5-2.015 4.5-4.5S8.985 10 6.5 10zM17.5 10c-.223 0-.437.034-.65.065.069-.232.14-.468.254-.68.114-.308.292-.575.469-.844.148-.291.409-.488.601-.737.201-.242.475-.403.692-.604.213-.21.492-.315.714-.463.232-.133.434-.28.65-.35.208-.086.39-.16.539-.222.302-.125.474-.197.474-.197L20.758 4.03c0 0-.218.052-.597.144-.191.048-.424.104-.689.171-.271.05-.56.187-.882.312-.317.143-.686.238-1.028.467-.344.218-.741.4-1.091.692-.339.301-.748.562-1.05.944-.33.358-.656.734-.909 1.162C14.219 8.33 14.02 8.778 13.81 9.221c-.19.443-.343.896-.468 1.336-.237.882-.343 1.72-.384 2.437-.034.718-.014 1.315.028 1.747.015.204.043.402.063.539.017.109.025.168.025.168l.026-.006C13.535 17.474 15.338 19 17.5 19c2.485 0 4.5-2.015 4.5-4.5S19.985 10 17.5 10z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.quote-slider::after {
    content: '';
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23006C4C' opacity='0.2'%3E%3Cpath d='M6.5 10c-.223 0-.437.034-.65.065.069-.232.14-.468.254-.68.114-.308.292-.575.469-.844.148-.291.409-.488.601-.737.201-.242.475-.403.692-.604.213-.21.492-.315.714-.463.232-.133.434-.28.65-.35.208-.086.39-.16.539-.222.302-.125.474-.197.474-.197L9.758 4.03c0 0-.218.052-.597.144C8.97 4.222 8.737 4.278 8.472 4.345c-.271.05-.56.187-.882.312C7.272 4.799 6.904 4.895 6.562 5.123c-.344.218-.741.4-1.091.692C5.132 6.116 4.723 6.377 4.421 6.76c-.33.358-.656.734-.909 1.162C3.219 8.33 3.02 8.778 2.81 9.221c-.19.443-.343.896-.468 1.336-.237.882-.343 1.72-.384 2.437-.034.718-.014 1.315.028 1.747.015.204.043.402.063.539.017.109.025.168.025.168l.026-.006C2.535 17.474 4.338 19 6.5 19c2.485 0 4.5-2.015 4.5-4.5S8.985 10 6.5 10zM17.5 10c-.223 0-.437.034-.65.065.069-.232.14-.468.254-.68.114-.308.292-.575.469-.844.148-.291.409-.488.601-.737.201-.242.475-.403.692-.604.213-.21.492-.315.714-.463.232-.133.434-.28.65-.35.208-.086.39-.16.539-.222.302-.125.474-.197.474-.197L20.758 4.03c0 0-.218.052-.597.144-.191.048-.424.104-.689.171-.271.05-.56.187-.882.312-.317.143-.686.238-1.028.467-.344.218-.741.4-1.091.692-.339.301-.748.562-1.05.944-.33.358-.656.734-.909 1.162C14.219 8.33 14.02 8.778 13.81 9.221c-.19.443-.343.896-.468 1.336-.237.882-.343 1.72-.384 2.437-.034.718-.014 1.315.028 1.747.015.204.043.402.063.539.017.109.025.168.025.168l.026-.006C13.535 17.474 15.338 19 17.5 19c2.485 0 4.5-2.015 4.5-4.5S19.985 10 17.5 10z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(180deg);
    opacity: 0.15;
    z-index: 0;
}

.quote-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    z-index: 1;
}

.quote-slide.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.quote-slide p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--deep-green);
    font-style: italic;
    font-weight: 500;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    position: relative;
    z-index: 2;
}

.quote-navigation {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.quote-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 108, 76, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quote-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--deep-green), var(--royal-gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quote-dot:hover {
    transform: scale(1.2);
}

.quote-dot.active {
    transform: scale(1.2);
}

.quote-dot.active::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .book-buttons {
        grid-template-columns: 1fr;
    }
    
    .quote-slide p {
        font-size: 1rem;
        padding: 0 15px;
    }

    .quote-slider {
        min-height: 200px;
        padding: 30px 15px;
    }
}

/* Message Section Styling */
.message-section {
    background-color: var(--section-bg);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
    align-items: center;
}

.video-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.video-placeholder {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    background-color: #000;
    transition: all 0.4s ease;
    cursor: pointer;
    border: 3px solid var(--royal-gold-dark);
}

.video-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8));
    z-index: 1;
    transition: background 0.4s ease;
}

.message-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.video-placeholder:hover .message-image {
    transform: scale(1.05);
}

.play-button {
    width: 80px;
    height: 80px;
    background: linear-gradient(145deg, #ffd700, #d4af37);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 5;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.play-button i {
    color: #004d36;
    font-size: 30px;
    position: relative;
    left: 2px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
    transition: all 0.2s ease;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.7);
    animation: pulse 2s infinite;
}

.play-button:hover i {
    transform: scale(1.1);
}

/* Loading state */
.play-button.loading {
    background: linear-gradient(145deg, #e6c300, #c9a633);
}

.play-button.loading i {
    animation: spinLoading 1.5s infinite linear;
    transform-origin: center;
}

/* Playing state */
.play-button.playing {
    background: linear-gradient(145deg, #e6c300, #c9a633);
}

.play-button.playing i {
    transform: scale(0.9);
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .play-button {
        width: 65px;
        height: 65px;
    }
    
    .play-button i {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .play-button {
        width: 55px;
        height: 55px;
    }
    
    .play-button i {
        font-size: 20px;
    }
}

.media-notification {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    z-index: 3;
    animation: fadeIn 0.5s ease-in-out;
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.message-text {
    text-align: center;
    max-width: 700px;
    margin: 30px auto 0;
    padding: 20px;
    position: relative;
}

.message-text p {
    font-size: 1.8rem;
    line-height: 1.4;
    font-weight: 500;
    color: var(--deep-green-dark);
    font-style: italic;
    position: relative;
}

.message-text p::before,
.message-text p::after {
    color: var(--royal-gold);
    font-size: 2.5rem;
    line-height: 0;
    position: absolute;
}

.message-text p::before {
    content: "";
    left: -25px;
    top: 15px;
}

.message-text p::after {
    content: "";
    margin-left: 5px;
}

@media (max-width: 768px) {
    .message-content {
        flex-direction: column;
    }
    
    .video-container {
        width: 100%;
    }
    
    .message-text p {
        font-size: 1.2rem;
        padding: 15px 30px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-button i {
        font-size: 1.2rem;
    }
}

/* Achievements Section */
.achievements-section {
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(0, 108, 76, 0.03), rgba(0, 108, 76, 0.08));
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 108, 76, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--deep-green), var(--royal-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
    background: linear-gradient(135deg, var(--deep-green), var(--royal-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.stat-icon::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 108, 76, 0.05);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 2s infinite;
}

.stat-counter {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--deep-green);
    line-height: 1;
    background: linear-gradient(135deg, var(--deep-green), var(--royal-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-card p {
    color: var(--royal-gold-dark);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* Story Mode Styles */
.story-navigation {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1001;
}

.story-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(0, 108, 76, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.story-dot:hover, .story-dot.active {
    background-color: var(--deep-green);
    transform: scale(1.2);
}

.story-dot::after {
    content: attr(title);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.story-dot:hover::after {
    opacity: 1;
}

.story-caption {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 1000;
    text-align: center;
    max-width: 80%;
}

.story-caption.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.section-transition {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
}

/* Add transition types styling */
.transition-fade {
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0));
    transition: opacity 0.8s ease;
}

.transition-slide {
    background: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0));
    transform: translateX(-100%);
    transition: transform 1s ease, opacity 1s ease;
}

.transition-zoom {
    background: radial-gradient(circle at center, rgba(0,0,0,0.5), rgba(0,0,0,0));
    transform: scale(0.8);
    transition: transform 1s ease, opacity 1s ease;
}

.transition-page-turn {
    background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0));
    transform-origin: left center;
    transform: perspective(1000px) rotateY(-90deg);
    transition: transform 1.2s ease, opacity 1s ease;
}

/* Current chapter transitions */
.current-chapter .transition-fade {
    opacity: 0.1;
}

.current-chapter .transition-slide {
    transform: translateX(0);
    opacity: 0.1;
}

.current-chapter .transition-zoom {
    transform: scale(1);
    opacity: 0.1;
}

.current-chapter .transition-page-turn {
    transform: perspective(1000px) rotateY(0deg);
    opacity: 0.1;
}

.story-animated {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.current-chapter .story-animated {
    opacity: 1;
    transform: translateY(0);
}

.auto-scroll-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--royal-gold);
    padding: 10px 15px;
    border-radius: 30px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.auto-scroll-toggle:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.auto-scroll-toggle .toggle-switch {
    width: 36px;
    height: 20px;
    background-color: #555;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.auto-scroll-toggle .toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.auto-scroll-toggle.active .toggle-switch {
    background-color: var(--royal-gold);
}

.auto-scroll-toggle.active .toggle-switch::after {
    left: 18px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-counter {
        font-size: 2.5rem;
    }
    
    .story-navigation {
        right: 10px;
    }
    
    .story-dot {
        width: 10px;
        height: 10px;
    }
    
    .story-dot::after {
        display: none;
    }
    
    .auto-scroll-toggle {
        padding: 8px 12px;
        font-size: 12px;
        bottom: 80px;
        left: 10px;
    }
    
    .audio-toggle {
        bottom: 20px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

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

/* Opening Scene Styles */
.opening-scene {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #004d36 0%, #006C4C 100%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    transition: opacity 1s ease, visibility 1s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.opening-scene.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.hero-figure, 
.hero-titles, 
.enter-button {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 9999 !important;
}

.hero-titles .hero-name { 
    color: var(--royal-gold);
}

.hero-portrait img {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.enter-button {
    padding: 1rem 2.5rem !important;
    background: #FFD700 !important;
    color: #000 !important;
    border: none !important;
    border-radius: 30px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    position: relative !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.3s ease !important;
    animation: buttonGlow 2s ease-in-out infinite !important;
}

.enter-button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4) !important;
}

@keyframes buttonGlow {
    0% {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 5px 30px rgba(255, 215, 0, 0.5);
    }
    100% {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
}

/* Mode selector overlay */
#mode-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none; /* Will be set to flex when shown */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

/* Section Background Colors */
.vision-section,
.experience-section,
.books-section,
.achievements-section {
    background-color: var(--section-bg, #fff);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    z-index: 1;
}

/* Title Styling */
.vision-section .section-title,
.experience-section .section-title,
.books-section .section-title,
.achievements-section .section-title {
    color: #006C4C;
}

.vision-section .section-title span,
.experience-section .section-title span,
.books-section .section-title span,
.achievements-section .section-title span {
    color: #006C4C;
}

/* Updated Contact Section */
.contact-section {
    position: relative;
    padding: 80px 0;
    background-color: var(--dark-bg);
    overflow: hidden;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-info {
    background-color: rgba(10, 10, 10, 0.5);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-item i {
    font-size: 20px;
    color: var(--royal-gold);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 108, 76, 0.2), rgba(183, 141, 11, 0.2));
    border-radius: 50%;
}

.contact-item p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
    flex: 1;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 108, 76, 0.1), rgba(183, 141, 11, 0.1));
    border-radius: 50%;
    color: var(--royal-gold);
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(0, 108, 76, 0.2), rgba(183, 141, 11, 0.2));
    color: var(--royal-gold-light);
}

/* RTL specific styles for contact section */
html[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .social-links {
    justify-content: flex-end;
}

/* Code Animation Styles */
.code-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    opacity: 0.3;
}

.code-line {
    position: absolute;
    font-family: 'Courier New', monospace;
    color: #16db93;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    text-shadow: 0 0 5px rgba(22, 219, 147, 0.7);
    opacity: 0;
    transform: translateY(-20px);
    animation: codeFadeIn 0.5s forwards, codeFloat 30s linear;
}

@keyframes codeFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 0.8;
        transform: translateY(0);
    }
}

@keyframes codeFloat {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(2000px);
    }
}

.gold-spark {
    position: absolute;
    width: 3px;
    height: 3px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    border-radius: 50%;
    filter: blur(1px);
    box-shadow: 0 0 10px #ffd700, 0 0 20px rgba(255, 215, 0, 0.5);
    z-index: 2;
    opacity: 0;
    animation: sparkFadeIn 0.3s forwards, sparkFloat 3s linear;
    animation-iteration-count: 1, 1;
    animation-fill-mode: forwards, forwards;
}

/* Add variation for larger sparks */
.gold-spark.large {
    width: 5px;
    height: 5px;
    filter: blur(2px);
    box-shadow: 0 0 15px #ffd700, 0 0 25px rgba(255, 215, 0, 0.6);
}

/* Enhanced gold spark for more visibility */
.code-container .gold-spark {
    width: 4px;
    height: 4px;
    filter: blur(1.5px);
    box-shadow: 0 0 15px #ffd700, 0 0 30px rgba(255, 215, 0, 0.7);
    animation-duration: 0.2s, 4s;
}

.code-container .gold-spark.large {
    width: 6px;
    height: 6px;
    filter: blur(2.5px);
    box-shadow: 0 0 20px #ffd700, 0 0 35px rgba(255, 215, 0, 0.8);
}

@keyframes sparkFadeIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes sparkFloat {
    0% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-10px) translateX(5px);
    }
    50% {
        transform: translateY(-15px) translateX(-5px);
    }
    75% {
        transform: translateY(-20px) translateX(3px);
    }
    100% {
        transform: translateY(-30px) translateX(0);
        opacity: 0;
    }
}

/* About Section Image - Updated with smaller size */
.about-image {
    max-width: 220px;
    margin: 0 auto 2rem;
    position: relative;
}

.about-image img {
    width: 180px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0 auto;
    border: 3px solid #fff;
    transition: all 0.3s ease;
}

.about-image:hover img {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments for about image */
@media (max-width: 768px) {
    .about-image {
        max-width: 180px;
    }
    
    .about-image img {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .about-image {
        max-width: 150px;
    }
    
    .about-image img {
        width: 120px;
    }
}

.image-frame {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid var(--royal-gold);
    border-radius: 15px;
    z-index: -1;
}

/* Fix Arabic text rendering */
[data-ar] {
    white-space: normal;
    word-break: normal;
}

.hero-title[data-ar], 
.logo-subtitle[data-ar],
.hero-subtitle[data-ar],
.section-title[data-ar="من هو فيصل؟"] span,
.section-title[data-ar="مشاريع غيرت الحياة"] span,
.section-title[data-ar="المخترع المجنون"] span {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    text-rendering: optimizeLegibility;
    white-space: normal;
}

.hero-subtitle[data-ar] .role-title,
.hero-subtitle[data-ar] .tech-highlight {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    display: inline-block;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.lang-btn.active {
    background: #FFD700;
    color: #004d36;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Mode Switcher */
.mode-switcher {
    display: flex;
    align-items: center;
    margin-left: 20px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.mode-switcher:hover {
    background: rgba(0, 0, 0, 0.1);
}

.mode-switcher span {
    margin-right: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.mode-toggle {
    width: 36px;
    height: 18px;
    background: #ddd;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.story-mode .mode-toggle {
    background: #FFD700;
}

body.story-mode .toggle-btn {
    left: 20px;
}

.audio-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: var(--royal-gold);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.audio-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.audio-toggle i {
    font-size: 1.2rem;
}

.audio-toggle.audio-unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

/* RTL Support for Arabic */
.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
}

.rtl .nav-links {
    flex-direction: row-reverse;
}

.rtl .logo {
    margin-right: 0;
    margin-left: 2rem;
}

.rtl .section-title::before {
    right: 0;
    left: auto;
}

.rtl .hero-text {
    text-align: right;
}

.rtl .project-actions,
.rtl .book-buttons,
.rtl .social-icons,
.rtl .footer-links {
    flex-direction: row-reverse;
}

.rtl .timeline::before {
    left: auto;
    right: 20px;
}

.rtl .timeline-item {
    padding-left: 0;
    padding-right: 50px;
}

.rtl .timeline-item::before {
    left: auto;
    right: 15px;
}

.rtl .testimonial-navigation {
    flex-direction: row-reverse;
}

.rtl .contact-item {
    flex-direction: row-reverse;
}

.rtl .contact-item i {
    margin-right: 0;
    margin-left: 1rem;
}

@media (max-width: 768px) {
    .rtl .nav-links {
        right: -100%;
        left: auto;
        text-align: right;
    }
    
    .rtl .nav-links.active {
        right: 0;
        left: auto;
    }
    
    .rtl .menu-toggle {
        margin-left: 0;
        margin-right: auto;
    }
    
    /* For RTL mobile */
    .rtl .logo {
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }
    
    .rtl nav {
        display: flex;
        flex-direction: row-reverse;
    }
    
    /* Adjust padding for mobile menu items in RTL */
    .rtl .nav-links a {
        padding: 12px 20px;
        text-align: right;
    }
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-right: 2rem;
    position: relative;
    z-index: 1003; /* Ensure logo is above mobile menu */
}

.logo-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo-link:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Enhanced RTL Support for Contact Section */
.rtl .contact-item {
    flex-direction: row-reverse;
    text-align: right;
}

.rtl .contact-item i {
    margin-right: 0;
    margin-left: 1.5rem;
    background: rgba(0, 108, 76, 0.15);
}

.rtl .contact-item p {
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
}

.rtl .contact-info {
    text-align: right;
}

.rtl .social-links {
    justify-content: flex-start;
}

/* Ensure icons have proper spacing in RTL mode */
.rtl .contact-details i.fas,
.rtl .social-links i.fab {
    font-size: 1.3rem;
}

/* Add enhanced hover effect for RTL mode */
.rtl .contact-item:hover i {
    transform: scale(1.1);
    background: rgba(0, 108, 76, 0.25);
    transition: all 0.3s ease;
}

/* Contact section animation in RTL mode */
.rtl .contact-details .contact-item {
    transform: translateX(20px);
    opacity: 0;
    animation: rtlSlideIn 0.5s forwards;
}

.rtl .contact-details .contact-item:nth-child(1) {
    animation-delay: 0.1s;
}

.rtl .contact-details .contact-item:nth-child(2) {
    animation-delay: 0.3s;
}

.rtl .contact-details .contact-item:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes rtlSlideIn {
    0% {
        transform: translateX(20px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.rtl .contact-item {
    flex-direction: row-reverse;
    text-align: right;
}

.rtl .contact-item i {
    margin-right: 0;
    margin-left: 1.5rem;
    background: rgba(0, 108, 76, 0.15);
    transition: all 0.3s ease;
}

/* Mobile styles for RTL contact section */
@media (max-width: 768px) {
    .rtl .contact-info {
        padding: 2rem 1.5rem;
    }
    
    .rtl .contact-item i {
        margin-left: 1rem;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .rtl .social-links {
        justify-content: center;
        margin-top: 1.5rem;
    }
}