/* ═══════════════════════════════════════════════════════
   SNAKE TIMELINE  —  timeline-style.css
   ═══════════════════════════════════════════════════════ */

#timeline-section {
    margin: 72px auto 0;
    padding: 0 3%;
    max-width: 980px;
    position: relative;
    z-index: 1;
}

#tl-heading {
    text-align: center;
    margin-bottom: 52px;
}

#tl-heading h3 {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    color: #000;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

#tl-heading p {
    font-size: 11px;
    color: #000;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0;
}

/* ── Snake container ────────────────────────────────── */
#tl-snake { position: relative; }

/* ── Row ────────────────────────────────────────────── */
.tl-row {
    display: flex;
    align-items: flex-start;
    position: relative;
    margin-bottom: 40px;
}

.tl-row.ltr { flex-direction: row; }
.tl-row.rtl { flex-direction: row-reverse; }

/* Horizontal spine — black, thicker */
.tl-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2%;
    right: 2%;
    height: 2px;
    background: #000;
    z-index: 0;
}

/* Direction arrow on the spine */
.tl-row::after {
    content: '';
    position: absolute;
    top: -5px;
    width: 0;
    height: 0;
    z-index: 2;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* LTR: arrowhead pointing right */
.tl-row.ltr::after {
    right: 10%;
    border-left: 11px solid #000;
    border-right: none;
}

/* RTL: arrowhead pointing left */
.tl-row.rtl::after {
    left: 10%;
    border-right: 11px solid #000;
    border-left: none;
}

/* ── Slot ───────────────────────────────────────────── */
.tl-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 16px 7px 0;
    min-width: 0;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.tl-slot.tl-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Year chip ──────────────────────────────────────── */
.tl-year-chip {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #000;
    margin-bottom: 8px;
    white-space: nowrap;
}

/* ── Card ───────────────────────────────────────────── */
.tl-card {
    width: 100%;
    background: #fff;
    border: 0.5px solid rgba(0,0,0,0.09);
    border-radius: 12px;
    padding: 13px 14px 12px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 1px 6px rgba(0,0,0,0.03);
    transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
    user-select: none;
}

.tl-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: rgba(0,0,0,0.15);
}

/* ── Tag ────────────────────────────────────────────── */
.tl-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 7px;
}

