/* Black & White Timeline Portfolio for Vish Ramesh */
/* CEO & Founder of Vy Labs AI */

:root {
    --primary-black: #000000;
    --primary-white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --primary-blue: #007bff;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Layout */
    --max-width: 1200px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--primary-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout Components */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* Hero Section */
.hero {
    background-color: var(--primary-white);
    padding: var(--spacing-2xl) 0;
    border-bottom: 2px solid var(--gray-300);
}

.hero-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-2xl);
    width: 100%;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-black);
    box-shadow: var(--shadow-md);
}

.profile-text {
    flex-grow: 1;
}

.name {
    font-size: 3rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--primary-black);
    margin-bottom: var(--spacing-sm);
}

.title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-medium);
    color: #000000; /* Use explicit black color */
    margin-bottom: var(--spacing-lg);
}

/* Header actions */
.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

.header-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.header-link {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-md);
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: #000000; /* Use explicit black color */
    font-size: 0.875rem;
    font-weight: var(--font-weight-bold);
    transition: var(--transition);
}

.header-link:hover {
    border-color: var(--primary-black);
    color: var(--primary-black);
    background-color: var(--gray-100);
}

.header-link.primary {
    border-color: var(--primary-black);
    color: var(--primary-black);
    font-weight: var(--font-weight-semibold);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: 0.875rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-black);
    color: var(--primary-white);
}

.btn-primary:hover {
    background-color: var(--gray-800);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-black);
    border-color: var(--gray-400);
}

.btn-secondary:hover {
    background-color: var(--gray-100);
    border-color: var(--primary-black);
}

/* Timeline Section */
.timeline-section {
    padding: var(--spacing-2xl) 0;
    background-color: var(--gray-100);
    position: relative; /* Needed for positioning context */
    overflow-x: hidden; /* Hide horizontal overflow from the full-width timeline */
}

@media screen and (min-width: 993px) {
    .timeline {
        display: flex;
        overflow-x: auto;
        padding-bottom: var(--spacing-lg); /* Space for scrollbar */
        scrollbar-width: thin;
        scrollbar-color: var(--primary-black) var(--gray-200);
        align-items: flex-start; /* Allow cards to have different heights */

        /* Full-width breakout */
        width: 100vw;
        position: relative;
        left: 50%;
        margin-left: -50vw;
        box-sizing: border-box;
        padding-left: calc((100vw - var(--max-width)) / 2 + var(--spacing-xl));
        padding-right: calc((100vw - var(--max-width)) / 2 + var(--spacing-xl));
    }

    .timeline::-webkit-scrollbar {
        height: 8px;
    }

    .timeline::-webkit-scrollbar-track {
        background: var(--gray-200);
        border-radius: var(--border-radius);
    }

    .timeline::-webkit-scrollbar-thumb {
        background-color: var(--primary-black);
        border-radius: var(--border-radius);
    }

    .timeline-item {
        flex: 0 0 550px; /* Make tiles even wider for larger images */
        margin: 0 var(--spacing-md);
        width: auto !important; /* Override inline styles */
        left: auto !important; /* Override inline styles */
        padding: 0;
        position: relative; /* Establish stacking context */
    }

    .timeline-item:first-child {
        margin-left: 0;
    }

    .timeline-item:last-child {
        margin-right: 0;
    }

    /* Hide vertical timeline elements on desktop */
    .timeline::after,
    .timeline-item::after,
    .timeline-item .timeline-content::before {
        display: none;
    }
    
    .timeline-content {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .project-image {
        margin-top: auto; /* Push image to the bottom */
    }
}

/* The central timeline line */
.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--gray-300);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

/* Container around content */
.timeline-item {
    padding: var(--spacing-md) var(--spacing-xl);
    position: relative;
    background-color: inherit;
    width: 50%;
}

/* The circles on the timeline */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--primary-white);
    border: 3px solid var(--primary-black);
    top: 32px;
    border-radius: 50%;
    z-index: 1;
    transition: var(--transition);
}

.timeline-item:hover::after {
    transform: scale(1.2);
    background-color: var(--primary-black);
}

/* Place the container to the left */
.timeline-item.left {
    left: 0;
}

/* Place the container to the right */
.timeline-item.right {
    left: 50%;
}

/* Add arrows to the left container (pointing right) */
.timeline-item.left .timeline-content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 28px;
    width: 0;
    z-index: 1;
    right: -10px;
    border: medium solid var(--primary-white);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--primary-white);
}

/* Add arrows to the right container (pointing left) */
.timeline-item.right .timeline-content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 28px;
    width: 0;
    z-index: 1;
    left: -10px;
    border: medium solid var(--primary-white);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--primary-white) transparent transparent;to
}


/* Fix the circle for right containers */
.timeline-item.right::after {
    left: -8px;
}

.logo-container {
    width: 120px; /* Increased from 100px */
    height: 120px; /* Increased from 100px */
    border-radius: 50%;
    background-color: var(--primary-white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--gray-200);
}

.timeline-logo {
    max-height: 80px; /* Increased from 70px */
    max-width: 80px; /* Increased from 70px */
    object-fit: contain;
    display: block;
    margin-bottom: 0;
}

