/* ============================================================
   RAMANPREET SINGH — Personal Site
   Aesthetic: Off-white + deep teal
   Type: Inter (body) + JetBrains Mono (accent/meta)
   ============================================================ */

:root {
    /* Off-white + deep teal palette. Warm off-white background,
       deep forest ink, rich teal as the brand accent. */
    --c-bg: #f7f8f6;             /* warm off-white */
    --c-bg-elevated: #eef2ee;    /* soft green-white for cards / chips */
    --c-ink: #1a2820;            /* deep forest — primary text */
    --c-ink-700: #2d4038;        /* dark green-ink body text */
    --c-ink-500: #4d6358;        /* muted teal-green — secondary */
    --c-ink-300: #7a9488;        /* light sage — meta / labels */
    --c-rule: #c8d8d0;           /* soft sage hairlines */
    --c-accent: #0f766e;         /* deep teal — brand */
    --c-accent-soft: #d0e9e4;    /* teal tint — chip fills, hover bg */

    /* Type */
    --f-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --f-mono: 'JetBrains Mono', ui-monospace, monospace;

    /* Rhythm */
    --space-section: clamp(5rem, 10vw, 8rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    /* Prevent horizontal scrollbar if any element accidentally overshoots
       the viewport width (e.g., animated canvas, long unbreakable strings). */
    overflow-x: hidden;
}

/* ============================================================
   HIDDEN SCROLLBARS
   Scrolling still works (mouse wheel, trackpad, keyboard); only the
   visible track is hidden. Note: some users rely on the scrollbar as
   a cue that content extends beyond the viewport.
   ============================================================ */

/* Firefox */
html { scrollbar-width: none; }

/* Chrome, Safari, Edge */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body {
    background: var(--c-bg);
    color: var(--c-ink);
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: var(--c-accent);
    color: white;
}

/* ============================================================
   NEURAL NETWORK BACKGROUND CANVAS
   Fixed behind content; content sits above via z-index.
   ============================================================ */

#neural-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.75;
}

/* Layer content above canvas */
.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 2rem);
    /* No background — canvas is visible through the content column.
       Stars are drawn at low opacity so text stays readable. */
}

/* Subtle glass effect on content sections so they "float" above the network */
.hero, .section, .footer {
    position: relative;
}

/* ============================================================
   SECTION STRUCTURE
   ============================================================ */

.section {
    padding: var(--space-section) 0 0;
}

.section__label {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-ink-500);
    margin-bottom: 2.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--c-rule);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
    padding-top: clamp(2.5rem, 6vw, 5rem);
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--c-accent);
    background-image: linear-gradient(135deg, #0d9488 0%, #0a2e28 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    box-shadow:
        0 4px 20px rgba(15, 118, 110, 0.25),
        0 0 0 1px rgba(15, 118, 110, 0.08);
}

.avatar__text {
    font-family: var(--f-body);
    font-weight: 500;
    font-size: 1.95rem;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1;
}

.hero__name {
    font-family: var(--f-body);
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 1.75rem;
    color: var(--c-ink);
}

/* ----- Typewriter ----- */
.hero__tagline {
    font-family: var(--f-mono);
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    font-weight: 500;
    color: var(--c-accent);
    min-height: 2.4em;
    margin-bottom: 1.75rem;
    letter-spacing: -0.01em;
}

.typewriter { display: inline; }

#typed-text { color: var(--c-accent); }

.cursor {
    display: inline-block;
    color: var(--c-accent);
    margin-left: 2px;
    font-weight: 400;
    animation: blink 1.05s steps(1) infinite;
    transform: translateY(-1px);
}

@keyframes blink {
    0%, 50%      { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

.hero__bio {
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--c-ink-700);
    max-width: 36em;
    margin-bottom: 1.75rem;
	text-align: justify;
}

.hero__status {
    font-family: var(--f-mono);
    font-size: 1rem;
    color: var(--c-ink-500);
    display: flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: 0.01em;
    margin-bottom: 1.75rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22); }
    50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.08); }
}

.hero__resume {
    margin-top: 1.20rem;
    font-family: var(--f-mono);
    font-size: 0.82rem;
    color: var(--c-ink-500);
    letter-spacing: 0.01em;
	font-style: italic;
}

.resume-link {
    color: var(--c-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity 0.18s ease;
}

.resume-link:hover {
    opacity: 0.7;
}

.hero__curious {
    margin-bottom: 1.75rem;
}

.curious-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: var(--f-mono);
    font-size: 0.78rem;
    color: var(--c-ink-300);
    letter-spacing: 0.02em;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.18s ease;
}

.curious-btn:hover {
    color: var(--c-accent);
}

/* ============================================================
   SKILLS — 2×2 card grid
   ============================================================ */

.skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* Each category is a card */
.skill-card {
    background: var(--c-bg-elevated);
    border: 1px solid var(--c-rule);
    border-radius: 14px;
    padding: 1.5rem;
    border-left: 3px solid var(--c-accent);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.12);
}

/* AI card gets a slightly richer teal tint to stand out */
.skill-card--ai {
    background: linear-gradient(135deg, var(--c-bg-elevated) 60%, var(--c-accent-soft) 100%);
}

/* Icon + title row */
.skill-card__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.1rem;
}

.skill-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--c-accent-soft);
    flex-shrink: 0;
}

.skill-card__icon svg {
    width: 17px;
    height: 17px;
    stroke: var(--c-accent);
}

.skill-card__title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--c-ink);
    letter-spacing: -0.005em;
    line-height: 1.3;
}

/* Pills — inherited from existing .skill-group__tags styles */
.skill-group__tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    padding: 0;
    margin: 0;
}

.skill-group__tags li {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    background: var(--c-bg);
    border: 1px solid var(--c-rule);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--c-ink-700);
    line-height: 1.3;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.skill-group__tags li:hover {
    border-color: var(--c-accent);
    background: var(--c-accent-soft);
    color: var(--c-ink);
}

/* Keep legacy class working in case used elsewhere */
.skill-group__list {
    color: var(--c-ink-500);
    font-size: 0.94rem;
    line-height: 1.65;
}

/* Stack to single column on narrow screens */
@media (max-width: 520px) {
    .skills {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   EXPERIENCE
   ============================================================ */

.experience {
    display: grid;
    gap: 3rem;
}

.role {
    padding-top: 2rem;
    border-top: 1px solid var(--c-rule);
}

.role:first-child {
    padding-top: 0;
    border-top: none;
}

.role__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.role__company {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--c-ink);
    letter-spacing: -0.015em;
    margin-bottom: 0.15rem;
}

.role__title {
    font-size: 0.88rem;
    color: var(--c-ink-500);
    font-weight: 400;
}

.role__date {
    font-family: var(--f-mono);
    font-size: 0.75rem;
    color: var(--c-ink-500);
    letter-spacing: 0.01em;
    padding-top: 0.3rem;
    white-space: nowrap;
}

.role__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.role__metrics span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    background: var(--c-accent-soft);
    border: 1px solid var(--c-rule);
    border-radius: 6px;
    font-family: var(--f-mono);
    font-size: 0.78rem;
    color: var(--c-ink-700);
    letter-spacing: -0.01em;
}

.role__metrics strong {
    color: var(--c-accent);
    font-weight: 600;
}

.role__summary {
    color: var(--c-ink-700);
    font-size: 0.98rem;
    line-height: 1.7;
    max-width: 42em;
	text-align: justify;
}

/* ============================================================
   AWARDS + EDUCATION
   ============================================================ */

.awards, .education {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.awards li, .education li {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 1.5rem;
    align-items: baseline;
    padding-bottom: 1rem;
}

.awards li:last-child, .education li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.awards__year, .education__year {
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--c-ink-500);
    letter-spacing: 0.01em;
}

.awards li > span:last-child {
    color: var(--c-ink);
    font-size: 0.96rem;
}

.education__detail {
    display: grid;
    gap: 0.25rem;
}

.education__detail strong {
    color: var(--c-ink);
    font-weight: 600;
    font-size: 1rem;
}

.education__detail span {
    color: var(--c-ink-500);
    font-size: 0.9rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    padding: var(--space-section) 0 3rem;
}

/* Top row of footer — headline on left, social icons on right */
.footer__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.footer__headline {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--c-ink);
    max-width: 14em;
    margin: 0;
}

/* Bottom row — centered copyright + location, with breathing room above */
.footer__bottom {
    padding-top: 2.5rem;
    border-top: 1px solid var(--c-rule);
    text-align: center;
    font-family: var(--f-mono);
    font-size: 0.78rem;
    color: var(--c-ink-500);
    letter-spacing: 0.02em;
}

.footer__bottom p {
    margin: 0;
}

/* Footer icon row */
.footer__links {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.footer__links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--c-ink-700);
    border: 1px solid var(--c-rule);
    border-radius: 50%;
    background: var(--c-bg-elevated);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer__links a svg {
    width: 18px;
    height: 18px;
}

