:root {
    --bg: #0a0e16;
    --bg-raised: #0f1522;
    --surface: rgba(20, 28, 44, 0.62);
    --surface-strong: #141c2c;
    --line: rgba(148, 163, 184, 0.14);
    --line-strong: rgba(148, 163, 184, 0.26);
    --text: #e8edf6;
    --body: #b4bfd2;
    --muted: #8692a8;
    --accent: #7c9cff;
    --accent-strong: #5b7cfa;
    --accent-soft: rgba(124, 156, 255, 0.12);
    --mint: #5eead4;
    --mint-soft: rgba(94, 234, 212, 0.1);

    --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

    --radius: 14px;
    --radius-small: 8px;
    --container: 1160px;
    --gutter: clamp(16px, 4vw, 32px);
    --header-height: 68px;
}

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    background:
        radial-gradient(900px 600px at 85% -10%, rgba(91, 124, 250, 0.16), transparent 60%),
        radial-gradient(700px 500px at -10% 30%, rgba(94, 234, 212, 0.06), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--body);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
strong, b { color: var(--text); font-weight: 600; }
em { font-style: normal; color: var(--accent); font-weight: 500; }
code { font-family: var(--font-mono); font-size: 0.9em; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection { background: var(--accent); color: var(--bg); }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--accent);
    color: var(--bg);
    border-radius: var(--radius-small);
    font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: #fff;
    box-shadow: 0 8px 24px -10px rgba(91, 124, 250, 0.7);
}
.btn-primary:hover { box-shadow: 0 12px 30px -10px rgba(91, 124, 250, 0.9); }

.btn-ghost {
    border-color: var(--line-strong);
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

.btn-small { min-height: 40px; padding: 10px 18px; font-size: 14px; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 14, 22, 0.72);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    color: var(--text);
    letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }

.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--body);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    position: relative;
}
.nav-toggle span {
    position: absolute;
    left: 12px;
    right: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.25s ease, top 0.25s ease;
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* Hero */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
    padding-top: clamp(48px, 9vh, 104px);
    padding-bottom: clamp(40px, 7vh, 72px);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid rgba(94, 234, 212, 0.3);
    border-radius: 999px;
    background: var(--mint-soft);
    color: var(--mint);
    font-size: 13px;
    font-weight: 500;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.6);
    animation: pulse 2.2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.55); }
    70% { box-shadow: 0 0 0 9px rgba(94, 234, 212, 0); }
    100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); }
}

.hero h1 { margin-top: 24px; font-family: var(--font-display); line-height: 1.02; letter-spacing: -0.035em; }
.hero-hi { display: block; font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; color: var(--body); letter-spacing: -0.01em; }
.hero-name {
    display: block;
    margin-top: 8px;
    font-size: clamp(44px, 7.2vw, 84px);
    font-weight: 700;
    background: linear-gradient(120deg, #ffffff 10%, var(--accent) 60%, var(--mint) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-role {
    margin-top: 20px;
    font-family: var(--font-display);
    font-size: clamp(18px, 2.1vw, 24px);
    font-weight: 500;
    color: var(--text);
}
.hero-role span { color: var(--accent); }

.hero-lead { margin-top: 20px; max-width: 58ch; font-size: clamp(16px, 1.4vw, 18px); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-social { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 28px; }
.hero-social a {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.hero-social a:hover { color: var(--text); border-bottom-color: var(--accent); }

/* Agent trace */
.trace {
    min-width: 0;
    background: linear-gradient(180deg, rgba(22, 30, 48, 0.92), rgba(14, 20, 33, 0.92));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(124, 156, 255, 0.05);
    overflow: hidden;
}
.trace-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.trace-title { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.trace-tag {
    margin-left: auto;
    padding: 2px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 11px;
    color: var(--muted);
}

.trace-tabs { display: flex; gap: 6px; padding: 14px 18px 0; }
.trace-tabs button {
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font: 500 13px var(--font-body);
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.trace-tabs button:hover { color: var(--text); }
.trace-tabs button[aria-selected="true"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }

.trace-body { padding: 16px 18px 6px; font-family: var(--font-mono); font-size: 13px; }
.trace-mail {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(10, 14, 22, 0.6);
    border: 1px solid var(--line);
}
.trace-mail span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.trace-mail strong { font-family: var(--font-body); font-size: 15px; }

.trace-steps { margin-top: 14px; min-height: 232px; }
.trace-step {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    animation: step-in 0.35s ease both;
}
.trace-step:last-child { border-bottom: 0; }
.trace-agent { color: var(--accent); }
.trace-agent::before { content: "▸ "; color: var(--muted); }
.trace-detail { color: #c9d3e6; overflow-wrap: anywhere; }
.trace-step.is-ok .trace-detail { color: var(--mint); font-weight: 500; }
.trace-step.is-held .trace-detail { color: #fbbf24; font-weight: 500; }
@keyframes step-in {
    from { opacity: 0; transform: translateX(-6px); }
    to { opacity: 1; transform: none; }
}

.trace-foot {
    padding: 12px 18px 16px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    padding-block: 0;
}
.stat {
    padding: 22px 20px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.stat:first-child { border-left: 1px solid var(--line); border-radius: var(--radius) 0 0 var(--radius); }
.stat:last-child { border-right: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) 0; }
.stat + .stat { box-shadow: -1px 0 0 var(--line); }
.stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(26px, 2.8vw, 34px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
}
.stat span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--muted); }

/* Sections */
.section { padding-top: clamp(72px, 11vw, 120px); }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4.6vw, 52px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: clamp(28px, 4vw, 44px);
}
.section-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--mint));
}

.subhead {
    margin: clamp(48px, 6vw, 72px) 0 24px;
    font-family: var(--font-display);
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
}

.card {
    padding: clamp(20px, 2.4vw, 28px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover { border-color: var(--line-strong); }

.card-title {
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--accent);
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
}
.about-text p { font-size: clamp(16px, 1.35vw, 18px); max-width: 68ch; }
.about-text p + p { margin-top: 18px; }

.portrait {
    position: relative;
    border-radius: 20px;
    padding: 6px;
    background: linear-gradient(140deg, var(--accent), transparent 55%, var(--mint));
}
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }

.bring-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.bring-grid h4 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    padding-left: 22px;
    position: relative;
}
.bring-grid h4::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: linear-gradient(135deg, var(--accent), var(--mint));
}
.bring-grid p { font-size: 15px; }

