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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: #1a1a2e;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-brand {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-brand .social-links {
    display: flex;
    gap: 1rem;
}

.header-brand .social-links a {
    color: rgba(255, 255, 255, 0.75);
    display: inline-flex;
    transition: color 0.2s;
}

.header-brand .social-links a:hover {
    color: #00d9ff;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00d9ff;
}

.logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.85;
}

.logo-link:focus-visible {
    outline: 2px solid #00d9ff;
    outline-offset: 3px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #00d9ff;
}

.has-dropdown {
    position: relative;
}

.dropdown {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.5rem 0;
    background: #16213e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    min-width: 11rem;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 50;
}

.dropdown li {
    width: 100%;
}

.dropdown a {
    display: block;
    padding: 0.5rem 1.25rem;
    white-space: nowrap;
}

.dropdown a:hover {
    background: rgba(0, 217, 255, 0.1);
}

.has-dropdown:hover .dropdown,
.has-dropdown.is-open .dropdown {
    opacity: 1;
    visibility: visible;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.hero-content {
    animation: hero-in 0.7s ease-out both;
}

@keyframes hero-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-content {
        animation: none;
    }
}

.no-js .reveal {
    opacity: 1;
    transform: none;
}

.section:nth-child(even) {
    background: white;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #1a1a2e;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #00d9ff;
    border-radius: 2px;
}

/* Hero Section */
#hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 7rem 0;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-text {
    flex: 1;
}

#hero h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
}

.hero-photo {
    flex-shrink: 0;
}

.hero-photo img {
    display: block;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 217, 255, 0.35);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: #00d9ff;
    color: #1a1a2e;
}

.btn-primary:hover {
    background: #00b8d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #1a1a2e;
}

/* About Section */
.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.skills {
  margin-bottom: 1.5rem;
}

.skills h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1a1a2e;
}

.subsection-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 3rem 0;
}

.timeline h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1a1a2e;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.skill-card {
    background: white;
    padding: 1.25rem 1.25rem 1rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    border-color: #00d9ff;
}

.skill-card h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #00b8d9;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.skill-card ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-card li {
    background: #eef7fa;
    color: #1a1a2e;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.skill-card li:hover {
    background: #00d9ff;
    color: #1a1a2e;
}

/* Timeline */
.timeline-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.timeline-hint {
    display: none;
    margin: 0 0 1.25rem;
    font-size: 0.85rem;
    color: #666;
}

.chip {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.2s;
}

.chip[data-filter="work"] {
    border-color: #00d9ff;
}

.chip[data-filter="run"] {
    border-color: #2ecc71;
}

.chip[data-filter="hobby"] {
    border-color: #f39c12;
}

