/*===================================================================== */
/*========================= Education Section ========================= */
/*===================================================================== */
.education-section {
    padding-left: 5%;
    color: #ddd;
    padding-bottom: 25px;
}

.education-section h4 {
    font-size: 25;
    margin-bottom: 20px;
    color: var(--secondary-accent-color);
}

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

.ed-card {
    background: rgba(var(--light-gray-color-rgb), 0.3);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    max-width: 400px;
}

/*===================================================================== */
/*======================== Experience Section ========================= */
/*===================================================================== */
/* ========== Container ========== */
#jobs {
    width: 90%;
    padding-left: 5%;
    padding-bottom: 40px;
}

h2 {
    grid-column: 1 / -1;
    font-size: 2rem;
    margin-bottom: 24px;
}

.experience-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    width: 100%;
    gap: 16px;
    padding: 24px;
    border-radius: 12px;
    background-color: rgba(var(--light-gray-color-rgb), 0.3);
    box-shadow: 0 20px 30px -15px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.5s ease, transform 0.5s ease, height 0.5s ease;
    min-height: 350px;
  
}

.experience-container.loaded {
    opacity: 1;
    transform: translateX(0);
}

/* ========== Tab List ========== */
.tab-list {
    display: flex;
    flex-direction: column;
    position: relative;
    align-self: start;
}

.tab-list::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background-color: var(--light-gray-color);
}

.tab-list button {
    background: none;
    border: none;
    padding: 12px 0 12px 10px;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    color: var(--shaded-white-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
}

.tab-list button:hover {
    background-color: rgba(255, 195, 0, 0.08);
}

.tab-list button[aria-selected="true"] {
    color: var(--secondary-accent-color);
    background-color: rgba(255, 195, 0, 0.15);
}

.tab-highlight {
    position: absolute;
    width: 2px;
    background-color: var(--secondary-accent-color);
    transition: top 0.3s ease, height 0.3s ease;
}

/* ========== Tab Content ========== */
.tab-panels {
    transition: height 0.3s ease;
}

.tab-panels > div {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-panels > div.visible {
    display: block;
    opacity: 1;
}

.tab-panels > div.fade-in-down {
    animation: fade-in-down 0.3s ease forwards;
}

.tab-panels > div.fade-out-up {
    animation: fade-out-up 0.3s ease forwards;
}

.tab-panels h3 {
    margin: 0 0 8px;
    font-size: 1.4rem;
    color: var(--white-color);
}

.company {
    color: var(--secondary-accent-color);
}

.tab-panels .range {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--shaded-white-color);
}

.job-description {
    list-style: none;
}

.job-description li {
    position: relative;
    padding-left: 1.2em;
    margin-bottom: 0.5em;
}

.job-description li::before {
    content: "▹";
    position: absolute;
    left: 0;
    top: 0.2em;
    color: var(--secondary-accent-color);
}

/* ========== Keyframes ========== */
@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-out-up {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-20px); }
}

/* ========== Responsive ========== */
@media (max-width: 800px) {
    #jobs {
        width: 100%;
        padding-left: 0;
    }

    .experience-container {
        grid-template-columns: 1fr;
    }

    .tab-list {
        flex-direction: row;
        border-bottom: 2px solid var(--shaded-white-color);
    }

    .tab-list button {
        padding: 8px 16px;
        border-bottom: 2px solid transparent;
        text-align: center;
    }
    
    .tab-list button[aria-selected="true"] {
        border-bottom-color: var(--secondary-accent-color);
    }
}

/* ========== Layered Picture Section ========== */
#picture-about-section {
    width: 100%;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1000px, 1fr));
    justify-content: center;
    justify-items: center;
    gap: 32px;
}

.layered-section {
    width: 100%;
    display: flex;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(var(--light-gray-color-rgb), 0.5), rgba(50, 50, 50, 0.5));
    padding: 40px;
    overflow: visible;
    max-width: 1000px;
    position: relative;
    margin-bottom: 5%;
    animation: slideInFromRight 0.8s ease-out both;
}

.layered-section p {
    color: var(--white-color);
}

.layered-content {
    padding: 20px;
    flex: 1;
    z-index: 1;
}

.image-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
    margin-bottom: -10%;
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* Layout direction toggles */
.reverse {
    flex-direction: row-reverse;
    animation: slideInFromLeft 0.8s ease-out both;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


@media (max-width: 768px) {
    #picture-about-section {
        display: block;
    }

    .layered-section {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        margin-bottom: 15%;
    }

    .image-wrapper {
        padding: 5px;
        margin-top: 20px;
    }

    .image-wrapper img {
        margin: 0;
    }
}