.cyber-hex-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    background-image: 
        linear-gradient(30deg, var(--cert-hex) 12%, transparent 12.5%, transparent 87%, var(--cert-hex) 87.5%, var(--cert-hex)),
        linear-gradient(150deg, var(--cert-hex) 12%, transparent 12.5%, transparent 87%, var(--cert-hex) 87.5%, var(--cert-hex)),
        linear-gradient(30deg, var(--cert-hex) 12%, transparent 12.5%, transparent 87%, var(--cert-hex) 87.5%, var(--cert-hex)),
        linear-gradient(150deg, var(--cert-hex) 12%, transparent 12.5%, transparent 87%, var(--cert-hex) 87.5%, var(--cert-hex));
}

.cyber-network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* Timeline Styles */
.timeline-header {
    text-align: center;
    margin-bottom: 2rem;
}

.timeline-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    /* background: linear-gradient(90deg, #ff0080, #ff8c00, #40e0d0); */
    /* -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent; */
}

.timeline-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.timeline {
    position: relative;
    padding: 1rem 0;
}

/* Central animated timeline path */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, 
        var(--accent),
        #ff0080,
        #ff8c00,
        #40e0d0,
        #9b59b6
    );
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 3rem);
    margin-bottom: 2rem;
    position: relative;
    opacity: 1;
    transform: translateX(0);
    /* animation: slideIn 0.6s forwards; */
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 3rem);
    /* transform: translateX(50px); */
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }

/* Connection line from card to timeline */
.timeline-connector {
    position: absolute;
    top: 50%;
    width: 2.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform: translateY(-50%);
    right: -2.5rem;
    z-index: 0;
}

.timeline-item:nth-child(even) .timeline-connector {
    left: -2.5rem;
    right: auto;
    background: linear-gradient(-90deg, var(--accent), transparent);
}

/* Animated pulse on connector */
.timeline-connector::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.timeline-item:nth-child(even) .timeline-connector::after {
    left: 0;
    right: auto;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50%) scale(1.3);
    }
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 4px solid var(--accent);
    z-index: 2;
    transition: height 0.3s, width 0.3s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    animation: dotPulse 2s ease-in-out infinite;
}

/* DATE */
.timeline-date {
    /* content: attr(data-year); */
    /* position: absolute; */
    top: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    /* background: var(--bg-secondary); */
    /* padding: 0.35rem 0.65rem; */
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.3s;
    /* border: 2px solid var(--accent); */
}

.timeline-comment {
    /* position: absolute; */
    top: 50%;
    clear: both;
    text-align: left;
    white-space: normal;
    color: var(--text-primary);
    transition: all 0.3s;
}

.timeline-dot-data {
    position: absolute;
    /* display: inline-flex;
    flex-direction: column; */
    white-space: nowrap;
    width: max-content;
    /* max-width: 100%; */
    /* align-items: flex-start;   */
}

.timeline-item:nth-child(odd) .timeline-dot-data {
    left: calc(100% + 1.5rem);
    transform: translateY(-50%);
}

.timeline-item:nth-child(even) .timeline-dot-data {
    right: calc(100% + 1.5rem);
    left: auto;
    transform: translateY(-50%);
}

.timeline-item:nth-child(even) .timeline-date {
    float: right;
}

/* DATE COMMENT */
/* .timeline-item:nth-child(odd) .timeline-comment {
    left: calc(100% + 1.5rem);
    transform: translateY(-50%);
}

.timeline-item:nth-child(even) .timeline-comment {
    right: calc(100% + 1.5rem);
    left: auto;
    transform: translateY(-50%);
} */

/* DATE */
/* .timeline-item:nth-child(odd) .timeline-date {
    left: calc(100% + 1.5rem);
    transform: translateY(-50%);
}

.timeline-item:nth-child(even) .timeline-date {
    right: calc(100% + 1.5rem);
    left: auto;
    transform: translateY(-50%);
} */

.timeline-dot:hover::after {
    /* background: var(--accent); */
    /* color: var(--bg-secondary); */
    transform: translateY(-50%) scale(1.1);
}

@keyframes dotPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

.timeline-item:hover .timeline-dot {
    width: 32px;
    height: 32px;
    /* background: linear-gradient(135deg, #ff0080, #40e0d0); */
    border-color: #40e0d0;
    box-shadow: 0 0 30px rgba(64, 224, 208, 0.8);
    animation: none;
}

/* Path indicator connecting dots */
.timeline-path {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 24px;
    width: 2px;
    height: calc(100% + 2rem);
    background: linear-gradient(180deg, 
        var(--accent) 0%,
        transparent 100%
    );
    opacity: 0.3;
    z-index: 0;
}

.cert-href {
    text-decoration: none;
}

.cert-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem;
    width: 100%;
    /* max-width: 450px; */
    border: 2px solid #4d3c48;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Glowing border effect on hover */
.cert-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    /* background: linear-gradient(45deg, 
        #ff0080, 
        #ff8c00, 
        #40e0d0, 
        #9b59b6,
        #ff0080
    ); */
    background-size: 400% 400%;
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
    animation: gradientRotate 3s ease infinite;
}

@keyframes gradientRotate {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.cert-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: transparent;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.cert-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.cert-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cert-full-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cert-date {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

.cert-provider {
    display: inline-block;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.cert-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.cert-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background-color: rgba(255, 0, 128, 0.1);
    color: #ff0080;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 0, 128, 0.3);
}

.skill-tag:nth-child(2) {
    background-color: rgba(255, 140, 0, 0.1);
    color: #ff8c00;
    border: 1px solid rgba(255, 140, 0, 0.3);
}

.skill-tag:nth-child(3) {
    background-color: rgba(64, 224, 208, 0.1);
    color: #40e0d0;
    border: 1px solid rgba(64, 224, 208, 0.3);
}

/* Level indicator */
.cert-level {
    position: absolute;
    top: -1px;
    left: -1px;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.9), rgba(255, 140, 0, 0.9));
    color: white;
    border-radius: 12px 0 12px 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* RAINBOW CERT-CARD */
.cert-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #ff0080, 
        #ff8c00, 
        #40e0d0, 
        #9b59b6,
        #ff0080
    );
    background-size: 400% 400%;
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.cert-card:hover::before {
    opacity: 0.35;
    animation: rainbowFlash 1.5s ease-out forwards;
}

@keyframes rainbowFlash {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        justify-content: flex-start;
        padding-left: 3.5rem;
        padding-right: 0;
        /* padding-left: calc(50% + 3rem); */
        /* transform: translateX(-30px); */
    }

    .timeline-item:nth-child(even) {
        padding-left: 3.5rem;
        /* padding-left: calc(50% + 3rem); */
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-date, .timeline-comment {
        display: none;
        /* left: calc(100% + 1rem) !important;
        right: auto !important;
        transform: translateY(-50%) !important; */
    }

    .timeline-connector {
        width: 1.5rem;
        right: auto;
        left: 44px;
        background: linear-gradient(90deg, var(--accent), transparent);
    }

    .timeline-connector::after {
        left: 0;
        right: auto;
    }

    .cert-card {
        max-width: 100%;
    }

    .timeline-header h2 {
        font-size: 1.5rem;
    }

    .cert-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}