/* ===== ORDINO HISTÒRIA - PROFESSIONAL MINIMALIST PRESENTATION ===== */

/* CSS Custom Properties for Design System */
:root {
    /* Typography Scale - Perfect Fourth (1.333) */
    --font-size-xs: 0.75rem;
    --font-size-sm: 1rem;
    --font-size-base: 1.333rem;
    --font-size-lg: 1.777rem;
    --font-size-xl: 2.369rem;
    --font-size-2xl: 3.157rem;
    --font-size-3xl: 4.209rem;
    --font-size-4xl: 5.610rem;

    /* Refined Color Palette */
    --color-primary: #4f46e5;
    --color-primary-light: #6366f1;
    --color-primary-dark: #3730a3;
    --color-secondary: #7c3aed;
    --color-accent: #f59e0b;

    /* Neutral Colors */
    --color-neutral-50: #ffffff;
    --color-neutral-100: #f5f5f4;
    --color-neutral-200: #e7e5e4;
    --color-neutral-300: #d6d3d1;
    --color-neutral-400: #a8a29e;
    --color-neutral-500: #78716c;
    --color-neutral-600: #57534e;
    --color-neutral-650: #4a453f; /* Nuevo color para mejor contraste en párrafos */
    --color-neutral-700: #44403c;
    --color-neutral-800: #292524;
    --color-neutral-900: #1c1917;

    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-base: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-base: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 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);
    --shadow-timeline: 0 25px 50px -12px rgba(79, 70, 229, 0.25);

    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-base: 250ms ease-out;
    --transition-slow: 350ms ease-out;
}

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

html {
    scroll-behavior: smooth;
    font-size: 18px; /* Larger base for presentation */
}

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.65;
    color: var(--color-neutral-800);
    background: #ffffff;
    overflow-x: hidden;
    position: relative;
}

/* Enhanced Typography System */
h1, h2, h3 {
    font-weight: 600;
    line-height: 1.1;
    color: var(--color-neutral-900);
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(var(--font-size-2xl), 6vw, var(--font-size-4xl));
    font-weight: 700;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(var(--font-size-xl), 5vw, var(--font-size-3xl));
    margin-bottom: var(--space-lg);
    font-weight: 650;
}

h3 {
    font-size: clamp(var(--font-size-xl), 5vw, var(--font-size-3xl));
    color: var(--color-neutral-900);
    margin-bottom: var(--space-lg);
    font-weight: 650;
}

p {
    font-size: clamp(var(--font-size-sm), 2vw, var(--font-size-base));
    line-height: 1.6;
    color: var(--color-neutral-650); /* Mejorado para mejor contraste */
    max-width: 100%;
    margin-bottom: var(--space-lg);
}

/* Main Container */
.timeline-container {
    max-width: 90vw;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Enhanced Header Section */
.header {
    text-align: center;
    padding: var(--space-4xl) 0 var(--space-5xl);
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(600px, 90vw);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.3;
}

.main-title {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-lg);
    position: relative;
    animation: titleFadeIn 1s ease-out forwards;
}

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

.subtitle {
    font-size: clamp(var(--font-size-lg), 3vw, var(--font-size-xl));
    color: var(--color-neutral-600); /* Mejorado para mejor contraste */
    font-weight: 400;
    font-style: italic;
    margin-bottom: var(--space-3xl);
    animation: subtitleFadeIn 1s ease-out 0.3s both;
}

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

/* Refined Handdrawn Accent */
.handdrawn-accent {
    width: 140px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    margin: 0 auto var(--space-xl);
    border-radius: var(--radius-sm);
    position: relative;
    transform: rotate(-0.8deg);
    animation: accentFadeIn 1s ease-out 0.6s both;
    box-shadow: var(--shadow-sm);
}

@keyframes accentFadeIn {
    from {
        opacity: 0;
        transform: rotate(-0.8deg) scaleX(0);
    }
    to {
        opacity: 1;
        transform: rotate(-0.8deg) scaleX(1);
    }
}

/* Header Image Styles */
.header-image {
    text-align: center;
    margin: var(--space-xl) 0;
}

.main-header-img {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base);
}

.main-header-img:hover {
    transform: scale(1.02);
}

