:root {
    --bg: #f2ede6;
    --sidebar: #1c1917;
    --sidebar-text: #d6d0c8;
    --sidebar-muted: #6b665f;
    --sidebar-accent: #a3c4a0;
    --content-bg: #faf8f4;
    --text: #1c1917;
    --muted: #7a756d;
    --rule: #ddd8d0;
    --accent: #3a7d5c;
    --serif: 'Lora', 'Georgia', serif;
    --sans: 'DM Sans', system-ui, sans-serif;
    --mono: 'DM Mono', ui-monospace, monospace;
    --sidebar-w: 320px;
}

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

html, body {
    background: var(--bg);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.layout {
    display: flex;
    min-height: 100vh;
    max-width: 1920px;
    margin: 0 auto;
    box-shadow: 0 0 80px rgba(0,0,0,.08);
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--sidebar);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 56px 40px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
}

.sidebar .avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 24px;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.08);
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

.sidebar .name {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -.02em;
    line-height: 1.2;
    margin-bottom: 4px;
}
.sidebar .role {
    font-size: 13px;
    color: var(--sidebar-muted);
    margin-bottom: 40px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: auto;
}
.sidebar nav a {
    font-size: 14px;
    color: var(--sidebar-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background .15s ease, color .15s ease;
    display: block;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: var(--sidebar-text); }
.sidebar nav a.active { color: var(--sidebar-text); background: rgba(255,255,255,.06); }

.sidebar .status {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar .status-label {
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--sidebar-muted);
    margin-bottom: 10px;
}
.sidebar .status-value {
    font-size: 14px;
    color: var(--sidebar-text);
    display: flex; align-items: center; gap: 8px;
}
.sidebar .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--sidebar-accent);
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

.sidebar .location {
    margin-top: 12px;
    font-size: 13px;
    color: var(--sidebar-muted);
    display: flex; align-items: center; gap: 8px;
}
.sidebar .location::before {
    content: '◎';
    font-size: 11px;
}

.sidebar .sidebar-links {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sidebar-links a {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--sidebar-muted);
    text-decoration: none;
    transition: color .15s ease;
}
.sidebar-links a:hover { color: var(--sidebar-accent); }

.lang-switch {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    gap: 10px;
    align-items: center;
}
.lang-switch a {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--sidebar-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .12em;
    transition: color .15s ease;
}
.lang-switch a:hover { color: var(--sidebar-text); }
.lang-switch a.active {
    color: var(--sidebar-accent);
    font-weight: 600;
}
.lang-switch .sep {
    color: var(--sidebar-muted);
    font-size: 10px;
    opacity: .5;
}

/* CONTENT */
.content {
    flex: 1;
    background: var(--content-bg);
    color: var(--text);
    overflow: auto;
}

.content-inner {
    padding: 96px 100px 120px;
    max-width: 1100px;
}

/* INTRO */
.intro {
    margin-bottom: 80px;
}
.intro .tag {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    margin-bottom: 20px;
}
.intro h1 {
    font-family: var(--serif);
    font-size: 48px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.025em;
    margin-bottom: 24px;
}
.intro h1 em {
    font-style: italic;
    color: var(--accent);
}
.intro .lede {
    font-size: 19px;
    line-height: 1.65;
    color: var(--muted);
}

/* SECTION */
.section {
    margin-bottom: 72px;
}
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}
.section-header h2 {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -.02em;
}
.section-header .line {
    flex: 1;
    height: 1px;
    background: var(--rule);
}

/* ABOUT */
.about-text p {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 18px;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}
.about-text a:hover { opacity: .75; }

/* CAREER */
.career-list {
    display: flex;
    flex-direction: column;
}
.career-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px 32px;
    padding: 28px 0;
    border-bottom: 1px solid var(--rule);
    align-items: start;
}
.career-item:last-child { border-bottom: none; padding-bottom: 0; }
.career-item:first-child { padding-top: 0; }
.career-item .period {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    padding-top: 4px;
}
.career-item .job-title {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -.01em;
    line-height: 1.2;
    margin-bottom: 4px;
}
.career-item .company {
    font-size: 14px;
    color: var(--muted);
}
.career-item .current-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: rgba(58, 125, 92, .12);
    color: var(--accent);
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

