:root {
    color-scheme: dark;
    --ink: #101313;
    --ink-soft: #171c1b;
    --panel: #1a201f;
    --panel-raised: #202725;
    --line: rgba(231, 241, 232, .12);
    --line-strong: rgba(231, 241, 232, .2);
    --paper: #f1f4ee;
    --muted: #9aa6a0;
    --accent: #c4f36b;
    --accent-ink: #18220d;
    --coral: #ff9f87;
    --shadow: 0 28px 90px rgba(0, 0, 0, .28);
    --radius: 20px;
    --radius-large: 30px;
    --ease: cubic-bezier(.2, .75, .25, 1);
}

:root[data-theme="light"] {
    color-scheme: light;
    --ink: #f4f6f1;
    --ink-soft: #ffffff;
    --panel: #ffffff;
    --panel-raised: #f6f8f3;
    --line: rgba(23, 34, 29, .11);
    --line-strong: rgba(23, 34, 29, .2);
    --paper: #17221d;
    --muted: #627169;
    --accent: #91bf40;
    --accent-ink: #17220d;
    --coral: #b94c39;
    --shadow: 0 28px 90px rgba(36, 53, 44, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
    min-width: 320px;
    margin: 0;
    background:
        radial-gradient(ellipse at 78% 4%, rgba(196, 243, 107, .075), transparent 28rem),
        var(--ink);
    color: var(--paper);
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    transition: background-color .25s ease, color .25s ease;
}
body:has(.project-dialog) { overflow: hidden; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { display: block; max-width: 100%; }
::selection { color: var(--accent-ink); background: var(--accent); }

.portfolio-site { overflow: clip; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.skip-link {
    position: fixed;
    z-index: 200;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    transform: translateY(-160%);
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--ink) 84%, transparent);
    backdrop-filter: blur(18px);
}
.nav-shell {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.035em;
}
.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--panel);
    color: var(--accent);
    font-size: 13px;
    letter-spacing: -.06em;
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.primary-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 38px); }
.primary-nav a, .footer-links a {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: color .2s ease;
}
.primary-nav a:hover, .footer-links a:hover { color: var(--accent); }
.primary-nav .nav-hire { color: var(--accent); }
.primary-nav .nav-hire i { margin-left: 3px; font-size: 9px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .menu-toggle, .modal-close {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--panel);
    color: var(--paper);
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.icon-button:hover, .menu-toggle:hover, .modal-close:hover { transform: translateY(-2px); border-color: var(--accent); }
.menu-toggle { display: none; }

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 19px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 700;
    transition: transform .2s var(--ease), box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(196, 243, 107, .17); }
.button-secondary { border-color: var(--line-strong); background: transparent; color: var(--paper); }
.button-secondary:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); box-shadow: none; }
.button-small { min-height: 40px; padding-inline: 14px; font-size: 12px; }
.mobile-nav { display: none; }
.mobile-nav .mobile-hire { color: var(--accent); }

.hero-section { position: relative; padding: clamp(68px, 9vw, 120px) 0 100px; }
.hero-section::before {
    position: absolute;
    top: 50px;
    right: -210px;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(196, 243, 107, .08);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); align-items: center; gap: clamp(44px, 8vw, 112px); }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--accent);
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.eyebrow::before { width: 21px; height: 1px; background: currentColor; content: ""; }
.availability {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-left: 14px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--muted);
    font-size: 11px;
}
.availability-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero-copy h1 {
    max-width: 750px;
    margin: 24px 0 20px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 7vw, 84px);
    font-weight: 600;
    letter-spacing: -.075em;
    line-height: .99;
}
.hero-copy h1 span { color: var(--accent); }
.hero-lede { max-width: 590px; margin: 0; color: var(--muted); font-size: clamp(16px, 2vw, 18px); line-height: 1.8; }
.hero-lede strong { color: var(--paper); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-footnote { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 11px; }
.hero-footnote span { display: inline-flex; align-items: center; gap: 8px; }
.hero-footnote i { color: var(--accent); font-size: 10px; }
.portrait-stage { position: relative; width: min(100%, 410px); justify-self: end; padding: 16px; border: 1px solid var(--line-strong); border-radius: 34px; background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.01)); box-shadow: var(--shadow); }
.portrait-stage::before { position: absolute; inset: 28px -14px -14px 28px; z-index: -1; border: 1px solid rgba(196, 243, 107, .25); border-radius: 34px; content: ""; }
.portrait-frame { position: relative; min-height: 400px; overflow: hidden; border-radius: 24px; background: var(--panel-raised); }
.portrait-frame::after { position: absolute; inset: 35% 0 0; background: linear-gradient(180deg, transparent, rgba(6, 10, 8, .75)); content: ""; }
.portrait-frame img { width: 100%; height: 435px; object-fit: cover; object-position: center 35%; filter: saturate(.78); }
.portrait-caption { position: absolute; z-index: 1; right: 22px; bottom: 20px; left: 22px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.portrait-caption strong { display: block; font-family: "Space Grotesk", sans-serif; font-size: 20px; }
.portrait-caption small { color: rgba(255,255,255,.72); font-size: 12px; }
.portrait-tag { padding: 7px 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; color: white; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(8px); }
.code-note { position: absolute; top: 44px; left: -54px; padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); color: var(--muted); font-family: "DM Mono", monospace; font-size: 11px; transform: rotate(-4deg); }
.code-note b { color: var(--accent); font-weight: 500; }