.tl-tag.personal   { background: #fff7ed; color: #c2410c; }
.tl-tag.work       { background: #eff6ff; color: #1d4ed8; }
.tl-tag.education  { background: #f0fdf4; color: #15803d; }
.tl-tag.project    { background: #fdf4ff; color: #7e22ce; }
.tl-tag.reading    { background: #fefce8; color: #a16207; }
.tl-tag.leadership { background: #f8fafc; color: #475569; }

.tl-card-title {
    font-size: 12px;
    font-weight: 700;
    color: #000;
    margin: 0 0 2px;
    line-height: 1.35;
}

.tl-card-org {
    font-size: 10px;
    color: #555;
    margin: 0 0 6px;
    line-height: 1.3;
}

.tl-card-preview {
    font-size: 11px;
    color: #333;
    line-height: 1.6;
    margin: 0 0 8px;
}

.tl-card-cta {
    font-size: 10px;
    color: #000;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0;
}

/* ══════════════════════════════════════════════════════
   POPUP MODAL
   ══════════════════════════════════════════════════════ */

#tl-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.38);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#tl-overlay.open { display: flex; }

#tl-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 580px;
    width: 100%;
    max-height: 84vh;
    overflow-y: auto;
    position: relative;
    animation: tlPop 0.2s cubic-bezier(0.34,1.4,0.64,1);
    box-shadow: 0 24px 64px rgba(0,0,0,0.15);
}

@keyframes tlPop {
    from { opacity:0; transform: scale(0.94) translateY(10px); }
    to   { opacity:1; transform: scale(1)    translateY(0);    }
}

#tl-modal-top    { padding: 24px 24px 0; }
#tl-modal-tag    {
    display: inline-block;
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.13em; text-transform: uppercase;
    padding: 2px 9px; border-radius: 20px; margin-bottom: 10px;
}
#tl-modal-title  { font-size: 20px; font-weight: 700; color: #000; margin: 0 0 3px; line-height: 1.25; padding-right: 32px; }
#tl-modal-org    { font-size: 12px; color: #555; margin: 0 0 4px; }
#tl-modal-year   { font-size: 12px; font-weight: 800; color: #000; letter-spacing: 0.1em; margin: 0 0 20px; }
#tl-modal-hr     { height: 1px; background: #e0e0e0; margin: 0 24px; }

#tl-modal-body {
    padding: 20px 24px 28px;
    font-size: 13px; color: #333; line-height: 1.74;
}
#tl-modal-body p      { margin: 0 0 10px; }
#tl-modal-body em     { font-style: italic; color: #444; }
#tl-modal-body strong { font-weight: 600; color: #000; }
#tl-modal-body ul     { margin: 0 0 12px; padding-left: 18px; }
#tl-modal-body li     { margin-bottom: 5px; }

#tl-modal-body .tl-chips {
    display: flex; flex-wrap: wrap; gap: 5px;
    margin-top: 14px; padding: 0; list-style: none;
}
#tl-modal-body .tl-chips li {
    background: #f4f4f4; border-radius: 20px;
    padding: 3px 11px; font-size: 11px; color: #222; font-weight: 500;
}

#tl-modal-body .tl-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px,1fr));
    gap: 10px; margin: 14px 0;
}
#tl-modal-body .tl-kpi {
    background: #f8f8f8; border-radius: 10px;
    padding: 10px 12px; text-align: center;
}
#tl-modal-body .tl-kpi-val   { font-size: 18px; font-weight: 700; color: #000; display: block; line-height: 1.2; }
#tl-modal-body .tl-kpi-label { font-size: 10px; color: #777; display: block; margin-top: 3px; letter-spacing: 0.06em; }

#tl-modal-body .tl-books {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px;
}
#tl-modal-body .tl-book {
    font-size: 12px; font-weight: 600; color: #000; line-height: 1.35;
    padding: 8px 10px; background: #fafaf5;
    border-radius: 8px; border-left: 2px solid #ca8a04;
}
#tl-modal-body .tl-book span {
    display: block; font-size: 10px; font-weight: 400; color: #777; margin-top: 2px;
}

#tl-close {
    position: absolute; top: 16px; right: 16px;
    width: 28px; height: 28px; border-radius: 50%;
    border: 0.5px solid #e5e5e5; background: #f5f5f5;
    cursor: pointer; font-size: 15px; color: #444;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s; line-height: 1;
}
#tl-close:hover { background: #eee; color: #000; }

/* ══════════════════════════════════════════════════════
   SKILLS SECTION
   ══════════════════════════════════════════════════════ */

#tl-skills {
    margin: 64px auto 0;
    max-width: 980px;
    padding: 0 3%;
}

#tl-skills-heading {
    text-align: center;
    margin-bottom: 32px;
}

#tl-skills-heading h3 {
    font-size: clamp(16px, 2.5vw, 22px);
    font-weight: 700;
    color: #000;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

#tl-skills-heading p {
    font-size: 11px;
    color: #000;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0;
}

.tl-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.tl-skill-group {
    background: #fff;
    border: 0.5px solid rgba(0,0,0,0.09);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.03);
}

.tl-skill-group-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #000;
    margin: 0 0 10px;
}

.tl-skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tl-skill-pill {
    background: #f5f5f5;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #111;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 660px) {
    .tl-row,
    .tl-row.ltr,
    .tl-row.rtl {
        flex-direction: column !important;
        align-items: stretch;
    }
    .tl-row::before { display: none; }
    .tl-row::after  { display: none; }
    .tl-slot { padding: 0 0 20px; }
    #tl-modal-body .tl-books { grid-template-columns: 1fr; }
    #tl-modal-body .tl-kpis  { grid-template-columns: 1fr 1fr; }
    .tl-skills-grid { grid-template-columns: 1fr; }
}