:root {
    --bg: #0b0d10;
    --bg-elevated: #14171c;
    --text: #e4e6eb;
    --text-muted: #8a9199;
    --text-dim: #5b6169;
    --accent: #7ee787;
    --accent-alt: #58a6ff;
    --accent-warn: #ffa657;
    --border: #1f232a;
    --border-strong: #2b313a;

    --font-mono: "JetBrains Mono", "Fira Code", "Menlo", "Consolas", monospace;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;

    --radius: 4px;
    --max-width: 820px;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 400;
    line-height: 1.65;
    min-height: 100vh;
    padding: var(--space-5) var(--space-4) var(--space-7);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-alt);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.15s ease;
}

a:hover {
    border-bottom-color: var(--accent-alt);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.lang-toggle {
    position: sticky;
    top: var(--space-3);
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-4);
    z-index: 10;
}

.lang-toggle__inner {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lang-toggle__btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    padding: 0 var(--space-1);
    transition: color 0.15s ease;
}

.lang-toggle__btn:hover {
    color: var(--text);
}

.lang-toggle__btn[aria-pressed="true"] {
    color: var(--accent);
    font-weight: 500;
}

.lang-toggle__sep {
    color: var(--text-dim);
    user-select: none;
}

.header {
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-6);
}

.header__prompt {
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: var(--space-3);
    letter-spacing: 0.02em;
}

.header__prompt::after {
    content: "_";
    margin-left: 2px;
    animation: blink 1.05s steps(1) infinite;
    color: var(--accent);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.header__name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-1);
}

.header__role {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--space-3);
}

.header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header__meta-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.header__meta-item .label {
    color: var(--text-dim);
}

.section {
    margin-bottom: var(--space-7);
}

.section__title {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: var(--space-4);
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

.section__title::before {
    content: "$ ";
    color: var(--text-dim);
}

.summary {
    color: var(--text);
    line-height: 1.75;
    max-width: 70ch;
}

.job {
    padding-bottom: var(--space-6);
    margin-bottom: var(--space-6);
    border-bottom: 1px dashed var(--border);
}

.job:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.job__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-2) var(--space-4);
    margin-bottom: var(--space-1);
}

.job__title {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
}

.job__company {
    color: var(--accent);
}

.job__time {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.job__meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--space-3);
}

.job__intro {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-3);
    font-style: italic;
}

.job__bullets {
    list-style: none;
    padding-left: var(--space-4);
}

.job__bullets li {
    position: relative;
    padding-left: var(--space-3);
    margin-bottom: var(--space-2);
    line-height: 1.65;
}

.job__bullets li::before {
    content: "›";
    position: absolute;
    left: -0.25rem;
    color: var(--accent);
}

.job__projects {
    margin-top: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.project {
    padding-left: var(--space-4);
    border-left: 2px solid var(--border-strong);
}

.project__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-3);
    margin-bottom: var(--space-1);
}

.project__name {
    color: var(--accent-alt);
    font-weight: 500;
    font-size: 1rem;
}

.project__time {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.project__summary {
    color: var(--text-muted);
    margin-bottom: var(--space-2);
    font-size: 0.92rem;
}

.project__bullets {
    list-style: none;
}

.project__bullets li {
    position: relative;
    padding-left: var(--space-4);
    margin-bottom: var(--space-1);
    font-size: 0.92rem;
}

.project__bullets li::before {
    content: "·";
    position: absolute;
    left: var(--space-2);
    color: var(--accent);
}

.job--compact {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2) var(--space-3);
    padding-bottom: 0;
    border-bottom: none;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.job--compact .job__title {
    font-size: 0.95rem;
    font-weight: 500;
}

.skills__group {
    margin-bottom: var(--space-5);
}

.skills__group:last-child {
    margin-bottom: 0;
}

.skills__group-name {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-2);
}

.skills__group-name::before {
    content: "// ";
    color: var(--text-dim);
    font-weight: 400;
}

.skills__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    list-style: none;
}

.skills__list li {
    padding: 2px var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.skills__list li:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.education__item,
.languages__item {
    margin-bottom: var(--space-3);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2) var(--space-4);
}

.education__item:last-child,
.languages__item:last-child {
    margin-bottom: 0;
}

.education__degree {
    color: var(--text);
    font-weight: 500;
}

