/* ============================================
   ACADEMIC PORTFOLIO - TIMELINE STYLES
   Version: 2.1.0

   Standards timeline visualization styles
   ============================================ */

/* ============================================
   STANDARDS TIMELINE VIEW
   ============================================ */
.standards-timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.timeline-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.timeline-view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--background);
    padding: 0.25rem;
    border-radius: var(--border-radius);
}

.timeline-view-toggle button {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: calc(var(--border-radius) - 2px);
    transition: all var(--transition-speed);
}

.timeline-view-toggle button.active {
    background: var(--accent);
    color: white;
}

/* ============================================
   TIMELINE TRACK
   ============================================ */
.timeline-track {
    position: relative;
    padding-left: 3rem;
}

.timeline-track::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), var(--border-color));
    border-radius: 2px;
}

.timeline-year {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-year-marker {
    position: absolute;
    left: -2.5rem;
    width: 2rem;
    height: 2rem;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    z-index: 1;
}

.timeline-year-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

/* ============================================
   TIMELINE ITEMS
   ============================================ */
.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all var(--transition-speed);
    position: relative;
}

.timeline-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateX(4px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 1.25rem;
    width: 10px;
    height: 10px;
    background: var(--card-background);
    border: 3px solid var(--accent);
    border-radius: 50%;
}

.timeline-item.completed::before {
    background: var(--success);
    border-color: var(--success);
}

.timeline-item.deadline::before {
    background: var(--warning);
    border-color: var(--warning);
}

.timeline-item.overdue::before {
    background: var(--danger);
    border-color: var(--danger);
}

.timeline-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.timeline-item-title {
    font-weight: 600;
    color: var(--primary-navy);
    margin: 0;
}

.timeline-item-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.timeline-item-category {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--background);
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.timeline-item-progress {
    margin-top: 0.75rem;
}

.timeline-progress-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.timeline-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.timeline-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ============================================
   CATEGORY PROGRESS SECTION
   ============================================ */
.category-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.category-progress-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category-progress-title {
    font-weight: 600;
    color: var(--primary-navy);
    text-transform: capitalize;
}

.category-progress-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.category-progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.category-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.category-teaching .category-progress-fill { background: #C05621; }
.category-service .category-progress-fill { background: #6B46C1; }
.category-research .category-progress-fill { background: #0066CC; }

.category-progress-details {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================
   YEARS TO PROMOTION CALCULATOR
   ============================================ */
.promotion-calculator {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.promotion-calculator-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 1rem;
}

.promotion-estimate {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.estimate-item {
    text-align: center;
}

.estimate-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.estimate-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.estimate-unit {
    font-size: 1rem;
    font-weight: normal;
    color: var(--text-muted);
}

.promotion-confidence {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--border-radius);
}

.confidence-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.confidence-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.confidence-high { background: var(--success); }
.confidence-medium { background: var(--warning); }
.confidence-low { background: var(--danger); }

/* ============================================
   GANTT-STYLE VIEW
   ============================================ */
.timeline-gantt {
    overflow-x: auto;
    padding-bottom: 1rem;
}

.gantt-container {
    min-width: 800px;
}

.gantt-header {
    display: grid;
    grid-template-columns: 200px repeat(12, 1fr);
    gap: 1px;
    background: var(--border-color);
    margin-bottom: 1px;
}

.gantt-header-cell {
    background: var(--card-background);
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.gantt-row {
    display: grid;
    grid-template-columns: 200px repeat(12, 1fr);
    gap: 1px;
    background: var(--border-color);
    margin-bottom: 1px;
}

.gantt-row:hover {
    background: var(--accent);
}

.gantt-row:hover .gantt-cell {
    background: rgba(255,255,255,0.95);
}

.gantt-cell {
    background: var(--card-background);
    padding: 0.75rem;
    min-height: 50px;
    position: relative;
}

.gantt-label {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    border-radius: 10px;
    background: var(--accent);
    opacity: 0.8;
}

.gantt-bar.completed {
    background: var(--success);
}

.gantt-bar.in-progress {
    background: var(--warning);
}

.gantt-milestone {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--accent);
}

/* ============================================
   MILESTONE VIEW
   ============================================ */
.milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.milestone-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-top: 4px solid var(--accent);
    transition: all var(--transition-speed);
}

.milestone-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.milestone-card.completed {
    border-top-color: var(--success);
}

.milestone-card.upcoming {
    border-top-color: var(--warning);
}

.milestone-card.overdue {
    border-top-color: var(--danger);
}

.milestone-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.milestone-title {
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.milestone-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.milestone-achievements {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.milestone-achievement-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .timeline-track {
        padding-left: 2rem;
    }

    .timeline-track::before {
        left: 0.5rem;
    }

    .timeline-year-marker {
        left: -1.5rem;
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.625rem;
    }

    .timeline-item::before {
        left: -1.5rem;
        width: 8px;
        height: 8px;
    }

    .category-progress-grid {
        grid-template-columns: 1fr;
    }

    .promotion-estimate {
        flex-direction: column;
    }

    .gantt-container {
        min-width: 600px;
    }
}

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */
[data-theme-mode="dark"] .timeline-item {
    background: var(--card-background);
}

[data-theme-mode="dark"] .timeline-item::before {
    background: var(--card-background);
}

[data-theme-mode="dark"] .category-progress-card,
[data-theme-mode="dark"] .milestone-card,
[data-theme-mode="dark"] .promotion-calculator {
    background: var(--card-background);
}

[data-theme-mode="dark"] .gantt-cell,
[data-theme-mode="dark"] .gantt-header-cell {
    background: var(--card-background);
}