.section { padding: clamp(74px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.section-title { max-width: 700px; margin: 12px 0 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(34px, 5vw, 52px); font-weight: 600; letter-spacing: -.06em; line-height: 1.08; }
.section-title span { color: var(--accent); }
.section-intro { max-width: 560px; margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.section-side-note { max-width: 240px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 11px; line-height: 1.8; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.service-card { min-height: 220px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); transition: transform .25s var(--ease), border-color .25s ease, background .25s ease; }
.service-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--panel-raised); }
.service-icon { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--accent); }
.service-card h3 { margin: 22px 0 8px; font-family: "Space Grotesk", sans-serif; font-size: 19px; letter-spacing: -.03em; }
.service-card p { max-width: 310px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.service-index { float: right; color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; }

.skills-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 54px; align-items: start; }
.skills-copy { position: sticky; top: 125px; }
.skills-copy p { max-width: 390px; color: var(--muted); }
.skill-groups { display: grid; gap: 12px; }
.skill-group { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.skill-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--paper); font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 600; }
.skill-group-head i { width: 18px; color: var(--accent); font-size: 13px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 11px; transition: color .2s ease, border-color .2s ease; }
.skill-chip:hover { border-color: var(--accent); color: var(--accent); }

.work-section { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel) 45%, transparent), transparent); }
.work-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 30px 0 24px; }
.filter-list { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-btn { min-height: 39px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 600; transition: all .2s ease; }
.filter-btn:hover, .filter-btn.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.project-search { position: relative; width: min(280px, 100%); }
.project-search i { position: absolute; top: 50%; left: 14px; color: var(--muted); font-size: 12px; transform: translateY(-50%); }
.project-search input { width: 100%; height: 42px; padding: 0 14px 0 38px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: var(--panel); color: var(--paper); font-size: 12px; }
.project-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.project-search input::placeholder { color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); transition: transform .25s var(--ease), border-color .25s ease, box-shadow .25s ease; }
.project-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.project-art { position: relative; display: flex; min-height: 210px; overflow: hidden; flex-direction: column; justify-content: space-between; padding: 20px; background: linear-gradient(135deg, #252e2a, #121716); }
.project-art::before, .repo-card::before { position: absolute; top: -45px; right: -25px; width: 170px; height: 170px; border: 1px solid rgba(196,243,107,.25); border-radius: 50%; box-shadow: 0 0 0 25px rgba(196,243,107,.035), 0 0 0 50px rgba(196,243,107,.025); content: ""; }
.project-art--branding { background: linear-gradient(135deg, #422d2a, #1d1818); }
.project-art--app, .project-art--mobile { background: linear-gradient(135deg, #242f42, #151a24); }
.project-art--graphic { background: linear-gradient(135deg, #383047, #1d1924); }
.project-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.project-card:hover .project-art img { transform: scale(1.04); }
.project-art-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.project-number { color: rgba(241,244,238,.55); font-family: "DM Mono", monospace; font-size: 10px; }
.project-kind { padding: 6px 9px; border: 1px solid rgba(241,244,238,.19); border-radius: 99px; background: rgba(10,14,12,.18); color: rgba(241,244,238,.85); font-family: "DM Mono", monospace; font-size: 9px; backdrop-filter: blur(8px); }
.project-content { padding: 19px 20px 20px; }
.project-content h3 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 17px; font-weight: 600; letter-spacing: -.03em; line-height: 1.35; }
.project-description { min-height: 44px; margin: 10px 0 15px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.project-tech, .modal-tech-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; }
.project-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); }
.project-date { color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; }
.project-open { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 700; }
.project-open i { transition: transform .2s ease; }
.project-open:hover i { transform: translateX(4px); }
.empty-state { grid-column: 1 / -1; padding: 50px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 30px; }
.load-more-wrap [disabled] { opacity: .65; cursor: wait; }

.github-section { padding-top: 30px; }
.github-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.github-heading h3 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 22px; letter-spacing: -.04em; }
.github-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.repo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.repo-card { position: relative; min-height: 178px; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); }
.repo-card::before { top: -100px; right: -92px; width: 210px; height: 210px; opacity: .45; }
.repo-card > * { position: relative; z-index: 1; }
.repo-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.repo-card h4 { overflow: hidden; margin: 0; color: var(--paper); font-family: "DM Mono", monospace; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.repo-card-head > i { color: var(--accent); }
.repo-card p { display: -webkit-box; min-height: 42px; overflow: hidden; margin: 13px 0 16px; color: var(--muted); font-size: 11px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.repo-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; }
.repo-meta span { display: inline-flex; align-items: center; gap: 6px; }
.repo-meta i { color: var(--accent); font-size: 9px; }
.github-empty { padding: 24px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); font-size: 13px; }

.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.process-step { position: relative; min-height: 165px; padding: 23px; }
.process-step + .process-step { border-left: 1px solid var(--line); }
.process-num { color: var(--accent); font-family: "DM Mono", monospace; font-size: 11px; }
.process-step h3 { margin: 18px 0 7px; font-family: "Space Grotesk", sans-serif; font-size: 16px; }
.process-step p { max-width: 210px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

.contact-section { position: relative; }
.contact-panel { display: grid; grid-template-columns: .85fr 1.15fr; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-large); background: var(--panel); box-shadow: var(--shadow); }
.contact-copy { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 54px); background: var(--accent); color: var(--accent-ink); }
.contact-copy::after { position: absolute; right: -90px; bottom: -130px; width: 290px; height: 290px; border: 1px solid rgba(24,34,13,.2); border-radius: 50%; box-shadow: 0 0 0 30px rgba(24,34,13,.04), 0 0 0 60px rgba(24,34,13,.035); content: ""; }
.contact-copy .eyebrow { color: #384d20; }
.contact-copy h2 { position: relative; z-index: 1; max-width: 380px; margin: 16px 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.07em; line-height: 1.04; }
.contact-copy > p { position: relative; z-index: 1; max-width: 350px; color: rgba(24,34,13,.78); font-size: 14px; }
.contact-links { position: relative; z-index: 1; display: grid; gap: 12px; margin-top: 30px; }
.contact-link { display: flex; align-items: center; gap: 11px; font-size: 12px; font-weight: 700; }
.contact-link i { width: 18px; text-align: center; }
.contact-socials { display: flex; gap: 8px; margin-top: 24px; }
.contact-socials a { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid rgba(24,34,13,.25); border-radius: 11px; transition: background .2s ease; }
.contact-socials a:hover { background: rgba(24,34,13,.1); }
.contact-form-wrap { padding: clamp(28px, 5vw, 54px); }
.form-heading { margin: 0 0 22px; font-family: "Space Grotesk", sans-serif; font-size: 21px; letter-spacing: -.04em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-field { display: grid; gap: 7px; }
.form-field-full { grid-column: 1 / -1; }
.form-field label { color: var(--muted); font-size: 11px; font-weight: 600; }
.form-control { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: var(--ink-soft); color: var(--paper); font-size: 12px; transition: border-color .2s ease, box-shadow .2s ease; }
.form-control::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.form-control.error { border-color: #ff796e; }
textarea.form-control { min-height: 124px; resize: vertical; }
.error-text { color: #ff8b7d; font-size: 10px; }
.form-submit { margin-top: 17px; }
.alert-message { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; font-size: 12px; }
.alert-success { border-color: rgba(196,243,107,.35); background: rgba(196,243,107,.09); color: var(--accent); }
.alert-error { border-color: rgba(255,121,110,.35); background: rgba(255,121,110,.08); color: #ff9c91; }

.site-footer { padding: 26px 0 38px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-note { color: var(--muted); font-size: 11px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { font-size: 11px; }
.footer-credit { color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; }
.footer-credit i { color: var(--coral); }

.project-dialog { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 22px; background: rgba(4, 7, 6, .82); backdrop-filter: blur(10px); }
.project-dialog-panel { position: relative; width: min(760px, 100%); max-height: min(88vh, 940px); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--ink-soft); box-shadow: 0 30px 100px rgba(0,0,0,.4); }
.project-dialog-panel .modal-close { position: sticky; z-index: 3; top: 14px; float: right; margin: 14px 14px -56px 0; background: rgba(16,19,19,.8); }
.modal-hero { position: relative; display: flex; min-height: 260px; align-items: end; overflow: hidden; padding: 30px; background: linear-gradient(135deg, #252e2a, #121716); }
.modal-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal-hero::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.78)); content: ""; }
.modal-hero h2, .modal-hero .eyebrow { position: relative; z-index: 1; color: white; }
.modal-hero h2 { max-width: 600px; margin: 10px 0 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(27px, 5vw, 42px); letter-spacing: -.06em; line-height: 1.1; }
.modal-body { padding: 28px 30px 32px; }
.modal-description { color: var(--muted); font-size: 14px; }
.modal-block { margin-top: 24px; }
.modal-block h3 { margin: 0 0 12px; color: var(--paper); font-family: "Space Grotesk", sans-serif; font-size: 14px; }
.modal-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.modal-gallery img { width: 100%; height: 120px; border-radius: 10px; object-fit: cover; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }

.back-to-top { position: fixed; z-index: 35; right: 25px; bottom: 25px; display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); color: var(--accent); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.whatsapp-float { position: fixed; z-index: 35; bottom: 25px; left: 25px; display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: #1fae68; color: white; font-size: 21px; box-shadow: 0 12px 30px rgba(0,0,0,.2); transition: transform .2s ease; }
.whatsapp-float:hover { transform: translateY(-3px); }

@media (max-width: 980px) {
    .primary-nav { gap: 16px; }
    .primary-nav a { font-size: 12px; }
    .nav-contact { display: none; }
    .hero-grid { grid-template-columns: 1fr .78fr; gap: 36px; }
    .portrait-frame, .portrait-frame img { height: 365px; min-height: 365px; }
    .code-note { left: -24px; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .project-grid, .repo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .skills-layout { gap: 34px; }
}

@media (max-width: 860px) {
    .container { width: min(100% - 34px, 560px); }
    .nav-shell { min-height: 68px; }
    .primary-nav, .nav-contact { display: none; }
    .menu-toggle { display: grid; }
    .mobile-nav { position: fixed; z-index: 90; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 9px; padding: 35px; background: var(--ink); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease; }
    .mobile-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
    .mobile-nav a { padding: 9px 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(30px, 8vw, 46px); letter-spacing: -.05em; }
    .mobile-nav a:hover { color: var(--accent); }
    .mobile-nav-close { position: absolute; top: 18px; right: 18px; }
    .hero-section { padding: 62px 0 72px; }
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-copy h1 { max-width: 590px; font-size: clamp(50px, 12vw, 74px); }
    .hero-copy { order: 1; }
    .portrait-stage { width: min(84%, 400px); justify-self: center; order: 2; }
    .portrait-frame, .portrait-frame img { height: min(92vw, 420px); min-height: 320px; }
    .code-note { top: 32px; left: -20px; }
    .section-head, .github-heading { align-items: start; flex-direction: column; }
    .section-side-note { max-width: none; }
    .skills-layout { grid-template-columns: 1fr; gap: 26px; }
    .skills-copy { position: static; }
    .work-controls { align-items: stretch; flex-direction: column; }
    .project-search { width: 100%; }
    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .process-step { min-height: 145px; }
    .process-step:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
    .process-step:nth-child(4) { border-top: 1px solid var(--line); }
    .contact-panel { grid-template-columns: 1fr; }
    .contact-copy { min-height: 370px; }
    .footer-inner { align-items: flex-start; flex-direction: column; gap: 14px; }
}

@media (max-width: 480px) {
    .container { width: calc(100% - 28px); }
    .brand-mark { width: 38px; height: 38px; }
    .nav-actions { gap: 7px; }
    .icon-button, .menu-toggle { width: 39px; height: 39px; }
    .availability { margin: 14px 0 0; }
    .hero-copy h1 { font-size: clamp(46px, 13vw, 62px); }
    .hero-actions .button { flex: 1 1 auto; }
    .hero-footnote { gap: 11px; font-size: 10px; }
    .portrait-stage { width: 90%; padding: 10px; border-radius: 25px; }
    .portrait-stage::before { inset: 20px -8px -8px 18px; border-radius: 25px; }
    .portrait-frame { border-radius: 18px; }
    .portrait-frame, .portrait-frame img { height: 350px; min-height: 0; }
    .section { padding: 66px 0; }
    .service-grid, .project-grid, .repo-grid { grid-template-columns: 1fr; }
    .service-card { min-height: 0; }
    .project-art { min-height: 230px; }
    .github-section { padding-top: 8px; }
    .github-heading .button { width: 100%; }
    .process-step { padding: 18px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-field-full { grid-column: auto; }
    .contact-copy { min-height: 390px; }
    .contact-form-wrap { padding: 25px 20px; }
    .footer-links { gap: 14px; }
    .project-dialog { padding: 10px; }
    .project-dialog-panel { max-height: 94vh; border-radius: 16px; }
    .modal-hero { min-height: 215px; padding: 22px; }
    .modal-body { padding: 22px; }
    .modal-gallery { grid-template-columns: repeat(2, 1fr); }
    .modal-gallery img { height: 95px; }
    .back-to-top { right: 14px; bottom: 14px; }
    .whatsapp-float { left: 14px; bottom: 14px; }
}

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