:root {
    color-scheme: dark;
    --bg: #0b0b0c;
    --bg-soft: #101011;
    --panel: #141415;
    --panel-raised: #19191a;
    --text: #f4eee8;
    --muted: #a5a09b;
    --quiet: #746f6a;
    --accent: #ff8057;
    --accent-strong: #f66f45;
    --border: rgba(242, 239, 235, 0.1);
    --border-strong: rgba(242, 239, 235, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    --sidebar-bg: #0d0e0f;
    --hero-end: #0e0f10;
    --hero-glow: rgba(176, 90, 44, .16);
    --section-tint: rgba(18, 19, 20, .88);
    --shape-warm: rgba(190, 101, 57, .22);
    --shape-dark: rgba(38, 34, 33, .72);
    --shape-edge: rgba(255, 136, 87, .38);
    --cover-bg: #35251f;
    --cover-overlay-start: rgba(8, 9, 10, .28);
    --cover-overlay-mid: rgba(8, 9, 10, .03);
    --cover-overlay-end: rgba(8, 9, 10, .36);
    --hero-cover-overlay:
        linear-gradient(90deg, rgba(8, 9, 10, .72), rgba(8, 9, 10, .5) 62%, rgba(8, 9, 10, .38)),
        linear-gradient(0deg, rgba(8, 9, 10, .28), transparent 60%);
    --hero-cover-filter: brightness(.68) saturate(.82);
    --cover-image-filter: sepia(.32) saturate(.82) hue-rotate(340deg) brightness(1.08) contrast(.98);
    --cover-shadow: 0 20px 55px rgba(0, 0, 0, .2);
    --caption-bg: transparent;
    --caption-text: #fff4ec;
    --caption-shadow: 0 10px 30px rgba(0, 0, 0, .22);
    --project-overlay: rgba(0, 0, 0, .62);
    --project-tag-bg: rgba(10, 10, 11, .62);
    --project-tag-border: rgba(255, 255, 255, .14);
    --project-tag-text: #f5f1ed;
    --accent-soft: rgba(255, 136, 87, .16);
    --accent-border-hover: rgba(255, 136, 87, .48);
    --button-text: #17110e;
    --focus-ring: rgba(255, 136, 87, .14);
    --selection-bg: rgba(255, 136, 87, .34);
    --sidebar-width: 148px;
}

body.light-mode {
    color-scheme: light;
    --bg: #f3f0ec;
    --bg-soft: #ebe7e2;
    --panel: #faf8f5;
    --panel-raised: #fffdfa;
    --text: #201d1b;
    --muted: #69635e;
    --quiet: #6f6963;
    --accent: #b84420;
    --accent-strong: #a83a1b;
    --border: rgba(32, 29, 27, 0.12);
    --border-strong: rgba(32, 29, 27, 0.2);
    --shadow: 0 24px 60px rgba(52, 43, 36, 0.1);
    --sidebar-bg: #faf8f5;
    --hero-end: #e8e2db;
    --hero-glow: rgba(184, 68, 32, .1);
    --section-tint: rgba(255, 255, 255, .62);
    --shape-warm: rgba(184, 68, 32, .1);
    --shape-dark: rgba(91, 72, 61, .12);
    --shape-edge: rgba(184, 68, 32, .24);
    --cover-bg: #d9d1c8;
    --cover-overlay-start: rgba(26, 25, 24, .12);
    --cover-overlay-mid: rgba(26, 25, 24, 0);
    --cover-overlay-end: rgba(26, 25, 24, .1);
    --hero-cover-overlay:
        linear-gradient(90deg, rgba(243, 240, 236, .92), rgba(243, 240, 236, 0.792) 62%, rgba(243, 240, 236, 0.638)),
        linear-gradient(0deg, rgba(243, 240, 236, .84), transparent 60%);
    --hero-cover-filter: brightness(1.08) saturate(.72);
    --cover-image-filter: sepia(.14) saturate(.9) brightness(1.08) contrast(.96);
    --cover-shadow: 0 20px 55px rgba(52, 43, 36, .12);
    --caption-bg: transparent;
    --caption-text: #382016;
    --caption-shadow: 0 10px 30px rgba(67, 39, 25, .16);
    --project-overlay: rgba(15, 13, 12, .45);
    --project-tag-bg: rgba(250, 248, 245, .92);
    --project-tag-border: rgba(32, 29, 27, .14);
    --project-tag-text: #302b27;
    --accent-soft: rgba(184, 68, 32, .1);
    --accent-border-hover: rgba(184, 68, 32, .42);
    --button-text: #fffaf6;
    --focus-ring: rgba(184, 68, 32, .2);
    --selection-bg: rgba(184, 68, 32, .22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s ease, color .3s ease;
}

::selection {
    background: var(--selection-bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1420px, calc(100% - 112px));
    margin: 0 auto;
}

.site-header {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    align-items: stretch;
    padding: 24px 12px 18px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
}

.brand {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    margin: 0 0 30px 8px;
}

.brand-mark {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    border-radius: 0;
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: -.07em;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nav-link {
    position: relative;
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 11px;
    padding: 0 10px;
    color: var(--muted);
    font-size: .82rem;
    transition: color .2s ease, background-color .2s ease;
}

.nav-link::before {
    position: absolute;
    top: 50%;
    left: -12px;
    width: 3px;
    height: 16px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
    content: "";
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity .2s ease;
}

.nav-link i {
    width: 15px;
    color: var(--quiet);
    font-size: .92rem;
    text-align: center;
    transition: color .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--text);
}

.nav-link:hover i,
.nav-link.is-active i {
    color: var(--accent);
}

.nav-link.is-active::before {
    opacity: 1;
}

.theme-toggle {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin: auto 0 0 4px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    background: var(--panel);
}

.theme-toggle .icon {
    font-size: 1rem;
}

main,
.site-footer {
    margin-left: var(--sidebar-width);
}

main > section {
    scroll-margin-top: 24px;
}

.hero {
    position: relative;
    min-height: min(720px, 100vh);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(1486px, calc(100% - 80px));
    min-height: min(760px, 100vh);
    grid-template-columns: minmax(220px, .58fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 76px);
}

.hero-copy {
    position: relative;
    z-index: 2;
    grid-column: 2;
    grid-row: 1;
    padding: 64px 0;
}

.eyebrow,
.section-tag {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .25em;
    line-height: 1.4;
    text-transform: uppercase;
}

.accent-rule {
    display: inline-block;
    width: 15px;
    height: 2px;
    flex: 0 0 auto;
    background: var(--accent);
}

.hero-copy h1 {
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(3.25rem, 5.8vw, 5.8rem);
    font-weight: 700;
    letter-spacing: -.075em;
    line-height: .94;
}

.name-accent {
    color: var(--accent);
}

.hero-copy h2 {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 500;
}

.hero-keywords {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2vw, 34px);
    margin: 18px 0 0;
    color: var(--muted);
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .36em;
    line-height: 1.4;
    text-transform: uppercase;
    display: none;
}

.hero-keywords i {
    color: var(--accent);
    font-style: normal;
}

.lead {
    max-width: 550px;
    margin: 23px 0 0;
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.7;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--accent);
    color: var(--button-text);
}