/* Project Description */
.project-description {
    max-width: 800px;
    margin: var(--space-2xl) auto var(--space-xl);
    text-align: center;
}

.project-description p {
    font-size: clamp(var(--font-size-sm), 2vw, var(--font-size-base));
    line-height: 1.6;
    color: var(--color-neutral-650); /* Mejorado para mejor contraste */
    font-style: italic;
    margin: 0;
    padding: var(--space-lg) var(--space-xl);
    background: rgba(79, 70, 229, 0.02);
    border-radius: var(--radius-base);
    border-left: 4px solid var(--color-primary);
    text-align: justify;
}

.handdrawn-accent::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 15px;
    width: 110px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
    border-radius: var(--radius-sm);
    transform: rotate(1.6deg);
    opacity: 0.7;
}

.handdrawn-accent::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    border-radius: var(--radius-sm);
}

/* Enhanced Timeline */
.timeline {
    position: relative;
    padding: var(--space-xl) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -20px;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, var(--color-primary), var(--color-primary-dark));
    border-radius: 50%;
    box-shadow:
        var(--shadow-lg),
        0 0 0 4px var(--color-neutral-50),
        0 0 0 6px var(--color-primary);
    z-index: 10;
}

.timeline::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -20px;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-neutral-300);
    border-radius: 50%;
    box-shadow:
        0 0 0 3px var(--color-neutral-50),
        0 0 0 4px var(--color-neutral-300);
    z-index: 10;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--color-primary-light) 5%,
        var(--color-primary) 25%,
        var(--color-secondary) 50%,
        var(--color-primary) 75%,
        var(--color-primary-light) 95%,
        transparent 100%
    );
    transform: translateX(-50%);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-timeline);
    animation: timelineGlow 3s ease-in-out infinite alternate;
}

@keyframes timelineGlow {
    from {
        box-shadow: var(--shadow-timeline);
    }
    to {
        box-shadow:
            var(--shadow-timeline),
            0 0 20px rgba(79, 70, 229, 0.15),
            0 0 40px rgba(79, 70, 229, 0.1);
    }
}

.timeline-line::before {
    content: '';
    position: absolute;
    top: 30px;
    left: -2px;
    width: 8px;
    height: calc(100% - 60px);
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 12px,
            rgba(255,255,255,0.4) 12px,
            rgba(255,255,255,0.4) 16px
        );
    border-radius: var(--radius-sm);
}

.timeline-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 1px;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255,255,255,0.6) 20%,
        rgba(255,255,255,0.8) 50%,
        rgba(255,255,255,0.6) 80%,
        transparent 100%
    );
    border-radius: var(--radius-sm);
}

/* Enhanced Timeline Items */
.timeline-item {
    position: relative;
    margin-bottom: var(--space-5xl);
    padding: var(--space-xl) 0;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: transform var(--transition-slow);
}

.timeline-item:hover {
    transform: translateY(-4px);
}

.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.4s; }
.timeline-item:nth-child(4) { animation-delay: 0.6s; }
.timeline-item:nth-child(5) { animation-delay: 0.8s; }
.timeline-item:nth-child(6) { animation-delay: 1.0s; }
.timeline-item:nth-child(7) { animation-delay: 1.2s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Year Markers */
.year-marker {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 20;
    margin-bottom: var(--space-3xl);
}

.year {
    display: block;
    background: transparent;
    padding: var(--space-lg) var(--space-2xl);
    border-radius: var(--radius-full);
    font-size: var(--font-size-base);
    font-weight: 650;
    color: white;
    box-shadow:
        var(--shadow-xl),
        0 0 0 3px var(--color-neutral-50),
        0 0 0 5px var(--color-primary);
    border: 3px solid var(--color-neutral-50);
    position: relative;
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    letter-spacing: 0.5px;
}

.year:hover {
    transform: scale(1.05);
    box-shadow:
        var(--shadow-xl),
        0 0 0 3px var(--color-neutral-50),
        0 0 0 5px var(--color-primary),
        0 0 20px rgba(79, 70, 229, 0.3);
}

.year::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-full);
    z-index: -1;
}