/* Experience */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), rgba(124, 156, 255, 0.1));
}

.job {
    position: relative;
    padding: clamp(22px, 3vw, 32px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.job + .job { margin-top: 24px; }
.job::before {
    content: "";
    position: absolute;
    left: -32px;
    top: 34px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.15);
}

.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.job-head h3 {
    font-family: var(--font-display);
    font-size: clamp(20px, 2.2vw, 24px);
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
}
.job-org { margin-top: 4px; font-weight: 600; color: var(--accent); }
.job-org span { font-weight: 400; color: var(--muted); }
.job-date {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 13px;
    white-space: nowrap;
}

.job-points { margin-top: 20px; }
.job-points li { position: relative; padding-left: 22px; }
.job-points li + li { margin-top: 14px; }
.job-points li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.68em;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--accent);
    transform: rotate(45deg);
}

.promo {
    margin-top: 20px;
    padding: 10px 14px;
    border-left: 3px solid var(--mint);
    border-radius: 0 8px 8px 0;
    background: var(--mint-soft);
    color: var(--text);
    font-size: 14px;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tags li {
    padding: 4px 11px;
    border: 1px solid rgba(124, 156, 255, 0.22);
    border-radius: 999px;
    background: var(--accent-soft);
    color: #b9c8ff;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.6;
}

.duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 40px;
}
.facts dt { color: var(--text); font-weight: 600; }
.facts dd { margin-top: 2px; font-size: 15px; }
.facts dd + dt { margin-top: 14px; }

/* Projects */
.featured {
    position: relative;
    padding: clamp(22px, 3.4vw, 40px);
    border: 1px solid rgba(124, 156, 255, 0.35);
    border-radius: calc(var(--radius) + 4px);
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(124, 156, 255, 0.12), transparent 70%),
        var(--surface-strong);
    box-shadow: 0 30px 80px -40px rgba(91, 124, 250, 0.5);
}

.featured-head,
.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.featured-head h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: clamp(26px, 3.2vw, 34px);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.badge {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--mint);
    color: #04201b;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.meta { margin-top: 6px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; flex-shrink: 0; }
