/* Keeping the core variables and base styles */
:root {
    --gradient-start: #2ecc71;
    --gradient-end: #3498db;
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --card-bg: rgba(255, 255, 255, 0.95);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-dark);
    min-height: 100vh;
}

/* Layout and Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Card and Section Styles */
section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
}

/* Header and Profile Styles */
.header {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.profile-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--gradient-end);
}

.profile-info h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

/* Links Container Styles */
.links-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Social Links Styles */
.btn-outline-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-outline-primary i {
    font-size: 1.2rem;
}

.btn-outline-primary .platform-name {
    margin-left: 0.25rem;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* Experience and Study Cards */
.experience-card,
.study-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--gradient-start);
    height: 100%;
}

/* Skills and Languages */
.skills-list,
.languages-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-item-simple,
.language-item-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Timeline Styles - Consolidated */
.timeline-container {
    margin: 2rem 0;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#timeline {
    height: 400px;
    width: 100%;
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    opacity: 0.8;
}

.nav-arrow:hover {
    opacity: 1;
}

.nav-arrow.prev {
    left: 0;
}

.nav-arrow.next {
    right: 0;
}

/* Collapsible Section Styles */
[data-bs-toggle="collapse"] {
    cursor: pointer;
    user-select: none;
}

[data-bs-toggle="collapse"] i.bi-chevron-down {
    transition: transform 0.3s ease;
}

[data-bs-toggle="collapse"][aria-expanded="true"] i.bi-chevron-down {
    transform: rotate(180deg);
}

.collapse {
    transition: all 0.35s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .profile-container {
        flex-direction: column;
        text-align: center;
    }

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

    section {
        padding: 1.5rem;
    }

    .experience-card,
    .studies-container .col-12 {
        flex: 0 0 85%;
        min-width: 280px;
    }

    .nav-arrow {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .links-container {
        justify-content: center;
    }

    .btn-outline-primary {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    #timeline {
        height: 300px;
    }
    .institution-logo {
        width: 30px;
        height: 30px;
    }
    .skill-item-simple,
    .language-item-simple {
        font-size: 0.85rem;
    }
}

.institution-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    margin-right: 10px;
    float: left;
}

.institution-details {
    display: flow-root;
}

.experience-section,
.studies-section {
    position: relative;
    margin: 1.5rem -1rem;
    padding: 0 1rem;
    overflow: hidden;
}

.experience-container,
.studies-container {
    position: relative;
    margin: 1.5rem -1rem;
    padding: 0 1rem;
    overflow: hidden;
}

.experience-container #experienceRow,
.studies-container #studiesRow {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 1rem;
}

.experience-container #experienceRow::-webkit-scrollbar,
.studies-container #studiesRow::-webkit-scrollbar {
    display: none;
}

.experience-card,
.studies-container .col-12 {
    flex: 0 0 85%;
    min-width: 280px;
    max-width: 400px;
    padding: 0 0.5rem;
    scroll-snap-align: center;
}

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

.skill-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 5px;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
}

.language-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.studies-container .row {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.studies-container .row::-webkit-scrollbar {
    display: none;
}

.studies-container .col-12 {
    flex: 0 0 auto;
    width: calc(50% - 1rem);
    padding: 0 0.5rem;
    scroll-snap-align: start;
}

.study-header {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1rem;
}

.study-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.study-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 1.5rem 0;
    flex-grow: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.institution-info {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.institution-details h5 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.institution-details p {
    font-size: 0.9rem;
    color: #666;
}

.study-period {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.location-info {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.company-link {
    text-decoration: none;
    font-size: 1.2rem;
}

.role-info {
    margin-top: 1rem;
}

.challenges {
    list-style: none;
    margin-top: 1rem;
}

.challenges li {
    margin-bottom: 0.5rem;
}


.contributions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.github-stats,
.boinc-stats {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.github-stats:hover,
.boinc-stats:hover {
    transform: translateY(-5px);
}

.github-stats h3,
.boinc-stats h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.github-stats-card,
.boinc-stats-card {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.github-stats-card:hover,
.boinc-stats-card:hover {
    transform: scale(1.02);
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.2);
}

.download-button i {
    font-size: 1.2rem;
}

.degree-status {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.degree-status.achieved {
    background: linear-gradient(to right, #2ecc71, #27ae60);
    color: white;
}

.degree-status.in-progress {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
}

.timeline-item {
    padding: 8px;
    border-radius: 4px;
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-item strong {
    color: var(--gradient-start);
}

.timeline-item em {
    color: var(--gradient-end);
    font-style: normal;
}

.timeline-challenge {
    color: var(--gradient-start);
    font-size: 1.2em;
}

.timeline-challenge-point {
    background-color: var(--gradient-start) !important;
    border-color: var(--gradient-end) !important;
}

.timeline-tooltip {
    position: absolute;
    background: var(--card-bg);
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 300px;
    pointer-events: none;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: var(--text-light);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
}

.experience-container {
    position: relative;
    margin: 1.5rem -1rem;
    padding: 0 1rem;
    overflow: hidden;
}

.experience-container #experienceRow {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 1rem;
}

.experience-container #experienceRow::-webkit-scrollbar {
    display: none;
}

.experience-card {
    flex: 0 0 85%;
    min-width: 280px;
    max-width: 400px;
    padding: 0 0.5rem;
    scroll-snap-align: center;
}

.experience-section {
    position: relative;
    margin: 1.5rem -1rem;
    padding: 0 1rem;
    overflow: hidden;
}

@media (max-width: 768px) {
    .experience-card {
        flex: 0 0 85%;
        min-width: 280px;
    }
    .studies-container {
        margin: 1rem -0.5rem;
        padding: 0 2rem;
    }

    .studies-container .row {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 1rem;
    }

    .studies-container .col-12 {
        width: calc(85% - 1rem);
        min-width: 280px;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .study-card {
        padding: 1.2rem;
    }

    .study-name {
        font-size: 1.2rem;
    }

    .study-description {
        font-size: 1rem;
        padding: 0.8rem;
        margin: 1rem 0;
    }
}

.studies-container {
    position: relative;
    margin: 1.5rem -1rem;
    padding: 0 1rem;
    overflow: hidden;
}

.studies-container .row {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.studies-container .row::-webkit-scrollbar {
    display: none;
}

.studies-container .col-12 {
    flex: 0 0 auto;
    width: calc(50% - 1rem);
    padding: 0 0.5rem;
    scroll-snap-align: start;
}


.skills-list, .languages-list{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-item-simple, .language-item-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}