body { background-color: #050505; color: #e5e5e5; overflow-x: hidden; perspective: 1000px; }
section[id] { scroll-margin-top: 6.5rem; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 3px;
    border-radius: 0.5rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

.glass-panel {
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

/* 3D FLIP CARD STYLES */
.flip-card { background-color: transparent; height: 320px; perspective: 1000px; cursor: pointer; }
.flip-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.8s; transform-style: preserve-3d; }
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card:focus-visible { outline: 2px solid #22d3ee; outline-offset: 4px; border-radius: 0.75rem; }
.flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 0.75rem; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; border: 1px solid rgba(255,255,255,0.1); }
.flip-card-front { background: rgba(20, 20, 20, 0.6); backdrop-filter: blur(10px); }
.flip-card-back { background: linear-gradient(145deg, rgba(34, 211, 238, 0.1), rgba(168, 85, 247, 0.1)); background-color: #0a0a0a; transform: rotateY(180deg); border: 1px solid rgba(34, 211, 238, 0.3); padding: 1.5rem; }

/* Reveal Animation */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.7s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Timeline */
.timeline {
    --timeline-axis-x: 1.125rem;
    --timeline-entry-indent: 4.5rem;
    --timeline-track-width: 2px;
    --timeline-track-top: 0px;
    --timeline-track-height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}
.timeline-entry {
    position: relative;
    display: block;
    width: 100%;
    padding: 0 0 4rem;
    padding-left: var(--timeline-entry-indent);
}
.timeline-entry:last-child {
    padding-bottom: 0;
}
.timeline-entry::before {
    content: '';
    position: absolute;
    top: 1.05rem;
    left: var(--timeline-axis-x);
    width: 1.25rem;
    height: 1px;
    background: linear-gradient(to right, rgba(34,211,238,0.45), rgba(34,211,238,0));
    pointer-events: none;
}
.timeline-entry-body {
    width: 100%;
    min-width: 0;
}
.timeline-entry-header {
    margin-bottom: 1.3rem;
}
.timeline-entry-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.8rem;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.timeline-company {
    color: rgba(255,255,255,0.72);
}
.timeline-company-current {
    color: #7dd3fc;
}
.timeline-meta-separator {
    width: 1.1rem;
    height: 1px;
    flex: 0 0 auto;
    background: linear-gradient(to right, rgba(34,211,238,0.5), rgba(168,85,247,0.45));
}
.timeline-duration {
    color: rgba(255,255,255,0.44);
}
.timeline-card-kicker {
    margin: 0 0 1rem;
    color: rgba(229,231,235,0.92);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.timeline-line,
.timeline-progress {
    position: absolute;
    top: var(--timeline-track-top);
    left: calc(var(--timeline-axis-x) - (var(--timeline-track-width) / 2));
    width: var(--timeline-track-width);
    pointer-events: none;
}
.timeline-line {
    height: var(--timeline-track-height);
    background: rgba(255,255,255,0.06);
    z-index: 0;
}
.timeline-progress {
    background: linear-gradient(to bottom, #22d3ee, #a855f7);
    height: 0;
    z-index: 1;
    transition: height 0.1s linear;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.4), 0 0 30px rgba(168, 85, 247, 0.15);
}

/* Timeline Dots */
.timeline-dot-current,
.timeline-dot {
    position: absolute;
    top: 0.5rem;
    border-radius: 50%;
    box-sizing: border-box;
    z-index: 10;
}
.timeline-dot-current {
    left: calc(var(--timeline-axis-x) - 9px);
    width: 18px;
    height: 18px;
    background: #22d3ee;
    border: 3px solid #050505;
    box-shadow: 0 0 0 4px rgba(34,211,238,0.15), 0 0 20px rgba(34,211,238,0.6);
    animation: dot-pulse 2.5s ease-in-out infinite;
}
.timeline-dot {
    left: calc(var(--timeline-axis-x) - 9px);
    width: 18px;
    height: 18px;
    background: #1a1a2e;
    border: 2px solid rgba(255,255,255,0.12);
    transition: all 0.3s ease;
}
.timeline-dot::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(34,211,238,0.15), 0 0 20px rgba(34,211,238,0.6); }
    50% { box-shadow: 0 0 0 8px rgba(34,211,238,0.08), 0 0 30px rgba(34,211,238,0.4); }
}

/* Timeline Cards */
.timeline-card {
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.75rem;
    padding: 1.75rem;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.25, 0, 0, 1);
}
.timeline-card:hover {
    background: rgba(255,255,255,0.035);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);
}
.timeline-card-active {
    border-color: rgba(34,211,238,0.15);
    box-shadow: inset 0 1px 0 rgba(34,211,238,0.06), 0 0 40px rgba(34,211,238,0.04);
}
.timeline-card-active:hover {
    border-color: rgba(34,211,238,0.25);
    box-shadow: inset 0 1px 0 rgba(34,211,238,0.08), 0 8px 32px rgba(0,0,0,0.3), 0 0 40px rgba(34,211,238,0.06);
}

/* Timeline List */
.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.7;
}
.timeline-list li {
    position: relative;
    padding-left: 1.25rem;
}
.timeline-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 1px;
    background: rgba(34,211,238,0.35);
    transform: rotate(45deg);
}
.timeline-card-active .timeline-list li::before {
    background: rgba(34,211,238,0.6);
    box-shadow: 0 0 6px rgba(34,211,238,0.3);
}

@media (max-width: 768px) {
    .timeline {
        --timeline-axis-x: 0.875rem;
        --timeline-entry-indent: 3.25rem;
    }

    .timeline-entry {
        padding-bottom: 3rem;
        padding-left: var(--timeline-entry-indent);
    }

    .timeline-entry-meta {
        gap: 0.55rem;
        flex-wrap: wrap;
    }

    .timeline-entry::before {
        width: 0.85rem;
    }
}

.blinking-cursor::after { content: '█'; animation: blink 1s step-start infinite; color: #22d3ee; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* PROFILE IMAGE STYLES */
.profile-container {
    position: relative;
    width: 180px;
    height: 180px;
}

.profile-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #22d3ee, #a855f7, #22d3ee);
    opacity: 0.7;
    filter: blur(8px);
    animation: spin 6s linear infinite;
}

.profile-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

/* Scanline effect over image */
.profile-image-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.3;
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.transition-delay-100 { transition-delay: 100ms; }
.transition-delay-200 { transition-delay: 200ms; }
.transition-delay-300 { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
    .flip-card-inner,
    .reveal,
    .profile-ring,
    .blinking-cursor::after {
        animation: none !important;
        transition: none !important;
    }
}
