:root {
    --bg-color: #0a0c10;
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    --accent-green: #00d4aa;
    --accent-purple: #7c6aff;
    --flow-lime: #9dcc78;
    --flow-blue: #66b8d8;
    --flow-amber: #e4b777;
    --flow-mauve: #b895d6;
    --card-bg: rgba(22, 27, 34, 0.6);
    --card-border: #30363d;
    --font-heading: 'Unbounded', sans-serif;
    --font-body: 'JetBrains Mono', monospace;
    --nav-height: 64px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.62;
    position: relative;
    overflow-x: hidden;
}

/* Background Grid & Noise */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
    z-index: -1;
    pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
}

h1 {
    font-size: clamp(38px, 5vw, 60px);
    line-height: 1.08;
    margin-bottom: 12px;
    font-weight: 800;
}

h2 {
    font-size: clamp(24px, 2.4vw, 32px);
    margin-bottom: 20px;
    color: var(--accent-green);
    display: inline-block;
    border-bottom: 2px solid var(--accent-purple);
    padding-bottom: 5px;
}

h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

a {
    color: var(--accent-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-purple);
}

/* Layout */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 26px 0;
    scroll-margin-top: calc(var(--nav-height) + 118px);
}

/* Sticky Nav */
nav {
    position: sticky;
    top: 0;
    background: rgba(10, 12, 16, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
    padding: 15px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 14px;
}

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

.lang-switcher {
    display: flex;
    gap: 5px;
    margin-left: 15px;
    border-left: 1px solid var(--card-border);
    padding-left: 15px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lang-btn:hover {
    color: var(--accent-green);
}

.lang-btn.active {
    color: var(--accent-purple);
    font-weight: bold;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 40px;
    padding-bottom: 10px;
}

.hero-subtitle {
    color: var(--accent-purple);
    font-size: 18px;
    margin-bottom: 20px;
    display: block;
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--accent-green);
    width: 0;
    animation: typing 2s steps(30, end) forwards, blink 0.75s step-end infinite;
}

.hero-details {
    margin: 20px 0 30px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
}

.hero-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-main);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    border-color: var(--accent-purple);
    background: rgba(124, 106, 255, 0.1);
    transform: translateY(-2px);
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* About Section — text + skills cloud (browser) */
.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 28px 40px;
    align-items: start;
}

.about-text {
    color: var(--text-muted);
    max-width: 72ch;
    font-size: 1rem;
    line-height: 1.72;
}

.about-text p {
    margin-bottom: 16px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Skills — free tag cloud (no card), right column on desktop, screen only */
.skills-panel {
    min-width: 0;
}

.skills-panel-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Footer */
.site-footer {
    margin-top: 14px;
    padding: 10px 0 14px;
    border-top: 1px solid var(--card-border);
}

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

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

/* Timeline Section */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--card-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -35px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--accent-green);
    z-index: 1;
    transition: background 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 25px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.timeline-content:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(124, 106, 255, 0.1);
}

.job-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .job-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.job-identity {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.company-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(230, 237, 243, 0.18);
    border-radius: 9px;
    background: #f6f8fa;
}

.company-mark-dark {
    background: #10151b;
}

.company-mark img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 2px;
    object-fit: contain;
}

.job-title {
    color: var(--text-main);
    font-size: 18px;
    font-family: var(--font-heading);
}

.job-company {
    color: var(--accent-green);
    font-weight: 700;
}

.job-date {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 5px;
}

/* Tag clouds — job stacks */
.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.job-tags {
    margin-top: 12px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.5;
    white-space: nowrap;
    transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.tag:hover {
    border-color: var(--accent-purple);
    color: var(--accent-green);
}

.tag-major {
    border-color: rgba(0, 212, 170, 0.45);
    color: var(--accent-green);
}

.job-desc {
    color: var(--text-muted);
    font-size: 14px;
}

.job-desc ul {
    list-style-type: none;
}

.job-desc li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 8px;
}

.job-desc li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-purple);
}

