:root {
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-sub: #666666;
    --accent: #007AFF;
    --accent-soft: #e1f5fe;
    --border: #e5e5e5;
}

/* Dark theme: follows the system unless the visitor picks one */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f1115;
        --card-bg: #171a21;
        --text-main: #e8e9ed;
        --text-sub: #9aa0ad;
        --accent: #4da3ff;
        --accent-soft: #12243a;
        --border: #262b35;
    }
}

:root[data-theme="dark"] {
    --bg: #0f1115;
    --card-bg: #171a21;
    --text-main: #e8e9ed;
    --text-sub: #9aa0ad;
    --accent: #4da3ff;
    --accent-soft: #12243a;
    --border: #262b35;
}

/* Accessibility: keyboard users reach the content without tabbing the nav */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 8px 0;
    z-index: 200;
}

.skip-link:focus { left: 0; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

/* Theme toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-sub);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* Closing call to action */
.cta-card {
    text-align: center;
    padding: 3rem 2rem;
}

.cta-card h3 { justify-content: center; font-size: 1.4rem; }

.cta-card p {
    color: var(--text-sub);
    max-width: 520px;
    margin: 0.5rem auto 1.5rem;
}

/* Footer socials */
.socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.socials a {
    color: var(--text-sub);
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.2s;
}

.socials a:hover { color: var(--accent); }


* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

/* Navigation */
/* No navigation bar - the theme toggle sits alone above the first card,
   matching where the case-study pages put theirs. */
.page-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

/* Main Container */
.resume-container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    scroll-margin-top: 85px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 i {
    color: var(--accent);
    font-size: 0.95rem;
}

/* Header/Profile Card */
.profile-card {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding: 3rem;
}

.id-photo-wrapper {
    width: 120px;
    height: 120px;
    background: var(--accent-soft);
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.id-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.work-title {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-sub);
    margin: 4px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.location {
    font-size: 0.9rem;
    color: var(--text-sub);
}

.identity-group { margin-bottom: 1rem; }

.meta-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 4px 12px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.header-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.header-link:hover { text-decoration: underline; }

/* Experience / Education items */
.item h4 { margin: 0; }
.item p { margin: 2px 0; }

.date {
    font-size: 0.85rem;
    color: var(--text-sub);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* An odd number of projects: the last one takes the whole row */
.projects-grid > .project-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* ...and its image should not balloon across the full width */
.projects-grid > .project-item:last-child:nth-child(odd) .project-shot {
    max-height: 240px;
}

@media (max-width: 640px) {
    .projects-grid { grid-template-columns: 1fr; }
}

/* The extra projects stay hidden until the toggle is pressed. The grid only
   gets .has-more from script.js, so without JavaScript every project shows. */
.projects-grid.has-more > .project-item.is-extra { display: none; }
.projects-grid.has-more.is-expanded > .project-item.is-extra { display: flex; }

.projects-more {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.projects-toggle {
    cursor: pointer;
    font-family: inherit;
}

.projects-toggle i { transition: transform 0.2s ease; }
.projects-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

.project-item {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.project-shot {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 0.8rem;
    display: block;
}

.project-shot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: repeating-linear-gradient(
        45deg, var(--bg), var(--bg) 10px, var(--accent-soft) 10px, var(--accent-soft) 20px);
    color: var(--text-sub);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.project-shot-empty i { font-size: 1.3rem; opacity: 0.6; }

.project-item h4 {
    margin: 0 0 0.4rem 0;
    font-size: 1rem;
    font-weight: 700;
}

.project-summary {
    font-size: 0.9rem;
    color: var(--text-sub);
    margin: 0 0 0.6rem 0;
}

.project-detail {
    font-size: 0.85rem;
    color: var(--text-main);
    margin: 0 0 0.8rem 0;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.8rem;
}

.project-stack span {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Render's free tier sleeps - say so before the click, not after.
   The note takes its own line so it never wraps the links above it. */
.demo-note {
    flex-basis: 100%;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-sub);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: auto;
}

.project-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.project-link:hover { text-decoration: underline; }
.project-link.secondary { color: var(--text-sub); }

/* Skills Tags */
.tags h4 {
    margin: 1rem 0 0.25rem 0;
    font-size: 0.85rem;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tags span {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--text-main);
    padding: 5px 12px;
    border-radius: 8px;
    margin: 4px 4px 4px 0;
    font-size: 0.9rem;
}

/* Milestones Timeline */
.milestone-timeline {
    margin-top: 1.5rem;
    margin-left: 10px;
    position: relative;
    padding-left: 24px;
    border-left: 2px solid var(--border);
}

.milestone-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.milestone-item:last-child { margin-bottom: 0; }

.milestone-dot {
    position: absolute;
    left: -31px;            /* centres the dot on the 2px timeline rule */
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--card-bg);
}

.milestone-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
}

.milestone-info p {
    margin: 2px 0 0 0;
    font-size: 0.95rem;
}

.milestone-org {
    font-size: 0.8rem !important;
    color: var(--text-sub);
}

/* Contact */
/* "Follow me" sits directly above the links, so the list needs less room above */
.contact-lead {
    margin: 1.75rem auto 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-sub);
}

.contact-list {
    list-style: none;
    margin: 0.9rem 0 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.contact-list i {
    color: var(--text-sub);
    width: 18px;
    text-align: center;
}

.contact-list a {
    color: var(--text-main);
    text-decoration: none;
}

.contact-list a:hover { color: var(--accent); }

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    color: var(--text-sub);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .resume-container { margin: 1.5rem auto; }
    .card { padding: 1.5rem; }
    .profile-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        gap: 1.5rem;
    }
    .meta-info { justify-content: center; }
    .project-links { flex-wrap: wrap; }
}

/* ===== Case study pages ===== */
.cs-project { padding: 2.5rem; }
.cs-project:hover { transform: none; box-shadow: none; }

.cs-head h2 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

.cs-tagline {
    color: var(--text-sub);
    margin: 0.3rem 0 1.2rem;
}

.cs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Metadata block */
.cs-meta {
    display: grid;
    gap: 0.9rem;
    margin: 0;
}

.cs-metarow {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 10px;
    align-items: start;
}

.cs-meta dt {
    font-size: 0.68rem;
    line-height: 1.45;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-sub);
    font-weight: 600;
}