.footer__links a:hover {
    background: var(--c-accent);
    color: white;
    border-color: var(--c-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.25);
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */

[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero.is-visible .avatar       { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both; }
.hero.is-visible .hero__name   { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
.hero.is-visible .hero__tagline{ animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }
.hero.is-visible .hero__bio    { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both; }
.hero.is-visible .hero__status { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both; }

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    [data-reveal] { opacity: 1; transform: none; }
    .cursor      { animation: none; opacity: 1; }
    .dot         { animation: none; }
    #neural-bg   { display: none; } /* hide animated bg entirely */
}

/* ============================================================
   RESPONSIVE
   ============================================================ */


/* ============================================================
   PRINT
   ============================================================ */

@media print {
    body { background: white; color: black; }
    #neural-bg { display: none; }
    [data-reveal] { opacity: 1; transform: none; }
    .cursor, .dot { display: none; }
}

/* ============================================================
   EXPLAINER BUTTON + MODAL
   ============================================================ */

/* Fixed ? button — bottom-right corner, always visible */
.explainer-btn {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 100;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--c-rule);
    background: var(--c-bg-elevated);
    color: var(--c-ink-500);
    font-family: var(--f-mono);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(15, 118, 110, 0.12);
}

.explainer-btn:hover {
    background: var(--c-accent);
    color: white;
    border-color: var(--c-accent);
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(15, 118, 110, 0.28);
}

/* Full-screen overlay — hidden by default */
.explainer-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(26, 40, 32, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.explainer-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

/* Modal card */
.explainer-modal {
    position: relative;
    background: var(--c-bg-elevated);
    border: 1px solid var(--c-rule);
    border-radius: 16px;
    padding: 2.5rem 2.5rem 2rem;
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--c-rule) transparent;
    box-shadow: 0 24px 48px rgba(26, 40, 32, 0.18);
    transform: translateY(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.explainer-modal::-webkit-scrollbar { width: 4px; }
.explainer-modal::-webkit-scrollbar-track { background: transparent; }
.explainer-modal::-webkit-scrollbar-thumb { background: var(--c-rule); border-radius: 4px; }

.explainer-overlay.is-open .explainer-modal {
    transform: translateY(0);
}

/* Close button */
.explainer-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--c-rule);
    background: transparent;
    color: var(--c-ink-500);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.explainer-close:hover {
    background: var(--c-accent-soft);
    color: var(--c-ink);
    border-color: var(--c-accent);
}

.explainer-eyebrow {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-bottom: 0.5rem;
}

.explainer-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--c-ink);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.explainer-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--c-ink-700);
    margin-bottom: 1rem;
}

.explainer-body strong { color: var(--c-ink); font-weight: 600; }
.explainer-body em { font-style: italic; color: var(--c-ink-500); }

.explainer-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: grid;
    gap: 0.6rem;
}

.explainer-list li {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--c-ink-700);
    padding-left: 1.1rem;
    position: relative;
}

.explainer-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--c-accent);
}

.explainer-list li strong { color: var(--c-ink); font-weight: 600; }