/* Animations */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-green) }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-purple));
    z-index: 200;
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

/* PDF Button */
.btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-pdf:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

/* Mobile Nav Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .lang-switcher {
        justify-content: center;
    }
    .typewriter {
        white-space: normal;
        border-right: none;
        width: auto;
        animation: none;
    }
    
    /* Mobile Contacts */
    .social-links {
        flex-wrap: nowrap;
        gap: 10px;
        width: 100%;
    }
    .btn {
        flex: 1;
        justify-content: center;
    }
    .btn span {
        display: none;
    }
    .btn-pdf span {
        display: none;
    }
}

/* Clean export styles — shared between @media print and .exporting-pdf */
@media print {
    *,
    *::before,
    *::after {
        color: #000 !important;
        background: #fff !important;
        box-shadow: none !important;
        text-shadow: none !important;
        border-color: #ccc !important;
    }

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

    html {
        font-size: 10pt;
    }

    body {
        font-size: 10pt;
        line-height: 1.35;
        overflow: visible;
    }

    body::before,
    body::after {
        display: none !important;
    }

    /* Hide all UI chrome */
    nav,
    .scroll-progress,
    .site-footer {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Reset all animations */
    section {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        padding: 12px 0;
    }

    .hero {
        padding-top: 0;
        padding-bottom: 5px;
    }

    .hero-subtitle {
        font-size: 12pt;
        margin-bottom: 5px;
    }

    .typewriter {
        width: auto !important;
        border-right: none !important;
        animation: none !important;
        white-space: normal;
    }

    h1 {
        font-size: 20pt;
        margin-bottom: 5px;
    }

    h2 {
        font-size: 13pt;
        margin-bottom: 12px;
        padding-bottom: 3px;
    }

    h3 {
        font-size: 10pt;
        margin-bottom: 4px;
    }

    .hero-details {
        margin: 8px 0 10px;
        font-size: 9pt;
        gap: 10px;
    }

    /* Contact buttons — plain text in print */
    .social-links {
        gap: 8px;
    }

    .social-links .btn {
        padding: 3px 8px;
        font-size: 8pt;
        border: 1px solid #ccc !important;
        border-radius: 3px;
    }

    .social-links .btn span {
        display: inline !important;
    }

    .social-links .btn svg {
        display: none;
    }

    /* Skills cloud is browser-only */
    .skills-panel {
        display: none !important;
    }

    .about-layout {
        display: block;
    }

    .company-mark {
        width: 32px;
        height: 32px;
    }

    /* Timeline — compact */
    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        width: 1px;
    }

    .timeline-dot {
        left: -25px;
        width: 8px;
        height: 8px;
    }

    .timeline-item {
        margin-bottom: 10px;
        break-inside: avoid;
    }

    .timeline-content {
        padding: 10px 12px;
        border-radius: 4px;
        transform: none !important;
    }

    .job-header {
        margin-bottom: 6px;
    }

    .job-title {
        font-size: 10pt;
    }

    .job-company {
        font-size: 9pt;
    }

    .job-date {
        font-size: 8pt;
        margin-top: 2px;
    }

    .job-tags {
        gap: 3px;
        margin-top: 4px;
    }

    .job-tags .tag {
        padding: 0 5px;
        font-size: 6.8pt;
    }

    .job-desc {
        font-size: 8.5pt;
    }

    .job-desc li {
        margin-bottom: 2px;
        padding-left: 10px;
    }

    .job-desc li::before {
        content: '–';
    }

    /* Expand URLs for printed links */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 7pt;
        color: #666 !important;
    }

    a[href^="mailto"]::after,
    a[href^="tel"]::after {
        content: none;
    }
}

/* html2pdf.js export mode — mirrors print but works on-screen */
.exporting-pdf,
.exporting-pdf *,
.exporting-pdf *::before,
.exporting-pdf *::after {
    color: #000 !important;
    background: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-color: #ccc !important;
}

.exporting-pdf body::before,
.exporting-pdf body::after,
.exporting-pdf::before,
.exporting-pdf::after {
    display: none !important;
}