.btn-primary:hover {
    background: var(--accent-strong);
    color: var(--button-text);
}

.btn-primary i {
    font-size: .9rem;
}

.btn-secondary {
    border-color: var(--border-strong);
    background: transparent;
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-stats {
    display: flex;
    max-width: 530px;
    list-style: none;
    margin: 27px 0 0;
    padding: 0;
}

.hero-stats li {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    padding: 0 16px;
    border-left: 1px solid var(--border-strong);
}

.hero-stats li:first-child {
    padding-left: 0;
    border-left: 0;
}

.hero-stats strong {
    font-family: 'Manrope', sans-serif;
    font-size: 1.27rem;
    font-weight: 500;
    line-height: 1.2;
}

.hero-stats span {
    color: var(--muted);
    font-size: .68rem;
    line-height: 1.35;
}

.hero-visual {
    position: relative;
    min-width: 0;
    z-index: 1;
    display: grid;
    height: auto;
    padding-bottom: 30px;
    grid-column: 1;
    grid-row: 1;
    place-items: center;
    align-self: center;
}

.hero-shape {
    position: absolute;
    pointer-events: none;
}

.hero-shape-back {
    top: -5%;
    right: 0;
    width: 96%;
    height: 106%;
    border: 1px solid var(--shape-edge);
    border-radius: 42px 142px 58px 126px;
    background: linear-gradient(145deg, var(--shape-warm), transparent 62%);
    transform: rotate(10deg);
}

.hero-shape-front {
    right: -1%;
    bottom: 6%;
    width: 90%;
    height: 78%;
    border: 1px solid var(--border);
    border-radius: 132px 42px 90px 44px;
    background: linear-gradient(140deg, var(--shape-dark), transparent);
    transform: rotate(-11deg);
}

.hero-cover {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-cover::after {
    position: absolute;
    inset: 0;
    background: var(--hero-cover-overlay);
    content: "";
    pointer-events: none;
}

.hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 52%;
    filter: var(--hero-cover-filter);
}

.hero-photo {
    position: relative;
    z-index: 3;
    width: clamp(230px, 28vw, 350px);
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: var(--panel);
    box-shadow: 0 18px 55px rgba(0, 0, 0, .26);
}

.hero-photo::after {
    position: absolute;
    inset: 0;
    background: none;
    content: "";
    pointer-events: none;
}

.hero-visual.has-cover .hero-photo {
    border-color: var(--accent);
}

.hero-visual.has-cover .hero-photo::after {
    background: none;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 40%;
    border-radius: 50%;
}

.avatar-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--accent);
    font-family: 'Manrope', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    border-radius: 50%;
}