.timeline-year {
    display: block;
    text-align: center;
    font-size: 1.2rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    color: var(--gray-700);
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

.timeline-content {
    padding: var(--spacing-lg);
    background-color: var(--primary-white);
    position: relative;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.timeline-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
}

.timeline-card-link:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-black);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-black);
}

.timeline-header h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.timeline-header .company {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-black);
}

.timeline-header .period {
    display: block;
    font-size: 1rem;
    color: var(--gray-900);
    margin-top: var(--spacing-sm);
}

.description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0; /* Remove bottom margin */
    flex-grow: 1;
    text-align: left;
    padding: 0;
}

.achievements {
    display: flex;
    flex-wrap: nowrap; /* Keep items in a single row */
    gap: var(--spacing-sm);
    margin-top: auto;
    justify-content: center; /* Center the buttons */
    margin-bottom: var(--spacing-md); /* Add some space below the buttons */
    overflow-x: auto; /* Add horizontal scroll for smaller screens */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    padding-bottom: 5px; /* Space for scrollbar if visible */
}

.achievements::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
}

.achievement-link {
    font-size: 0.8rem;
    color: var(--gray-800);
    text-decoration: none;
    padding: 4px 10px;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    transition: var(--transition);
    white-space: nowrap; /* Prevent text from wrapping */
}

.achievement-link:hover {
    background-color: var(--gray-200);
    border-color: var(--gray-400);
}

.project-image {
    margin-top: var(--spacing-md);
    text-align: center;
}

.project-image-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.research-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Context for z-index */
    z-index: 1;
}

.research-image:hover {
    transform: scale(1.4) !important; /* Increased zoom effect */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4) !important; /* Deeper shadow */
    z-index: 10 !important; /* Bring to front */
}

.timeline-content.content-has-full-width-image {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
}

.timeline-content.content-has-full-width-image .project-image {
    margin-top: var(--spacing-md);
    text-align: center;
}

.timeline-content.content-has-full-width-image .research-image {
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    box-shadow: none;
}

/* Footer */
.footer {
    background-color: var(--gray-100);
    color: var(--gray-800);
    padding: var(--spacing-lg) 0; /* Reduced padding */
    text-align: center;
    border-top: 1px solid var(--gray-200);
}

.footer-content {
    text-align: center;
    padding: 40px 0;
}

.footer-content h3 {
    margin-bottom: 20px;
}

.footer-content .btn {
    margin-bottom: 20px;
}

.copyright {
    font-size: 0.9em;
    color: #888;
}

.footer h3 {
    font-size: 2em;
    font-weight: 600;
}

/* Responsive Grid */
@media screen and (max-width: 992px) {
    .timeline::after,
    .timeline-item::after,
    .timeline-item .timeline-content::before {
        display: none;
    }

    .timeline-item {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: var(--spacing-lg); /* Add space between items vertically */
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0;
    }

    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 12px;
    }

    .timeline-item .timeline-content::before {
        left: -10px;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--primary-white) transparent transparent;
    }

    .timeline-item.left .timeline-content::before, .timeline-item.right .timeline-content::before {
        left: -10px;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--primary-white) transparent transparent;
    }
}


/* Timeline content styling */
.timeline-header {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.timeline-header h3 {
    font-size: 1.25rem; /* Larger title */
    margin-bottom: var(--spacing-xs);
}

.timeline-header .company {
    display: block;
    font-size: 1.1rem; /* Larger company/institution */
    font-weight: 500;
    color: var(--primary-black);
}

.timeline-header .period {
    display: block;
    font-size: 1rem; /* Larger date */
    color: var(--gray-900);
    margin-top: var(--spacing-xs);
}

.description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    flex-grow: 1;
    text-align: left;
    padding: 0 var(--spacing-sm);
}

.project-image-link:hover .research-image {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.timeline-content.content-has-full-width-image {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
}

.timeline-content.content-has-full-width-image .project-image {
    margin-top: var(--spacing-md);
    text-align: center;
}

.timeline-content.content-has-full-width-image .research-image {
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    box-shadow: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
    }
    .header-actions {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
    }
    .header-link {
        margin-bottom: var(--spacing-sm);
    }
    .name {
        font-size: 2rem;
    }
    .title {
        font-size: 1rem;
    }
} 

/* Highlight style for specific tiles */
.timeline-item.highlight .timeline-content {
    background-color: var(--primary-white); /* Keep highlight background white */
    border: 2px solid var(--primary-black);
    box-shadow: var(--shadow-xl);
} 

.timeline-content .description {
    font-size: 1.1em;
    line-height: 1.6;
    color: #555;
}

.timeline-content p.description {
    margin-bottom: 15px;
} 

.affiliations {
    margin-top: 15px;
    font-size: 0.95em;
}

.centered-affiliations {
    text-align: center;
}

.description a,
.affiliations a {
    color: var(--primary-blue);
    text-decoration: none;
}

.description a:hover,
.affiliations a:hover {
    text-decoration: underline;
} 

 