.cs-meta dd {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
}

.cs-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2rem;
}

.cs-stack span {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 3px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.cs-section { margin-bottom: 2.5rem; }
.cs-section:last-child { margin-bottom: 0; }

.cs-section h3 {
    font-size: 1.05rem;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.cs-section h4 {
    font-size: 0.95rem;
    margin: 1.75rem 0 0.6rem 0;
}

.cs-section h4:first-of-type { margin-top: 0.5rem; }

/* Screenshot slots */
.cs-shot {
    width: 100%;
    height: auto;              /* keep the image's own ratio - never crop */
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
    display: block;
}

.cs-shot-empty {
    aspect-ratio: 16 / 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: repeating-linear-gradient(
        45deg, var(--bg), var(--bg) 10px, var(--accent-soft) 10px, var(--accent-soft) 20px);
    color: var(--text-sub);
    font-size: 0.78rem;
}

.cs-shot-empty i { font-size: 1.5rem; opacity: 0.6; }

/* Unfilled placeholder copy - visually obvious so it can't ship by accident */
.todo {
    color: var(--text-sub);
    border-left: 3px solid #e0a800;
    padding-left: 12px;
    font-style: italic;
}

.todo-list { padding-left: 1.2rem; }
.todo-list .todo { border-left: none; padding-left: 0; }

@media (max-width: 768px) {
    .cs-project { padding: 1.5rem; }
    .cs-meta { padding: 1rem; }
    .cs-head h2 { font-size: 1.3rem; }
}

/* Paired screenshots - two states of the same screen sit side by side */
.cs-shots {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    justify-items: center;
    align-items: start;
}

.cs-shots.pair { grid-template-columns: 1fr 1fr; }
.cs-shots .cs-shot { margin-bottom: 0; }

/* A lone portrait shot should not stretch to the full card width;
   a lone landscape shot (marked .wide by case-study.js) may. */
.cs-shots:not(.pair) .cs-shot { max-width: 380px; }
.cs-shots.wide .cs-shot { max-width: 100%; }

/* Portrait screenshots: cap the rendered width so a pair stays readable */
.cs-shots.pair .cs-shot { max-width: 100%; }

/* Named parts of a screen: a short label and one sentence each */
.cs-steps {
    margin: 0 0 1rem 0;
    display: grid;
    gap: 0.75rem;
}

.cs-steps dt {
    font-weight: 600;
    font-size: 0.9rem;
}

.cs-steps dd {
    margin: 2px 0 0 0;
    font-size: 0.9rem;
    color: var(--text-sub);
}

/* Architecture pipeline: A -> B -> C */
.cs-pipeline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.cs-pipeline span {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.cs-pipeline i {
    color: var(--text-sub);
    font-size: 0.7rem;
}

.cs-archsteps {
    padding-left: 1.2rem;
    margin: 0 0 1rem 0;
}

.cs-archsteps li {
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
}

@media (max-width: 600px) {
    .cs-shots.pair { grid-template-columns: 1fr; }
    .cs-shots { padding: 0.75rem; }
    .cs-shots .cs-shot { max-width: 320px; }
}

/* Case study top bar - replaces the nav on case study pages */
.cs-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cs-back {
    color: var(--text-sub);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.cs-back:hover { color: var(--accent); }

/* Acronym expansion under a project title */
.cs-acronym {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin: -0.6rem 0 1.2rem 0;
    letter-spacing: 0.02em;
}

/* ===== Case study: two-column layout ===== */
.cs-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

/* Sidebar sticks while the narrative scrolls */
.cs-sidebar {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 1rem;
    align-content: start;
    /* taller than the viewport, so let it scroll on its own */
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.cs-sidebar::-webkit-scrollbar { width: 8px; }
.cs-sidebar::-webkit-scrollbar-track { background: transparent; }

.cs-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 8px;
}

.cs-sidebar::-webkit-scrollbar-thumb:hover { background: var(--text-sub); }

.cs-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
}

.cs-paneltitle {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-sub);
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.cs-featlist {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.6rem;
}

.cs-featlist li {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Main narrative column */
.cs-main {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.25rem;
    min-width: 0;
}

.cs-main .cs-head { margin-bottom: 2rem; }
.cs-main h1 { font-size: 2rem; margin: 0; letter-spacing: -0.02em; }

/* Walkthrough steps as a two-column icon grid */
.cs-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem 1.5rem;
    margin: 0 0 1rem 0;
}

.cs-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: start;
}

.cs-stepicon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 0.8rem;
}

.cs-step strong { font-size: 0.92rem; display: block; }

.cs-step p {
    margin: 3px 0 0 0;
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.5;
}

/* Small uppercase label above the pipeline */
.cs-eyebrow {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-sub);
    font-weight: 600;
    margin: 0 0 0.6rem 0;
}

