:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #061923;
    color: #f6fbff;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    height: 100%;
    overflow: hidden;
    background: #061923;
}

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

a {
    color: inherit;
}

h1:focus {
    outline: none;
}

.portfolio-page {
    --site-gutter: clamp(18px, 4vw, 96px);
    --page-bg: #061923;
    --panel: #08202d;
    --panel-soft: rgba(8, 32, 45, 0.78);
    --ink: #f7fbff;
    --muted: #aec3ca;
    --cream: #f2ece2;
    --cream-ink: #0a1820;
    --teal: #13a7c4;
    --teal-deep: #075c74;
    --cyan: #65e3f2;
    --orange: #df4b1c;
    --amber: #f49a22;
    --line: rgba(255, 255, 255, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    height: 100vh;
    height: 100svh;
    max-height: 100vh;
    max-height: 100svh;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(8, 31, 43, 0.96), rgba(4, 15, 22, 0.96)),
        repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 58px);
    color: var(--ink);
}

.site-header {
    position: relative;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(120deg, rgba(3, 15, 22, 0.95), rgba(7, 40, 52, 0.88) 42%, rgba(96, 26, 14, 0.9));
    backdrop-filter: blur(18px);
}

.site-header-inner {
    width: 100%;
    min-height: clamp(58px, 7.5vh, 86px);
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.2vw, 38px);
    padding: clamp(8px, 1.1vh, 14px) var(--site-gutter);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.2vw, 18px);
    min-width: clamp(250px, 23vw, 420px);
    text-decoration: none;
}

.brand-mark,
.footer-mark {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.brand-mark {
    width: clamp(52px, 7vh, 72px);
    height: clamp(44px, 6vh, 64px);
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.08);
}

.footer-mark {
    width: clamp(54px, 7vh, 78px);
    height: clamp(54px, 7vh, 78px);
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.footer-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.92;
    transform: scale(1.1);
}

.brand-copy {
    display: grid;
    gap: 4px;
}

.brand-name {
    color: var(--ink);
    font-size: clamp(1rem, 1.08vw, 1.35rem);
    font-weight: 900;
    text-transform: uppercase;
}

.brand-title {
    color: var(--cyan);
    font-size: clamp(0.68rem, 0.68vw, 0.84rem);
    font-weight: 700;
    text-transform: uppercase;
}

.primary-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2vw, 36px);
    margin-left: auto;
}

.nav-link {
    position: relative;
    padding: 10px 0;
    color: var(--ink);
    font-size: clamp(0.72rem, 0.74vw, 0.94rem);
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    content: "";
    background: currentColor;
    opacity: 0;
    transform: scaleX(0.45);
    transition: opacity 160ms ease, transform 160ms ease;
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.hero-section {
    position: relative;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: url("/images/hero-background.png") center center / cover no-repeat;
    color: var(--cream-ink);
}

.hero-section::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    content: "";
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.99) 0%,
        rgba(255, 255, 255, 0.98) 30%,
        rgba(255, 250, 241, 0.82) 41%,
        rgba(255, 250, 241, 0.34) 56%,
        rgba(255, 250, 241, 0) 74%
    );
    pointer-events: none;
}

.hero-portrait {
    position: absolute;
    z-index: 1;
    bottom: clamp(-260px, -21vh, -155px);
    left: 52%;
    width: clamp(860px, 66vw, 1440px);
    height: calc(100% + clamp(150px, 22vh, 280px));
    transform: translateX(-50%);
    pointer-events: none;
}

.hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    opacity: 0.98;
    filter: saturate(1.04) contrast(1.02);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(340px, 0.72fr) minmax(520px, 0.86fr);
    align-items: center;
    gap: clamp(32px, 5vw, 118px);
    padding: clamp(22px, 3.4vh, 46px) var(--site-gutter) clamp(16px, 2.4vh, 34px);
}

.hero-copy-block {
    max-width: min(650px, 42vw);
    align-self: center;
}

.eyebrow {
    margin: 0 0 clamp(8px, 1.2vh, 14px);
    color: var(--teal-deep);
    font-size: 0.86rem;
    font-weight: 900;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: #071922;
    font-size: clamp(2.55rem, 3vw, 4.2rem);
    line-height: 1.09;
    font-weight: 950;
}

.accent-teal {
    color: var(--teal-deep);
}

.accent-orange {
    color: var(--orange);
}

.hero-summary {
    position: relative;
    max-width: min(480px, 36vw);
    margin: clamp(18px, 2.1vh, 30px) 0 0;
    padding-top: clamp(18px, 2vh, 28px);
    color: #122730;
    font-size: clamp(1rem, 0.92vw, 1.22rem);
    line-height: 1.55;
}

