:root {
    --bg: #050b14;
    --bg-deep: #02060d;
    --surface: rgba(9, 24, 42, 0.82);
    --surface-strong: #0b1726;
    --text: #f5fbff;
    --muted: #9eb4c7;
    --cyan: #64ffda;
    --mint: #44ffb2;
    --sky: #7af0ff;
    --coral: #ff6b8a;
    --amber: #ffd166;
    --border: rgba(122, 240, 255, 0.22);
    --shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
    --font-arcade: "Press Start 2P", system-ui;
    --font-body: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --font-sans: "Inter", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font-body);
    background:
        radial-gradient(circle at 18% 12%, rgba(100, 255, 218, 0.10), transparent 30%),
        linear-gradient(rgba(100, 255, 218, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 255, 218, 0.022) 1px, transparent 1px),
        linear-gradient(145deg, var(--bg), var(--bg-deep) 62%, #071324);
    background-size: auto, 38px 38px, 38px 38px, auto;
    overflow-x: hidden;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 54px);
    background: rgba(5, 11, 20, 0.86);
    border-bottom: 1px solid rgba(122, 240, 255, 0.14);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.5;
    text-decoration: none;
}

.brand-logo {
    width: 34px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(100, 255, 218, 0.36));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2.5vw, 28px);
}

.nav-links a {
    color: var(--muted);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--cyan);
}

.section-shell {
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
}

.hero {
    min-height: calc(100vh - 73px);
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
    align-items: center;
    gap: clamp(32px, 6vw, 78px);
    padding: 64px 0 34px;
}

.hero-copy h1,
.section-heading h2,
.contact h2 {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 900;
    letter-spacing: 0;
}

.hero-copy h1 {
    max-width: 680px;
    font-size: clamp(40px, 6vw, 82px);
    line-height: 0.98;
    text-shadow: 0 0 20px rgba(100, 255, 218, 0.18);
}

.hero-copy p {
    max-width: 590px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

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

.button-primary {
    color: #041015;
    background: linear-gradient(135deg, var(--mint), var(--sky));
    box-shadow: 0 0 24px rgba(68, 255, 178, 0.22);
}

.button-secondary {
    color: var(--cyan);
    background: rgba(7, 18, 31, 0.78);
    border-color: var(--border);
}

.cabinet {
    position: relative;
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(100, 255, 218, 0.10), transparent 38%),
        linear-gradient(180deg, rgba(19, 36, 58, 0.96), rgba(7, 19, 34, 0.96));
    border: 1px solid rgba(122, 240, 255, 0.26);
    border-radius: 8px;
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.cabinet-top,
.screen-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--cyan);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.5;
    text-transform: uppercase;
}

.coin {
    color: var(--amber);
}

.cabinet-screen {
    margin-top: 14px;
    padding: 16px;
    min-height: 620px;
    background:
        radial-gradient(circle at 50% 20%, rgba(100, 255, 218, 0.10), transparent 34%),
        linear-gradient(rgba(122, 240, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 240, 255, 0.045) 1px, transparent 1px),
        #040b14;
    background-size: auto, 24px 24px, 24px 24px, auto;
    border: 1px solid rgba(122, 240, 255, 0.18);
    border-radius: 8px;
    box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.62);
}

.cartridge-stack {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.mini-cart {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    width: 100%;
    padding: 12px;
    color: var(--text);
    text-align: left;
    background: rgba(11, 23, 38, 0.74);
    border: 1px solid rgba(122, 240, 255, 0.16);
    border-radius: 8px;
    cursor: pointer;
}

.mini-cart.active,
.mini-cart:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 14px rgba(100, 255, 218, 0.16);
}

.mini-cart strong,
.mini-cart small {
    display: block;
}

.mini-cart strong {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.5;
}

.mini-cart small {
    margin-top: 5px;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 12px;
}

.cart-icon {
    width: 42px;
    height: 42px;
    background: rgba(100, 255, 218, 0.10);
    border: 1px solid rgba(100, 255, 218, 0.28);
    border-radius: 8px;
    position: relative;
}

.plane-icon::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 18px;
    width: 25px;
    height: 7px;
    background: var(--cyan);
    clip-path: polygon(0 40%, 70% 0, 100% 50%, 70% 100%, 0 60%);
}

.terminal-icon::before,
.terminal-icon::after,
.cash-icon::before,
.cash-icon::after {
    content: "";
    position: absolute;
}

.terminal-icon::before {
    left: 10px;
    top: 13px;
    width: 12px;
    height: 12px;
    background: var(--cyan);
    clip-path: polygon(0 0, 100% 50%, 0 100%, 0 70%, 48% 50%, 0 30%);
}

.terminal-icon::after {
    right: 10px;
    bottom: 12px;
    width: 14px;
    height: 3px;
    background: var(--cyan);
}

.bars-icon {
    box-shadow: inset 8px 0 0 var(--mint), inset 18px 0 0 var(--sky), inset 28px 0 0 var(--coral);
}

.cash-icon::before {
    left: 8px;
    right: 8px;
    bottom: 10px;
    height: 3px;
    background: var(--cyan);
    transform: rotate(-22deg);
    transform-origin: left center;
    box-shadow: 9px -7px 0 -1px var(--mint), 18px -16px 0 -1px var(--amber);
}

.cash-icon::after {
    right: 8px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-top: 3px solid var(--amber);
    border-right: 3px solid var(--amber);
}

.screen-stage {
    position: relative;
    display: grid;
    grid-template-columns: 0.92fr 1fr;
    gap: 18px;
    min-height: 248px;
    margin-top: 16px;
    padding: 18px;
    overflow: hidden;
    border: 1px dashed rgba(100, 255, 218, 0.28);
    border-radius: 8px;
    background: rgba(1, 7, 13, 0.60);
}