.hero-caption {
    position: absolute;
    z-index: 3;
    top: 38%;
    right: -4%;
    min-width: 165px;
    margin: 0;
    padding: 9px 10px 12px;
    border: 0;
    border-radius: 0;
    background: var(--caption-bg);
    box-shadow: none;
    color: var(--caption-text);
    font-family: 'Manrope', sans-serif;
    font-size: clamp(.95rem, 1.35vw, 1.2rem);
    font-style: italic;
    line-height: 1.38;
    transform: rotate(-7deg);
}

.hero-caption::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: transparent;
    content: "";
    filter: blur(8px);
}

.hero-caption span {
    display: block;
    width: 92px;
    height: 1px;
    margin-top: 10px;
    background: var(--accent);
    transform: rotate(-6deg);
}

.hero-shape,
.hero-caption {
    display: none;
}

.hero-location {
    position: absolute;
    z-index: 3;
    right: 50%;
    bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--muted);
    font-size: .68rem;
    white-space: nowrap;
    transform: translateX(50%);
}

.section {
    padding: 78px 0;
}

.projects-section {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--section-tint), var(--bg) 52%);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

.section-tag {
    margin-bottom: 14px;
}

.section-head h3,
.two-col h3,
.contact-box h3 {
    max-width: 680px;
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(2.25rem, 4.25vw, 4rem);
    font-weight: 600;
    letter-spacing: -.065em;
    line-height: 1.02;
}

.section-head h3 span,
.two-col h3 span {
    color: var(--accent);
}

.section-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--accent);
    font-size: .75rem;
    transition: gap .2s ease, color .2s ease;
}

.section-link:hover {
    gap: 12px;
    color: var(--accent-strong);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--panel);
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-border-hover);
    box-shadow: var(--shadow);
}

.project-image {
    position: relative;
    aspect-ratio: 1.55;
    overflow: hidden;
    background: var(--panel-raised);
}

.project-image::after {
    position: absolute;
    inset: 30% 0 0;
    background: linear-gradient(180deg, transparent, var(--project-overlay));
    content: "";
    pointer-events: none;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.2, .75, .25, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.035);
}

.project-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background:
        radial-gradient(ellipse at 60% 30%, var(--accent-soft), transparent 54%),
        linear-gradient(145deg, var(--panel-raised), var(--bg-soft));
    color: var(--accent);
    font-family: 'Manrope', sans-serif;
    font-size: 2.3rem;
    font-weight: 700;
}

.project-category {
    position: absolute;
    z-index: 1;
    bottom: 13px;
    left: 14px;
    padding: 6px 10px;
    border: 1px solid var(--project-tag-border);
    border-radius: 999px;
    background: var(--project-tag-bg);
    color: var(--project-tag-text);
    font-size: .64rem;
    backdrop-filter: blur(10px);
}

.project-body {
    display: flex;
    min-height: 222px;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 16px 14px;
}

.project-topline {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.project-status,
.project-featured {
    color: var(--quiet);
    font-size: .62rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.project-featured {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
}

.project-card h4 {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.3;
}

.project-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.55;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 13px;
}

.tech-list span {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: .61rem;
    line-height: 1.3;
}

.project-actions {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 15px;
}

.project-actions a {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: .72rem;
    transition: color .2s ease;
}

.project-actions a:hover {
    color: var(--accent);
}

.project-actions a:last-child:not(:first-child) {
    color: var(--muted);
    font-size: .9rem;
}

.project-actions a:last-child:not(:first-child):hover {
    color: var(--accent);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 30px;
    border: 1px dashed var(--border-strong);
    border-radius: 13px;
    color: var(--muted);
    text-align: center;
}

.about-section {
    border-bottom: 1px solid var(--border);
}

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, .75fr);
    align-items: center;
    gap: clamp(48px, 9vw, 140px);
}