.hero-summary::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 52px;
    height: 3px;
    content: "";
    background: var(--teal-deep);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: clamp(20px, 2.5vh, 32px);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(42px, 5.2vh, 52px);
    min-width: 168px;
    gap: 12px;
    border: 1px solid #0a1820;
    border-radius: 6px;
    padding: 0 24px;
    font-size: 0.92rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
    outline: none;
}

.button-primary {
    border-color: var(--teal-deep);
    background: linear-gradient(135deg, var(--teal-deep), #08384b);
    color: #f7fbff;
    box-shadow: 0 18px 38px rgba(7, 92, 116, 0.28);
}

.button-secondary {
    background: rgba(255, 250, 241, 0.5);
    color: #0a1820;
}

.button-icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.hero-visual {
    display: grid;
    justify-items: end;
    gap: clamp(12px, 1.8vh, 22px);
    align-self: start;
    padding-top: clamp(72px, 13vh, 156px);
}

.project-window {
    width: clamp(520px, 35vw, 740px);
    aspect-ratio: 3 / 2;
    height: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    color: #f7fbff;
    box-shadow: none;
}

.project-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.project-topbar {
    min-height: clamp(46px, 6vh, 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.project-logo {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(101, 227, 242, 0.64);
    border-radius: 6px;
    color: var(--cyan);
}

.project-search {
    width: 170px;
    max-width: 38%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    color: #8aa6af;
    font-size: 0.76rem;
    background: rgba(255, 255, 255, 0.03);
}

.project-body {
    display: grid;
    grid-template-columns: 150px 1fr;
    height: calc(100% - clamp(46px, 6vh, 64px));
    min-height: 0;
}

.project-sidebar {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 22px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-item {
    border-radius: 6px;
    padding: 11px 12px;
    color: #b9c9ce;
    font-size: 0.82rem;
}

.sidebar-item.selected {
    background: rgba(19, 167, 196, 0.18);
    color: #f7fbff;
}

.project-dashboard {
    display: grid;
    gap: clamp(10px, 1.4vh, 16px);
    padding: clamp(16px, 2vh, 24px) 22px;
    min-height: 0;
}

.dashboard-title {
    color: #f7fbff;
    font-size: 1.16rem;
    font-weight: 900;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.metric-tile,
.activity-panel,
.chart-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.metric-tile {
    display: grid;
    gap: 7px;
    min-height: clamp(78px, 10vh, 106px);
    padding: clamp(12px, 1.5vh, 16px);
}

.metric-label {
    color: #a9bdc3;
    font-size: 0.72rem;
}

.metric-tile strong {
    font-size: 1.65rem;
}

.metric-trend {
    font-size: 0.72rem;
    font-weight: 800;
}

.metric-trend.good {
    color: var(--cyan);
}

.metric-trend.warn {
    color: var(--amber);
}

.dashboard-lower {
    display: grid;
    grid-template-columns: 1.2fr 0.88fr;
    gap: 14px;
    min-height: 0;
}

.activity-panel,
.chart-panel {
    min-height: clamp(120px, 14vh, 165px);
    padding: clamp(12px, 1.5vh, 16px);
}

.activity-panel {
    display: grid;
    gap: 10px;
    color: #c9d6da;
    font-size: 0.72rem;
}

.panel-title {
    display: block;
    margin-bottom: 4px;
    color: #f7fbff;
    font-size: 0.82rem;
    font-weight: 900;
}

.chart-panel {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 12px;
}

.donut-chart {
    width: 98px;
    height: 98px;
    border-radius: 50%;
    background: conic-gradient(var(--teal) 0 38%, var(--cyan) 38% 56%, var(--orange) 56% 76%, #244a55 76% 100%);
    box-shadow: inset 0 0 0 26px #071923;
}

.chart-key {
    color: #aac0c7;
    font-size: 0.68rem;
}

.featured-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: min(100%, 520px);
    gap: 4px 18px;
    padding-right: 10px;
    color: #f7fbff;
    text-decoration: none;
}

.featured-link span {
    grid-column: 1 / -1;
    color: var(--amber);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.featured-link strong {
    min-width: 0;
    font-size: clamp(1.12rem, 1.32vw, 1.5rem);
    line-height: 1.12;
}

.featured-link em {
    color: var(--orange);
    font-style: normal;
    font-size: 2rem;
}

.process-section {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 30px);
    padding: clamp(10px, 1.7vh, 22px) var(--site-gutter);
    background:
        linear-gradient(135deg, rgba(255, 250, 241, 0.98), rgba(242, 236, 226, 0.98)),
        repeating-linear-gradient(45deg, rgba(7, 36, 50, 0.04) 0 1px, transparent 1px 28px);
    color: var(--cream-ink);
}

.process-step {
    display: grid;
    grid-template-columns: clamp(70px, 9vh, 104px) 1fr;
    align-items: center;
    gap: clamp(10px, 1.2vw, 18px);
    min-width: 0;
}

.process-badge {
    display: grid;
    place-items: center;
    width: clamp(70px, 9vh, 104px);
    height: clamp(70px, 9vh, 104px);
}

.process-badge img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.process-step h2 {
    margin: 0 0 clamp(4px, 0.7vh, 8px);
    font-size: clamp(0.78rem, 1.2vh, 0.92rem);
    text-transform: uppercase;
}

.process-step p {
    margin: 0;
    color: #263941;
    font-size: clamp(0.72rem, 1.15vh, 0.86rem);
    line-height: 1.35;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(250px, 0.85fr) minmax(420px, 1.45fr) auto;
    align-items: center;
    gap: clamp(20px, 2.5vw, 38px);
    padding: clamp(12px, 2vh, 24px) var(--site-gutter);
    border-top: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(3, 15, 22, 0.97), rgba(7, 36, 50, 0.96)),
        repeating-linear-gradient(45deg, rgba(101, 227, 242, 0.06) 0 1px, transparent 1px 22px);
    color: #f7fbff;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.4vw, 20px);
}

.footer-brand p {
    max-width: 310px;
    margin: 0;
    font-size: clamp(0.78rem, 1.35vh, 0.95rem);
    line-height: 1.45;
}

.footer-brand span {
    color: var(--cyan);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1.7vw, 22px);
}

.footer-links a {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
    color: #dce9ed;
    text-decoration: none;
    font-size: clamp(0.78rem, 1.35vh, 0.95rem);
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: #fff;
    outline: none;
}

.link-token {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 900;
}

.copyright {
    margin: 0;
    color: #b6c6cc;
    font-size: clamp(0.74rem, 1.25vh, 0.9rem);
    line-height: 1.4;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

@media (max-width: 1220px) {
    .site-header-inner {
        flex-wrap: wrap;
        gap: 16px 24px;
        padding: 16px var(--site-gutter);
    }

    .brand-lockup {
        flex: 1 1 300px;
        min-width: 0;
    }

    .primary-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: clamp(16px, 3vw, 28px);
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding: clamp(20px, 3.2vh, 40px) var(--site-gutter);
    }

    .hero-copy-block,
    .hero-summary {
        max-width: 650px;
    }

    .hero-visual {
        justify-items: start;
        padding-top: 0;
    }

    .project-window {
        width: min(100%, 660px);
    }

    .hero-portrait {
        left: 65%;
        width: min(74vw, 760px);
        bottom: clamp(-210px, -18vh, -120px);
        height: calc(100% + 150px);
        opacity: 0.72;
    }

    .process-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: clamp(10px, 1.7vh, 20px) var(--site-gutter);
    }

    .site-footer {
        padding-right: var(--site-gutter);
        padding-left: var(--site-gutter);
    }

    .site-footer {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 860px) {
    .site-header-inner {
        min-height: auto;
    }

    .brand-lockup {
        flex: 1 1 260px;
    }

    .primary-nav {
        gap: 20px;
    }

    h1 {
        font-size: clamp(2.2rem, 6vw, 3rem);
    }

    .hero-copy-block,
    .hero-summary {
        max-width: 100%;
    }

    .hero-section {
        background: url("/images/hero-background.png") center center / cover no-repeat;
    }

    .hero-section::before {
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.99) 0%,
            rgba(255, 255, 255, 0.96) 45%,
            rgba(255, 250, 241, 0.74) 66%,
            rgba(255, 250, 241, 0.18) 100%
        );
    }

    .hero-portrait {
        right: -210px;
        bottom: 320px;
        left: auto;
        width: 640px;
        height: 540px;
        transform: none;
        opacity: 0.22;
    }

    .project-body {
        grid-template-columns: 1fr;
    }

    .project-sidebar {
        display: none;
    }

    .metric-grid,
    .dashboard-lower,
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .site-header-inner,
    .hero-inner,
    .process-section,
    .site-footer {
        padding-right: 18px;
        padding-left: 18px;
    }

    .brand-mark {
        width: 58px;
        height: 58px;
        font-size: 1.05rem;
    }

    .brand-name {
        font-size: 1.12rem;
    }

    .brand-title {
        font-size: 0.76rem;
    }

    h1 {
        font-size: 2.35rem;
    }

    .hero-summary {
        font-size: 1rem;
    }

    .button {
        width: 100%;
    }

    .project-window {
        min-height: auto;
    }

    .project-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .project-search {
        width: 100%;
        max-width: none;
    }

    .project-dashboard {
        padding: 18px;
    }

    .hero-portrait {
        right: -245px;
        bottom: 390px;
        width: 600px;
        height: 500px;
        opacity: 0.16;
    }

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

    .process-step {
        grid-template-columns: 86px 1fr;
    }

    .process-badge {
        width: 76px;
        height: 76px;
        font-size: 1rem;
    }

}
