@import url("../styles.css");

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===========================
   Vertical Timeline
   =========================== */

/* Hide default scrollbar */
.main-wrapper {
    flex: 1;
    overflow-y: scroll;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.main-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* ===========================
   TIMELINE SPECIFIC STYLES
   Add these to your existing styles.css
   =========================== */

/* Timeline Container */
.timeline {
    position: relative;
    width: 100%;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    margin-top: 12rem;
    min-height: 200vh;
}

/* Timeline Line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ccc;
    transform: translateX(-50%);
    z-index: 1;
}

/* Timeline Progress */
.timeline-progress {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 0;
    background: #00bcd4;
    transform: translateX(-50%);
    z-index: 2;
    transition: height 0.1s ease-out;
}

/* Timeline Headers */
.timeline-headers {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    z-index: 1000;
    background: #f8f9fa;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeline-headers-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-main-header {
    text-align: center;
    background: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeline-main-header h1 {
    margin: 0 0 0.4rem 0;
    font-size: 1.3rem;
    color: #333;
    font-weight: 700;
}

.timeline-instructions {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.timeline-section-headers {
    display: grid;
    grid-template-columns: 1fr 4px 1fr;
    gap: 0;
    align-items: center;
    position: relative;
}

.timeline-section-headers::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 60%;
    background: #00bcd4;
    border-radius: 2px;
    z-index: 1;
}

.timeline-header {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    background: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeline-header.left {
    grid-column: 1;
}

.timeline-header.right {
    grid-column: 3;
}

/* Timeline Items */
.timeline-item {
    position: absolute;
    width: 45%;
    z-index: 10;
}

.timeline-item.left {
    right: 55%;
}

.timeline-item.right {
    left: 55%;
}

/* Timeline Content */
.timeline-content {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #00bcd4;
    position: sticky;
    top: 180px;
    transition: all 0.3s ease;
    z-index: 10;
    min-height: 60px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.timeline-content-text {
    flex: 1;
    min-width: 0;
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.timeline-content.left {
    text-align: right;
    border-left: none;
    border-right: 4px solid #00bcd4;
    flex-direction: row-reverse;
}

.timeline-content.left .timeline-content-text {
    text-align: right;
}

.timeline-content h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-content .company {
    color: #00bcd4;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content .description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-content .duration {
    color: #999;
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Year Labels on Timeline */
.timeline-year-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #00bcd4;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 20;
    white-space: nowrap;
}

/* Header styling */
.header {
    display: none;
}

/* Main wrapper adjustments */
.main-wrapper {
    padding-top: 0;
}

/* Popup System */
.timeline-popup {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    max-width: 90vw;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #00bcd4;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.timeline-popup.visible {
    opacity: 1;
    visibility: visible;
}

.timeline-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.timeline-popup-nav {
    display: flex;
    gap: 0.5rem;
}

.timeline-popup-nav button {
    background: #00bcd4;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: white;
}

.timeline-popup-nav button:hover:not(:disabled) {
    background: #0097a7;
    color: white;
    border-color: #00bcd4;
    transform: scale(1.1);
}

.timeline-popup-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.timeline-popup-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.timeline-popup-close:hover {
    color: #ff4444;
}

.timeline-popup-content {
    padding: 1.5rem;
}

.timeline-popup-content .location {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding: 0.4rem 0.6rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

.timeline-popup-content .company-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    margin-left: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.timeline-popup-content .company-link:hover {
    transform: scale(1.1);
    background-color: #f0f0f0;
}

.timeline-popup-content .linkedin-link {
    color: #0077b5;
}

.timeline-popup-content .linkedin-link:hover {
    color: #005885;
    background-color: #e8f4f8;
}

.timeline-popup-content .website-link {
    color: #00bcd4;
}

.timeline-popup-content .website-link:hover {
    color: #0097a7;
    background-color: #e8f8f9;
}

.timeline-popup-content .logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 6px;
}

.timeline-popup-content h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.3rem;
}

.timeline-popup-content .company {
    color: #00bcd4;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.timeline-popup-content .duration {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #00bcd4;
}

/* Enhanced popup content styling */
.timeline-popup-content .description {
    color: #444;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-popup-content .description h4 {
    color: #333;
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.timeline-popup-content .description h5 {
    color: #555;
    margin: 0.75rem 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.timeline-popup-content .description ul,
.timeline-popup-content .description ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.timeline-popup-content .description li {
    margin: 0.25rem 0;
}

.timeline-popup-content .description p {
    margin: 0.5rem 0;
}

.timeline-popup-content .description strong {
    color: #333;
    font-weight: 600;
}

.timeline-popup-content .description em {
    color: #666;
    font-style: italic;
}

.timeline-popup-content .description .highlight {
    background: #fff3cd;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    border: 1px solid #ffeaa7;
}

.timeline-popup-content .description .achievement {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0.5rem 0;
    border-left: 4px solid #28a745;
}

.timeline-popup-content .description code {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    padding: 0.125rem 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #e83e8c;
}

.timeline-popup-content .skills {
    margin-top: 1rem;
}

.timeline-popup-content .skills h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
}

.timeline-popup-content .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-popup-content .skill-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Timeline item hover and active states */
.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.timeline-content.active {
    border-left-color: #ff6b35;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.timeline-content.active.right {
    border-right-color: #ff6b35;
    border-left-color: transparent;
}

/* ===========================
   DESKTOP RESPONSIVENESS FIX
   =========================== */

/* Prevent overlap with sidebar on desktop */
@media (min-width: 1025px) {
    .timeline-headers {
        left: 280px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .timeline-headers {
        left: 250px;
    }

    .timeline-popup {
        width: 300px;
        right: 15px;
    }
}

/* ===========================
   MOBILE OPTIMIZATIONS
   =========================== */

/* Menu toggle for mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: navy;
    position: fixed;
    top: 0rem;
    left: -0.2rem;
    z-index: 3000;
    padding: 0.5rem;
    touch-action: manipulation;
}

/* On desktop, hide the toggle button */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

/* Tablet optimizations */
@media (max-width: 1024px) {
    .timeline-headers {
        left: 220px;
    }

    .timeline-popup {
        width: 320px;
        right: 20px;
    }
}

/* Mobile optimizations - completely redesigned */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .timeline-headers {
        left: 0;
        padding: 0.5rem;
        /* transform: translateX(25%) !important; */
        background: var(--bg-secondary);
        box-shadow: var(--shadow-light);
    }

    .timeline-headers-inner {
        gap: 0.5rem;
        max-width: 100%;
    }

    .timeline-main-header {
        padding: 0.6rem 0.8rem;
        margin-bottom: 0.3rem;
        transform: translateX(1%) !important;
    }

    .timeline-main-header h1 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
        /* transform: translateX(1%) !important; */
    }

    .timeline-instructions {
        font-size: 0.75rem;
    }

    .timeline-section-headers {
        grid-template-columns: 1fr 3px 1fr;
        gap: 0.3rem;
        font-size: 0.9rem;
        margin-top: 0.3rem;
    }

    .timeline-section-headers::before {
        width: 3px;
        height: 50%;
    }

    .timeline-header {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .timeline-header.left {
        grid-column: 1;
        font-size: 0.7rem;
        text-align: center;
        width: 14rem;
        transform: translateX(70%) !important;
    }

    .timeline-header.right {
        grid-column: 3;
        font-size: 0.7rem;
        text-align: center;
        width: 16rem;
        transform: translateX(60%) !important;
    }

    .timeline {
        margin-top: 8rem;
        padding: 1rem 0.8rem;
        max-width: 100%;
    }

    .timeline-line {
        left: 50%;
        transform: translateX(-50%);
        width: 3px;
    }

    .timeline-progress {
        left: 50%;
        transform: translateX(-50%);
        width: 3px;
    }

    .timeline-item {
        width: 42%;
    }

    .timeline-item.left {
        right: 55% !important;
        left: auto !important;
        ;
    }

    .timeline-item.right {
        left: 55% !important;
        right: auto !important;
        ;
    }

    .timeline-content {
        padding: 0.7rem;
        top: 125px;
        border-radius: 6px;
        gap: 0.5rem;
        min-height: 70px;
    }

    .timeline-content h3 {
        font-size: 0.95rem;
        line-height: 1.2;
        margin-bottom: 0.3rem;
    }

    .timeline-content .company {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .timeline-content .duration {
        font-size: 0.75rem;
    }

    .timeline-content.left {
        text-align: right;
        border-left: none;
        border-right: 4px solid #00bcd4;
        flex-direction: row-reverse;
    }

    .timeline-content.left .timeline-content-text {
        text-align: right;
    }

    .timeline-logo {
        width: 45px;
        height: 45px;
    }

    .timeline-year-marker {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .timeline-popup {
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
        max-height: 75vh;
        border-radius: 8px;
    }

    .timeline-popup-content {
        padding: 1rem;
    }

    .timeline-popup-content .logo {
        width: 60px;
        height: 60px;
    }

    .timeline-popup-content h3 {
        font-size: 1.1rem;
    }

    .timeline-popup-content .company {
        font-size: 0.95rem;
    }

    .timeline-popup-content .description {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .timeline-popup-content .duration {
        font-size: 0.8rem;
        padding: 0.4rem;
    }

    .timeline-popup-content .location {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }
}

/* Small mobile optimizations */
@media (max-width: 480px) {

    /* Compact header for very small screens */
    .timeline-headers {
        padding: 0.4rem;
        transform: translateX(5%) !important;
    }

    .timeline-main-header {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        transform: translateX(4%) !important;
    }

    .timeline-main-header h1 {
        font-size: 0.7rem;
    }

    .timeline-instructions {
        font-size: 0.65rem;
    }

    /* .timeline-main-header */
    .timeline-section-headers {
        gap: 0.2rem;
        margin-top: 0.2rem;
        transform: translateX(4%) !important;
        grid-template-columns: 1fr 3px 1.5fr !important;
        /* make right column wider */
    }

    /* Optional: move right headers if using grid */
    .timeline-header.left {
        grid-column: 1;
        font-size: 0.7rem;
        /* text-align: center; */
        width: 10rem;
        transform: translateX(10%) !important;
    }

    .timeline-header.right {
        grid-column: 3 !important;
        font-size: 0.7rem;
        width: 10rem;
        text-align: center !important;
        /* you can also add transform to push it further right */
        transform: translateX(10%) !important;
    }

    .timeline-header {
        font-size: 0.75rem;
        padding: 0.1rem 0.1rem;
    }

    /* Timeline adjustments */
    .timeline {
        margin-top: 10rem;
        padding: 0.8rem 0.5rem;

    }

    /* Smaller timeline items for very small screens */
    .timeline-item {
        width: 35%;
    }

    .timeline-item.left {
        right: 55% !important;
        grid-column: 1;
        font-size: 0.7rem;
        text-align: center;
        width: 14rem;
        transform: translateX(9%) !important;
        /* left: auto; */
    }

    .timeline-item.right {
        left: 60% !important;
        /* make sure it fits */
    }

    .timeline-content {
        padding: 0.5rem;
        gap: 0.3rem;
        top: 120px;
        min-height: 60px;
    }

    .timeline-content h3 {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }

    .timeline-content .company {
        font-size: 0.72rem;
        margin-bottom: 0.2rem;
    }

    .timeline-content .duration {
        font-size: 0.65rem;
    }

    .timeline-logo {
        width: 35px;
        height: 35px;
    }

    .timeline-year-marker {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }

    /* Very compact popup for small screens */
    .timeline-popup {
        right: 5px;
        left: 5px;
        max-height: 70vh;
        border-radius: 6px;
    }

    .timeline-popup-content {
        padding: 0.8rem;
    }

    .timeline-popup-content .logo {
        width: 50px;
        height: 50px;
    }

    .timeline-popup-content h3 {
        font-size: 1rem;
    }

    .timeline-popup-content .company {
        font-size: 0.85rem;
    }

    .timeline-popup-content .description {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .timeline-popup-content .duration {
        font-size: 0.7rem;
        padding: 0.3rem;
    }

    .timeline-popup-content .location {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    .timeline-popup-nav button {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Extra small devices */
/* @media (max-width: 360px) {
    .timeline-headers {
        padding: 0.3rem;
    }

    .timeline-main-header {
        padding: 0.3rem 0.5rem;
    }

    .timeline-main-header h1 {
        font-size: 0.85rem;
    }

    .timeline-instructions {
        font-size: 0.6rem;
    }

    .timeline-header {
        font-size: 0.65rem;
        padding: 0.25rem 0.3rem;
    }

    .timeline {
        margin-top: 6rem;
        padding: 0.6rem 0.3rem;
    }

    .timeline-item {
        width: 38%;
    }

    .timeline-item.left {
        right: 56%;
    }

    .timeline-item.right {
        left: 56%;
    }

    .timeline-content {
        padding: 0.4rem;
        gap: 0.25rem;
        top: 75px;
        min-height: 50px;
    }

    .timeline-content h3 {
        font-size: 0.75rem;
        margin-bottom: 0.15rem;
    }

    .timeline-content .company {
        font-size: 0.65rem;
        margin-bottom: 0.15rem;
    }

    .timeline-content .duration {
        font-size: 0.6rem;
    }

    .timeline-logo {
        width: 28px;
        height: 28px;
    }

    .timeline-year-marker {
        font-size: 0.55rem;
        padding: 0.1rem 0.3rem;
    }

    .timeline-popup {
        right: 3px;
        left: 3px;
        max-height: 65vh;
        border-radius: 4px;
    }

    .timeline-popup-content {
        padding: 0.6rem;
    }

    .timeline-popup-content .logo {
        width: 40px;
        height: 40px;
    }

    .timeline-popup-content h3 {
        font-size: 0.9rem;
    }

    .timeline-popup-content .company {
        font-size: 0.75rem;
    }

    .timeline-popup-content .description {
        font-size: 0.7rem;
        line-height: 1.25;
    }

    .timeline-popup-content .duration {
        font-size: 0.65rem;
        padding: 0.25rem;
    }

    .timeline-popup-content .location {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }

    .timeline-popup-nav button {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
} */