.chip[data-filter="work"]:hover { color: #00b8d9; }
.chip[data-filter="run"]:hover { color: #27ae60; }
.chip[data-filter="hobby"]:hover { color: #e67e22; }

.chip[aria-pressed="true"][data-filter="work"] {
    background: #00d9ff;
    border-color: #00d9ff;
    color: #1a1a2e;
}

.chip[aria-pressed="true"][data-filter="run"] {
    background: #2ecc71;
    border-color: #2ecc71;
    color: white;
}

.chip[aria-pressed="true"][data-filter="hobby"] {
    background: #f39c12;
    border-color: #f39c12;
    color: #1a1a2e;
}

.life-timeline {
    list-style: none;
    position: relative;
    display: block;
    height: var(--tl-half, 5.5rem);
    margin: 0 auto;
    max-width: 1100px;
}

.life-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    top: 50%;
    height: 2px;
    background: linear-gradient(to right, rgba(0,217,255,0.15), #00d9ff);
}

.life-timeline::after {
    content: '';
    position: absolute;
    right: -0.25rem;
    top: 50%;
    transform: translateY(-50%);
    border-left: 10px solid #00d9ff;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.life-timeline-start {
    position: absolute;
    left: 2rem;
    top: calc(50% + 10px);
    font-size: 0.85rem;
    font-weight: 600;
    color: #999;
    white-space: nowrap;
}

.life-timeline-wrap {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.milestone {
    position: absolute;
    left: var(--x, 0%);
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 0 0.25rem;
    transition: opacity 0.3s, filter 0.3s;
    z-index: 25;
}

.milestone-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00d9ff;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #00d9ff;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}

.milestone[data-cat="run"] .milestone-node {
    background: #2ecc71;
    box-shadow: 0 0 0 2px #2ecc71;
}

.milestone[data-cat="hobby"] .milestone-node {
    background: #f39c12;
    box-shadow: 0 0 0 2px #f39c12;
}

.milestone-node:hover,
.milestone-node:focus-visible {
    transform: translate(-50%, -50%) scale(1.25);
}

.milestone-node:focus-visible {
    outline: 2px solid #00d9ff;
    outline-offset: 3px;
}

.milestone-date {
    position: absolute;
    bottom: calc(50% + 6px);
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    font-size: 0.95rem;
    color: #666;
    white-space: nowrap;
}

.milestone-body {
    position: absolute;
    left: 50%;
    top: calc(50% + var(--pop-gap, 18px));
    width: min(340px, calc(100vw - 3rem));
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 0.9rem 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 30;
    pointer-events: none;
    transform: translateX(calc(-50% + var(--pop-shift, 0px)));
}

.milestone.side-up .milestone-body {
    top: auto;
    bottom: calc(50% + var(--pop-gap, 18px));
}

.milestone:hover .milestone-body,
.milestone-node:focus-visible + .milestone-date ~ .milestone-body,
.milestone.is-open .milestone-body {
    opacity: 1;
    visibility: visible;
}

.milestone:hover,
.milestone.is-open {
    z-index: 30;
}

.milestone-body::before {
    content: '';
    position: absolute;
    top: -7px;
    left: calc(50% - var(--pop-shift, 0px));
    width: 12px;
    height: 12px;
    background: white;
    border-left: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
    transform: translateX(-50%) rotate(45deg);
}

.milestone.side-up .milestone-body::before {
    top: auto;
    bottom: -7px;
    border-left: none;
    border-top: none;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.milestone.side-up .milestone-date {
    bottom: auto;
    top: calc(50% + 6px);
}

.year-marker {
    position: absolute;
    left: var(--x, 0%);
    top: 50%;
    transform: translate(-50%, calc(-50% - 3.4rem));
    font-size: 1.1rem;
    font-weight: 700;
    color: #999;
    background: none;
    padding: 0;
    border: none;
    white-space: nowrap;
    line-height: 1;
    z-index: 20;
}

.year-marker::after {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(100% + 0.45rem);
    transform: translateX(-50%);
    width: 2px;
    height: 0.9rem;
    background: #ccc;
}

.timeline-bars {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 0;
}

.timeline-bar {
    position: absolute;
    top: 0;
    left: var(--bar-x, 0%);
    width: var(--bar-w, 0%);
    height: 6px;
    transform: translateY(-50%);
    border-radius: 3px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 1;
}

.timeline-bar.is-visible {
    opacity: 1;
    visibility: visible;
}

.timeline-bar-work { background: #00d9ff; }
.timeline-bar-run { background: #2ecc71; }
.timeline-bar-hobby { background: #f39c12; }

.timeline-bar-open {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.timeline-bar-open::after {
    content: '';
    position: absolute;
    right: -9px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.timeline-bar-open.timeline-bar-hobby::after { border-left-color: #f39c12; }
.timeline-bar-open.timeline-bar-work::after { border-left-color: #00d9ff; }
.timeline-bar-open.timeline-bar-run::after { border-left-color: #2ecc71; }

/* Popover date stamp */
.milestone-stamp {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #00b8d9;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.2rem;
}

.milestone-body h4 {
    font-size: 1rem;
    color: #1a1a2e;
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.milestone-cat {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    margin-right: 0.5rem;
    vertical-align: 2px;
}

.milestone[data-cat="work"] .milestone-cat {
    background: #00d9ff;
    color: #1a1a2e;
}

.milestone[data-cat="run"] .milestone-cat {
    background: #2ecc71;
    color: white;
}

.milestone[data-cat="hobby"] .milestone-cat {
    background: #f39c12;
    color: #1a1a2e;
}

.milestone-body p {
    color: #555;
    line-height: 1.55;
    font-size: 0.9rem;
    margin: 0;
}

.milestone[data-dim] {
    opacity: 0.35;
    filter: saturate(0.4);
}

.milestone[data-dim] .milestone-node {
    pointer-events: none;
}

.milestone[data-dim] .milestone-body {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Projects Section */
/* Projects carousel: one card in focus at a time */
.project-carousel {
    max-width: 720px;
    margin: 0 auto;
}

.project-track {
    display: grid;
}

.project-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transform: translateX(24px);
    pointer-events: none;
}

.project-card.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #00d9ff;
}

.project-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.carousel-btn {
    font-family: inherit;
    font-size: 1.5rem;
    line-height: 1;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: white;
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    border-color: #00d9ff;
    color: #00b8d9;
}

.carousel-dots {
    display: flex;
    gap: 0.6rem;
}

.carousel-dot {
    width: 0.75rem;
    height: 0.75rem;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: #d5d5d5;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.carousel-dot.is-active {
    background: #00d9ff;
    transform: scale(1.2);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.project-description {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #555;
}

.tech-stack {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: #00d9ff;
    color: #1a1a2e;
    padding: 0.375rem 0.875rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-links {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.project-link {
    color: #00d9ff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.project-link:hover {
    color: #00b8d9;
}

/* Contact Section */
.contact-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #555;
}

/* Colophon ("This Site Was Built With") */
.colophon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto 2.5rem;
}

.colophon-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.colophon-item h4 {
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.colophon-item p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.colophon-source {
    text-align: center;
    color: #555;
    font-size: 1rem;
    margin: 0;
}

form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1a1a2e;
}

input, textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #00d9ff;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

button[type=submit] {
    background: #00d9ff;
    color: #1a1a2e;
    padding: 0.875rem 2.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

button[type=submit]:hover {
    background: #00b8d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

button:disabled {
    background: #b0b0b0;
    cursor: not-allowed;
    transform: none;
}

#form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    display: none;
    font-weight: 500;
}

#form-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#form-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Footer */
footer {
    background: #1a1a2e;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer .container {
    display: flex;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 6.5rem;
    }

    nav .container {
        flex-direction: column;
        gap: 0.4rem;
    }

    .nav-links {
        position: static;
        transform: none;
        gap: 0.35rem 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.92rem;
    }

    .hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    #hero {
        padding: 3.5rem 0 4rem;
    }

    .hero-links {
        justify-content: center;
    }

    #hero h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-photo img {
        width: 220px;
        height: 220px;
    }

    .has-dropdown {
        position: relative;
    }

    .dropdown {
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        min-width: 11rem;
        text-align: center;
        padding: 0.5rem 0;
        background: #16213e;
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.35);
        display: none;
    }

    .has-dropdown:hover .dropdown {
        opacity: 0;
        visibility: hidden;
    }

    .has-dropdown.is-open .dropdown {
        opacity: 1;
        visibility: visible;
        display: flex;
    }

    #hero h2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    h2 {
        font-size: 2rem;
    }

    .project-carousel {
        max-width: 100%;
    }

    .project-track {
        overflow: hidden;
    }

    .project-card {
        padding: 1.5rem;
    }

    .colophon-grid {
        grid-template-columns: 1fr;
    }

    .timeline-chips {
        gap: 0.5rem;
    }

    .chip {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }

    .life-timeline {
        display: block;
        padding: 0 0 0 2rem;
        position: relative;
        height: auto;
    }

    .life-timeline.tl-proportional {
        height: var(--tl-mh, auto);
    }

    .life-timeline::before {
        top: 0.25rem;
        bottom: 0.25rem;
        left: 0;
        right: auto;
        width: 2px;
        height: auto;
        background: #00d9ff;
    }

    .life-timeline::after {
        display: none;
    }

    .life-timeline-start {
        display: none;
    }

    .timeline-chips {
        margin-bottom: 0.5rem;
    }

    .timeline-hint {
        display: block;
    }

    .milestone {
        display: block;
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        padding: 0 0 2rem 1.5rem;
        min-height: 0;
    }

    .tl-proportional .milestone {
        position: absolute;
        left: 2rem;
        right: 0;
        top: var(--y, auto);
        padding-bottom: 0;
        height: 1px;
    }

    .milestone-node {
        position: absolute;
        left: -2.4rem;
        top: 0.3rem;
        transform: none;
        width: 14px;
        height: 14px;
    }

    .tl-proportional .milestone-node {
        top: 50%;
        transform: translateY(-50%);
    }

    .milestone-node:hover,
    .milestone-node:focus-visible {
        transform: scale(1.2);
    }

    .tl-proportional .milestone-node:hover,
    .tl-proportional .milestone-node:focus-visible {
        transform: translateY(-50%) scale(1.2);
    }

    .milestone.side-up .milestone-date,
    .milestone.side-down .milestone-date {
        display: inline-block;
        font-size: 0.85rem;
        line-height: 1.1;
        position: static;
        white-space: normal;
        margin: 0 0 0 -2rem;
    }

    .tl-proportional .milestone.side-up .milestone-date,
    .tl-proportional .milestone.side-down .milestone-date {
        vertical-align: top;
        transform: translateY(calc(-50% + var(--nudge, 0px)));
    }

    .timeline-bars {
        display: block;
        top: 0;
        bottom: 0;
        height: auto;
        pointer-events: none;
        z-index: 35;
    }

    .timeline-bar {
        left: -2px;
        width: 6px;
        top: var(--bar-top, 0px);
        height: var(--bar-h, 0px);
        transform: none;
        border-radius: 3px;
    }

    .timeline-bar-open {
        border-top-left-radius: 2px;
        border-top-right-radius: 2px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .timeline-bar-open::after {
        right: auto;
        top: auto;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid;
        border-bottom: none;
    }

    .timeline-bar-open.timeline-bar-hobby::after { border-top-color: #f39c12; }
    .timeline-bar-open.timeline-bar-work::after { border-top-color: #00d9ff; }
    .timeline-bar-open.timeline-bar-run::after { border-top-color: #2ecc71; }

    .year-marker {
        position: static;
        left: auto;
        right: auto;
        top: auto;
        transform: none;
        border: none;
        background: none;
        padding: 0;
        color: #999;
    }

    .tl-proportional .year-marker {
        position: absolute;
        left: auto;
        right: calc(50%);
        top: var(--y, auto);
        transform: translateY(-50%);
        font-size: 1rem;
        line-height: 1;
        white-space: nowrap;
    }

    .year-marker::after {
        display: none;
    }

    .milestone-body {
        position: static;
        width: auto;
        transform: none;
        display: none;
        pointer-events: auto;
        margin: 0;
    }

    .milestone-body::before {
        display: none;
    }

    .milestone:hover .milestone-body {
        opacity: 0;
        visibility: hidden;
    }

    .milestone.is-open .milestone-body {
        display: block;
        opacity: 1;
        visibility: visible;
        position: absolute;
        top: 1.75rem;
        bottom: auto;
        left: -1.4rem;
        transform: none;
        right: 0;
        width: auto;
        max-width: 340px;
        z-index: 30;
    }

    .milestone-body h4 {
        font-size: 1.05rem;
    }

    .milestone-cat {
        display: inline-block;
        margin-bottom: 0.3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 3rem 0;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-links {
        gap: 0.75rem;
        font-size: 0.9rem;
    }

    .hero-links {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}
