@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap");

:root {
    --ink: #1c1714;
    --muted: #6c5d53;
    --paper: #f4eee4;
    --white: #fffaf5;
    --line: #d8c8b8;
    --accent: #a94f2b;
    --on-accent: #fffaf5;
    --dark: #1a1512;
    --soft: #e8ddcf;
    --chip: #efe4d7;
    --panel-shadow: rgb(45 31 23 / 20%);
    --header-glass: rgb(255 250 245 / 90%);
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: #f5f4ef;
    color: #141411;
    font-family: "Manrope", sans-serif;
    -webkit-font-smoothing: antialiased;
}

main[data-theme="dark"] {
    --ink: #f5ede3;
    --muted: #baa99d;
    --paper: #181310;
    --white: #211a16;
    --line: #43362e;
    --accent: #d47743;
    --on-accent: #1a1512;
    --soft: #2b231e;
    --chip: #30251f;
    --panel-shadow: rgb(0 0 0 / 38%);
    --header-glass: rgb(24 19 16 / 90%);
}

html[data-theme="dark"],
body[data-theme="dark"],
main[data-theme="dark"],
.site-header[data-theme="dark"] {
    background-color: #171716;
}

body[data-theme="dark"] {
    background: #171716;
    color: #f0eee7;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

main {
    overflow: hidden;
    background: var(--paper);
    color: var(--ink);
    transition: color 250ms ease, background-color 250ms ease;
}

main[data-theme="dark"] {
    --ink: #f0eee7;
    --muted: #aaa9a2;
    --paper: #171716;
    --white: #20201e;
    --line: #393936;
    --soft: #272725;
    --chip: #2a2a27;
    --panel-shadow: rgb(0 0 0 / 38%);
}

html[data-theme="dark"],
main[data-theme="dark"],
.site-header[data-theme="dark"],
.site-footer[data-theme="dark"] {
    --ink: #f0eee7;
    --muted: #aaa9a2;
    --paper: #171716;
    --white: #20201e;
    --line: #393936;
    --soft: #272725;
    --chip: #2a2a27;
}

.site-header[data-theme="dark"] {
    background: #171716;
    border-color: #393936;
    color: #f0eee7;
}

.site-header[data-theme="dark"] .theme-toggle-track {
    background: var(--accent);
    border-color: var(--accent);
}

.site-header[data-theme="dark"] .theme-toggle-thumb {
    color: #191918;
    background: #f5f4ef;
    transform: translateX(19px);
}

.site-header[data-theme="dark"] .language-switch a,
.site-header[data-theme="dark"] .language-switch a.active,
.site-header[data-theme="dark"] .site-header nav a {
    color: #f0eee7;
}

.site-header[data-theme="dark"] .language-switch a,
.site-header[data-theme="dark"] .language-switch a.active,
.site-header[data-theme="dark"] .site-header nav a {
    color: #f0eee7;
}

.shell {
    width: min(1180px, calc(100% - 64px));
    margin-inline: auto;
}

/* ---- Header ---- */
.site-header {
    width: 100%;
    height: 86px;
    padding-inline: max(32px, calc((100vw - 1310px) / 2));
    position: sticky;
    z-index: 50;
    top: 0;
    box-sizing: border-box;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: transparent;
    transition:
        background-color 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
}

.site-header-scrolled {
    background: var(--header-glass);
    border-color: var(--line);
    box-shadow: 0 10px 30px rgb(20 20 17 / 8%);
    backdrop-filter: blur(22px) saturate(125%);
    -webkit-backdrop-filter: blur(22px) saturate(125%);
}

.site-header[data-theme="dark"] {
    background: #171716;
    border-color: #393936;
    color: #f0eee7;
}

main::before {
    content: "";
    width: 100%;
    height: 3px;
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    background: var(--accent);
    transform-origin: left;
    animation: brand-line 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.logo {
    width: max-content;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.07em;
}

.logo-dot,
.accent { color: var(--accent); }

.site-header nav {
    display: flex;
    gap: 40px;
}

.site-header nav a,
.hire-link,
.language-switch {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-header nav a {
    position: relative;
    padding-block: 6px;
}

.site-header nav a::after {
    content: "";
    position: absolute;
    height: 1px;
    inset: auto 100% 0 0;
    background: var(--accent);
    transition: inset 220ms ease;
}

.site-header nav a:hover::after { inset-right: 0; }

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 38px;
}

.theme-toggle {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-track {
    width: 40px;
    height: 18px;
    padding: 2px;
    display: block;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--soft);
}

.theme-toggle-thumb {
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 2px 5px rgb(0 0 0 / 14%);
    transition: transform 240ms ease, background-color 220ms ease;
}

.theme-toggle-thumb svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

main[data-theme="dark"] .theme-toggle-track {
    background: var(--accent);
    border-color: var(--accent);
}

main[data-theme="dark"] .theme-toggle-thumb {
    color: #191918;
    background: #f5f4ef;
    transform: translateX(19px);
}

.language-switch {
    display: flex;
    align-items: center;
    gap: 5px;
}

.language-switch a {
    padding: 4px 2px;
    border: 0;
    color: #a09f98;
    transition: color 180ms ease;
}

.language-switch a:hover,
.language-switch a.active { color: var(--ink); }

.language-switch span { color: #b8b7b0; }

.hire-link,
.text-link,
.project-bottom a,
.blog-card a,
.social-row a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    transition: transform 200ms ease;
}

a:hover .icon { transform: translateX(4px); }
a:hover .icon-diagonal { transform: translate(3px, -3px) rotate(-45deg); }
.icon-diagonal { transform: rotate(-45deg); }

/* ---- Hero ---- */
.hero {
    min-height: 680px;
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 72px;
}

.hero-copy { padding-bottom: 34px; }

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: #44a44f;
    box-shadow: 0 0 0 4px rgb(68 164 79 / 10%);
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    margin-bottom: 28px;
    font-size: clamp(46px, 5.25vw, 73px);
    line-height: 1.04;
    letter-spacing: -0.055em;
    font-weight: 600;
}

.hero-copy > p {
    max-width: 590px;
    margin-bottom: 34px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.hero-actions { display: flex; gap: 12px; }

.button {
    min-height: 52px;
    padding: 0 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    border: 1px solid var(--ink);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 200ms ease, background 200ms ease, transform 200ms ease;
    overflow: hidden;
    position: relative;
}

.button:hover { transform: translateY(-2px); }

.button-dark {
    color: var(--paper);
    background: var(--ink);
}

.button-dark:hover {
    color: var(--on-accent);
    background: var(--accent);
    border-color: var(--accent);
}

.button::before,
.send-button::before {
    content: "";
    width: 35%;
    height: 180%;
    position: absolute;
    top: -40%;
    left: -60%;
    background: rgb(255 255 255 / 18%);
    transform: skewX(-24deg);
    transition: left 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.button:hover::before,
.send-button:hover::before {
    left: 125%;
}

main[data-theme="dark"] .button-dark {
    background: #f5f4ef;
    border-color: #f5f4ef;
    color: #171716;
}

main[data-theme="dark"] .button-dark:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.button-outline:hover {
    color: white;
    background: var(--ink);
}

.code-visual {
    position: relative;
    height: 430px;
    display: grid;
    place-items: center;
}

.code-visual::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: var(--soft);
}

.code-window {
    width: min(440px, 100%);
    height: 280px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 18%);
    background: #20201e;
    color: #d7d5ce;
    box-shadow: 0 28px 60px var(--panel-shadow);
    transform: rotate(2deg);
}

.code-top {
    height: 43px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #353532;
}

.code-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5f5f59;
}