.two-col h3 {
    max-width: 720px;
    font-size: clamp(2.5rem, 4.5vw, 4.25rem);
    line-height: 1.08;
}

.about-copy {
    padding-top: 26px;
}

.about-copy p {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.9;
}

.about-location {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: var(--accent);
    font-size: .76rem;
}

.tech-section {
    padding-top: 70px;
    padding-bottom: 70px;
}

.tech-panel {
    display: grid;
    grid-template-columns: minmax(210px, .72fr) minmax(0, 1.55fr);
    align-items: center;
    gap: 38px;
    padding: 28px 30px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background:
        radial-gradient(ellipse at 100% 100%, var(--accent-soft), transparent 34%),
        var(--panel);
}

.tech-panel .section-tag {
    margin-bottom: 12px;
}

.tech-panel h3 {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.7rem, 2.4vw, 2.25rem);
    letter-spacing: -.06em;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.tech-item {
    display: flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-soft);
    color: var(--muted);
    font-size: .72rem;
    transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.tech-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-border-hover);
    color: var(--text);
}

.tech-icon {
    display: inline-flex;
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .58rem;
    font-weight: 700;
}

.tech-icon.tech-image-wrap {
    background: transparent;
}

.tech-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.contact-section {
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}

.contact-box {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(340px, .78fr);
    align-items: start;
    justify-content: space-between;
    gap: clamp(45px, 9vw, 125px);
}

.contact-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.contact-copy h3 {
    max-width: 570px;
    font-size: clamp(2.6rem, 5vw, 4.6rem);
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 7px;
}

.contact-info a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: .73rem;
    transition: border-color .2s ease, color .2s ease;
}

.contact-info a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.contact-form-wrap {
    width: 100%;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--panel);
}

.quick-request-form {
    display: grid;
    gap: 13px;
}

.form-row {
    display: grid;
    gap: 6px;
}