/* Top bar spans the page and stays put */
.cs-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.85rem 0;
    margin-bottom: 1.5rem;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

@media (max-width: 900px) {
    .cs-layout { grid-template-columns: 1fr; }
    .cs-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
    .cs-main { padding: 1.5rem; }
    .cs-main h1 { font-size: 1.5rem; }
}

/* Case study pages need more room than the single-column portfolio */
.cs-page { max-width: 1180px; }

@media (max-width: 1240px) {
    .cs-page { max-width: 900px; }
}

/* ===== Portfolio row layout ===== */
.row-split {
    display: grid;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
}

/* Row 2: narrow milestones column beside the wider text column */
.row-2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr); }


/* The grid gap handles spacing, so cards drop their own top margin */
.row-split .card { margin-top: 0; }

.col-right,
.col-left {
    display: grid;
    gap: 1.5rem;
    align-content: start;
    min-width: 0;
}

/* Let the two columns of a row end level with each other */
.row-split > * { height: 100%; }
.row-split .card { height: auto; }


@media (max-width: 860px) {
    .row-2 { grid-template-columns: 1fr; }
    .row-split > * { height: auto; }
}

/* ===== Career milestones: fixed height, scrolls on its own ===== */
.milestones-card {
    display: flex;
    flex-direction: column;
}

.milestones-card h3 { margin-bottom: 1.5rem; }

/* The scroll lives on a wrapper, not on the timeline itself: a scroll
   container clips its own overflow, and the dots sit left of the timeline's
   border - on the timeline, scrolling sliced every dot in half. */
.milestones-card .milestone-scroll {
    flex: 1;
    min-height: 0;          /* lets a flex child actually shrink and scroll */
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-left: 12px;     /* room for the dots, which sit outside the line */
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.milestones-card .milestone-scroll .milestone-timeline {
    margin-left: 0;
    margin-top: 0;
}

.milestones-card .milestone-scroll::-webkit-scrollbar { width: 8px; }
.milestones-card .milestone-scroll::-webkit-scrollbar-track { background: transparent; }

.milestones-card .milestone-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 8px;
}

.milestones-card .milestone-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-sub);
}

/* ===== Tighter, uniform spacing between the portfolio rows ===== */
.resume-container:not(.cs-page) > .card,
.resume-container:not(.cs-page) > .row-split {
    margin-top: 0.75rem;
}

.resume-container:not(.cs-page) .row-split { gap: 0.75rem; }
.resume-container:not(.cs-page) .col-left,
.resume-container:not(.cs-page) .col-right { gap: 0.75rem; }

/* the first row should not be pushed down by that margin */
.resume-container:not(.cs-page) > .card:first-child { margin-top: 0; }

/* Milestones: a sticky, viewport-tall panel that scrolls on its own while
   the About / Education / Stack column scrolls the page normally. A plain
   height:100% cannot work here - the row sizes to its tallest child, so the
   timeline would just grow and never scroll. */
/* Milestones match the height of the left column exactly.
   The card is absolutely positioned so its (long) timeline does not
   contribute to the grid row height - otherwise the row would stretch to
   fit all the entries and nothing would ever scroll. The row is therefore
   sized by the About / Education / Stack column, and the card fills it. */
.row-2 .col-right {
    position: relative;
    display: block;
    height: 100%;
    min-height: 0;
}

.row-2 .col-right .milestones-card {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    height: auto;
}

@media (max-width: 860px) {
    .row-2 .col-right {
        position: static;
        height: auto;
        display: grid;
    }
    .row-2 .col-right .milestones-card {
        position: static;
        inset: auto;
        flex: none;
        height: auto;
    }
    .milestones-card .milestone-scroll { max-height: 420px; overflow-y: auto; }
}

