:root {
    --paper: #f8fafc;
    --paper-2: #eef4f8;
    --surface: #ffffff;
    --ink: #102033;
    --text: #243447;
    --muted: #667085;
    --line: #d9e2ea;
    --blue: #1d4ed8;
    --blue-dark: #173ea6;
    --green: #16835e;
    --amber: #b45309;
    --rose: #be123c;
    --shadow: 0 18px 48px rgba(16, 32, 51, 0.11);
    --radius: 8px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

body.nav-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

:focus-visible {
    outline: 3px solid rgba(29, 78, 216, 0.38);
    outline-offset: 3px;
}

.container {
    width: min(calc(100% - 40px), var(--max));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 100;
    transform: translateY(-140%);
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--ink);
    color: #ffffff;
    font-weight: 800;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(217, 226, 234, 0.9);
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(14px);
}

.nav-shell {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: var(--radius);
    background: var(--ink);
    color: #ffffff;
    font-weight: 900;
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text strong {
    color: var(--ink);
    font-size: 1rem;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.78rem;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.primary-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: var(--radius);
    color: #425466;
    font-size: 0.95rem;
    font-weight: 750;
    transition: background 160ms ease, color 160ms ease;
}

.primary-nav a:hover {
    background: #e8eef5;
    color: var(--ink);
}

.primary-nav .nav-action {
    margin-left: 4px;
    background: var(--ink);
    color: #ffffff;
}

.primary-nav .nav-action:hover {
    background: var(--blue);
    color: #ffffff;
}

.nav-toggle {
    display: none;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font-weight: 850;
    cursor: pointer;
}

.hero {
    position: relative;
    min-height: min(660px, calc(100svh - 112px));
    display: grid;
    align-items: center;
    overflow: hidden;
    color: #ffffff;
    background: var(--ink);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(16, 32, 51, 0.96) 0%, rgba(16, 32, 51, 0.88) 34%, rgba(16, 32, 51, 0.42) 64%, rgba(16, 32, 51, 0.18) 100%),
        url("../images/portfolio-hero.jpg");
    background-position: center;
    background-size: cover;
    transform: scale(1.01);
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 42px 0 34px;
}

.eyebrow,
.section-kicker,
.project-meta,
.contact-method span {
    margin: 0 0 12px;
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow {
    width: fit-content;
    margin-bottom: 16px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    color: #b7f7dc;
}

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

h1,
h2,
h3 {
    color: var(--ink);
    line-height: 1.08;
    letter-spacing: 0;
}

h1 {
    max-width: 1080px;
    margin-bottom: 18px;
    color: #ffffff;
    font-size: 5.1rem;
    font-weight: 950;
}

h2 {
    margin-bottom: 14px;
    font-size: 3rem;
    font-weight: 920;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.35rem;
    font-weight: 880;
}

.hero-lede {
    max-width: 820px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.12rem;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 17px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 850;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(29, 78, 216, 0.3);
}

.btn-primary:hover {
    background: var(--blue-dark);
}

.btn-secondary {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.18);
}

.section .btn-secondary,
.muted-band .btn-secondary {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
}

.section .btn-secondary:hover,
.muted-band .btn-secondary:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.hero-proof {
    max-width: 720px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 24px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.18);
}

.hero-proof div {
    padding: 12px 14px;
    background: rgba(16, 32, 51, 0.55);
}

.hero-proof dt {
    margin-bottom: 3px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
}

.hero-proof dd {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.86rem;
}

.section {
    padding: 78px 0;
}

.section-tight {
    padding-top: 64px;
}

.muted-band {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--paper-2);
}

.section-head {
    max-width: 820px;
    margin-bottom: 30px;
}