.education__place {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.education__time,
.languages__level {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-left: auto;
}

.education__note {
    flex-basis: 100%;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

.languages__name {
    color: var(--text);
}

.footer {
    margin-top: var(--space-7);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.8rem;
    text-align: center;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    body {
        padding: var(--space-6) var(--space-5) var(--space-7);
    }

    .header__name {
        font-size: 2.4rem;
    }
}

@media print {
    :root {
        --bg: #ffffff;
        --bg-elevated: #ffffff;
        --text: #0a0a0a;
        --text-muted: #2e2e2e;
        --text-dim: #606060;
        --accent: #000000;
        --accent-alt: #000000;
        --border: #c8c8c8;
        --border-strong: #8a8a8a;
    }

    @page {
        size: A4;
        margin: 10mm 12mm;
    }

    html {
        font-size: 14px;
    }

    body {
        background: #fff;
        color: #0a0a0a;
        font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        font-size: 9.1pt;
        line-height: 1.36;
        padding: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .container {
        max-width: none;
    }

    .lang-toggle,
    .footer {
        display: none !important;
    }

    a {
        color: inherit;
        border: none;
    }

    .header {
        padding-bottom: 0.45rem;
        margin-bottom: 0.7rem;
        border-bottom: 1px solid #bbb;
    }

    .header__prompt {
        display: none;
    }

    .header__name {
        font-size: 18pt;
        margin-bottom: 1px;
        letter-spacing: -0.01em;
    }

    .header__role {
        font-size: 10pt;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

    .header__meta {
        font-size: 8.5pt;
        gap: 0.35rem 0.9rem;
        color: #333;
    }

    .header__meta-item .label {
        color: #666;
    }

    .section {
        margin-bottom: 0.7rem;
    }

    .section__title {
        font-size: 10pt;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 0.35rem;
        padding-bottom: 0.15rem;
        border-bottom: 1px solid #ddd;
        break-after: avoid;
    }

    .section__title::before {
        content: "";
    }

    .summary {
        line-height: 1.45;
        max-width: none;
    }

    .job {
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
        border-bottom: none;
        break-inside: avoid;
    }

    .job__head {
        gap: 0.1rem 0.6rem;
        margin-bottom: 0;
    }

    .job__title {
        font-size: 9.8pt;
        font-weight: 600;
    }

    .job__company {
        color: #000;
        font-weight: 700;
    }

    .job__time {
        font-size: 8.6pt;
        color: #555;
    }

    .job__meta {
        font-size: 8.6pt;
        color: #555;
        margin-bottom: 0.2rem;
    }

    .job__intro {
        font-size: 8.9pt;
        margin-bottom: 0.25rem;
        color: #444;
    }

    .job__bullets {
        padding-left: 0.9rem;
    }

    .job__bullets li,
    .project__bullets li {
        margin-bottom: 0.1rem;
        font-size: 9pt;
        padding-left: 0.6rem;
    }

    .job__bullets li::before,
    .project__bullets li::before {
        color: #000;
        content: "•";
        left: -0.1rem;
    }

    .job__projects {
        margin-top: 0.3rem;
        gap: 0.45rem;
    }

    .project {
        padding-left: 0.55rem;
        border-left: 1.5px solid #bbb;
        break-inside: avoid;
    }

    .project__head {
        gap: 0.4rem;
        margin-bottom: 0;
    }

    .project__name {
        font-size: 9.3pt;
        font-weight: 700;
        color: #000;
    }

    .project__time {
        font-size: 8.3pt;
    }

    .project__summary {
        font-size: 8.9pt;
        margin-bottom: 0.15rem;
    }

    .job--compact {
        font-size: 8.9pt;
    }

    .skills__group {
        margin-bottom: 0.3rem;
    }

    .skills__group-name {
        font-size: 9pt;
        font-weight: 700;
        margin-bottom: 0.15rem;
    }

    .skills__group-name::before {
        content: "";
    }

    .skills__list {
        gap: 0.2rem 0.3rem;
    }

    .skills__list li {
        background: none;
        border: none;
        border-radius: 0;
        padding: 0;
        font-size: 8.7pt;
        color: #222;
    }

    .skills__list li:not(:last-child)::after {
        content: " ·";
        color: #999;
    }

    .education__item,
    .languages__item {
        margin-bottom: 0.15rem;
        font-size: 9pt;
        gap: 0.2rem 0.6rem;
    }

    .education__place {
        font-size: 8.8pt;
    }

    .education__time,
    .languages__level {
        font-size: 8.5pt;
    }

    .education__note {
        font-size: 8.4pt;
    }
}