.code-top small {
    margin-left: 10px;
    color: #85857f;
    font-family: "DM Mono", monospace;
    font-size: 8px;
}

.code-body {
    padding: 26px;
    display: flex;
    flex-direction: column;
    font: 10px/1.85 "DM Mono", monospace;
}

.code-body .line { display: block; white-space: pre; }

.code-body .line-num {
    width: 35px;
    display: inline-block;
    color: #575751;
    font-style: normal;
}

.code-body b { color: #ff755a; font-weight: 400; }
.code-body em { color: #8fbec7; font-style: normal; }

.code-body .indent { padding-left: 18px; }
.code-body .indent-more { padding-left: 36px; }

.code-orbit {
    position: absolute;
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: 50%;
}

.orbit-one {
    width: 160px;
    height: 160px;
    top: 105px;
    right: -55px;
}

.orbit-two {
    width: 85px;
    height: 85px;
    top: 142px;
    right: -17px;
    border-color: rgb(255 86 52 / 55%);
}

.status-pill {
    height: 34px;
    padding: 0 14px;
    position: absolute;
    z-index: 2;
    right: 4px;
    bottom: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 8px 30px rgb(20 20 17 / 12%);
    font: 8px "DM Mono", monospace;
    letter-spacing: 0.1em;
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4baa55;
}

.scroll-cue {
    position: absolute;
    left: 0;
    bottom: 36px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8a8982;
    font: 9px "DM Mono", monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.scroll-cue-line {
    width: 1px;
    height: 28px;
    position: relative;
    overflow: hidden;
    background: var(--line);
}

.scroll-cue-line::after {
    content: "";
    position: absolute;
    inset: -100% 0 100%;
    background: var(--ink);
    animation: scroll 2.2s ease-in-out infinite;
}

@keyframes scroll {
    50% { inset: 100% 0 -100%; }
}

/* ---- Sections ---- */
.stack-section,
.blog-section {
    padding-block: 100px 112px;
}

.section-heading h2 {
    margin-bottom: 0;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.045em;
    font-weight: 600;
}

.kicker {
    margin-bottom: 21px;
    display: block;
    color: var(--accent);
    font: 10px "DM Mono", monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.split-heading {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: end;
}

.split-heading p,
.portfolio-heading p,
.blog-heading > p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.split-heading p { max-width: 440px; justify-self: end; }

/* ---- Skills ---- */
.skill-grid {
    margin-top: 62px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.skill {
    min-height: 116px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background 180ms ease, transform 180ms ease;
}

.skill:hover {
    z-index: 1;
    background: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgb(20 20 17 / 5%);
}

.skill-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--soft);
    color: #5a5953;
    font: 11px "DM Mono", monospace;
}

.skill div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill strong {
    font-size: 13px;
    font-weight: 600;
}

.skill small {
    color: #8b8a84;
    font: 9px "DM Mono", monospace;
    text-transform: uppercase;
}

/* ---- Portfolio ---- */
.portfolio-section {
    padding-block: 104px 120px;
    background: var(--white);
}

.portfolio-heading {
    display: grid;
    grid-template-columns: 0.5fr 1fr auto;
    gap: 40px;
    align-items: start;
}

.portfolio-heading > div p {
    max-width: 550px;
    margin-top: 22px;
}

.text-link {
    align-self: end;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--ink);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.project-grid {
    margin-top: 68px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px 28px;
}

.project-card:nth-child(3) { grid-column: 1 / -1; }

.project-visual {
    height: 355px;
    position: relative;
    overflow: hidden;
    transition: transform 280ms ease;
}

.project-card:hover .project-visual { transform: translateY(-5px); }

.project-visual::after {
    content: "";
    position: absolute;
    z-index: 4;
    inset: 0;
    background: var(--accent);
    mix-blend-mode: multiply;
    opacity: 0;
    transform: translateX(-101%);
    transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
}

.project-card:hover .project-visual::after {
    opacity: 0.1;
    transform: translateX(101%);
}

.project-1 .project-visual {
    background: #e3d2bf;
}

.project-2 .project-visual {
    background: #c9a47d;
}

.project-3 .project-visual {
    height: 390px;
    background: #cdb79e;
}

.project-number,
.project-type {
    position: absolute;
    z-index: 3;
    font: 8px "DM Mono", monospace;
    letter-spacing: 0.1em;
}

.project-number { top: 18px; left: 18px; }
.project-type { right: 18px; bottom: 16px; }

.project-1 .project-visual { background: #e6e2d5; }
.project-2 .project-visual { background: #bcc8b6; }
.project-3 .project-visual {
    height: 390px;
    background: #d4d0c3;
}

.finora-ui {
    width: 73%;
    height: 75%;
    position: absolute;
    left: 50%;
    top: 58px;
    padding: 28px;
    background: #f8f7f2;
    box-shadow: 0 20px 45px rgb(58 53 43 / 20%);
    transform: translateX(-50%) rotate(-2deg);
}

.finora-heading {
    width: 85px;
    height: 9px;
    margin-bottom: 24px;
    background: #292925;
}

.chart {
    height: 88px;
    display: flex;
    align-items: end;
    gap: 8px;
    border-bottom: 1px solid #ccc9bf;
}

.chart i {
    width: 15%;
    background: #898f6d;
}

.chart i:nth-child(1) { height: 25%; }
.chart i:nth-child(2) { height: 48%; }
.chart i:nth-child(3) { height: 42%; }
.chart i:nth-child(4) { height: 68%; }
.chart i:nth-child(5) { height: 62%; }
.chart i:nth-child(6) { height: 90%; background: var(--accent); }

.finora-row {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
}

.finora-row span {
    width: 58px;
    height: 5px;
    background: #d2d0c8;
}

.finora-row.short span:last-child { width: 35px; }

.phone {
    width: 186px;
    height: 320px;
    position: absolute;
    top: 35px;
    left: 50%;
    padding: 30px 20px;
    border: 5px solid #252823;
    border-radius: 25px 25px 0 0;
    background: #f3f1e8;
    box-shadow: 0 23px 45px rgb(44 52 41 / 24%);
    transform: translateX(-50%) rotate(3deg);
}

.phone-speaker {
    width: 38px;
    height: 4px;
    position: absolute;
    top: 9px;
    left: 50%;
    border-radius: 5px;
    background: #31332e;
    transform: translateX(-50%);
}

.phone-date {
    text-align: center;
    font: 7px "DM Mono", monospace;
    letter-spacing: 0.12em;
}

.progress-ring {
    width: 95px;
    height: 95px;
    margin: 25px auto;
    display: grid;
    place-items: center;
    border: 9px solid #ced4c8;
    border-top-color: var(--accent);
    border-right-color: var(--accent);
    border-radius: 50%;
    font: 18px "DM Mono", monospace;
}

.phone-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-lines i {
    display: block;
    height: 20px;
    border-radius: 5px;
    background: #deddd6;
}

.northline-ui {
    width: 75%;
    height: 86%;
    position: absolute;
    left: 50%;
    top: 42px;
    overflow: hidden;
    background: #e9e6dc;
    box-shadow: 0 25px 55px rgb(54 51 43 / 20%);
    transform: translateX(-50%);
}

.northline-nav {
    height: 42px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font: 8px "DM Mono", monospace;
}

.mountains {
    height: calc(100% - 42px);
    position: relative;
    overflow: hidden;
    background: linear-gradient(#c7c6be 0 50%, #777a6f 50%);
}

.mountains i,
.mountains b,
.mountains em {
    position: absolute;
    border-style: solid;
    border-width: 0 130px 155px;
    border-color: transparent transparent #686d65;
}

.mountains i { left: 5%; bottom: 55px; }
.mountains b {
    left: 32%;
    bottom: 25px;
    border-width: 0 180px 210px;
    border-bottom-color: #555a53;
}
.mountains em {
    right: -8%;
    bottom: 50px;
    border-width: 0 145px 165px;
    border-bottom-color: #747970;
}

.northline-copy {
    position: absolute;
    left: 25px;
    bottom: 20px;
    color: white;
    font-size: 34px;
    font-weight: 600;
    line-height: 0.88;
    letter-spacing: -0.06em;
}

.project-copy { padding-top: 25px; }

.project-copy h3 {
    margin-bottom: 13px;
    font-size: 24px;
    letter-spacing: -0.035em;
}

.project-copy > p {
    max-width: 480px;
    min-height: 50px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

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

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

.tag {
    padding: 6px 9px;
    background: var(--chip);
    color: #65645e;
    font: 8px "DM Mono", monospace;
    text-transform: uppercase;
}

.project-bottom a,
.blog-card a {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ---- Blog ---- */
.blog-heading {
    display: grid;
    grid-template-columns: 1fr 0.65fr auto;
    gap: 50px;
    align-items: end;
}

.blog-heading > p { max-width: 400px; }

.blog-grid {
    margin-top: 65px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
}

.blog-card {
    min-height: 320px;
    padding: 30px 30px 28px 0;
    position: relative;
    border-right: 1px solid var(--line);
}

.blog-card:not(:first-child) { padding-left: 30px; }
.blog-card:last-child { border-right: 0; }

.blog-card time {
    color: #909089;
    font: 9px "DM Mono", monospace;
    letter-spacing: 0.08em;
}

.blog-card h3 {
    max-width: 310px;
    margin: 34px 0 16px;
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: -0.025em;
    transition: color 180ms ease;
}

.blog-card:hover h3 { color: var(--accent); }

.blog-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.blog-card a {
    position: absolute;
    left: 0;
    bottom: 28px;
}

.blog-card:not(:first-child) a { left: 30px; }

/* ---- Contact ---- */
.contact-section {
    padding-block: 110px;
    background: var(--dark);
    color: #f6f5ef;
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 120px;
}

.kicker-light { color: #aaa9a2; }

.contact-copy h2 {
    margin-bottom: 28px;
    font-size: clamp(40px, 4.5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
    font-weight: 600;
}

.contact-copy > p {
    max-width: 480px;
    color: #aaa9a2;
    font-size: 14px;
    line-height: 1.75;
}

.contact-details {
    margin-top: 42px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-details a {
    width: max-content;
    padding-bottom: 3px;
    border-bottom: 1px solid #686761;
    font-size: 14px;
}

.contact-details span {
    color: #81807a;
    font: 9px "DM Mono", monospace;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.social-row {
    margin-top: 35px;
    display: flex;
    gap: 10px;
}

.social-row a {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    border: 1px solid #44443f;
    transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.social-row a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.social-row svg { width: 15px; height: 15px; }

.contact-form { display: flex; flex-direction: column; }

.contact-form label {
    padding: 18px 0;
    display: grid;
    grid-template-columns: 110px 1fr;
    border-bottom: 1px solid #41413d;
}

.contact-form label > span {
    padding-top: 4px;
    color: #8b8a84;
    font: 9px "DM Mono", monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    resize: none;
    background: transparent;
    color: white;
    font-size: 14px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #6f6e69; }

.contact-form label:focus-within { border-color: var(--accent); }

.send-button {
    height: 56px;
    margin-top: 28px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 0;
    background: var(--accent);
    color: white;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background 180ms ease, transform 180ms ease;
}

.send-button:hover {
    background: #ef4423;
    transform: translateY(-2px);
}

.send-button:hover .icon { transform: translateX(4px); }

.form-error {
    padding: 0 0 0 110px;
    color: #ff5634;
    font: 9px "DM Mono", monospace;
    margin-top: -12px;
}

/* ---- Footer ---- */
.site-footer {
    padding: 76px max(32px, calc((100vw - 1180px) / 2)) 28px;
    background: #121211;
    color: white;
    border-top: 1px solid #2b2b29;
}

.footer-main {
    padding-bottom: 70px;
    display: flex;
    justify-content: space-between;
}

.footer-logo { display: block; margin-bottom: 18px; }

.footer-tag {
    max-width: 320px;
    color: #7f7e78;
    font-size: 12px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 100px;
}

.footer-links > div {
    min-width: 100px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link-label {
    margin-bottom: 7px;
    color: #5e5d58;
    font: 8px "DM Mono", monospace;
    letter-spacing: 0.1em;
}

.footer-links a {
    width: max-content;
    color: #aaa9a3;
    font-size: 11px;
    transition: color 180ms ease;
}

.footer-links a:hover { color: white; }

.footer-bottom {
    padding-top: 25px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-top: 1px solid #2b2b29;
    color: #5e5d58;
    font: 8px "DM Mono", monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.footer-bottom > div { display: flex; gap: 22px; }

.footer-bottom .language-switch { justify-self: end; }

/* ---- Scroll to top ---- */
.scroll-to-top {
    width: 48px;
    height: 48px;
    padding: 0;
    position: fixed;
    z-index: 20;
    right: 28px;
    bottom: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--ink);
    color: var(--paper);
    box-shadow: 0 10px 28px rgb(0 0 0 / 18%);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity 200ms ease, transform 200ms ease, color 180ms ease, background-color 180ms ease;
}

.scroll-to-top-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top .icon { transform: rotate(-90deg); }
.scroll-to-top:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}
.scroll-to-top:hover .icon { transform: translateY(-3px) rotate(-90deg); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .site-header { grid-template-columns: 1fr auto; }
    .site-header nav { display: none; }

    .hero {
        min-height: auto;
        padding-block: 90px 100px;
        grid-template-columns: 1fr;
    }

    .hero-copy { padding-bottom: 0; }
    .hero-copy > p { max-width: 660px; }

    .code-visual {
        width: min(560px, 100%);
        margin-inline: auto;
    }

    .scroll-cue { display: none; }

    .split-heading,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .split-heading p { justify-self: start; }

    .skill-grid { grid-template-columns: repeat(2, 1fr); }

    .portfolio-heading { grid-template-columns: 1fr auto; }
    .portfolio-heading > .kicker { grid-column: 1 / -1; }

    .project-visual { height: 300px; }

    .blog-heading { grid-template-columns: 1fr auto; }
    .blog-heading > p { grid-row: 2; }

    .blog-grid { grid-template-columns: 1fr; }

    .blog-card {
        min-height: 250px;
        padding-left: 0 !important;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .blog-card a { left: 0 !important; }

    .contact-grid { gap: 70px; }
}

@media (max-width: 600px) {
    .shell,
    .site-header { width: calc(100% - 40px); }

    .site-header { height: 72px; }
    .header-actions { gap: 18px; }
    .hire-link { display: none; }

    .hero {
        padding-block: 70px 72px;
        gap: 42px;
    }

    h1 { font-size: 43px; }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button { justify-content: space-between; }

    .code-visual { height: 320px; }
    .code-visual::before { width: 300px; height: 300px; }
    .code-window { height: 235px; }
    .code-body { padding: 20px 16px; font-size: 8px; }
    .status-pill { right: -4px; bottom: 15px; }

    .stack-section,
    .blog-section { padding-block: 76px; }

    .skill-grid {
        margin-top: 42px;
        grid-template-columns: 1fr;
    }

    .portfolio-section { padding-block: 76px; }

    .portfolio-heading,
    .blog-heading {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .portfolio-heading > .kicker { grid-column: auto; }
    .text-link { width: max-content; align-self: auto; }

    .project-grid {
        margin-top: 48px;
        grid-template-columns: 1fr;
    }

    .project-card:nth-child(3) { grid-column: auto; }
    .project-visual,
    .project-3 .project-visual { height: 280px; }

    .project-bottom {
        gap: 20px;
        align-items: flex-end;
    }

    .project-bottom a { flex: 0 0 auto; }
    .northline-ui { width: 88%; }
    .northline-copy { font-size: 26px; }

    .contact-section { padding-block: 76px; }
    .contact-grid { gap: 52px; }

    .scroll-to-top {
        width: 44px;
        height: 44px;
        right: 18px;
        bottom: 18px;
    }

    .contact-form label {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-main {
        flex-direction: column;
        gap: 50px;
    }

    .footer-links { gap: 60px; }

    .footer-bottom {
        grid-template-columns: 1fr auto;
        gap: 22px;
    }

    .footer-bottom > span { grid-column: 1 / -1; }
    .footer-bottom .language-switch {
        grid-column: 2;
        grid-row: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
