/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==================== CSS Variables ==================== */
:root {
    --color-primary: #0055A4;
    --color-accent: #FF7F00;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;

    --transition-base: 0.5s ease;
    --transition-fast: 0.3s ease;

    --blur-standard: blur(20px) saturate(180%);
    --blur-light: blur(12px) saturate(150%);

    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
    --shadow-glass-light: 0 4px 16px 0 rgba(0, 0, 0, 0.04);
    --shadow-gallery: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ==================== Core Styles ==================== */
[x-cloak] {
    display: none !important;
}

body {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    background-attachment: fixed;
}

.bg-pattern {
    background-image:
        radial-gradient(circle at 2px 2px, rgba(0, 0, 0, 0.02) 1px, transparent 0),
        radial-gradient(circle at 50% 50%, rgba(0, 85, 164, 0.03), transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(255, 127, 0, 0.03), transparent 50%);
    background-size: 40px 40px, 100% 100%, 100% 100%;
    background-repeat: repeat, no-repeat, no-repeat;
    background-attachment: fixed;
}

/* ==================== Glassmorphism ==================== */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-glass);
}

.glass-light {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: var(--blur-light);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-glass-light);
}

/* ==================== Shared Animation Base ==================== */
@keyframes scroll-horizontal {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes advanced-glow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes item-pulse {

    0%,
    100% {
        --pulse-color: transparent;
        --pulse-border: rgba(255, 255, 255, 0.05);
        --pulse-icon: grayscale(1);
        --pulse-icon-op: 0.5;
        --pulse-year: var(--color-slate-900);
    }

    50% {
        --pulse-color: rgba(255, 127, 0, 0.1);
        --pulse-border: rgba(255, 127, 0, 0.5);
        --pulse-icon: grayscale(0);
        --pulse-icon-op: 1;
        --pulse-year: var(--color-accent);
    }
}

/* ==================== Scrolling Animations ==================== */
.animate-timeline,
.animate-gallery {
    display: flex;
    width: max-content;
}

.animate-timeline {
    animation: scroll-horizontal 50s linear infinite;
}

.animate-gallery {
    animation: scroll-horizontal 60s linear infinite;
}

.animate-timeline:hover,
.animate-gallery:hover {
    animation-play-state: paused;
}

/* ==================== Timeline Styles ==================== */
.timeline-item .icon,
.timeline-item .year,
.timeline-item .dot,
.timeline-item .card {
    transition: all var(--transition-base);
}

.timeline-item .icon {
    filter: grayscale(1);
    opacity: 0.5;
}

.timeline-item .year {
    color: var(--color-slate-800);
}

.timeline-item .dot {
    background-color: white;
    border-color: var(--color-slate-300);
}

.timeline-item .card {
    border-color: #e2e8f0;
}

/* Pulse Animation States */
.animate-glow {
    animation: item-pulse 4s ease-in-out infinite, advanced-glow 4s ease-in-out infinite;
}

.animate-glow .icon {
    filter: var(--pulse-icon);
    opacity: var(--pulse-icon-op);
}

.animate-glow .year {
    color: var(--pulse-year);
}

.animate-glow .dot {
    border-color: var(--pulse-border);
    background-color: var(--pulse-year);
    transform: scale(1.5);
}

.animate-glow .card {
    border-color: var(--pulse-border);
    background: var(--pulse-color);
}

/* ==================== Gallery Styles ==================== */
.gallery-image {
    width: 60vw;
    height: 45vh;
    object-fit: cover;
    border-radius: 2rem;
    margin-right: 2rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-gallery);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== Custom Scrollbar ==================== */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* ==================== Typography ==================== */
.text-glow {
    text-shadow: 0 0 20px rgba(0, 85, 164, 0.5);
}

.text-glow-accent {
    text-shadow: 0 0 20px rgba(255, 127, 0, 0.5);
}

/* ==================== Image Grid & Hover ==================== */
.img-grid {
    perspective: 1000px;
}

.img-hover-wrapper {
    position: relative;
}

.img-hover-wrapper::before {
    content: '';
    position: absolute;
    inset: -0.5rem;
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
    border-radius: 1rem;
    opacity: 0.1;
    filter: blur(12px);
    transition: opacity var(--transition-fast);
}

.img-hover-wrapper:hover::before {
    opacity: 0.2;
}

.img-hover {
    position: relative;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    object-fit: cover;
    transition: transform var(--transition-fast);
}

.img-hover-wrapper:hover .img-hover {
    transform: scale(1.05) rotate(1deg);
}