:root {
    --work: #38bdf8;
    --education: #a78bfa;
    --certification: #4ade80;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 10%, rgba(37,99,235,.12), transparent 30%),
        radial-gradient(circle at 90% 20%, rgba(139,92,246,.1), transparent 30%),
        var(--bg-body);
}

.journey-header, main, .journey-footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.journey-header { position: relative; padding: 34px 0 45px; }
.back-link { color: var(--text-secondary); text-decoration: none; font-size: .82rem; }
.back-link:hover { color: white; }
.header-copy { max-width: 760px; margin-top: 65px; }
.eyebrow { margin: 0 0 13px; color: #7dd3fc; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.header-copy h1 { margin: 0; font-size: clamp(2.8rem, 6vw, 5.6rem); line-height: 1; letter-spacing: -.06em; }
.header-copy > p:last-child { max-width: 700px; color: #aebbd0; font-size: 1.08rem; line-height: 1.65; }
.journey-stats { position: absolute; right: 0; bottom: 49px; display: flex; gap: 12px; }
.journey-stats div { min-width: 108px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: rgba(17,26,46,.72); }
.journey-stats strong, .journey-stats span { display: block; }
.journey-stats strong { font-size: 1.25rem; }
.journey-stats span { margin-top: 3px; color: var(--text-muted); font-size: .65rem; }

.journey-controls { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-top: 1px solid var(--border); }
.filter-group, .map-actions { display: flex; align-items: center; gap: 8px; }
.filter, .map-actions button { min-height: 38px; padding: 0 13px; border: 1px solid var(--border-input); border-radius: 20px; background: rgba(15,23,42,.75); color: var(--text-secondary); font-size: .76rem; }
.filter i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.filter.work { color: var(--work); }.filter.education { color: var(--education); }.filter.certification { color: var(--certification); }
.filter.active { border-color: #64748b; background: #1e293b; color: white; }
.map-actions span { min-width: 190px; color: var(--text-muted); text-align: center; font-size: .7rem; }

.map-shell { position: relative; }
.map-hint { position: absolute; z-index: 3; top: 13px; right: 16px; color: var(--text-muted); font-size: .67rem; pointer-events: none; }
.career-map { overflow-x: auto; border: 1px solid var(--border); border-radius: 22px; background: rgba(8,15,28,.84); cursor: grab; scrollbar-color: #334155 transparent; }
.career-map.dragging { cursor: grabbing; user-select: none; }
.career-map:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.career-canvas { position: relative; width: 3700px; height: 610px; background: linear-gradient(90deg, rgba(148,163,184,.025) 1px, transparent 1px); background-size: 104px 100%; }
.lane { position: absolute; right: 0; left: 0; height: 1px; }
.lane::after { content: ""; position: absolute; inset: 0; opacity: .34; background: linear-gradient(90deg, transparent, currentColor 5%, currentColor 95%, transparent); }
.lane span { position: sticky; z-index: 2; left: 14px; display: inline-block; transform: translateY(-13px); padding: 5px 8px; border-radius: 12px; background: #0b1220; color: currentColor; font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lane-work { top: 165px; color: var(--work); }.lane-education { top: 340px; color: var(--education); }.lane-certification { top: 500px; color: var(--certification); }
.year-axis { position: absolute; inset: 42px 0 auto; height: 28px; border-bottom: 1px solid rgba(148,163,184,.12); }
.year-axis span { position: absolute; transform: translateX(-50%); color: #475569; font-family: var(--font-mono); font-size: .64rem; }

.milestone { --color: var(--work); position: absolute; z-index: 1; isolation: isolate; overflow: visible; top: 94px; width: 190px; min-height: 104px; transform: translateX(-50%); padding: 12px 13px; border: 1px solid color-mix(in srgb, var(--color), transparent 73%); border-radius: 13px; background: rgba(15,23,42,.93); color: var(--text-primary); text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.16); transition: transform .2s ease, opacity .25s ease, box-shadow .2s ease; }
.milestone.education { --color: var(--education); top: 267px; }.milestone.certification { --color: var(--certification); top: 427px; }
.milestone.offset-1.work { top: 178px; }.milestone.offset-1.education { top: 350px; }.milestone.offset-1.certification { top: 510px; }
.milestone:hover, .milestone.selected { z-index: 4; transform: translateX(-50%) translateY(-5px); border-color: var(--color); box-shadow: 0 13px 35px color-mix(in srgb, var(--color), transparent 84%); }
.milestone[hidden] { display: none; }
.milestone-period {
    position: absolute;
    z-index: -1;
    top: 70px;
    left: calc(50% - var(--duration) / 2);
    width: var(--duration);
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--color), color-mix(in srgb, var(--color), transparent 38%));
    box-shadow: 0 0 9px color-mix(in srgb, var(--color), transparent 55%);
    transition: height .2s ease, box-shadow .2s ease;
}
.milestone-period::before,
.milestone-period::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    border: 2px solid #0b1220;
    border-radius: 50%;
    background: var(--color);
}
.milestone-period::before { left: 0; }
.milestone-period::after { left: 100%; }
.milestone.offset-1 .milestone-period { top: -15px; }
.milestone.selected .milestone-period {
    height: 6px;
    box-shadow: 0 0 16px var(--color);
}
.milestone-year { color: var(--color); font-family: var(--font-mono); font-size: .62rem; }
.milestone strong, .milestone small { display: block; }
.milestone strong { margin-top: 7px; font-size: .8rem; line-height: 1.25; }
.milestone small { margin-top: 5px; color: var(--text-muted); font-size: .63rem; line-height: 1.3; }

.milestone-detail { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 23px; margin-top: 18px; padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: rgba(17,26,46,.73); }
.detail-marker { border-radius: 8px; background: var(--work); }.detail-marker.education { background: var(--education); }.detail-marker.certification { background: var(--certification); }
.detail-meta { display: flex; gap: 12px; color: var(--text-muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .09em; }
#detailType.work { color: var(--work); } #detailType.education { color: var(--education); } #detailType.certification { color: var(--certification); }
.detail-main h2 { margin: 7px 0 3px; font-size: 1.35rem; }.detail-main > p { margin: 0; color: var(--text-secondary); }.detail-description { max-width: 780px; margin-top: 13px !important; color: #cbd5e1 !important; font-size: .87rem; line-height: 1.55; }
.detail-tags { display: flex; max-width: 270px; align-content: start; justify-content: end; flex-wrap: wrap; gap: 6px; }.detail-tags span { padding: 6px 8px; border: 1px solid var(--border-input); border-radius: 8px; color: #cbd5e1; font-size: .67rem; }

.journey-legend { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 15px; padding: 80px 0; }
.journey-legend h2 { margin: 0; font-size: 2rem; letter-spacing: -.04em; }.journey-legend article { padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: rgba(17,26,46,.5); }.journey-legend article span { color: #475569; font-family: var(--font-mono); font-size: .66rem; }.journey-legend article h3 { margin: 25px 0 7px; }.journey-legend article p { margin: 0; color: var(--text-secondary); font-size: .78rem; line-height: 1.55; }
.journey-footer { display: flex; gap: 18px; padding: 28px 0 40px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .76rem; }.journey-footer a { color: #bfdbfe; text-decoration: none; }.journey-footer a:hover { color: white; }

@media (max-width: 850px) {
    .journey-stats { position: static; margin-top: 30px; }.journey-controls { align-items: start; flex-direction: column; }.journey-legend { grid-template-columns: 1fr; }.milestone-detail { grid-template-columns: 6px 1fr; }.detail-tags { grid-column: 2; justify-content: start; max-width: none; }
}

@media (max-width: 560px) {
    .journey-header, main, .journey-footer { width: min(100% - 28px, 1180px); }.header-copy { margin-top: 42px; }.journey-stats { display: grid; grid-template-columns: repeat(3, 1fr); }.journey-stats div { min-width: 0; padding: 10px; }.filter-group { flex-wrap: wrap; }.map-actions { width: 100%; justify-content: space-between; }.map-actions span { min-width: 0; }.map-hint { display: none; }.career-canvas { height: 570px; }.journey-footer { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
