:root {
    --primary-color: #002623;
    --secondary-color: #baa57a;
    --text-color: #333;
    --light-color: #f5f5f5;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f0f0f0;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 30px auto;
    box-shadow: 0 0 20px var(--shadow-color);
    border-radius: 10px;
    overflow: hidden;
    background-color: white;
    position: relative;
}

.sidebar {
    width: 30%;
    background-color: var(--primary-color);
    color: white;
    padding: 30px;
    position: relative;
    order: 1;
}

.profile-container {
    text-align: center;
    margin-bottom: 30px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 5px solid var(--secondary-color);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.title {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 15px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.contact-info {
    margin-bottom: 30px;
}

.contact-info ul {
    list-style: none;
}

.contact-info li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.contact-info i {
    margin-left: 10px;
    color: var(--secondary-color);
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.languages {
    margin-bottom: 30px;
}

.language-item {
    margin-bottom: 10px;
}

.language-name {
    display: block;
    margin-bottom: 5px;
}

.language-level {
    display: flex;
}

.level-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    margin-left: 5px;
}

.level-dot.filled {
    background-color: var(--secondary-color);
}

.personal-skills {
    margin-bottom: 30px;
}

.skills-list {
    list-style: none;
}

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

.skills-list li::before {
    content: '\2713';
    position: absolute;
    right: 0;
    color: var(--secondary-color);
}

.hobbies {
    margin-bottom: 30px;
}

.hobbies-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hobby-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    width: calc(50% - 5px);
}

.hobby-item i {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.main-content {
    width: 70%;
    padding: 30px;
    order: 2;
}

.main-section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 10px;
}

.main-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 70px;
    height: 3px;
    background-color: var(--secondary-color);
}

section {
    margin-bottom: 40px;
}

.about p {
    text-align: justify;
}

.timeline-item {
    position: relative;
    padding-right: 30px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.timeline-dot {
    position: absolute;
    right: 0;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    z-index: 2;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: 7px;
    top: 5px;
    height: 100%;
    width: 1px;
    background-color: var(--border-color);
}

.timeline-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.timeline-content h4 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #666;
}

.course-item {
    display: flex;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    background-color: var(--primary-color);
    color: white;
}

.course-icon i {
    font-size: 24px;
}

.course-content {
    padding: 15px;
    flex: 1;
}

.course-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.course-content h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #666;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-item {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

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

.skill-percentage {
    color: var(--secondary-color);
    font-weight: 600;
}

.skill-bar {
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 5px;
}

@media (max-width: 768px) {
    body {
        padding: 0;
        margin: 0;
        font-size: 14px;
    }
    
    .container {
        flex-direction: column;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        display: flex;
        flex-wrap: wrap;
        box-shadow: none;
    }
    
    .main-section-title {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .name {
        font-size: 20px;
    }
    
    .title {
        font-size: 14px;
    }
    
    .sidebar, .main-content {
        width: 100%;
        padding: 20px;
    }
    
    .sidebar {
        border-radius: 0 0 20px 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        margin-bottom: 20px;
    }
    
    .contact-info ul li {
        font-size: 13px;
    }
    
    .language-name {
        font-size: 13px;
    }
    
    .skills-list li {
        font-size: 13px;
    }
    
    .hobby-item span {
        font-size: 12px;
    }
    
    .main-content {
        padding-top: 30px;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .hobby-item {
        width: calc(50% - 7px);
    }
    
    .copyright {
        margin-top: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        font-size: 12px;
        padding: 10px;
    }
    
    .timeline-content h3 {
        font-size: 15px;
        line-height: 1.4;
        margin-bottom: 8px;
    }
    
    .timeline-content h4 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .timeline-content p {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .timeline-item {
        margin-bottom: 25px;
        padding-bottom: 10px;
        border-bottom: 1px dashed rgba(0,0,0,0.1);
    }
    
    .timeline-item:last-child {
        border-bottom: none;
    }
    
    .course-item {
        flex-direction: column;
        margin-bottom: 15px;
        border: 1px solid rgba(0,0,0,0.05);
    }
    
    .course-icon {
        width: 100%;
        padding: 15px 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .course-icon i {
        font-size: 28px;
    }
    
    .course-content {
        padding: 15px 12px;
    }
    
    .course-content h3 {
        font-size: 14px;
    }
    
    .course-content p {
        font-size: 13px;
    }
    
    .skill-info {
        flex-wrap: wrap;
        margin-bottom: 8px;
    }
    
    .skill-name {
        width: 70%;
        font-size: 13px;
    }
    
    .skill-percentage {
        width: 30%;
        text-align: left;
        font-size: 13px;
    }
    
    .skill-bar {
        height: 8px;
        border-radius: 4px;
    }
    
    .skill-item {
        margin-bottom: 15px;
        padding-bottom: 5px;
    }
}

.copyright {
    text-align: center;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    font-size: 14px;
    width: 100%;
    margin-top: auto;
    order: 3;
}

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

section {
    animation: fadeIn 0.5s ease-out forwards;
}

.timeline-item, .course-item, .skill-item {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.timeline-item:nth-child(1), .course-item:nth-child(1), .skill-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2), .course-item:nth-child(2), .skill-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3), .course-item:nth-child(3), .skill-item:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(4), .course-item:nth-child(4), .skill-item:nth-child(4) {
    animation-delay: 0.4s;
}

.timeline-item:nth-child(5), .course-item:nth-child(5), .skill-item:nth-child(5) {
    animation-delay: 0.5s;
}

.hobby-item:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
    background-color: rgba(255, 255, 255, 0.2);
}

.course-item:hover {
    box-shadow: 0 5px 15px var(--shadow-color);
    transform: translateY(-3px);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

@media (hover: none) {
    .hobby-item:active {
        transform: translateY(-3px);
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .course-item:active {
        box-shadow: 0 3px 10px var(--shadow-color);
    }
}

@media print {
    body {
        background-color: white;
    }
    
    .container {
        box-shadow: none;
        margin: 0;
    }
    
    .hobby-item, .course-item, .timeline-item, .skill-item {
        break-inside: avoid;
    }
    
    .sidebar {
        background-color: #f5f5f5;
        color: var(--text-color);
    }
    
    .section-title, .name {
        color: var(--primary-color);
    }
    
    .contact-info i, .hobby-item i, .level-dot.filled {
        color: var(--primary-color);
    }
    
    .level-dot.filled {
        background-color: var(--primary-color);
    }
}