:root {
    --ln-primary: #0A66C2;
    --ln-primary-dark: #004182;
    --ln-accent: #8AB4F8;
    --ln-bg: #F3F2EF;
    --ln-ink: #1D1D1D;
    --ln-muted: #6E6E6E;
    --ln-white: #FFFFFF;
    --ln-border: #E0E0E0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 8px;
}

[data-theme="dark"] {
    --ln-bg: #1B1F23;
    --ln-white: #2D3339;
    --ln-ink: #F1F2F2;
    --ln-muted: #B0B7BD;
    --ln-border: #3E4651;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--ln-bg);
    color: var(--ln-ink);
    line-height: 1.6;
    transition: all 0.3s ease;
}

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

/* Header */
.header {
    background: var(--ln-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--ln-primary);
}

.header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

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

.btn-primary:hover {
    background: var(--ln-primary-dark);
}

.btn-secondary {
    background: var(--ln-border);
    color: var(--ln-ink);
}

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

/* Hero Section */
.hero {
    background: var(--ln-white);
    padding: 60px 0;
    margin: 20px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: center;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--ln-primary);
    object-fit: cover;
    background: var(--ln-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--ln-primary);
}

.hero-info h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--ln-ink);
}

.hero-info .title {
    font-size: 1.3rem;
    color: var(--ln-primary);
    margin-bottom: 20px;
    font-weight: 500;
}

.hero-info .summary {
    font-size: 1.1rem;
    color: var(--ln-muted);
    line-height: 1.7;
    margin-bottom: 30px;
}

/* Contact Info */
.contact-info {
    background: var(--ln-white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 20px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--ln-bg);
}

.contact-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ln-primary);
    color: var(--ln-white);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-left: auto;
}

.contact-action-btn:hover {
    background: var(--ln-primary-dark);
    transform: scale(1.1);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: var(--ln-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--ln-primary-dark);
    transform: translateY(-2px);
}

/* Section Styles */
.section {
    background: var(--ln-white);
    margin: 20px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-header {
    background: var(--ln-primary);
    color: white;
    padding: 20px 30px;
    font-size: 1.3rem;
    font-weight: 600;
}

.section-content {
    padding: 30px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-right: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--ln-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-right: 50px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: 6px;
    top: 5px;
    width: 18px;
    height: 18px;
    background: var(--ln-primary);
    border-radius: 50%;
    border: 3px solid var(--ln-white);
    box-shadow: 0 0 0 3px var(--ln-primary);
}

.timeline-content {
    background: var(--ln-bg);
    padding: 20px;
    border-radius: var(--radius);
    border-right: 4px solid var(--ln-primary);
}

.timeline-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ln-primary);
    margin-bottom: 5px;
}

.timeline-company {
    font-weight: 500;
    margin-bottom: 5px;
}

.timeline-duration {
    color: var(--ln-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.timeline-achievements {
    list-style: none;
}

.timeline-achievements li {
    position: relative;
    padding-right: 20px;
    margin-bottom: 8px;
}

.timeline-achievements li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--ln-primary);
    font-weight: bold;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category h3 {
    color: var(--ln-primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.skill-name {
    font-weight: 500;
}

.skill-level {
    display: flex;
    gap: 3px;
}

.skill-star {
    width: 16px;
    height: 16px;
    background: var(--ln-border);
    border-radius: 2px;
}

.skill-star.filled {
    background: var(--ln-primary);
}

/* Certificates Grid */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.certificate-card {
    background: var(--ln-bg);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.certificate-card:hover {
    transform: translateY(-5px);
    border-color: var(--ln-primary);
}

.certificate-image {
    width: 80px;
    height: 80px;
    background: var(--ln-primary);
    border-radius: var(--radius);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.certificate-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--ln-ink);
}

.certificate-platform {
    color: var(--ln-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.certificate-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--ln-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.certificate-link:hover {
    background: var(--ln-primary-dark);
}

/* About Section */
.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-toggle {
    margin-top: 20px;
}

.about-more {
    display: none;
    margin-top: 15px;
}

.about-more.show {
    display: block;
}

/* Footer */
.footer {
    background: var(--ln-white);
    padding: 40px 0;
    margin-top: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--ln-primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }

    .hero-info h1 {
        font-size: 2rem;
    }

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

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

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

    .timeline {
        padding-right: 0;
        padding-left: 30px;
    }

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

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

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

    .header-content {
        justify-content: center;
    }

    .section-content {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }

    .header, .header-buttons, .btn, .social-links {
        display: none !important;
    }

    .section, .hero, .contact-info, .footer {
        box-shadow: none;
        border: 1px solid #ddd;
        margin: 10px 0;
        page-break-inside: avoid;
    }

    .hero-content {
        grid-template-columns: auto 1fr;
        gap: 20px;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .timeline-item {
        margin-bottom: 20px;
    }

    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .certificate-card {
        padding: 15px;
    }

    .section-header {
        background: #f0f0f0 !important;
        color: black !important;
        padding: 15px 20px;
    }

    .about-more {
        display: block !important;
    }

    .about-toggle {
        display: none;
    }
}

/* RTL/LTR Toggle */
[dir="ltr"] .timeline {
    padding-right: 0;
    padding-left: 30px;
}

[dir="ltr"] .timeline::before {
    right: auto;
    left: 15px;
}

[dir="ltr"] .timeline-item {
    padding-right: 0;
    padding-left: 50px;
}

[dir="ltr"] .timeline-item::before {
    right: auto;
    left: 6px;
}

[dir="ltr"] .timeline-content {
    border-right: none;
    border-left: 4px solid var(--ln-primary);
}

[dir="ltr"] .timeline-achievements li {
    padding-right: 0;
    padding-left: 20px;
}

[dir="ltr"] .timeline-achievements li::before {
    right: auto;
    left: 0;
}

/* Focus States for Accessibility */
.btn:focus, .social-link:focus, .certificate-link:focus {
    outline: 2px solid var(--ln-primary);
    outline-offset: 2px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.show {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}
