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

:root {
    --primary-color: #f3f3f3;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-primary: #e5e7eb;
    --text-secondary: #e5e7eb;
    --text-light: #9ca3af;
    --bg-primary: #040f20;
    --bg-secondary: #08101d;
    --bg-dark: #040916;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-dark: #0f172a;
    --border-color: #374151;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* RTL Support */
[dir="rtl"] {
    --text-align: right;
    --margin-start: margin-right;
    --margin-end: margin-left;
    --padding-start: padding-right;
    --padding-end: padding-left;
    --border-start: border-right;
    --border-end: border-left;
}

[dir="ltr"] {
    --text-align: left;
    --margin-start: margin-left;
    --margin-end: margin-right;
    --padding-start: padding-left;
    --padding-end: padding-right;
    --border-start: border-left;
    --border-end: border-right;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

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

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-brand h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.lang-toggle {
    background: #2563eb;
    color: rgb(231, 228, 233) !important;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 3;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.typing-text {
    display: inline-block;
    border-right: 3px solid white;
    animation: typing 3s steps(12) 1s 1 normal both, blink 1s infinite;
}

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

@keyframes blink {
    50% { border-color: transparent; }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #1d033f;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.profile-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.3; }
}

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

.scroll-arrow {
    color: white;
    font-size: 1.5rem;
    opacity: 0.7;
}

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

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Story Section */
.story {
    background: var(--bg-secondary);
    position: relative;
    z-index: 2;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 4;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background: #021d57;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cfd8e9;
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
    margin: 0 2rem;
}

.timeline-content {
    flex: 1;
    background: #0c1d38;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-medium);
    max-width: 350px;
    position: relative;
    z-index: 5;
}

.timeline-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Vision Section */
.vision {
    background: var(--bg-dark);
    color: white;
}

.vision .section-title,
.vision .section-subtitle {
    color: white;
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.vision-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.vision-card:hover {
    transform: translateY(-10px);
}

.vision-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.vision-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.vision-card p {
    opacity: 0.9;
    line-height: 1.6;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-category {
    background: #081529;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.skill-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.skill-link {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.skill-link:hover {
    color: var(--primary-color);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Achievements Section */
.achievements {
    background: var(--bg-secondary);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.achievement-card {
    background: #0c1d38;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
}

.achievement-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.achievement-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Connect Section */
.connect {
    background: var(--bg-primary);
}

.connect-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 40px;
}

.contact-item h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-form {
    background: #041124;
    padding: 2rem;
    border-radius: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 70px;
    }
    
    .timeline-icon {
        position: absolute;
        left: 0;
        margin: 0;
    }
    
    .timeline-content {
        max-width: none;
    }
    
    .connect-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* RTL Specific Styles */
[dir="rtl"] .timeline::before {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

[dir="rtl"] .timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

[dir="rtl"] .timeline-item:nth-child(even) {
    flex-direction: row;
}

[dir="rtl"] .nav-link::after {
    right: 0;
    left: auto;
}

[dir="rtl"] .typing-text {
    border-left: 3px solid white;
    border-right: none;
}

@media (max-width: 768px) {
    [dir="rtl"] .timeline::before {
        right: 30px;
        left: auto;
    }
    
    [dir="rtl"] .timeline-item {
        padding-right: 70px;
        padding-left: 0;
    }
    
    [dir="rtl"] .timeline-icon {
        right: 0;
        left: auto;
    }
}

/* Animation Classes */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}



/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle i:before {
    content: "\f185"; /* sun icon */
}

/* Contact Buttons */
.contact-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.contact-btn:hover::before {
    left: 100%;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.contact-btn i {
    font-size: 1.25rem;
}

.email-btn {
    background: linear-gradient(135deg, #351a7e, #220741);
}

.linkedin-btn {
    background: linear-gradient(135deg, #0077b5, #005885);
}

.github-btn {
    background: linear-gradient(135deg, #333, #24292e);
}

.twitter-btn {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #1ebe57);
}

.telegram-btn {
    background: linear-gradient(135deg, #0088cc, #006699);
}

/* Dark theme adjustments */
[data-theme="dark"] body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .hero {
    background: var(--bg-primary);
}

[data-theme="dark"] .story,
[data-theme="dark"] .vision,
[data-theme="dark"] .skills,
[data-theme="dark"] .achievements,
[data-theme="dark"] .connect {
    background: var(--bg-primary);
}

[data-theme="dark"] .timeline-item:nth-child(even) .timeline-content {
    background: var(--bg-secondary);
}

[data-theme="dark"] .vision-card,
[data-theme="dark"] .skill-category,
[data-theme="dark"] .achievement-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .contact-form input::placeholder,
[data-theme="dark"] .contact-form textarea::placeholder {
    color: var(--text-light);
}

/* Smooth theme transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Mobile responsiveness for contact buttons */
@media (max-width: 768px) {
    .contact-buttons {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle {
        margin-left: 0.5rem;
        width: 35px;
        height: 35px;
    }
}

