/* Teaching Section Styles */
.teaching-section {
    padding: 6rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.gradient-title {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(to right, #0070f3, #6b46c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Teaching Timeline */
.teaching-timeline {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.teaching-position {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.teaching-position:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Position Header */
.position-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.period-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, #0070f3, #6b46c1);
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.position-info {
    flex-grow: 1;
}

.institution-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.position-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #64748b;
    font-size: 0.95rem;
}

.role {
    color: #0070f3;
    font-weight: 500;
}

.location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.course-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.course-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.course-item i {
    color: #0070f3;
    font-size: 1.1rem;
}

.course-item span {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.teaching-position {
    animation: slideInUp 0.6s ease backwards;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .teaching-section {
        background: #0f172a;
    }

    .teaching-position {
        background: #1e293b;
    }

    .institution-name {
        color: #f1f5f9;
    }

    .position-meta {
        color: #94a3b8;
    }

    .course-item {
        background: #334155;
    }

    .course-item:hover {
        background: #475569;
    }

    .course-item span {
        color: #e2e8f0;
    }

    .course-item i {
        color: #60a5fa;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .teaching-section {
        padding: 4rem 0;
    }

    .gradient-title {
        font-size: 2rem;
    }

    .teaching-position {
        padding: 1.5rem;
    }

    .position-header {
        flex-direction: column;
        gap: 1rem;
    }

    .period-badge {
        align-self: flex-start;
    }

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

    .institution-name {
        font-size: 1.25rem;
    }

    .position-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Hover Effects */
.teaching-position::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #0070f3, #6b46c1);
    border-radius: 4px 4px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.teaching-position:hover::before {
    opacity: 1;
}

/* Loading States */
.teaching-position.loading {
    position: relative;
    overflow: hidden;
}

.teaching-position.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: loading 1.5s infinite;
}

@keyframes loading {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}