.explainer-note {
    font-size: 0.85rem;
    color: var(--c-ink-500);
    font-style: italic;
    border-top: 1px solid var(--c-rule);
    padding-top: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

@media (max-width: 560px) {

    /* ---- Modal: bottom-sheet on mobile ---- */
    .explainer-overlay {
        padding: 1rem;
        align-items: flex-end;
    }
    .explainer-modal {
        padding: 1.5rem 1.25rem 1.25rem;
        max-height: 70vh;
        border-radius: 14px 14px 0 0;
    }
    .explainer-title  { font-size: 1.2rem; margin-bottom: 1rem; }
    .explainer-body   { font-size: 0.88rem; }
    .explainer-list li { font-size: 0.84rem; }
    .explainer-btn {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    /* ---- Skills: single column on mobile, accordion behaviour ---- */
    .skills {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .skill-card {
        border-radius: 10px;
        padding: 0;
        border-left: none;
        border: 1px solid var(--c-rule);
        overflow: hidden;
    }

    .skill-card:hover {
        transform: none;
        box-shadow: none;
    }

    .skill-card__header {
        padding: 0.85rem 1rem;
        margin-bottom: 0;
        background: var(--c-bg-elevated);
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        justify-content: space-between;
    }

    .skill-card__header::after {
        content: "+";
        font-size: 1.1rem;
        font-weight: 300;
        color: var(--c-ink-500);
        line-height: 1;
        flex-shrink: 0;
    }

    .skill-card.is-open .skill-card__header::after { content: "−"; }

    .skill-card .skill-group__tags {
        max-height: 0;
        overflow: hidden;
        padding: 0 1rem;
        gap: 0.4rem 0.5rem;
        transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                    padding 0.25s ease;
    }

    .skill-card.is-open .skill-group__tags {
        max-height: 300px;
        padding: 0.75rem 1rem 1rem;
    }

    .skill-group__tags li {
        font-size: 0.78rem;
        padding: 0.25rem 0.6rem;
    }

    .skill-card--ai {
        background: var(--c-bg-elevated);
    }

    /* ---- Awards: stacked cards ---- */
    .awards { gap: 0; }

    .awards li {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.9rem 0 0.9rem 1rem;
        border-bottom: 1px solid var(--c-rule);
        border-left: 2px solid var(--c-accent-soft);
        grid-template-columns: unset;
    }

    .awards li:last-child { border-bottom: none; }

    .awards__year {
        font-size: 0.72rem;
        color: var(--c-ink-300);
        letter-spacing: 0.06em;
    }

    .awards li > span:last-child {
        font-size: 0.92rem;
        line-height: 1.4;
    }

    /* ---- Education: stacked cards ---- */
    .education { gap: 0; }

    .education li {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        padding: 0.9rem 0 0.9rem 1rem;
        border-bottom: 1px solid var(--c-rule);
        border-left: 2px solid var(--c-accent-soft);
        grid-template-columns: unset;
    }

    .education li:last-child { border-bottom: none; }

    .education__year {
        font-size: 0.72rem;
        color: var(--c-ink-300);
        letter-spacing: 0.06em;
        order: -1;
    }

    .education__detail strong { font-size: 0.92rem; line-height: 1.4; }
    .education__detail span   { font-size: 0.82rem; }

    /* ---- Timeline ---- */
    .tl-header { flex-direction: column; gap: 0.15rem; }
    .tl-date   { font-size: 0.72rem; }

    /* ---- Background: visible on mobile at reduced opacity ---- */
    #neural-bg { opacity: 0.55; }
}

@media (max-width: 900px) {
    #neural-bg { opacity: 0.60; }
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

/* The vertical line */
.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--c-rule);
    border-radius: 2px;
}

/* Each timeline item */
.tl-item {
    position: relative;
    margin-bottom: 0;
}

.tl-item + .tl-item {
    margin-top: 0;
}

/* Clickable milestone row */
.tl-milestone {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 0.75rem 1.1rem 0;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.18s ease;
    user-select: none;
    position: relative;
    margin-left: -0.25rem;
    padding-left: 0.25rem;
}

.tl-milestone:hover {
    background: var(--c-accent-soft);
}

/* Dot on the timeline */
.tl-dot {
    position: absolute;
    left: calc(-2rem - 4px);
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-bg-elevated);
    border: 2px solid var(--c-rule);
    transition: background 0.2s ease, border-color 0.2s ease,
                transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

/* Active / hover dot state */
.tl-item.is-open .tl-dot,
.tl-milestone:hover .tl-dot {
    background: var(--c-accent);
    border-color: var(--c-accent);
    transform: translateY(-50%) scale(1.35);
    box-shadow: 0 0 0 4px var(--c-accent-soft);
}

/* Header content */
.tl-header {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    min-width: 0;
}

.tl-left {
    min-width: 0;
}

.tl-company {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--c-ink);
    letter-spacing: -0.015em;
    margin-bottom: 0.1rem;
    transition: color 0.18s ease;
}

.tl-item.is-open .tl-company,
.tl-milestone:hover .tl-company {
    color: var(--c-accent);
}

.tl-title {
    font-size: 0.85rem;
    color: var(--c-ink-500);
    font-weight: 400;
}

.tl-date {
    font-family: var(--f-mono);
    font-size: 0.75rem;
    color: var(--c-ink-500);
    letter-spacing: 0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Chevron indicator */
.tl-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    position: relative;
    opacity: 0.4;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
}

.tl-chevron::before,
.tl-chevron::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 6px;
    height: 1.5px;
    background: var(--c-ink);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tl-chevron::before { left: 2px;  transform: translateY(-50%) rotate(45deg);  }
.tl-chevron::after  { left: 7px;  transform: translateY(-50%) rotate(-45deg); }

.tl-item.is-open .tl-chevron {
    transform: rotate(180deg);
    opacity: 0.7;
}

.tl-milestone:hover .tl-chevron { opacity: 0.7; }

/* Collapsible detail panel */
.tl-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.tl-detail-inner {
    padding: 0.25rem 0.75rem 1.5rem 0;
    border-top: 1px solid var(--c-rule);
    margin-top: 0;
}

/* Divider between items */
.tl-item + .tl-item .tl-milestone {
    border-top: none;
}

/* ============================================================
   TIMELINE — blink animation for current (first) job dot
   ============================================================ */

.tl-item:first-child .tl-dot {
    background: var(--c-accent);
    border-color: var(--c-accent);
    animation: tl-blink 2s ease-in-out infinite;
}

@keyframes tl-blink {
    0%, 100% { box-shadow: 0 0 0 0px rgba(15, 118, 110, 0);
                transform: translateY(-50%) scale(1); }
    50%      { box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.15);
                transform: translateY(-50%) scale(1.25); }
}

/* Keep it solid (no scale jump) when the item is clicked open */
.tl-item:first-child.is-open .tl-dot {
    animation: none;
    background: var(--c-accent);
    border-color: var(--c-accent);
    transform: translateY(-50%) scale(1.35);
    box-shadow: 0 0 0 4px var(--c-accent-soft);
}