.stage-preview {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(122, 240, 255, 0.22);
    border-radius: 8px;
    background: #06111f;
}

.stage-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, transparent 50%, rgba(5, 11, 20, 0.76)),
        repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 4px);
}

.stage-preview img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    object-position: top center;
}

.stage-content {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.stage-label {
    margin: 0 0 12px;
    color: var(--cyan);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.stage-content h2 {
    margin: 0;
    font-family: var(--font-sans);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.05;
}

.stage-content p:not(.stage-label) {
    max-width: 360px;
    margin: 14px 0 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
}

.stage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.stage-actions .button {
    min-height: 42px;
    padding: 11px 13px;
    font-size: 13px;
}

.projects,
.process,
.contact {
    padding: 92px 0;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(240px, 0.58fr);
    align-items: end;
    gap: 28px;
    margin-bottom: 28px;
}

.section-heading h2,
.contact h2 {
    font-size: clamp(28px, 3.6vw, 48px);
    line-height: 1.08;
}

.section-heading p,
.contact p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

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

.project-card {
    display: grid;
    grid-template-rows: 170px 1fr;
    min-height: 448px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.20);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    scroll-margin-top: 96px;
}

.project-card.is-highlighted {
    border-color: var(--cyan);
    box-shadow: 0 0 0 1px rgba(100, 255, 218, 0.35), 0 18px 44px rgba(0, 0, 0, 0.24), 0 0 30px rgba(100, 255, 218, 0.18);
    transform: translateY(-3px);
}

.project-preview {
    position: relative;
    margin: 0;
    overflow: hidden;
    background:
        linear-gradient(rgba(122, 240, 255, 0.065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 240, 255, 0.065) 1px, transparent 1px),
        #071322;
    background-size: 22px 22px;
}

.project-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, transparent 58%, rgba(5, 11, 20, 0.72)),
        repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 0, rgba(255, 255, 255, 0.055) 1px, transparent 1px, transparent 4px);
    opacity: 0.55;
}

.project-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0.92;
    transform: scale(1.01);
}

.project-body {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.project-type {
    margin: 0 0 14px;
    color: var(--cyan);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.project-body h3 {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 21px;
    font-weight: 900;
    line-height: 1.25;
}

.project-body p:not(.project-type) {
    margin: 18px 0 24px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.project-body a,
.project-status {
    margin-top: auto;
    align-self: flex-start;
    padding: 11px 13px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 900;
}

.project-body a {
    color: var(--bg);
    background: var(--cyan);
    text-decoration: none;
}

.project-status {
    color: var(--muted);
    background: rgba(122, 240, 255, 0.08);
    border: 1px solid rgba(122, 240, 255, 0.18);
}

.level-path {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 28px 0 0;
    list-style: none;
}

.level-path::before {
    content: "";
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 4px;
    background: linear-gradient(90deg, var(--cyan), var(--mint));
    opacity: 0.58;
}

.level-path li {
    min-height: 178px;
    padding: 20px;
    background: rgba(9, 24, 42, 0.76);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.level-path span,
.level-path strong,
.level-path small {
    display: block;
}

.level-path span {
    color: var(--amber);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
}

.level-path strong {
    margin-top: 18px;
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.5;
}

.level-path small {
    margin-top: 13px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 34px;
    margin-bottom: 36px;
    padding: 46px;
    background: rgba(9, 24, 42, 0.84);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
    padding: 28px 0 42px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 1120px) {
    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 44px;
        min-height: auto;
    }

    .cabinet {
        max-width: 620px;
        width: 100%;
        justify-self: center;
    }

    .level-path {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .contact {
        grid-template-columns: 1fr;
    }

    .contact {
        padding: 32px 22px;
    }
}

@media (max-width: 640px) {
    .site-header {
        position: relative;
        align-items: center;
        flex-direction: row;
        padding: 10px 12px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 11px;
    }

    .brand {
        gap: 8px;
        font-size: 12px;
    }

    .brand-logo {
        width: 26px;
        height: 34px;
    }

    .hero {
        gap: 26px;
        padding-top: 26px;
    }

    .hero-copy h1 {
        font-size: 38px;
        line-height: 1.02;
    }

    .hero-copy p {
        margin-top: 18px;
        font-size: 15px;
        line-height: 1.65;
    }

    .hero-actions {
        margin-top: 24px;
    }

    .cabinet {
        padding: 12px;
    }

    .cabinet-screen {
        min-height: auto;
        padding: 12px;
    }

    .cabinet-top,
    .screen-header {
        font-size: 11px;
    }

    .mini-cart {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 10px;
    }

    .mini-cart strong {
        font-size: 13px;
    }

    .mini-cart small {
        font-size: 11px;
    }

    .cart-icon {
        width: 38px;
        height: 38px;
    }

    .screen-stage {
        grid-template-columns: 1fr;
        gap: 14px;
        min-height: auto;
        padding: 12px;
    }

    .stage-preview img {
        min-height: 148px;
        max-height: 178px;
    }

    .stage-content h2 {
        font-size: 24px;
    }

    .stage-content p:not(.stage-label) {
        font-size: 13px;
        line-height: 1.6;
    }

    .stage-actions {
        margin-top: 16px;
    }

    .stage-actions .button {
        flex: 1 1 128px;
    }

    .section-shell {
        width: min(100% - 24px, 1160px);
    }

    .projects,
    .process,
    .contact {
        padding-top: 66px;
        padding-bottom: 66px;
    }

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

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

    .site-footer {
        flex-direction: column;
    }
}

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