.form-row label {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 600;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: var(--bg);
    color: var(--text);
    font-size: .8rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.form-row input,
.form-row select {
    min-height: 42px;
    padding: 0 12px;
}

.form-row textarea {
    min-height: 105px;
    padding: 10px 12px;
    resize: vertical;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--quiet);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-row select option {
    background: var(--panel);
    color: var(--text);
}

.btn-whatsapp {
    width: 100%;
    margin-top: 2px;
    border: 0;
    cursor: pointer;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-wrap {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 15px;
    padding-bottom: 15px;
}

.footer-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.footer-brand .brand-mark {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    font-size: .57rem;
}

.footer-brand > span:last-child {
    display: grid;
    gap: 3px;
}

.footer-brand strong {
    overflow: hidden;
    color: var(--text);
    font-size: .69rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-brand small,
.footer-note,
.footer-copyright {
    margin: 0;
    color: var(--quiet);
    font-size: .62rem;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-socials a {
    color: var(--muted);
    font-size: .83rem;
    transition: color .2s ease, transform .2s ease;
}

.footer-socials a:hover {
    transform: translateY(-2px);
    color: var(--accent);
}

.footer-copyright {
    text-align: right;
}

.js-enabled .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .65s ease, transform .65s ease;
}

.js-enabled .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

@media (min-width: 1600px) {
    :root {
        --sidebar-width: 168px;
    }

    .hero-grid {
        gap: 34px;
    }
}

@media (max-width: 1151px) {
    .hero-caption {
        top: clamp(55%, calc(114% - 5vw), 70%);
        right: -2px;
    }
}

@media (max-width: 1100px) {
    :root {
        --sidebar-width: 120px;
    }

    .container {
        width: min(100%, calc(100% - 56px));
    }

    .hero-copy h1 {
        font-size: clamp(3.1rem, 6.3vw, 5rem);
    }

    .tech-panel {
        grid-template-columns: minmax(180px, .65fr) minmax(0, 1.5fr);
        gap: 24px;
        padding: 24px;
    }

    .tech-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .contact-box {
        grid-template-columns: minmax(0, .85fr) minmax(320px, .9fr);
        gap: 40px;
    }
}

@media (max-width: 960px) {
    .hero,
    .hero-grid {
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding-top: 40px;
        padding-bottom: 58px;
    }

    .hero-visual {
        width: 100%;
        height: clamp(270px, 38vw, 340px);
        grid-column: 1;
        grid-row: 1;
    }

    .hero-photo {
        width: clamp(220px, 32vw, 300px);
    }

    .hero-copy {
        grid-column: 1;
        grid-row: 2;
        padding: 34px 0 0;
    }
}

@media (max-width: 820px) {
    :root {
        --sidebar-width: 0px;
    }

    .site-header {
        position: sticky;
        top: 0;
        width: 100%;
        height: 68px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 0 22px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(18px);
    }

    .brand {
        width: 34px;
        height: 40px;
        flex: 0 0 34px;
        margin: 0;
    }

    .nav {
        flex: 1;
        flex-direction: row;
        justify-content: center;
        gap: clamp(2px, 1vw, 10px);
    }

    .nav-link {
        min-height: 40px;
        justify-content: center;
        gap: 7px;
        padding: 0 8px;
        font-size: .73rem;
    }

    .nav-link::before {
        top: auto;
        right: 8px;
        bottom: 0;
        left: 8px;
        width: auto;
        height: 2px;
        transform: none;
    }

    .nav-link i {
        font-size: .9rem;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        margin: 0;
    }

    .container {
        width: min(100%, calc(100% - 52px));
    }

    .hero,
    .hero-grid {
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding-top: 30px;
        padding-bottom: 48px;
    }

    .hero-copy {
        grid-column: 1;
        grid-row: 2;
        padding: 30px 0 0;
    }

    .hero-copy h1 {
        font-size: clamp(3rem, 7vw, 4.9rem);
    }

    .hero-visual {
        height: clamp(260px, 38vw, 320px);
        grid-column: 1;
        grid-row: 1;
    }

    .hero-photo {
        width: clamp(210px, 32vw, 280px);
    }

    .hero-stats li {
        padding: 0 10px;
    }

    .hero-stats span {
        font-size: .61rem;
    }

    .section {
        padding: 72px 0;
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-col {
        grid-template-columns: minmax(0, 1.05fr) minmax(220px, .8fr);
        gap: 36px;
    }

    .tech-panel {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .contact-box {
        grid-template-columns: minmax(0, .85fr) minmax(280px, 1fr);
        gap: 28px;
    }

    .footer-wrap {
        flex-wrap: wrap;
    }
}

@media (max-width: 620px) {
    .site-header {
        height: 62px;
        gap: 9px;
        padding: 0 14px;
    }

    .nav {
        gap: 1px;
    }

    .nav-link {
        min-width: 34px;
        padding: 0 5px;
    }

    .nav-link span {
        display: none;
    }

    .container {
        width: calc(100% - 40px);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 0;
    }

    .hero-visual {
        height: clamp(220px, 68vw, 290px);
        grid-row: 1;
        margin: 0;
    }

    .hero-photo {
        width: clamp(190px, 60vw, 260px);
    }

    .hero-location {
        right: 50%;
        bottom: 3px;
    }

    .hero-copy {
        grid-column: 1;
        padding: 8px 0 38px;
    }

    .eyebrow,
    .section-tag {
        font-size: .59rem;
        letter-spacing: .2em;
    }

    .hero-copy h1 {
        font-size: clamp(3.25rem, 14vw, 5rem);
    }

    .hero-copy h2 {
        margin-top: 12px;
    }

    .lead {
        font-size: .88rem;
    }

    .cta-row {
        gap: 8px;
    }

    .btn {
        min-height: 44px;
        padding: 0 15px;
    }

    .hero-stats {
        margin-top: 24px;
    }

    .hero-stats li {
        padding: 0 9px;
    }

    .hero-stats strong {
        font-size: 1.1rem;
    }

    .hero-stats span {
        font-size: .57rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 22px;
    }

    .section-head h3,
    .two-col h3 {
        font-size: clamp(2.35rem, 10vw, 3.4rem);
    }

    .section-link {
        margin: 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .project-image {
        aspect-ratio: 1.65;
    }

    .project-body {
        min-height: 205px;
    }

    .two-col {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .about-copy {
        padding-top: 0;
    }

    .about-copy p {
        font-size: .88rem;
    }

    .tech-panel {
        gap: 22px;
        padding: 20px 16px;
    }

    .tech-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .tech-item {
        min-height: 44px;
        padding: 6px 8px;
        font-size: .67rem;
    }

    .contact-box {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .contact-copy h3 {
        font-size: clamp(2.6rem, 12vw, 4rem);
    }

    .contact-form-wrap {
        padding: 16px;
    }

    .footer-wrap {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 14px;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .footer-note {
        display: none;
    }

    .footer-socials {
        justify-content: flex-end;
        gap: 12px;
    }

    .footer-copyright {
        grid-column: 1 / -1;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