.exporting-pdf nav,
.exporting-pdf .scroll-progress,
.exporting-pdf .site-footer {
    display: none !important;
}

.exporting-pdf section {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

.exporting-pdf .typewriter {
    width: auto !important;
    border-right: none !important;
    animation: none !important;
    white-space: normal;
}

.exporting-pdf .social-links .btn svg {
    display: none;
}

.exporting-pdf .social-links .btn span {
    display: inline !important;
}

.exporting-pdf .timeline-content {
    transform: none !important;
}

/* Compact screen layouts */
@media screen {
    body {
        font-size: clamp(16px, 0.35vw + 14.8px, 18px);
        line-height: 1.62;
    }

    body > .container,
    nav .container {
        max-width: 1120px;
    }

    section {
        padding: 24px 0;
    }

    h2 {
        margin-bottom: 20px;
    }

    nav {
        padding: 10px 0;
    }

    .nav-content {
        position: relative;
    }

    .nav-links {
        gap: 16px;
    }

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

    .lang-switcher {
        margin-left: 0;
        padding-left: 12px;
    }

    .hero {
        padding-top: 36px;
        padding-bottom: 18px;
    }

    .hero-subtitle {
        margin-bottom: 10px;
        font-size: 17px;
    }

    .typewriter {
        border-right-color: transparent;
        animation: typing 1.5s steps(30, end) forwards, blink 0.55s step-end 3;
    }

    .hero-details {
        margin: 16px 0 20px;
        gap: 10px 16px;
        font-size: 13px;
    }

    .social-links {
        gap: 8px;
    }

    .btn {
        gap: 7px;
        min-height: 42px;
        padding: 9px 14px;
        font-size: 13px;
    }

    .btn svg {
        width: 16px;
        height: 16px;
    }

    .about-text {
        max-width: none;
    }

    .about-text p {
        margin-bottom: 14px;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-item {
        margin-bottom: 14px;
    }

    .timeline-dot {
        left: -29px;
        width: 10px;
        height: 10px;
    }

    .timeline-content {
        padding: 17px 19px;
        border-radius: 8px;
    }

    .timeline-content:hover {
        transform: translateX(3px);
    }

    .job-header {
        margin-bottom: 8px;
        gap: 10px 18px;
    }

    .job-identity {
        max-width: 67%;
    }

    .job-title {
        margin-bottom: 4px;
        font-size: 17px;
        line-height: 1.3;
    }

    .job-company {
        font-size: 13px;
    }

    .job-date {
        max-width: 48%;
        margin-top: 0;
        font-size: 12.5px;
        line-height: 1.45;
        text-align: right;
    }

    .job-desc {
        font-size: 14.5px;
        line-height: 1.55;
    }

    .job-desc li {
        margin-bottom: 4px;
        padding-left: 15px;
    }

    .cicd-background {
        position: fixed;
        top: clamp(88px, 12vh, 160px);
        right: clamp(-60px, -2.5vw, -24px);
        z-index: 0;
        width: min(68vw, 900px);
        min-width: 660px;
        opacity: 0.18;
        pointer-events: none;
        contain: paint;
        -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.34) 34%, rgba(0, 0, 0, 0.72) 60%, #000 82%);
        mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.34) 34%, rgba(0, 0, 0, 0.72) 60%, #000 82%);
        transform-origin: center;
    }

    .cicd-background::after {
        content: '';
        position: absolute;
        inset: 8% 4%;
        z-index: -1;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(124, 106, 255, 0.18), rgba(0, 212, 170, 0.06) 42%, transparent 72%);
        filter: blur(28px);
    }

    .cicd-background-inner {
        transform-origin: center;
    }

    .cicd-background-svg {
        display: block;
        width: 100%;
        height: auto;
        overflow: visible;
        filter: drop-shadow(0 24px 54px rgba(0, 0, 0, 0.35));
    }

    .cicd-route-base,
    .cicd-ribbon,
    .cicd-route-light {
        fill: none;
        vector-effect: non-scaling-stroke;
    }

    .cicd-route-base {
        stroke: rgba(4, 7, 12, 0.9);
        stroke-width: 82;
        stroke-linecap: round;
    }

    .cicd-ribbon {
        stroke: url('#cicd-ribbon-color');
        stroke-width: 68;
        stroke-linecap: round;
        opacity: 0.56;
    }

    .cicd-color-blue { stop-color: var(--flow-blue); }
    .cicd-color-lime { stop-color: var(--flow-lime); }
    .cicd-color-amber { stop-color: var(--flow-amber); }
    .cicd-color-mauve { stop-color: var(--flow-mauve); }

    .cicd-route-light {
        stroke: currentColor;
        stroke-width: 5;
        stroke-linecap: round;
        stroke-dasharray: 0.055 0.945;
        stroke-dashoffset: 0;
        opacity: 0.62;
    }

    .cicd-route-runner {
        fill: currentColor;
        stroke: #e6edf3;
        stroke-width: 2;
        opacity: 0.95;
    }

    .cicd-stage-labels,
    .cicd-core-labels {
        fill: rgba(8, 12, 18, 0.88);
        font-family: var(--font-heading);
        font-weight: 700;
        text-anchor: middle;
        dominant-baseline: central;
        pointer-events: none;
    }

    .cicd-stage-labels {
        font-size: 14px;
        letter-spacing: 0.06em;
    }

    .cicd-stage-labels textPath {
        dominant-baseline: middle;
    }

    .cicd-core-labels {
        fill: rgba(230, 237, 243, 0.22);
        font-size: 34px;
        font-weight: 600;
        letter-spacing: 0.12em;
        stroke: none;
    }

    body > .container {
        position: relative;
        z-index: 1;
    }

    .scroll-cut {
        position: fixed;
        top: var(--nav-height);
        right: 0;
        left: 0;
        z-index: 90;
        height: 56px;
        background: linear-gradient(
            to bottom,
            rgba(10, 12, 16, 0.97) 0%,
            rgba(10, 12, 16, 0.72) 36%,
            rgba(10, 12, 16, 0.18) 72%,
            transparent 100%
        );
        opacity: 0;
        pointer-events: none;
        transition: opacity 160ms ease;
    }

    .has-scroll-cut.is-scrolled .scroll-cut {
        opacity: 1;
    }

    #experience .timeline-reading-line {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 2px;
        background: var(--accent-green);
        opacity: 0.55;
        transform: scaleY(0);
        transform-origin: center top;
        pointer-events: none;
    }

    #experience .timeline-item.is-reading .timeline-dot {
        box-shadow: none;
    }

    #experience .timeline-item.is-read .timeline-dot {
        background: var(--card-border);
    }

    .nav-links a[aria-current="location"] {
        color: var(--accent-green);
        text-decoration: underline;
        text-underline-offset: 6px;
    }

    .scroll-progress {
        width: 100%;
        transform: scaleX(0);
        transform-origin: left center;
        transition: none;
        will-change: transform;
    }

    a:focus-visible,
    button:focus-visible,
    summary:focus-visible {
        outline: 2px solid var(--accent-green);
        outline-offset: 3px;
    }

    /* FLOW — the single compact screen layout */
    .hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(260px, 280px);
        grid-template-areas:
            "subtitle details"
            "title details"
            "social details";
        align-items: center;
        column-gap: 36px;
    }

    .hero-subtitle {
        grid-area: subtitle;
        align-self: end;
    }

    .hero h1 {
        grid-area: title;
        justify-self: start;
        max-width: 100%;
    }

    .hero-details {
        grid-area: details;
        display: grid;
        gap: 10px;
        margin: 0;
        padding-left: 26px;
        border-left: 1px solid var(--card-border);
    }

    .social-links {
        grid-area: social;
        align-self: start;
        margin-top: 16px;
    }

    #education .timeline {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding-left: 0;
    }

    #education .timeline::before,
    #education .timeline-dot {
        display: none;
    }

    #education .timeline-item {
        margin-bottom: 0;
    }

    #education .timeline-content {
        height: 100%;
    }
}