.links a {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.links a:hover { color: var(--text); border-bottom-color: var(--accent); }

.featured-lead { margin-top: 18px; max-width: 75ch; font-size: clamp(16px, 1.35vw, 18px); color: var(--text); }

.flow {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px;
    margin-top: 28px;
    counter-reset: step;
}
.flow li {
    position: relative;
    padding: 14px 12px;
    text-align: center;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(10, 14, 22, 0.55);
}
.flow li:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-weight: 600;
}
.flow li:last-child {
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}
.flow b { display: block; font-size: 15px; color: var(--text); }
.flow small { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.flow li:last-child b { color: #fff; }
.flow li:last-child small { color: #e2e8ff; }

.featured-body {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(24px, 3.4vw, 40px);
    margin-top: 32px;
    align-items: start;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.metrics div {
    padding: 14px 12px;
    border-radius: 10px;
    background: rgba(10, 14, 22, 0.55);
    border: 1px solid var(--line);
}
.metrics strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--mint);
}
.metrics span { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }

.checks li { position: relative; padding-left: 26px; font-size: 15px; }
.checks li + li { margin-top: 12px; }
.checks li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--mint);
    font-weight: 700;
}

.shot {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
    background: #fff;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.project {
    display: flex;
    flex-direction: column;
    padding: clamp(22px, 2.6vw, 30px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.project:hover { border-color: rgba(124, 156, 255, 0.4); transform: translateY(-3px); }
.project h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
}
.project > p:not(.meta):not(.demo-login) { margin-top: 14px; font-size: 15px; }
.project .checks { margin-top: 16px; }
.project .tags { margin-top: auto; padding-top: 22px; }
.project:last-child:nth-child(odd) { grid-column: 1 / -1; }

.demo-login { margin-top: 14px; font-size: 14px; color: var(--muted); }
.demo-login code { padding: 2px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); color: var(--text); }

.note { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
}
.chips li.key { border-color: rgba(124, 156, 255, 0.45); background: var(--accent-soft); color: #d4ddff; }

/* Contact */
.contact { text-align: center; padding-bottom: clamp(72px, 10vw, 112px); }
.contact .section-title::after { margin-inline: auto; }
.contact-lead { max-width: 60ch; margin: 0 auto; font-size: clamp(16px, 1.4vw, 18px); }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 860px;
    margin: 40px auto 0;
    text-align: left;
}
.contact-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 600;
    overflow-wrap: anywhere;
}
.contact-card .label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.contact-card a:hover { color: var(--accent); }
.inline-links { display: flex; flex-wrap: wrap; gap: 16px; }

.copy-btn {
    position: absolute;
    right: 14px;
    top: 14px;
    padding: 4px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font: 500 12px var(--font-body);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.copy-btn.is-done { color: var(--mint); border-color: var(--mint); }

.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-block: 24px;
    font-size: 14px;
    color: var(--muted);
}
.footer-inner a:hover { color: var(--text); }

/* Reveal on scroll (enabled by JS only) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
    .hero { grid-template-columns: minmax(0, 1fr); }
    .trace { max-width: 640px; }
    .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .stat,
    .stat:first-child,
    .stat:last-child { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
    .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .featured-body { grid-template-columns: minmax(0, 1fr); }
    .shot { max-width: 640px; }
    .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
    .flow li:nth-child(3)::after { content: none; }
}

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px var(--gutter) 24px;
        background: rgba(10, 14, 22, 0.97);
        border-bottom: 1px solid var(--line);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }
    .nav-menu.is-open { opacity: 1; visibility: visible; transform: none; }
    .nav-links { flex-direction: column; }
    .nav-links a { padding: 12px; font-size: 17px; }
    .nav-menu .btn { width: 100%; }

    .about-grid { grid-template-columns: minmax(0, 1fr); }
    .portrait { order: -1; width: 180px; }
    .bring-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-grid,
    .duo { grid-template-columns: minmax(0, 1fr); }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat:last-child { grid-column: 1 / -1; }
    .bring-grid,
    .skills-grid,
    .contact-grid { grid-template-columns: minmax(0, 1fr); }

    .hero-actions .btn,
    .contact-actions .btn { flex: 1 1 100%; }

    .job-head,
    .featured-head,
    .project-head { flex-direction: column; gap: 8px; }
    .links { justify-content: flex-start; }
    .timeline { padding-left: 24px; }
    .timeline::before { left: 4px; }
    .job::before { left: -26px; width: 12px; height: 12px; }

    .flow { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .trace-body { font-size: 12px; }
    .trace-head .dots { display: none; }
    .trace-step { grid-template-columns: 100px minmax(0, 1fr); gap: 8px; }
    .trace-steps { min-height: 260px; }
    .flow li:not(:last-child)::after {
        content: "↓";
        right: auto;
        left: 50%;
        top: auto;
        bottom: -21px;
        transform: translateX(-50%);
    }
    .flow li:nth-child(3)::after { content: "↓"; }

    .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}