.year::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.8) 0%,
        rgba(255,255,255,0.4) 50%,
        rgba(255,255,255,0.1) 100%
    );
    border-radius: var(--radius-full);
    pointer-events: none;
}

/* Enhanced Content Wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-4xl);
    align-items: center;
    margin-top: var(--space-5xl);
    padding: 0 var(--space-3xl);
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.content-wrapper:hover {
    transform: translateY(-2px);
}

.content-wrapper.reverse {
    direction: rtl;
}

.content-wrapper.reverse > * {
    direction: ltr;
}

/* Enhanced Image Container */
.image-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--color-neutral-100);
    transition: all var(--transition-slow);
    cursor: pointer;
}

.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(79, 70, 229, 0.05) 0%,
        rgba(124, 58, 237, 0.03) 100%
    );
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.image-container:hover::before {
    opacity: 1;
}

.image-container:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Enhanced Placeholder Images */
.placeholder-image {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-slow);
    background-size: cover;
    background-position: center;
}

.image-container:hover .placeholder-image {
    transform: scale(1.05);
}

/* Simplified visual representations for each period */
.placeholder-image.prehistoric {
    background:
        radial-gradient(ellipse at 30% 20%, #DEB887 0%, transparent 40%),
        radial-gradient(ellipse at 70% 30%, #CD853F 0%, transparent 35%),
        radial-gradient(ellipse at 20% 80%, #8B4513 0%, transparent 30%),
        linear-gradient(180deg, #87CEEB 0%, #F4A460 40%, #8B4513 100%);
    position: relative;
}

.placeholder-image.prehistoric::before {
    content: "⛰️";
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.placeholder-image.roman {
    background:
        linear-gradient(90deg, #DC143C 0%, #DC143C 15%, #F5DEB3 15%, #F5DEB3 85%, #DC143C 85%, #DC143C 100%),
        linear-gradient(0deg, #8B0000 0%, #DC143C 50%, #F08080 100%);
    position: relative;
}

.placeholder-image.roman::before {
    content: "🏛️";
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.placeholder-image.medieval {
    background:
        radial-gradient(circle at 50% 40%, #4682B4 0%, transparent 60%),
        linear-gradient(135deg, #191970 0%, #4682B4 30%, #87CEEB 70%, #F0F8FF 100%);
    position: relative;
}

.placeholder-image.medieval::before {
    content: "🏰";
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.placeholder-image.parage {
    background:
        radial-gradient(ellipse at 50% 50%, #FFF8DC 0%, transparent 70%),
        linear-gradient(45deg, #B8860B 0%, #DAA520 30%, #FFD700 60%, #FFF8DC 100%);
    position: relative;
}

.placeholder-image.parage::before {
    content: "📜";
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.placeholder-image.iron {
    background:
        radial-gradient(circle at 60% 40%, #FF4500 0%, transparent 30%),
        radial-gradient(circle at 30% 60%, #2F4F4F 0%, transparent 40%),
        linear-gradient(135deg, #2F4F4F 0%, #696969 50%, #A9A9A9 100%);
    position: relative;
}

.placeholder-image.iron::before {
    content: "⚒️";
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.placeholder-image.modern {
    background:
        radial-gradient(circle at 20% 80%, #32CD32 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, #90EE90 0%, transparent 40%),
        linear-gradient(135deg, #228B22 0%, #32CD32 40%, #90EE90 80%, #F0FFF0 100%);
    position: relative;
}

.placeholder-image.modern::before {
    content: "🏘️";
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Texture overlay only for specific elements */
.image-texture {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0,0,0,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Enhanced Image Caption */
.image-caption {
    position: absolute;
    bottom: var(--space-lg);
    left: var(--space-lg);
    right: var(--space-lg);
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    color: white;
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-base);
    font-size: var(--font-size-sm);
    text-align: center;
    font-weight: 500;
    z-index: 10;
    transform: translateY(10px);
    opacity: 0;
    transition: all var(--transition-base);
}

.image-container:hover .image-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Add photo-realistic film effect */
.placeholder-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 1px,
            rgba(0,0,0,0.01) 1px,
            rgba(0,0,0,0.01) 2px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 1px,
            rgba(0,0,0,0.01) 1px,
            rgba(0,0,0,0.01) 2px
        );
    border-radius: 15px;
    pointer-events: none;
}

/* Enhanced Image Shadow */
.image-shadow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow:
        inset 0 0 30px rgba(0,0,0,0.08),
        var(--shadow-lg);
    border-radius: var(--radius-xl);
    pointer-events: none;
    transition: box-shadow var(--transition-slow);
}

.image-container:hover .image-shadow {
    box-shadow:
        inset 0 0 30px rgba(0,0,0,0.12),
        var(--shadow-xl);
}

.image-shadow::after {
    content: '';
    position: absolute;
    top: var(--space-base);
    left: var(--space-base);
    right: var(--space-base);
    bottom: var(--space-base);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: var(--radius-lg);
    transition: opacity var(--transition-base);
}

.image-container:hover .image-shadow::after {
    opacity: 0.7;
}

/* Enhanced Text Content */
.text-content {
    padding: var(--space-xl);
    width: 100%;
    transition: transform var(--transition-slow);
}

/* Text-only sections with timeline alternating titles */
.content-wrapper.text-only {
    display: block;
    max-width: 95%;
    position: relative;
}

.content-wrapper.text-only .text-content {
    padding: var(--space-2xl) 0;
    max-width: none;
}

/* Content blocks alternating with titles */
.content-section {
    margin-bottom: var(--space-3xl);
    width: 100%;
    position: relative;
}

/* Right side content (title + text) */
.content-section.right {
    margin-left: 50%;
    width: 50%;
    padding-left: var(--space-3xl);
    text-align: left;
}

.content-section.right h2,
.content-section.right h3 {
    text-align: left;
    margin-bottom: var(--space-lg);
    position: relative;
    color: var(--color-neutral-700);
    transition: color var(--transition-base);
    cursor: pointer;
}

.content-section.right:hover h2,
.content-section.right:hover h3 {
    color: var(--color-primary-dark);
}

.content-section.right h2::after,
.content-section.right h3::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-sm);
    transform: rotate(-0.5deg);
    transition: all var(--transition-base);
}

.content-section.right:hover h2::after,
.content-section.right:hover h3::after {
    width: 120px;
    transform: rotate(0deg);
}

.content-section.right p {
    text-align: justify;
    margin-bottom: var(--space-lg);
}

/* Left side content (title + text) */
.content-section.left {
    width: 50%;
    padding-right: var(--space-3xl);
    text-align: right;
}

.content-section.left h2,
.content-section.left h3 {
    text-align: right;
    margin-bottom: var(--space-lg);
    position: relative;
    color: var(--color-neutral-700);
    transition: color var(--transition-base);
    cursor: pointer;
}

.content-section.left:hover h2,
.content-section.left:hover h3 {
    color: var(--color-primary-dark);
}

.content-section.left h2::after,
.content-section.left h3::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    right: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-sm);
    transform: rotate(0.5deg);
    transition: all var(--transition-base);
}

.content-section.left:hover h2::after,
.content-section.left:hover h3::after {
    width: 120px;
    transform: rotate(0deg);
}

.content-section.left p {
    text-align: justify;
    margin-bottom: var(--space-lg);
}

/* Images in content sections */
.section-image {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-xl);
    text-align: center;
    width: 100%;
}

.content-img {
    width: 80%;
    max-width: 400px;
    height: auto;
    min-height: 200px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-base);
    border: 2px solid var(--color-neutral-200);
    background-color: var(--color-neutral-100);
    display: block;
}

.content-img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl), 0 10px 20px rgba(79, 70, 229, 0.15);
}

.text-content:hover {
    transform: translateX(8px);
}

.content-wrapper.reverse .text-content:hover {
    transform: translateX(-8px);
}

/* Los estilos de títulos ahora están en .content-section */

/* Enhanced Footer */
.footer {
    text-align: center;
    padding: var(--space-4xl) 0 var(--space-xl);
    position: relative;
    margin-top: var(--space-5xl);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(400px, 80vw);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-neutral-300), transparent);
}

.handdrawn-accent-bottom {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-secondary), transparent);
    margin: 0 auto var(--space-xl);
    transform: rotate(0.8deg);
    border-radius: var(--radius-sm);
    animation: bottomAccentPulse 2s ease-in-out infinite alternate;
}

@keyframes bottomAccentPulse {
    from {
        opacity: 0.7;
        transform: rotate(0.8deg) scaleX(1);
    }
    to {
        opacity: 1;
        transform: rotate(0.8deg) scaleX(1.1);
    }
}

.footer-text {
    font-size: var(--font-size-base);
    color: var(--color-neutral-600); /* Mejorado para mejor contraste */
    font-style: italic;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
        padding: 0 var(--space-xl);
    }

    .content-wrapper.reverse {
        direction: ltr;
    }

    .timeline-line {
        display: none;
    }

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

    .year-marker {
        position: static;
        transform: none;
        margin-bottom: var(--space-xl);
        display: flex;
        justify-content: center;
    }

    .timeline-item {
        margin-bottom: var(--space-5xl);
        padding: var(--space-base) 0;
    }

    .content-wrapper {
        margin-top: var(--space-3xl);
    }

    .text-content:hover,
    .content-wrapper.reverse .text-content:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-base: 1.2rem;
        --font-size-lg: 1.5rem;
        --font-size-xl: 2rem;
        --font-size-2xl: 2.5rem;
        --font-size-3xl: 3rem;
        --font-size-4xl: 3.5rem;
    }

    .timeline-container {
        padding: 0 var(--space-base);
    }

    html {
        font-size: 16px;
    }

    .header {
        padding: var(--space-xl) 0 var(--space-3xl);
    }

    .content-wrapper {
        padding: 0;
        gap: var(--space-xl);
    }

    .text-content {
        padding: var(--space-base);
    }

    .timeline-item {
        margin-bottom: var(--space-4xl);
    }

    .image-container:hover {
        transform: translateY(-2px) scale(1.01);
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        gap: var(--space-lg);
    }

    .year {
        padding: var(--space-base) var(--space-lg);
        font-size: var(--font-size-sm);
    }

    .header {
        padding: var(--space-lg) 0 var(--space-xl);
    }
}

/* Enhanced Print Styles */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    html {
        font-size: 11px;
    }

    .timeline-item {
        page-break-inside: avoid;
        margin-bottom: var(--space-3xl);
    }

    .image-container {
        background: var(--color-neutral-200) !important;
    }

    .year {
        color: var(--color-neutral-800) !important;
        box-shadow: 0 0 0 2px var(--color-neutral-800) !important;
    }

    .timeline-line {
        background: var(--color-neutral-400) !important;
    }

    .handdrawn-accent,
    .handdrawn-accent-bottom {
        background: var(--color-neutral-600) !important;
    }

    .main-title {
        -webkit-text-fill-color: var(--color-neutral-900) !important;
        color: var(--color-neutral-900) !important;
    }
}

/* Enhanced Accessibility & User Preferences */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #0000ee;
        --color-secondary: #800080;
        --color-neutral-50: #ffffff;
        --color-neutral-900: #000000;
        --color-neutral-800: #1a1a1a;
        --color-neutral-600: #333333;
    }

    .main-title {
        -webkit-text-fill-color: var(--color-neutral-900);
        color: var(--color-neutral-900);
    }

    .year {
        color: var(--color-neutral-900);
        background: var(--color-neutral-50);
        box-shadow: 0 0 0 3px var(--color-neutral-900);
    }

    .timeline-line {
        background: var(--color-neutral-900);
    }
}

@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;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --color-neutral-50: #0a0a0a;
        --color-neutral-100: #171717;
        --color-neutral-200: #262626;
        --color-neutral-300: #404040;
        --color-neutral-400: #525252;
        --color-neutral-500: #737373;
        --color-neutral-600: #a3a3a3;
        --color-neutral-700: #d4d4d4;
        --color-neutral-800: #e5e5e5;
        --color-neutral-900: #f5f5f5;
    }

    .main-title {
        background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .image-container {
        background: var(--color-neutral-200);
    }

    .year {
        background: var(--color-neutral-100);
        border-color: var(--color-neutral-100);
    }
}

/* Focus Management for Accessibility */
.year:focus,
.image-container:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Utility Classes */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 6px;
}