@media screen and (min-width: 621px) and (max-width: 1399px) {
    .cicd-background {
        top: 110px;
        right: -70px;
        width: 720px;
        min-width: 720px;
        opacity: 0.13;
    }
}

@media screen and (min-width: 1600px) {
    .cicd-background {
        right: -20px;
        width: 960px;
        opacity: 0.2;
    }
}

@media screen and (max-width: 980px) {
    body > .container,
    nav .container {
        max-width: 760px;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border: 1px solid var(--card-border);
        border-radius: 6px;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 11px);
        right: 0;
        left: 0;
        width: auto;
        max-height: calc(100vh - 76px);
        padding: 18px;
        overflow-y: auto;
        border: 1px solid var(--card-border);
        border-top: 0;
        border-radius: 0 0 8px 8px;
        background: rgba(10, 12, 16, 0.97);
        backdrop-filter: blur(14px);
        flex-direction: column;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .lang-switcher {
        margin-top: 3px;
        padding-left: 0;
        border-left: 0;
    }

    .hero {
        display: flex;
        align-items: stretch;
    }

    .hero-details {
        display: flex;
        margin: 12px 0 16px;
        padding-left: 0;
        border-left: 0;
    }

    .social-links {
        margin-top: 0;
    }

}

@media screen and (max-width: 620px) {
    body {
        font-size: 15px;
        line-height: 1.62;
    }

    body > .container,
    nav .container {
        padding-inline: 14px;
    }

    section {
        padding: 20px 0;
        scroll-margin-top: calc(var(--nav-height) + 92px);
    }

    h1 {
        font-size: clamp(32px, 10vw, 42px);
    }

    h2 {
        max-width: 100%;
        margin-bottom: 15px;
        font-size: 22px;
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    .hero {
        padding-top: 22px;
    }

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

    .hero-details {
        gap: 7px 11px;
        font-size: 12px;
    }

    .social-links {
        gap: 6px;
    }

    .btn {
        min-height: 42px;
        padding: 8px;
    }

    .about-text {
        font-size: 15px;
    }

    .timeline {
        padding-left: 18px;
    }

    .timeline::before {
        width: 1px;
    }

    .timeline-dot {
        left: -22px;
        width: 9px;
        height: 9px;
    }

    .timeline-content {
        padding: 14px;
    }

    .job-header {
        display: block;
        margin-bottom: 7px;
    }

    .job-identity {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 10px;
        max-width: 100%;
    }

    .company-mark {
        width: 38px;
        height: 38px;
    }

    .job-date {
        max-width: none;
        margin-top: 5px;
        text-align: left;
    }

    .job-tags {
        margin-top: 8px;
    }

    .tag {
        font-size: 10.5px;
    }

    .job-desc {
        font-size: 13.5px;
        line-height: 1.55;
    }

    .cicd-background {
        display: none;
    }

    .scroll-cut {
        height: 42px;
    }

    #education .timeline {
        grid-template-columns: 1fr;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    section,
    .typewriter {
        width: auto;
        opacity: 1 !important;
        transform: none !important;
    }

    .typewriter {
        border-right: 0;
    }

    .cicd-background {
        transform: none !important;
    }

    .cicd-background-inner {
        animation: none !important;
    }

    .cicd-route-light,
    .cicd-route-runner {
        display: none !important;
    }

    .scroll-cut {
        display: none !important;
    }

    section[data-scroll-fold],
    section[data-scroll-fold] > * {
        opacity: 1 !important;
        transform: none !important;
    }
}

@media print {
    #experience .timeline-reading-line,
    .cicd-background,
    .scroll-cut,
    .skills-panel {
        display: none !important;
    }

    section[data-scroll-fold],
    section[data-scroll-fold] > * {
        opacity: 1 !important;
        transform: none !important;
    }
}

.exporting-pdf #experience .timeline-reading-line,
.exporting-pdf .cicd-background,
.exporting-pdf .scroll-cut {
    display: none !important;
}

body.exporting-pdf section[data-scroll-fold],
body.exporting-pdf section[data-scroll-fold] > * {
    opacity: 1 !important;
    transform: none !important;
}

body.exporting-pdf > .container {
    display: block !important;
    max-width: 100% !important;
}

body.exporting-pdf {
    font-size: 10pt !important;
    line-height: 1.35 !important;
    overflow: visible !important;
}

body.exporting-pdf section {
    padding: 10px 0 !important;
}

body.exporting-pdf .hero {
    display: block !important;
    padding-top: 0 !important;
    padding-bottom: 4px !important;
}

body.exporting-pdf h1 {
    margin-bottom: 5px !important;
    font-size: 20pt !important;
}

body.exporting-pdf h2 {
    margin-bottom: 10px !important;
    padding-bottom: 3px !important;
    font-size: 13pt !important;
}

body.exporting-pdf h3 {
    margin-bottom: 3px !important;
    font-size: 10pt !important;
}

body.exporting-pdf .hero-subtitle {
    margin-bottom: 5px !important;
    font-size: 11pt !important;
}

body.exporting-pdf .hero-details {
    display: flex !important;
    gap: 8px 14px !important;
    margin: 7px 0 9px !important;
    padding-left: 0 !important;
    border-left: 0 !important;
    font-size: 8.5pt !important;
}

body.exporting-pdf .social-links {
    display: flex !important;
    margin-top: 0 !important;
    gap: 6px !important;
}

body.exporting-pdf .social-links .btn {
    min-height: 0 !important;
    padding: 3px 7px !important;
    font-size: 7.5pt !important;
}

body.exporting-pdf .about-text {
    max-width: none !important;
    font-size: 9pt !important;
    line-height: 1.45 !important;
}

body.exporting-pdf .about-text p {
    margin-bottom: 6px !important;
}

body.exporting-pdf .about-layout {
    display: block !important;
}

body.exporting-pdf .skills-panel {
    display: none !important;
}

body.exporting-pdf .timeline {
    padding-left: 18px !important;
}

body.exporting-pdf .timeline-item {
    margin-bottom: 8px !important;
    break-inside: avoid !important;
}

body.exporting-pdf .timeline-dot {
    left: -23px !important;
    width: 8px !important;
    height: 8px !important;
}

body.exporting-pdf .timeline-content {
    padding: 9px 11px !important;
}

body.exporting-pdf .job-header {
    margin-bottom: 5px !important;
}

body.exporting-pdf .job-identity {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 8px !important;
}

body.exporting-pdf .company-mark {
    width: 30px !important;
    height: 30px !important;
}

body.exporting-pdf .job-title {
    font-size: 9pt !important;
}

body.exporting-pdf .job-company {
    font-size: 8pt !important;
}

body.exporting-pdf .job-date {
    font-size: 7pt !important;
}

body.exporting-pdf .job-tags {
    gap: 3px !important;
    margin-top: 4px !important;
}

body.exporting-pdf .job-tags .tag {
    padding: 0 5px !important;
    font-size: 6.8pt !important;
}

body.exporting-pdf .job-desc {
    font-size: 7.7pt !important;
    line-height: 1.4 !important;
}

body.exporting-pdf .job-desc li {
    margin-bottom: 1px !important;
}

body.exporting-pdf #education .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/*
 * Plain one-page CV for browser print and html2pdf.
 * Kept last so it deterministically overrides the legacy print rules above.
 */
@page {
    size: A4 portrait;
    margin: 6mm;
}

@media print {
    html,
    body {
        width: 198mm !important;
        min-width: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    body > .container {
        width: 198mm !important;
        max-width: 198mm !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}

@media print {
    body,
    body * {
        color: #000 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        filter: none !important;
    }
}

body.exporting-pdf,
body.exporting-pdf * {
    color: #000 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}

@media print {
    body {
        font-family: Arial, sans-serif !important;
        font-size: 5.6pt !important;
        line-height: 1.18 !important;
    }
}

body.exporting-pdf {
    width: 198mm !important;
    min-width: 198mm !important;
    font-family: Arial, sans-serif !important;
    font-size: 5.6pt !important;
    line-height: 1.18 !important;
}

body.exporting-pdf > .container {
    width: 198mm !important;
    max-width: 198mm !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media print {
    nav,
    .scroll-progress,
    .scroll-cut,
    .cicd-background,
    .site-footer,
    .company-mark,
    .timeline-dot,
    .timeline::before,
    .social-links svg {
        display: none !important;
    }
}

body.exporting-pdf nav,
body.exporting-pdf .scroll-progress,
body.exporting-pdf .scroll-cut,
body.exporting-pdf .cicd-background,
body.exporting-pdf .site-footer,
body.exporting-pdf .company-mark,
body.exporting-pdf .timeline-dot,
body.exporting-pdf .timeline::before,
body.exporting-pdf .social-links svg {
    display: none !important;
}

@media print {
    section,
    section[data-scroll-fold],
    section[data-scroll-fold] > * {
        width: auto !important;
        padding: 0 !important;
        margin: 0 0 1.2mm !important;
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        break-inside: auto !important;
    }
}

body.exporting-pdf section,
body.exporting-pdf section[data-scroll-fold],
body.exporting-pdf section[data-scroll-fold] > * {
    width: auto !important;
    padding: 0 !important;
    margin: 0 0 1.2mm !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    break-inside: auto !important;
}

@media print {
    h1,
    h2,
    h3,
    .hero-subtitle,
    .job-title {
        font-family: Arial, sans-serif !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
    }

    h1 {
        font-size: 13pt !important;
        margin: 0 0 0.6mm !important;
    }

    h2 {
        display: block !important;
        font-size: 8pt !important;
        margin: 1.2mm 0 0.7mm !important;
        padding: 0 !important;
    }

    h3,
    .job-title {
        font-size: 6.2pt !important;
        margin: 0 !important;
    }
}

body.exporting-pdf h1,
body.exporting-pdf h2,
body.exporting-pdf h3,
body.exporting-pdf .hero-subtitle,
body.exporting-pdf .job-title {
    font-family: Arial, sans-serif !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
}

body.exporting-pdf h1 {
    font-size: 13pt !important;
    margin: 0 0 0.6mm !important;
}

body.exporting-pdf h2 {
    display: block !important;
    font-size: 8pt !important;
    margin: 1.2mm 0 0.7mm !important;
    padding: 0 !important;
}

body.exporting-pdf h3,
body.exporting-pdf .job-title {
    font-size: 6.2pt !important;
    margin: 0 !important;
}

@media print {
    .hero {
        display: block !important;
    }

    .hero-subtitle {
        display: block !important;
        font-size: 7pt !important;
        margin: 0 0 0.4mm !important;
    }

    .typewriter {
        width: auto !important;
        white-space: normal !important;
    }

    .hero-details,
    .social-links {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.4mm 3mm !important;
        margin: 0.5mm 0 !important;
        font-size: 5.4pt !important;
    }

    .social-links .btn {
        display: inline !important;
        min-height: 0 !important;
        padding: 0 !important;
        font: inherit !important;
    }

    .social-links .btn span {
        display: inline !important;
    }
}

body.exporting-pdf .hero {
    display: block !important;
}

body.exporting-pdf .hero-subtitle {
    display: block !important;
    font-size: 7pt !important;
    margin: 0 0 0.4mm !important;
}

body.exporting-pdf .typewriter {
    width: auto !important;
    white-space: normal !important;
}

body.exporting-pdf .hero-details,
body.exporting-pdf .social-links {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4mm 3mm !important;
    margin: 0.5mm 0 !important;
    font-size: 5.4pt !important;
}

body.exporting-pdf .social-links .btn {
    display: inline !important;
    min-height: 0 !important;
    padding: 0 !important;
    font: inherit !important;
}

body.exporting-pdf .social-links .btn span {
    display: inline !important;
}

@media print {
    .about-layout,
    .about-text,
    .timeline,
    #education .timeline {
        display: block !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .about-text {
        font-size: 5.5pt !important;
        line-height: 1.18 !important;
    }

    .about-text p {
        margin: 0 0 0.5mm !important;
    }

    .timeline-item,
    .timeline-item:last-child {
        margin: 0 0 0.7mm !important;
        break-inside: auto !important;
    }

    .timeline-content {
        padding: 0 !important;
    }

    .job-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 3mm !important;
        align-items: baseline !important;
        margin: 0 0 0.25mm !important;
    }

    .job-identity {
        display: block !important;
    }

    .job-company,
    .job-date {
        font-size: 5.2pt !important;
        line-height: 1.1 !important;
        margin: 0 !important;
    }

    .job-date {
        text-align: right !important;
        white-space: nowrap !important;
    }

    .job-desc {
        font-size: 5.4pt !important;
        line-height: 1.16 !important;
    }

    .job-desc ul {
        margin: 0 !important;
    }

    .job-desc li {
        padding-left: 2mm !important;
        margin: 0 0 0.2mm !important;
    }

    .job-desc li::before {
        content: "•" !important;
        left: 0 !important;
    }

    .job-tags {
        display: block !important;
        margin: 0.25mm 0 0 !important;
        font-size: 5pt !important;
        line-height: 1.1 !important;
    }

    .job-tags::before {
        content: "Stack: ";
        font-weight: 700;
    }

    .job-tags .tag {
        display: inline !important;
        padding: 0 !important;
        font: inherit !important;
        white-space: normal !important;
    }

    .job-tags .tag:not(:last-child)::after {
        content: ", ";
    }

    a::after {
        content: none !important;
    }
}

body.exporting-pdf .about-layout,
body.exporting-pdf .about-text,
body.exporting-pdf .timeline,
body.exporting-pdf #education .timeline {
    display: block !important;
    max-width: none !important;
    padding: 0 !important;
}

body.exporting-pdf .about-text {
    font-size: 5.5pt !important;
    line-height: 1.18 !important;
}

body.exporting-pdf .about-text p {
    margin: 0 0 0.5mm !important;
}

body.exporting-pdf .timeline-item,
body.exporting-pdf .timeline-item:last-child {
    margin: 0 0 0.7mm !important;
    break-inside: auto !important;
}

body.exporting-pdf .timeline-content {
    padding: 0 !important;
}

body.exporting-pdf .job-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 3mm !important;
    align-items: baseline !important;
    margin: 0 0 0.25mm !important;
}

body.exporting-pdf .job-identity {
    display: block !important;
}

body.exporting-pdf .job-company,
body.exporting-pdf .job-date {
    font-size: 5.2pt !important;
    line-height: 1.1 !important;
    margin: 0 !important;
}

body.exporting-pdf .job-date {
    text-align: right !important;
    white-space: nowrap !important;
}

body.exporting-pdf .job-desc {
    font-size: 5.4pt !important;
    line-height: 1.16 !important;
}

body.exporting-pdf .job-desc ul {
    margin: 0 !important;
}

body.exporting-pdf .job-desc li {
    padding-left: 2mm !important;
    margin: 0 0 0.2mm !important;
}

body.exporting-pdf .job-desc li::before {
    content: "•" !important;
    left: 0 !important;
}

body.exporting-pdf .job-tags {
    display: block !important;
    margin: 0.25mm 0 0 !important;
    font-size: 5pt !important;
    line-height: 1.1 !important;
}

body.exporting-pdf .job-tags::before {
    content: "Stack: ";
    font-weight: 700;
}

body.exporting-pdf .job-tags .tag {
    display: inline !important;
    padding: 0 !important;
    font: inherit !important;
    white-space: normal !important;
}

body.exporting-pdf .job-tags .tag:not(:last-child)::after {
    content: ", ";
}

body.exporting-pdf a::after {
    content: none !important;
}
