/* =========================================
   About Page Custom Styles (Final Fix)
   ========================================= */

/* Hero Section */
.about-hero {
    position: relative;
    padding-top: 12rem;
    padding-bottom: 8rem;
    background: linear-gradient(135deg, #FFF9F7 0%, #FFF0E8 100%);
    overflow-x: hidden;
    /* Fix: Clip the blob without global scroll lock */
}

/* Profile Section */
.profile-section {
    position: relative;
    z-index: 10;
    margin-top: -5rem;
    padding-bottom: 6rem;
    overflow-x: clip;
    /* Modern clip to prevent any horizontal leaks */
}

.profile-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem;
    max-width: 1150px;
    margin: 0 auto;
    align-items: start;
}

@media (min-width: 992px) {
    .profile-container {
        grid-template-columns: 350px 1fr;
    }
}

/* Instructor Card */
.instructor-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.instructor-avatar {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    padding: 5px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.instructor-name {
    font-size: 1.6rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.instructor-degree {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: #f5f5f5;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 0.8rem;
}

.instructor-title {
    font-size: 0.95rem;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Letter Content - Clean Design */
.letter-content {
    background: transparent;
    padding: 0;
    position: relative;
    padding-top: 1rem;
}

.letter-intro {
    font-size: 2.2rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 700;
    position: relative;
}

.letter-intro::before {
    content: '"';
    position: absolute;
    top: -40px;
    left: -30px;
    font-size: 8rem;
    color: var(--primary-color);
    opacity: 0.1;
    font-family: sans-serif;
    line-height: 1;
}

.letter-body {
    position: relative;
    padding-left: 2rem;
    border-left: 3px solid rgba(232, 141, 103, 0.2);
}

.letter-body p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.letter-body p:last-child {
    margin-bottom: 0;
}

.letter-outro {
    margin-top: 3rem;
    padding-left: 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    font-family: var(--font-heading);
}

/* Timeline Section */
.timeline-section {
    padding: 6rem 0;
    position: relative;
    overflow-x: hidden;
    /* Fix: Ensure no horizontal scroll from markers */
}

.timeline-header {
    text-align: center;
    margin-bottom: 5rem;
}

.timeline-minimal {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 60px;
    padding-bottom: 50px;
}

.timeline-line-faded,
.timeline-line-filled {
    position: absolute;
    top: 0;
    left: 29px;
    width: 2px;
}

.timeline-line-faded {
    bottom: 0;
    background: #e5e5e5;
    z-index: 0;
}

.timeline-line-filled {
    height: 0;
    background: var(--primary-color);
    z-index: 1;
    transition: height 0.1s linear;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    padding-left: 2rem;
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

.timeline-item.active {
    opacity: 1;
}

.timeline-marker {
    position: absolute;
    left: -42px;
    top: 6px;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 3px solid #e5e5e5;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.4s ease;
}

.timeline-item.active .timeline-marker {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: 0 0 0 5px rgba(232, 141, 103, 0.2);
    transform: scale(1.1);
}

.timeline-year {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: #ddd;
    line-height: 1;
    margin-bottom: 0.5rem;
    transition: color 0.4s ease;
}

.timeline-item.active .timeline-year {
    color: var(--primary-color);
}

.timeline-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* About CTA Section */
.about-cta {
    text-align: center;
    padding: 8rem 1rem;
    background: #fff;
    position: relative;
    overflow-x: hidden;
}

.about-cta h2 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.about-cta p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.about-cta .btn-cta {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 18px 48px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(232, 141, 103, 0.3);
}

.about-cta .btn-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(232, 141, 103, 0.4);
}

/* =========================================
   Mobile Optimization (About Page)
   ========================================= */

@media (max-width: 768px) {

    /* Hero Adjustments */
    .about-hero {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    /* Profile Adjustments */
    .profile-section {
        margin-top: -2rem;
    }

    .profile-container {
        gap: 3rem;
    }

    .instructor-card {
        padding: 1.5rem;
    }

    .instructor-avatar {
        width: 140px;
        height: 140px;
    }

    .instructor-name {
        font-size: 1.4rem;
    }

    /* Letter Content Compact Mode */
    .letter-intro {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .letter-intro::before {
        font-size: 5rem;
        top: -20px;
        left: -15px;
    }

    .letter-body {
        padding-left: 1rem;
        border-left-width: 2px;
    }

    .letter-body p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .letter-outro {
        padding-left: 1rem;
        font-size: 1.1rem;
        margin-top: 2rem;
    }

    /* Timeline Adjustments */
    .timeline-section {
        padding: 4rem 0;
    }

    .timeline-header {
        margin-bottom: 3rem;
    }

    .timeline-minimal {
        padding-left: 40px;
        /* Reduce left padding */
    }

    .timeline-line-faded,
    .timeline-line-filled {
        left: 15px;
        /* Move line closer to edge */
    }

    .timeline-marker {
        left: -36px;
        /* Adjust based on new line position (15px - 22/2 - border fix?) => visually check */
        /* Actually: line is at 15px. Marker center should be at 15px + 1px(half line). 
           Marker width 22px => left = 16 - 11 = 5px relative to container? 
           Wait, marker is absolute to item. Item has padding-left. 
           Let's just pull it tighter. */
        left: -36px;
    }

    .timeline-year {
        font-size: 2rem;
    }

    .timeline-text {
        font-size: 1rem;
    }

    /* CTA Adjustments */
    .about-cta {
        padding: 4rem 1rem;
    }

    .about-cta h2 {
        font-size: 2rem;
    }

    .about-cta p {
        font-size: 1rem;
    }

    .about-cta .btn-cta {
        padding: 14px 36px;
        font-size: 1rem;
        width: 100%;
    }
}