/* Role progression inside a single company */
.role-progression {
    margin-top: 14px;
    padding-left: 18px;
    border-left: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.role-step {
    position: relative;
}
.role-step::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 6px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--content-bg);
    border: 1.5px solid var(--rule);
    box-sizing: border-box;
}
.role-step--current::before {
    background: var(--accent);
    border-color: var(--accent);
}
.role-step-title {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -.01em;
    line-height: 1.3;
    color: var(--muted);
    margin-bottom: 3px;
}
.role-step--current .role-step-title {
    color: var(--text);
}
.role-step-period {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* EXPERTISE */
.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.expertise-item {
    padding: 20px 22px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--content-bg);
    transition: border-color .15s ease, transform .15s ease;
}
.expertise-item:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}
.expertise-title {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -.01em;
    margin-bottom: 6px;
}
.expertise-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

/* WRITING */
.post-list {
    display: flex;
    flex-direction: column;
}
.post-link {
    display: block;
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    color: var(--text);
    transition: padding-left .2s ease;
}
.post-link:last-child { border-bottom: none; padding-bottom: 0; }
.post-link:first-child { padding-top: 0; }
.post-link:hover { padding-left: 8px; }
.post-link .post-title {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -.015em;
    line-height: 1.3;
    margin-bottom: 6px;
}
.post-link:hover .post-title { color: var(--accent); }
.post-link .post-date {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
}
.post-link.loading .post-title {
    background: var(--rule);
    color: transparent;
    border-radius: 4px;
    width: 70%;
    height: 1.3em;
}
.post-link.loading .post-date {
    background: var(--rule);
    color: transparent;
    border-radius: 4px;
    width: 30%;
    height: 1em;
    margin-top: 4px;
}

/* CONTACT */
.contact-block {
    background: var(--sidebar);
    color: var(--sidebar-text);
    border-radius: 16px;
    padding: 40px 44px;
}
.contact-block .contact-heading {
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 500;
    letter-spacing: -.02em;
    margin-bottom: 12px;
}
.contact-block .contact-sub {
    font-size: 15px;
    color: var(--sidebar-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}
.contact-block .contact-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--sidebar-accent);
    color: var(--sidebar);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 22px;
    border-radius: 8px;
    transition: opacity .2s ease;
}
.contact-block .contact-cta:hover { opacity: .85; }

/* FOOTER */
footer {
    padding: 32px 64px;
    border-top: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 820px) {
    .layout {
        flex-direction: column;
        box-shadow: none;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 2px 16px;
        padding: 24px 24px 20px;
    }
    .sidebar .avatar {
        grid-row: 1 / 3;
        grid-column: 1;
        width: 56px;
        height: 56px;
        margin: 0;
    }
    .sidebar .name {
        grid-column: 2;
        margin: 0;
        font-size: 19px;
    }
    .sidebar .role {
        grid-column: 2;
        margin: 0;
        font-size: 13px;
    }
    .sidebar nav {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2px;
        margin: 14px 0 0;
        padding-top: 14px;
        border-top: 1px solid rgba(255,255,255,.08);
    }
    .sidebar nav a {
        padding: 6px 7px;
        font-size: 13px;
    }
    .sidebar .status {
        grid-column: 1 / -1;
        margin: 12px 0 0;
        padding-top: 0;
        border-top: none;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px 14px;
    }
    .sidebar .status { display: none }
    .sidebar .sidebar-links {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
        margin: 12px 0 0;
    }
    .sidebar .lang-switch {
        grid-column: 1 / -1;
        margin: 14px 0 0;
        padding-top: 14px;
    }

    .content-inner {
        padding: 40px 24px 64px;
    }
    footer {
        padding: 24px;
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
    .career-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .career-item .period {
        padding-top: 0;
    }
    .expertise-grid {
        grid-template-columns: 1fr;
    }
}