.section-head p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.split-head {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
    gap: 34px;
    align-items: end;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.project-card,
.service-card,
.process-step,
.fit-card,
.build-panel,
.contact-method {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(16, 32, 51, 0.06);
}

.project-card {
    min-height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.project-meta {
    color: var(--amber);
}

.project-card p,
.service-card p,
.process-step p,
.fit-card li,
.build-panel p,
.about-intro p,
.contact-layout p {
    color: var(--muted);
}

.proof-list {
    display: grid;
    gap: 8px;
    margin: 4px 0 18px;
    padding: 0;
    list-style: none;
}

.proof-list li {
    position: relative;
    padding-left: 20px;
    color: #34465a;
    font-size: 0.95rem;
}

.proof-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f4f7fa;
    color: #34465a;
    font-size: 0.78rem;
    font-weight: 800;
}

.text-link {
    width: fit-content;
    margin-top: 18px;
    color: var(--blue);
    font-weight: 900;
}

.text-link:hover {
    color: var(--blue-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.service-grid,
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.service-card,
.process-step {
    padding: 22px;
}

.service-card ul,
.fit-card ul {
    display: grid;
    gap: 8px;
    margin: 16px 0 0;
    padding-left: 18px;
}

.service-card li,
.fit-card li {
    padding-left: 2px;
}

.feature-section {
    background: var(--ink);
    color: #ffffff;
}

.feature-section h2,
.feature-section h3 {
    color: #ffffff;
}

.feature-section p {
    color: rgba(255, 255, 255, 0.74);
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
    gap: 42px;
    align-items: center;
}

.feature-layout > div:first-child {
    max-width: 680px;
}

.build-panel {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.build-panel div {
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
}

.build-panel span {
    display: inline-flex;
    margin-bottom: 8px;
    color: #9ee8c8;
    font-weight: 950;
}

.build-panel strong {
    display: block;
    margin-bottom: 4px;
    color: #ffffff;
    font-size: 1.04rem;
}

.process-step span {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--blue);
    font-size: 1.1rem;
    font-weight: 950;
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 34px;
    align-items: start;
}

.about-intro {
    max-width: 620px;
}

.fit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.fit-card {
    padding: 22px;
}

.fit-card h3 {
    font-size: 1.18rem;
}

.contact-section {
    background: #fff7ed;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.78fr);
    gap: 42px;
    align-items: center;
}

.contact-actions {
    display: grid;
    gap: 12px;
}

.contact-method {
    display: grid;
    gap: 4px;
    padding: 17px 18px;
    transition: border-color 160ms ease, transform 160ms ease;
}

.contact-method:hover {
    border-color: var(--blue);
    transform: translateY(-1px);
}

.contact-method span {
    margin-bottom: 0;
    color: var(--amber);
}

.contact-method strong {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.primary-method {
    border-color: rgba(29, 78, 216, 0.42);
    background: #eff6ff;
}

.site-footer {
    padding: 34px 0;
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.footer-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.footer-layout p {
    margin: 0;
    color: var(--muted);
}

.footer-layout strong {
    color: var(--ink);
}

.footer-layout nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 14px;
}

.footer-layout a {
    color: #425466;
    font-weight: 800;
    font-size: 0.92rem;
}

.footer-layout a:hover {
    color: var(--blue);
}

.floating-cta {
    display: none;
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 45;
}

.floating-cta .btn {
    width: 100%;
}

@media (max-width: 1040px) {
    h1 {
        font-size: 4.6rem;
    }

    h2 {
        font-size: 2.45rem;
    }

    .service-grid,
    .process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-height: 620px) and (min-width: 760px) {
    .hero-inner {
        padding: 32px 0 28px;
    }

    .hero-proof {
        display: none;
    }

    .hero-lede {
        margin-bottom: 16px;
    }
}

@media (max-width: 820px) {
    body.nav-open {
        overflow: hidden;
    }

    .container {
        width: min(calc(100% - 28px), var(--max));
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .primary-nav {
        position: fixed;
        left: 14px;
        right: 14px;
        top: 82px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .primary-nav.is-open {
        display: flex;
    }

    .primary-nav a {
        justify-content: flex-start;
    }

    .primary-nav .nav-action {
        margin-left: 0;
        justify-content: center;
    }

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: auto;
    }

    .hero-bg {
        background-image:
            linear-gradient(90deg, rgba(16, 32, 51, 0.96) 0%, rgba(16, 32, 51, 0.9) 58%, rgba(16, 32, 51, 0.62) 100%),
            url("../images/portfolio-hero.jpg");
        background-position: center right;
    }

    h1 {
        font-size: 3.6rem;
    }

    h2 {
        font-size: 2.1rem;
    }

    .hero-lede {
        font-size: 1.08rem;
    }

    .split-head,
    .project-grid,
    .feature-layout,
    .about-layout,
    .fit-grid,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 58px 0;
    }

    .section-tight {
        padding-top: 48px;
    }

    .footer-layout {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-layout nav {
        justify-content: flex-start;
    }

    .floating-cta.is-visible {
        display: block;
    }

    body {
        padding-bottom: 76px;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(calc(100% - 28px), 362px);
        margin-left: 14px;
        margin-right: auto;
    }

    .brand-text strong {
        max-width: 170px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-inner {
        padding: 44px 0;
    }

    h1 {
        max-width: 9.5ch;
        font-size: 2.75rem;
        overflow-wrap: normal;
        text-wrap: balance;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-actions .btn,
    .section-actions .btn {
        width: 100%;
    }

    .hero-proof div {
        padding: 10px 8px;
    }

    .hero-proof dt {
        font-size: 0.9rem;
    }

    .hero-proof dd {
        font-size: 0.72rem;
    }

    .service-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }

    .project-card,
    .service-card,
    .process-step,
    .fit-card {
        padding: 19px;
    }
}

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