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

html {
    scroll-behavior: smooth;
}

:root {
    --purple: #6B30BE;
    --purple-soft: rgba(107, 48, 190, 0.08);
    --text: #111110;
    --muted: #888884;
    --border: #E8E7E3;
    --bg: #FFFFFF;
    --off: #F8F7F4;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */
.wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── HEADER ── */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--text);
}

/* ── HERO ── */
#hero {
    padding: 72px 0 64px;
    border-bottom: 1px solid var(--border);
}

.hero-available {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.02em;
    margin-bottom: 28px;
}

.dot-green {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.dot-warning {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #eab308;
    flex-shrink: 0;
}

.dot-red {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
}

.hero-name {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 6px;
}

.hero-role {
    font-size: 16px;
    color: var(--purple);
    font-weight: 400;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.hero-bio {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 36px;
}

.hero-bio strong {
    color: var(--text);
    font-weight: 500;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 36px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-num {
    font-size: 22px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--text);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    text-decoration: none;
    transition: opacity 0.15s;
    border-radius: 6px;
}

.hero-cta:hover {
    opacity: 0.8;
}

.li-icon {
    width: 16px;
    height: 16px;
    fill: #fff;
    flex-shrink: 0;
}

/* ── SECTIONS ── */
.section {
    padding: 56px 0;
    border-bottom: 1px solid var(--border);
}

.section-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 32px;
}

/* ── PROJECTS ── */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-item {
    border-top: 1px solid var(--border);
}

.project-item:last-child {
    border-bottom: 1px solid var(--border);
}

/* Thumbnail strip */
.project-thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--off);
    border-radius: 6px;
    margin-bottom: 0;
    display: none; /* shown when open */
    cursor: default;
}

.project-item.open .project-thumb {
    display: block;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Thumbnail SVG fallback (used when no real img) */
.thumb-svg {
    width: 100%;
    height: 100%;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 16px;
    cursor: pointer;
    user-select: none;
}

.project-left {
    flex: 1;
    min-width: 0;
}

.project-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.project-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
}

.project-cat {
    font-size: 12px;
    color: var(--purple);
    font-weight: 400;
}

.project-brief {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.project-arrow {
    color: var(--muted);
    font-size: 18px;
    font-weight: 300;
    flex-shrink: 0;
    transition: transform 0.2s;
    line-height: 1;
}

.project-item.open .project-arrow {
    transform: rotate(45deg);
}

/* Detail */
.project-detail {
    display: none;
    padding-bottom: 28px;
}

.project-item.open .project-detail {
    display: block;
}

.project-detail-content {
    background: var(--off);
    border-radius: 8px;
    padding: 24px;
}

/* Images gallery in detail */
.detail-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.detail-img {
    border-radius: 5px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--border);
    cursor: zoom-in;
}

.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-img.wide {
    grid-column: 1 / -1;
    aspect-ratio: 16/7;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.detail-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.65;
}

.detail-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-list li {
    font-size: 14px;
    color: var(--text);
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
}

.detail-list li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--purple);
}

.detail-result {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.result-num {
    font-size: 20px;
    font-weight: 500;
    color: var(--purple);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.result-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

.detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.chip {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 4px;
}

/* ── STACK ── */
.stack-groups {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 48px;
}

.stack-group-title {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stack-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stack-chip {
    font-size: 13px;
    color: var(--text);
    background: var(--off);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 400;
    transition: border-color 0.15s;
}

.stack-chip:hover {
    border-color: var(--purple);
}

/* ── TIMELINE ── */
.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* The vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: 108px;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: var(--border);
}

.tl-item {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 0;
    position: relative;
    padding-bottom: 0;
}

/* Dot on the line */
.tl-item::before {
    content: '';
    position: absolute;
    left: 104px;
    top: 14px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    z-index: 1;
}

.tl-item.current::before {
    background: var(--purple);
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-soft);
}

.tl-left {
    padding: 10px 24px 0 0;
    text-align: right;
}

.tl-date {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.5;
}

.tl-right {
    padding: 8px 0 0 28px;
}

/* Accordion trigger */
.tl-trigger {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    cursor: pointer;
    gap: 12px;
    padding-bottom: 20px;
    user-select: none;
}

.tl-item:last-child .tl-trigger {
    padding-bottom: 0;
}

.tl-item.tl-open .tl-trigger {
    padding-bottom: 12px;
}

.tl-role {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
    margin-bottom: 3px;
}

.tl-item.current .tl-role {
    color: var(--purple);
}

.tl-company {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

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

.tl-tag {
    font-size: 11px;
    color: var(--muted);
    background: var(--off);
    padding: 2px 8px;
    border-radius: 4px;
}

.tl-expand-btn {
    color: var(--muted);
    font-size: 16px;
    font-weight: 300;
    flex-shrink: 0;
    margin-top: 1px;
    transition: transform 0.2s;
    line-height: 1;
}

.tl-item.tl-open .tl-expand-btn {
    transform: rotate(45deg);
}

/* Timeline accordion detail */
.tl-detail {
    display: none;
    padding-bottom: 24px;
}

.tl-item.tl-open .tl-detail {
    display: block;
}

.tl-detail-inner {
    background: var(--off);
    border-radius: 8px;
    padding: 20px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
}

.tl-detail-inner strong {
    color: var(--text);
    font-weight: 500;
}

.tl-detail-inner ul {
    list-style: none;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tl-detail-inner li {
    padding-left: 14px;
    position: relative;
}

.tl-detail-inner li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--purple);
}

/* Formation */
.formation-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.formation-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.formation-item {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.formation-item:first-of-type {
    border-top: 1px solid var(--border);
}

.formation-year {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    padding-top: 2px;
    padding-right: 24px;
    text-align: right;
}

.formation-school {
    font-weight: 500;
    color: var(--text);
    padding-left: 28px;
    margin-bottom: 2px;
}

.formation-diploma {
    color: var(--muted);
    font-size: 12px;
    padding-left: 28px;
}

/* ── FOOTER / CTA ── */
footer {
    padding: 56px 0 40px;
}

.footer-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-cta-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.footer-title {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 500;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 8px;
}

.footer-sub {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-size: 12px;
    color: var(--muted);
}

.footer-brand {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}

/* ── LIGHTBOX ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox.active {
    display: flex;
}

.lightbox img,
.lightbox svg {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* ── MOBILE NAV ── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {

    /* Nav: hamburger */
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px 24px;
        gap: 16px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 15px;
    }

    /* Hero */
    #hero {
        padding: 48px 0 40px;
    }

    .hero-name {
        font-size: 32px;
    }

    .hero-stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    /* Projects */
    .detail-images {
        grid-template-columns: 1fr;
    }

    .detail-img.wide {
        grid-column: auto;
    }

    .project-thumb {
        height: 140px;
    }

    /* Stack */
    .stack-groups {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Timeline */
    .timeline::before {
        left: 0;
    }

    .tl-item {
        grid-template-columns: 1fr;
        padding-left: 20px;
    }

    .tl-item::before {
        left: -4px;
    }

    .tl-left {
        text-align: left;
        padding: 0 0 4px 0;
    }

    .tl-right {
        padding-left: 0;
    }

    /* Formation */
    .formation-item {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .formation-year {
        text-align: left;
        padding-left: 0;
        padding-right: 0;
    }

    .formation-school,
    .formation-diploma {
        padding-left: 0;
    }

    /* Footer */
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

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

    .header-inner {
        padding: 0 16px;
    }

    .footer-inner {
        padding: 0 16px;
    }

    .hero-bio {
        font-size: 14px;
    }

    .project-detail-content {
        padding: 16px;
    }
}
