/* CSS Variables - Warm Neutral Theme */

:root {
    --bg-primary: #fdfcfb;
    --bg-secondary: #f5f0ec;
    --text-primary: #1e1c1a;
    --text-secondary: #5a534f;
    --accent: #d9723a;
    --accent-text: #b5552a;
    --border: #e8e2dc;
    --overlay-bg: rgba(20, 18, 16, 0.85);
    --shadow-sm: 0 2px 8px rgba(30, 28, 26, 0.08);
    --shadow-md: 0 4px 12px rgba(30, 28, 26, 0.1);
    --shadow-lg: 0 4px 24px rgba(30, 28, 26, 0.25);
    --color-on-dark: #f5f0ec;
    --overlay-accent: rgba(255, 255, 255, 0.15);
    --error: #b53a3a;
    --font-body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 1.5rem);
}

/* Header & Navigation */
.header {
    position: sticky;
    top: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    gap: 1rem;
}

.nav-social {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.nav-social a img {
    width: 24px;
    height: 24px;
    transition: opacity 0.2s, transform 0.2s;
}

.nav-social a:hover img {
    opacity: 0.75;
    transform: scale(1.1);
}

.nav-social a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent-text);
}

.nav-link.active {
    color: var(--accent-text);
}

.nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Nav Toggle (Mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section with Avatar */
.hero {
    padding: 6rem 0;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-avatar {
    width: clamp(120px, 30vw, 200px);
    height: clamp(120px, 30vw, 200px);
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.hero-text {
    text-align: left;
    flex: 1;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

.bio {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 600px;
    margin: 0;
}

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

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-avatar {
        width: clamp(120px, 30vw, 200px);
        height: clamp(120px, 30vw, 200px);
    }

    .hero-text {
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--color-on-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn--secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.btn--primary-dark {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Projects Section */
.projects {
    padding: 6rem 0;
}

.projects h2 {
    font-family: var(--font-heading);
    text-align: left;
    margin-bottom: 3rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

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

.project-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Project Card Images */
.project-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-out;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: 320px;
    }

    .project-image-wrapper {
        height: clamp(140px, 35vw, 200px);
    }
}

.project-card h3 {
    font-family: var(--font-heading);
    margin: 1.25rem 1.5rem 0.5rem;
    font-size: 1.125rem;
    text-align: left;
}

.project-card p {
    color: var(--text-secondary);
    margin: 0 1.5rem 1rem;
    line-height: 1.6;
    text-align: left;
}

.tech-badge {
    display: inline-block;
    background-color: var(--bg-primary);
    color: var(--accent-text);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin: 0 0.5rem 1.5rem 1.5rem;
}


/* Tech Stack Section */
.tech-stack {
    padding: 2rem 0;
    background-color: var(--bg-secondary);
}

.tech-stack h2 {
    font-family: var(--font-heading);
    text-align: left;
    margin-bottom: 1.5rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

/* Category rows */
.tech-categories {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.tech-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.tech-category__label {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.tech-category__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
}

.tech-list__link {
    display: inline-block;
    background-color: var(--bg-primary);
    padding: 0.375rem 0.875rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.tech-list__link:hover {
    color: var(--accent);
}

.tech-list__link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Dashboard Teaser Section (index.html) */
.dashboard-teaser {
    padding: 4rem 0;
}

.dashboard-teaser h2 {
    font-family: var(--font-heading);
    text-align: left;
    margin-bottom: 2rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.project-card--full {
    max-width: 1000px;
    margin: 0 auto;
    grid-column: 1 / -1;
}

/* Teaser Card */
.teaser-card {
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.teaser-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.teaser-card::before {
    content: '';
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
    z-index: 0;
}

.teaser-card:hover::before {
    opacity: 1;
}

.teaser-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Sparkline */
.teaser-sparkline-wrap {
    position: relative;
    padding: 2rem 0 1.5rem;
    overflow: hidden;
}

.teaser-sparkline {
    width: 100%;
    height: 60px;
    display: block;
}

.teaser-sparkline-path {
    opacity: 0.35;
    stroke-dasharray: 300;
    stroke-dashoffset: -300;
    animation: spark-trace 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.2s;
}

@keyframes spark-trace {
    to { stroke-dashoffset: 0; }
}

.teaser-sparkline-dot {
    opacity: 0;
    animation: dot-fade-in 0.3s ease-out forwards;
    animation-delay: 1.7s;
}

@keyframes dot-fade-in {
    to { opacity: 1; }
}

.teaser-card:hover .teaser-sparkline-dot {
    animation: dot-pulse 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes dot-pulse {
    0%, 100% { r: 3.5; opacity: 1; }
    50% { r: 5; opacity: 0.6; }
}

/* Token Counter */
.teaser-counter {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin: 1rem 1.5rem 1.5rem;
    flex-wrap: wrap;
}

.counter-number {
    font-family: 'Figtree', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.counter-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1;
}

/* Dashboard Section (full page on dashboard.html) */
.dashboard-container {
    width: 100%;
    height: 70vh;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-secondary);
}

.dashboard-container iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    max-height: 900px;
    border: none;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 0.5rem;
    }

    .dashboard-container iframe {
        height: 500px !important;
    }
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--accent);
}

.social-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Visualizations Grid */
.visualizations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.visualizations-grid figure {
    text-align: center;
    width: 100%;
    position: relative;
    display: block;
    cursor: pointer;
    transition: all 0.2s ease;
}

.visualizations-grid img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.visualizations-grid figcaption {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu.active li a {
        min-height: 44px;
        padding: 0.75rem 0.5rem;
        display: inline-flex;
        align-items: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .bio {
        font-size: 1rem;
    }

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

    .visualizations-grid figure:hover {
        transform: none;
    }
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    background-color: var(--accent);
    color: var(--color-on-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 500;
    transition: top 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.lightbox .close-lightbox {
    position: absolute;
    top: 30px;
    right: 30px;
    color: var(--color-on-dark);
    font-size: 48px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease;
    background: none;
    border: none;
    line-height: 1;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox .close-lightbox:hover {
    transform: scale(1.2);
    opacity: 0.7;
}

.lightbox .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--overlay-accent);
    color: var(--color-on-dark);
    border: none;
    padding: 16px;
    font-size: 28px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.lightbox .nav-btn:hover {
    background-color: color-mix(in srgb, var(--color-on-dark) 30%, transparent);
}

.lightbox .close-lightbox:focus-visible,
.lightbox .nav-btn:focus-visible {
    outline: 2px solid var(--color-on-dark);
    outline-offset: 4px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .lightbox .prev { left: 15px; }
    .lightbox .next { right: 15px; }
    .lightbox .nav-btn { padding: 14px 12px; font-size: 24px; }
}


.visualizations-grid figure:hover img {
    filter: brightness(0.5);
}

.visualizations-grid figure:hover {
    transform: scale(1.03);
}

.visualizations-grid figure {
    overflow: hidden;
}

/* Side Project Navigation (prev/next arrows on viewport edges) */
.project-nav-side {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
}

.project-nav-side--prev {
    left: 0.75rem;
}

.project-nav-side--next {
    right: 0.75rem;
}

.project-nav-side__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--accent-text);
    font-size: 1.25rem;
    transition: background-color 0.2s, color 0.2s, transform 0.2s ease-out;
}

.project-nav-side__link:hover {
    background-color: var(--bg-secondary);
    color: var(--accent);
    transform: scale(1.1);
}

.project-nav-side__link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Subtle chevron-style arrows using pseudo-elements for cleaner look */
.project-nav-side__link::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.project-nav-side--prev .project-nav-side__link::before {
    transform: rotate(-135deg);
    margin-left: 2px;
}

.project-nav-side--next .project-nav-side__link::before {
    transform: rotate(45deg);
    margin-right: 2px;
}

/* Article section spacing */
article > h3 {
    font-family: var(--font-heading);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

article h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

/* Contact Form Styles */
.contact-section {
    padding: 4rem 0;
}

.contact-title {
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 2rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus-visible {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}

.form-textarea {
    resize: vertical;
}

.contact-status {
    margin-top: 1rem;
}

@media (min-width: 769px) {
    .visualizations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Form Invalid State */
.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

.form-input:invalid:not(:placeholder-shown):focus-visible {
    border-color: var(--error);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--error) 25%, transparent);
}

.error-message {
    display: none;
    color: var(--error);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.form-input:invalid:not(:placeholder-shown) ~ .error-message {
    display: block;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Ensure sparkline is fully visible */
    .teaser-sparkline-path {
        stroke-dashoffset: 0 !important;
        opacity: 0.35 !important;
    }

    .teaser-sparkline-dot {
        opacity: 1 !important;
    }
}

/* Timeline Section */
.timeline-section {
    padding: 5rem 0;
}

.timeline-section h2 {
    font-family: var(--font-heading);
    text-align: left;
    margin-bottom: 3rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.timeline {
    position: relative;
    padding-left: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Left-edge connecting line */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 40px;
    bottom: 40px;
    width: 2px;
    background-color: var(--border);
}

/* Timeline Pop-out Animation */
@keyframes tl-icon-pop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes tl-icon-pop-pair {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes tl-content-pop {
    0% { transform: translateX(30px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.tl-item .tl-avatar-wrap img,
.tl-item .tl-logos-pair .logo-left,
.tl-item .tl-logos-pair .logo-right {
    opacity: 0;
}

.tl-item.visible .tl-avatar-wrap img {
    animation: tl-icon-pop 500ms cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i, 0) * 80ms) both;
}

.tl-item.visible .tl-logos-pair .logo-left,
.tl-item.visible .tl-logos-pair .logo-right {
    animation: tl-icon-pop-pair 500ms cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i, 0) * 80ms) both;
}

/* End Timeline Pop-out Animation */

.tl-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    background: transparent;
}

.tl-item:last-child {
    margin-bottom: 0;
}

.tl-avatar-wrap {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.tl-avatar-wrap img {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bg-secondary);
    border: 2px solid var(--accent);
    box-shadow: 0 2px 8px rgba(30, 28, 26, 0.08);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

/* Outline modifier — desaturated look */
.tl-avatar-wrap.outline img {
    filter: saturate(0.3) brightness(0.85);
}

/* Hover pop-out for entire timeline item */
.tl-item:hover .tl-avatar-wrap img {
    transform: translateY(-4px) scale(1.12);
    filter: saturate(0.5) brightness(0.92) !important;
    box-shadow: 0 8px 24px rgba(30, 28, 26, 0.22);
}

.tl-item:hover .tl-logos-pair .logo-left {
    transform: translateY(-4px) scale(1.12);
    filter: saturate(0.5) brightness(0.92) !important;
    box-shadow: 0 8px 24px rgba(30, 28, 26, 0.22);
}

.tl-item:hover .tl-logos-pair .logo-right {
    transform: translateY(4px) scale(1.12);
    filter: saturate(0.5) brightness(0.92) !important;
    box-shadow: 0 8px 24px rgba(30, 28, 26, 0.22);
}

.tl-item:hover .tl-content {
    transform: translateX(-4px);
}

/* Double-logo pair — both logos visible, no clip-path */
.tl-logos-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    position: relative;
    width: clamp(52px, 13vw, 68px);
    height: auto;
    margin-left: 5px;
}

.tl-logos-pair .logo-left {
    width: clamp(44px, 11vw, 58px);
    height: clamp(44px, 11vw, 58px);
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bg-secondary);
    border: 2px solid var(--accent);
    box-shadow: 0 2px 8px rgba(30, 28, 26, 0.08);
    filter: saturate(0.3) brightness(0.85);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.tl-logos-pair .logo-right {
    width: clamp(44px, 11vw, 58px);
    height: clamp(44px, 11vw, 58px);
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bg-secondary);
    border: 2px solid var(--accent);
    box-shadow: 0 2px 8px rgba(30, 28, 26, 0.08);
    filter: saturate(0.3) brightness(0.85);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.tl-content {
    flex: 1;
    padding-top: 0.5rem;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tl-content .timeline-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.tl-content .timeline-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-style: italic;
    margin: 0 0 0.25rem;
    line-height: 1.4;
}

.tl-content .timeline-location {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0 0 0.25rem;
}

.tl-content .timeline-location--tiny {
    font-size: 0.8125rem;
    margin: 0 0 0.25rem;
}

.tl-content .timeline-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

@media (max-width: 768px) {
    .timeline-section {
        padding: 3rem 0;
    }

    .timeline {
        padding-left: 2.5rem;
    }

    .tl-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .tl-content {
        padding-top: 0;
    }

    .timeline-title {
        font-size: 1rem;
    }

    .tl-logos-pair {
        margin-left: 0;
    }

    .timeline::before {
        display: none;
    }
}
