/**
 * Archive Styles
 * The Variables Co. - Career Archive Pages
 *
 * This file contains styles specific to archive pages:
 * - /archive/index.html (project grid)
 * - /archive/timeline.html (career timeline)
 * - /archive/skills.html (skills showcase)
 *
 * Created: 2026-01-19
 */

/* ============================================
   ACCESSIBILITY - FOCUS STATES
   ============================================ */

.project-card:focus-visible,
.timeline-item:focus-visible,
.skill-card:focus-visible {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 4px;
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .project-card,
    .timeline-item,
    .skill-card,
    .modal-overlay,
    .modal-content {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================
   ARCHIVE HERO
   ============================================ */

.archive-hero {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-slate) 100%);
    color: white;
    padding: 8rem 2rem 6rem;
    text-align: center;
}

.archive-hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.archive-hero-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.archive-hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.archive-hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.archive-hero-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.archive-hero-stats .stat-number {
    font-family: 'Fraunces', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent-primary);
    line-height: 1;
}

.archive-hero-stats .stat-label {
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   ARCHIVE NAVIGATION
   ============================================ */

.archive-nav {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.archive-nav-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    padding: 1rem 0;
}

.archive-nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-slate);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.archive-nav-link:hover {
    background: rgba(47, 99, 100, 0.1);
    color: var(--color-accent-primary);
}

.archive-nav-link.active {
    color: var(--color-accent-primary);
    background: rgba(47, 99, 100, 0.1);
}

.archive-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent-primary);
}

/* ============================================
   ARCHIVE FILTERS
   ============================================ */

.archive-filters {
    background: #f8f9fa;
    padding: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.archive-filters .container {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-slate);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-search,
.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    background: white;
    transition: all 0.3s ease;
}

.filter-search:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 3px rgba(47, 99, 100, 0.1);
}

/* Filter reset button - matches .btn-tertiary from button system */
.filter-reset {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: var(--color-slate);
    color: var(--color-white);
    border: 2px solid var(--color-slate);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    transition: var(--transition-fast);
    align-self: flex-end;
    line-height: 1;
}

.filter-reset:hover {
    background: var(--color-navy);
    border-color: var(--color-navy);
    transform: translateY(-2px);
}

.filter-reset:focus-visible {
    outline: 2px solid var(--color-slate);
    outline-offset: 4px;
}

/* ============================================
   ARCHIVE PROJECT GRID
   ============================================ */

.archive-grid {
    padding: 4rem 2rem;
    min-height: 60vh;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ============================================
   ARCHIVE PROJECT CARDS
   ============================================ */

.project-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--color-accent-primary);
}

.project-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.project-card-title {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.project-card-timeline {
    font-size: 0.875rem;
    color: var(--color-accent-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-card-timeline::before {
    content: '📅';
    font-size: 1rem;
}

.project-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.project-card-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-slate);
    margin-bottom: 1.5rem;
}

.project-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(47, 99, 100, 0.1);
    color: var(--color-accent-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-card-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.confidence-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-slate);
}

.confidence-bar {
    width: 60px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent-primary), #4ade80);
    width: var(--confidence, 0%);
}

.view-details {
    font-size: 0.875rem;
    color: var(--color-accent-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.view-details::after {
    content: '→';
}

/* ============================================
   NO RESULTS STATE
   ============================================ */

.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results p {
    font-size: 1.25rem;
    color: var(--color-slate);
    margin-bottom: 1.5rem;
}

/* ============================================
   PROJECT DETAIL MODAL
   ============================================ */

.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-close:hover {
    background: var(--color-accent-primary);
    color: white;
    transform: rotate(90deg);
}

.modal-header {
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-slate) 100%);
    color: white;
}

.modal-title {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.modal-timeline {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tech .tech-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.modal-body {
    padding: 2.5rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 1rem;
}

.modal-section p,
.modal-section ul {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-slate);
}

.modal-section ul {
    list-style: none;
    padding: 0;
}

.modal-section li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.modal-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent-primary);
}

.modal-confidence {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.modal-confidence-label {
    font-weight: 600;
    color: var(--color-slate);
}

.modal-confidence .confidence-bar {
    flex: 1;
    max-width: 200px;
    height: 8px;
}

.modal-confidence-value {
    font-weight: 700;
    color: var(--color-accent-primary);
}

/* ============================================
   TIMELINE COMPONENT
   ============================================ */

.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    background: var(--color-accent-primary);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--color-accent-primary);
}

.timeline-year {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent-primary);
    margin-bottom: 0.5rem;
}

.timeline-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.timeline-card-title {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 0.75rem;
}

.timeline-card-description {
    font-size: 0.938rem;
    line-height: 1.6;
    color: var(--color-slate);
    margin-bottom: 1rem;
}

/* ============================================
   SKILLS GRID
   ============================================ */

.skills-container {
    padding: 4rem 2rem;
}

.skills-category {
    margin-bottom: 4rem;
}

.skills-category:last-child {
    margin-bottom: 0;
}

.skills-category-title {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-accent-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.skill-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: var(--color-accent-primary);
}

.skill-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.skill-card-name {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-navy);
}

.skill-card-years {
    font-size: 0.875rem;
    color: var(--color-accent-primary);
    font-weight: 600;
    white-space: nowrap;
}

.skill-card-description {
    font-size: 0.938rem;
    line-height: 1.6;
    color: var(--color-slate);
    margin-bottom: 1rem;
}

.skill-card-projects {
    font-size: 0.875rem;
    color: var(--color-slate);
}

.skill-card-projects strong {
    color: var(--color-navy);
}

/* ============================================
   RESPONSIVE: MOBILE
   ============================================ */

@media (max-width: 768px) {
    .archive-hero {
        padding: 6rem 1.5rem 4rem;
    }

    .archive-hero-stats {
        gap: 2rem;
    }

    .archive-hero-stats .stat-number {
        font-size: 2.5rem;
    }

    .archive-nav {
        top: 60px;
    }

    .archive-nav-links {
        gap: 1rem;
    }

    .archive-nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .archive-filters .container {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-reset {
        width: 100%;
        align-self: stretch;
    }

    .archive-grid {
        padding: 2rem 1rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-modal {
        padding: 1rem;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header,
    .modal-body {
        padding: 2rem 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
        padding-right: 2rem;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -2rem;
    }

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

@media (max-width: 480px) {
    .archive-hero-title {
        font-size: 2rem;
    }

    .archive-hero-subtitle {
        font-size: 1rem;
    }

    .archive-hero-stats .stat-number {
        font-size: 2rem;
    }

    .project-card-title {
        font-size: 1.25rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }
}
