* { margin: 0; padding: 0; box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; line-height: 1.6; transition: all 0.3s ease; }
        body.light { background-color: #ffffff; color: #1f2937; }
        body.dark { background-color: #111827; color: #f9fafb; }
        header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; backdrop-filter: blur(10px); border-bottom: 1px solid; }
        body.light header { background-color: rgba(255, 255, 255, 0.9); border-bottom-color: #e5e7eb; }
        body.dark header { background-color: rgba(17, 24, 39, 0.9); border-bottom-color: #374151; }
        .header-container { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
        .logo { font-size: 1.25rem; font-weight: bold; background: linear-gradient(to right, #2563eb, #7c3aed); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
        nav { display: flex; gap: 2rem; align-items: center; }
        nav a { text-decoration: none; font-weight: 500; transition: color 0.3s; }
        body.light nav a { color: #4b5563; }
        body.dark nav a { color: #d1d5db; }
        nav a:hover { color: #2563eb; }
        .header-controls { display: flex; gap: 1rem; align-items: center; }
        .language-dropdown { position: relative; }
        .language-btn { padding: 0.5rem 1rem; border-radius: 0.5rem; border: none; cursor: pointer; font-weight: 500; }
        body.light .language-btn { background-color: #f3f4f6; color: #1f2937; }
        body.dark .language-btn { background-color: #374151; color: #f9fafb; }
        .language-menu { position: absolute; top: 100%; right: 0; margin-top: 0.5rem; border-radius: 0.5rem; box-shadow: 0 10px 25px rgba(0,0,0,0.1); display: none; min-width: 120px; }
        body.light .language-menu { background-color: #ffffff; border: 1px solid #e5e7eb; }
        body.dark .language-menu { background-color: #1f2937; border: 1px solid #374151; }
        .language-menu.active { display: block; }
        .language-menu button { display: block; width: 100%; padding: 0.75rem 1rem; border: none; background: none; text-align: left; cursor: pointer; }
        body.light .language-menu button:hover { background-color: #f3f4f6; }
        body.dark .language-menu button:hover { background-color: #374151; }
        .theme-toggle { background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 0.5rem; }
        .mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
        @media (max-width: 768px) {
            nav { display: none; width: 100%; flex-direction: column; gap: 1rem; padding: 1rem 0; }
            nav.active { display: flex; }
            .mobile-menu-btn { display: block; }
        }
        #home { padding: 8rem 2rem 4rem; text-align: center; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
        body.light #home { background: linear-gradient(to bottom right, #dbeafe, #ffffff, #f3e8ff); }
        body.dark #home { background: linear-gradient(to bottom right, #1e3a8a, #111827, #581c87); }
        .profile-pic { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; margin: 0 auto 2rem; cursor: pointer; transition: transform 0.3s; box-shadow: 0 20px 40px rgba(0,0,0,0.2); border: 4px solid #2563eb; display: block; }
        .profile-pic:hover { transform: scale(1.05); }
        .hero-title { font-size: 3rem; font-weight: bold; margin-bottom: 1rem; background: linear-gradient(to right, #2563eb, #7c3aed); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
        .hero-subtitle { font-size: 1.5rem; margin-bottom: 2rem; color: #6b7280; }
        section { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; }
        body.light section:nth-child(even) { background-color: #f9fafb; }
        body.dark section:nth-child(even) { background-color: #0f172a; }
        .section-title { font-size: 2.5rem; font-weight: bold; text-align: center; margin-bottom: 3rem; background: linear-gradient(to right, #2563eb, #7c3aed); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
        .cv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
        .cv-card { padding: 2rem; border-radius: 1rem; box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: transform 0.3s; }
        body.light .cv-card { background: linear-gradient(to bottom right, #dbeafe, #e0e7ff); }
        body.dark .cv-card { background: linear-gradient(to bottom right, #1e3a8a, #4c1d95); }
        .cv-card:hover { transform: translateY(-5px); }
        .cv-icon { font-size: 2rem; margin-bottom: 1rem; }
        .cv-card h3 { font-size: 1.25rem; font-weight: bold; margin-bottom: 0.5rem; }
        .download-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 1rem 2rem; border-radius: 2rem; border: none; font-weight: 600; cursor: pointer; text-decoration: none; background: linear-gradient(to right, #2563eb, #7c3aed); color: #ffffff; }
        .download-btn:hover { transform: scale(1.05); }
        .btn-center { text-align: center; }
        .cards-container { display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem; position: relative; }
        .card { flex: 0 0 300px; border-radius: 1rem; overflow: hidden; cursor: pointer; transition: transform 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
        body.light .card { background-color: #ffffff; }
        body.dark .card { background-color: #1f2937; }
        .card:hover { transform: scale(1.05); }
        .card img { width: 100%; height: 200px; object-fit: cover; background-color: #e5e7eb; }
        .card-content { padding: 1.5rem; }
        .card-badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 1rem; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.75rem; background-color: #fef3c7; color: #92400e; }
        .card h3 { font-size: 1.25rem; font-weight: bold; margin-bottom: 0.5rem; }
        .card p { font-size: 0.875rem; line-height: 1.5; color: #6b7280; }
        .view-details-btn { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; padding: 0.5rem 1rem; border-radius: 1.5rem; border: none; font-size: 0.875rem; font-weight: 600; cursor: pointer; background: linear-gradient(to right, #2563eb, #7c3aed); color: #ffffff; transition: transform 0.3s, box-shadow 0.3s; }
        .view-details-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4); }
        .hobbies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2rem; max-width: 900px; margin: 0 auto; }
        .hobby-item { text-align: center; padding: 2rem 1rem; border-radius: 1rem; }
        body.light .hobby-item { background-color: #f3f4f6; }
        body.dark .hobby-item { background-color: #1f2937; }
        .hobby-icon { font-size: 3rem; margin-bottom: 1rem; }
        .hobby-item h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
        footer { padding: 2rem; text-align: center; background-color: #111827; color: #9ca3af; border-top: 1px solid #374151; }
        .footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1rem; }
        .footer-links a { color: #60a5fa; text-decoration: none; }
        .footer-links a:hover { color: #2563eb; }
        .modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); }
        .modal.active { display: flex; align-items: center; justify-content: center; }
        .modal-content { position: relative; margin: 2rem; padding: 2rem; border-radius: 1rem; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; }
        body.light .modal-content { background-color: #ffffff; }
        body.dark .modal-content { background-color: #1f2937; }
        .modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 2rem; cursor: pointer; color: #6b7280; }
        .modal-img { width: 100%; border-radius: 0.5rem; margin-bottom: 1.5rem; }
        .modal h2 { font-size: 1.75rem; font-weight: bold; margin-bottom: 1rem; }
        .modal-info { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
        .modal-badge { padding: 0.5rem 1rem; border-radius: 0.5rem; font-weight: 500; background-color: #dbeafe; color: #1e40af; }
        .modal p { line-height: 1.8; }
        .view-certificate-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 1rem 2rem; border-radius: 2rem; border: none; font-weight: 600; cursor: pointer; text-decoration: none; background: linear-gradient(to right, #2563eb, #7c3aed); color: #ffffff; margin-top: 1.5rem; transition: transform 0.3s; }
        .view-certificate-btn:hover { transform: scale(1.05); }
        .modal-buttons { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; justify-content: center; }
        @media (min-width: 769px) {
            .cards-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); overflow-x: visible; }
            .card { flex: unset; }
        }
        .section-navigation { position: relative; margin-bottom: 2rem; }
        .nav-arrows { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; }
        .nav-arrow { background: linear-gradient(to right, #2563eb, #7c3aed); color: white; border: none; border-radius: 50%; width: 50px; height: 50px; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.3s; }
        .nav-arrow:hover { transform: scale(1.1); }
        .nav-arrow:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.hero-title {
  overflow: hidden;
  border-right: 3px solid #2563eb;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-right-color: transparent }
  50% { border-right-color: #2563eb }
}
.gallery-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: 250px;
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-caption h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.gallery-caption p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.gallery-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.4s ease;
}

.gallery-modal.active .gallery-modal-content {
    transform: scale(1);
}

.gallery-modal-img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-modal-caption {
    padding: 20px;
    text-align: center;
}

.gallery-modal-caption h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #1f2937;
}

.gallery-modal-caption p {
    color: #6b7280;
}

.gallery-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
}

.gallery-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
}

.gallery-modal-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

.gallery-modal-prev {
    left: 20px;
}

.gallery-modal-next {
    right: 20px;
}

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

.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .gallery-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .gallery-modal-prev {
        left: 10px;
    }
    
    .gallery-modal-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 250px;
    }
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: transparent;
    font-family: inherit;
}

body.dark .form-group input,
body.dark .form-group textarea {
    border-color: #374151;
    color: #f9fafb;
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #6b7280;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 0.5rem;
}

body.dark .form-group label {
    background: #111827;
    color: #d1d5db;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.8rem;
    font-size: 0.875rem;
    color: #2563eb;
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(to right, #2563eb, #7c3aed);
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

@keyframes blink-caret-rtl {
  from, to { border-left-color: transparent }
  50% { border-left-color: #2563eb }
}

html[dir="rtl"] .hero-title {
  border-right: none;
  border-left: 3px solid #2563eb;
  animation: typing 3.5s steps(40, end), blink-caret-rtl 0.75s step-end infinite;
}

html[dir="rtl"] .modal-close {
    right: auto;
    left: 1rem;
}

html[dir="rtl"] .gallery-modal-close {
    right: auto;
    left: 15px;
}

html[dir="rtl"] .gallery-modal-prev {
    left: auto;
    right: 20px;
    transform: translateY(-50%) scaleX(-1); /* Flip the arrow */
}

html[dir="rtl"] .gallery-modal-next {
    right: auto;
    left: 20px;
    transform: translateY(-50%) scaleX(-1); /* Flip the arrow */
}

@media (max-width: 768px) {
    html[dir="rtl"] .gallery-modal-prev {
        left: auto;
        right: 10px;
    }
    
    html[dir="rtl"] .gallery-modal-next {
        right: auto;
        left: 10px;
    }
}

html[dir="rtl"] .form-group label {
    left: auto;
    right: 1rem;
}

html[dir="rtl"] .form-group input:focus + label,
html[dir="rtl"] .form-group textarea:focus + label,
html[dir="rtl"] .form-group input:not(:placeholder-shown) + label,
html[dir="rtl"] .form-group textarea:not(:placeholder-shown) + label {
    left: auto;
    right: 0.8rem;
}
.floating-share {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.share-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.share-buttons {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

.share-buttons.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.share-btn:hover {
    background: #f8f9fa;
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Dark mode support */
body.dark .share-buttons {
    background: rgba(40, 40, 40, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
}

body.dark .share-btn {
    background: #2d2d2d;
    border-color: #444;
    color: white;
}

body.dark .share-btn:hover {
    background: #3d3d3d;
}

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