:root {
    --bg: #0d1117;
    --panel: #151a21;
    --panel-strong: #1e1e1e;
    --panel-soft: #202734;
    --text: #e6edf3;
    --muted: #8b949e;
    --subtle: #6e7681;
    --line: #30363d;
    --blue: #007acc;
    --blue-soft: rgba(0, 122, 204, 0.16);
    --green: #4ec9b0;
    --yellow: #dcdcaa;
    --orange: #ce9178;
    --purple: #c586c0;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        var(--bg);
    background-size: 48px 48px;
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.6;
}

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

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

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

.site-header {
    align-items: center;
    background: rgba(13, 17, 23, 0.78);
    border-bottom: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    left: 0;
    padding: 14px clamp(18px, 4vw, 56px);
    position: fixed;
    right: 0;
    top: 0;
    transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    z-index: 20;
    backdrop-filter: blur(16px);
}

.site-header.scrolled {
    background: rgba(13, 17, 23, 0.94);
    border-color: var(--line);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
}

.brand-mark {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    gap: 10px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
}

.brand-icon {
    border: 1px solid rgba(0, 122, 204, 0.7);
    border-radius: 8px;
    display: block;
    height: 42px;
    object-fit: cover;
    width: 42px;
}

.primary-nav {
    align-items: center;
    display: flex;
    gap: clamp(18px, 3vw, 34px);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.84rem;
    font-weight: 600;
}

.primary-nav a {
    color: var(--muted);
    position: relative;
    transition: color 180ms ease;
}

.primary-nav a:hover {
    color: var(--text);
}

.primary-nav a[aria-current="page"] {
    color: var(--text);
}

.primary-nav a[aria-current="page"]::before {
    color: var(--yellow);
}

.primary-nav a::before {
    color: var(--blue);
    content: "#";
    margin-right: 2px;
}

.menu-toggle {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: none;
    height: 42px;
    padding: 10px;
    width: 46px;
}

.menu-toggle span {
    background: var(--text);
    display: block;
    height: 2px;
    margin: 5px 0;
    transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    align-items: center;
    display: grid;
    gap: clamp(28px, 5vw, 70px);
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    min-height: 92svh;
    overflow: hidden;
    padding: 124px clamp(18px, 5vw, 72px) 92px;
    position: relative;
}

.hero-image,
.hero-video-grid,
.hero-shade {
    height: 100%;
    inset: 0;
    position: absolute;
    width: 100%;
}

.hero-image {
    filter: grayscale(1) brightness(0.42) contrast(1.08);
    object-fit: cover;
    object-position: center;
    opacity: 0.18;
    transform: scale(1.02);
}

.hero-video-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    opacity: 0.42;
    padding: 10px;
    transform: scale(1.03);
}

.hero-video-tile {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
    margin: 0;
    overflow: hidden;
    position: relative;
}

.hero-video {
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.hero-video-tile figcaption {
    background: linear-gradient(180deg, transparent 0%, rgba(13, 17, 23, 0.92) 100%);
    bottom: 0;
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    font-weight: 700;
    left: 0;
    letter-spacing: 0.03em;
    padding: 18px 16px 14px;
    position: absolute;
    right: 0;
    text-transform: uppercase;
}

.hero-shade {
    background:
        radial-gradient(circle at 72% 22%, rgba(0, 122, 204, 0.16), transparent 30%),
        linear-gradient(90deg, rgba(13, 17, 23, 0.98) 0%, rgba(13, 17, 23, 0.88) 54%, rgba(13, 17, 23, 0.72) 100%);
}

.hero-content,
.editor-preview,
.hero-stats {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 780px;
}

.hero-logo-lockup {
    align-items: center;
    background: rgba(21, 26, 33, 0.72);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: inline-flex;
    gap: 12px;
    margin-bottom: 22px;
    padding: 8px 14px 8px 8px;
}

.hero-logo-lockup img {
    border: 1px solid rgba(0, 122, 204, 0.7);
    border-radius: 8px;
    height: 54px;
    object-fit: cover;
    width: 54px;
}

.hero-logo-lockup span {
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.86rem;
    font-weight: 700;
}

.eyebrow,
.section-kicker,
.project-type {
    color: var(--green);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.process-layout h2,
.contact-panel h2 {
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0;
}

.hero h1 {
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(3.2rem, 8vw, 7.6rem);
    max-width: 900px;
    overflow-wrap: anywhere;
}

.hero h1::before {
    color: var(--blue);
    content: "<";
}

.hero h1::after {
    color: var(--blue);
    content: " />";
}

.hero-copy {
    color: var(--muted);
    font-size: clamp(1rem, 1.6vw, 1.22rem);
    margin: 22px 0 0;
    max-width: 650px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    font-weight: 700;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

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

.button.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
}

.button.primary:hover {
    background: #1388d3;
}

.button.secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.button.secondary:hover {
    border-color: var(--blue);
    color: var(--green);
}

.editor-preview {
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.editor-topbar {
    align-items: center;
    background: #252526;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
}

.editor-topbar span {
    border-radius: 999px;
    height: 10px;
    width: 10px;
}

.editor-topbar span:nth-child(1) {
    background: #f85149;
}

.editor-topbar span:nth-child(2) {
    background: #dcdcaa;
}

.editor-topbar span:nth-child(3) {
    background: #4ec9b0;
}

.editor-topbar p {
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    margin: 0 0 0 8px;
}

.editor-body {
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(0.78rem, 1.3vw, 0.98rem);
    overflow-x: auto;
    padding: 22px;
}

.editor-body p {
    margin: 0 0 12px;
    white-space: nowrap;
}

.line-number {
    color: var(--subtle);
    display: inline-block;
    margin-right: 18px;
    text-align: right;
    width: 24px;
}

.token-key {
    color: var(--purple);
}

.token-string {
    color: var(--orange);
}

.token-comment {
    color: var(--subtle);
}

.hero-stats {
    align-self: end;
    background: rgba(21, 26, 33, 0.86);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 0;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    max-width: 760px;
    overflow: hidden;
}

.hero-stats div {
    padding: 18px 20px;
}

.hero-stats div + div {
    border-left: 1px solid var(--line);
}

.hero-stats strong {
    color: var(--yellow);
    display: block;
    font-family: "JetBrains Mono", monospace;
    font-size: 1.5rem;
    line-height: 1;
}

.hero-stats span {
    color: var(--muted);
    display: block;
    font-size: 0.86rem;
    margin-top: 6px;
}

.intro-band {
    background: #111827;
    border-block: 1px solid var(--line);
    color: var(--muted);
    overflow: hidden;
    padding: 14px clamp(18px, 5vw, 72px);
}

.intro-band p {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(0.9rem, 1.6vw, 1.08rem);
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.page-hero {
    display: grid;
    gap: clamp(28px, 5vw, 56px);
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    overflow: hidden;
    padding: 124px clamp(18px, 5vw, 72px) 72px;
    position: relative;
}

.page-hero::before {
    background:
        radial-gradient(circle at 72% 22%, rgba(0, 122, 204, 0.16), transparent 32%),
        linear-gradient(90deg, rgba(13, 17, 23, 0.96) 0%, rgba(13, 17, 23, 0.9) 54%, rgba(13, 17, 23, 0.82) 100%);
    content: "";
    inset: 0;
    position: absolute;
}

.page-hero > * {
    position: relative;
    z-index: 1;
}

.page-hero-copy {
    max-width: 780px;
}

.page-hero h1 {
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1.02;
    margin: 0;
}

.page-hero p:not(.eyebrow) {
    color: var(--muted);
    font-size: 1rem;
    margin: 18px 0 0;
}

.page-hero-card {
    align-self: end;
    background: rgba(21, 26, 33, 0.82);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.page-hero-label {
    color: var(--green);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 18px;
    text-transform: uppercase;
}

.page-hero-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-hero-card li + li {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 16px;
}

.page-hero-card strong {
    color: var(--text);
    display: block;
    font-size: 1rem;
    margin-bottom: 6px;
}

.page-hero-card span {
    color: var(--muted);
    display: block;
}

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

.overview-card {
    color: inherit;
    display: block;
    text-decoration: none;
}

.overview-card p {
    margin-top: 12px;
}

.section {
    padding: clamp(70px, 9vw, 118px) clamp(18px, 5vw, 72px);
}

.section-heading {
    align-items: end;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    margin-bottom: 36px;
}

.section-heading h2,
.process-layout h2,
.contact-panel h2 {
    color: var(--text);
    font-size: clamp(2rem, 4.8vw, 4.5rem);
}

.section-heading p,
.process-layout p,
.contact-panel p {
    color: var(--muted);
    font-size: 1rem;
    margin: 0;
}

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

.service-card,
.portfolio-card {
    background: rgba(21, 26, 33, 0.82);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.service-card:hover,
.portfolio-card:hover {
    background: rgba(32, 39, 52, 0.92);
    border-color: rgba(0, 122, 204, 0.72);
    transform: translateY(-4px);
}

.service-card {
    min-height: 250px;
    padding: 24px;
}

.service-number {
    color: var(--blue);
    font-family: "JetBrains Mono", monospace;
    font-size: 1rem;
    font-weight: 700;
}

.service-card h3,
.portfolio-card h3,
.process-list h3 {
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1.16;
    margin: 20px 0 10px;
}

.service-card p,
.portfolio-card p,
.process-list p {
    color: var(--muted);
    margin: 0;
}

.portfolio-section {
    background:
        linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        #10151c;
    background-size: 36px 36px;
    border-block: 1px solid var(--line);
}

.portfolio-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -4px 0 28px;
}

.filter-button {
    background: rgba(21, 26, 33, 0.9);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.84rem;
    font-weight: 700;
    min-height: 40px;
    padding: 8px 14px;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.filter-button.active,
.filter-button:hover {
    background: var(--blue-soft);
    border-color: var(--blue);
    color: var(--text);
}

.portfolio-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.portfolio-card.hidden {
    display: none;
}

.portfolio-card img {
    aspect-ratio: 1.22 / 1;
    filter: grayscale(0.2) saturate(0.74) brightness(0.82);
    object-fit: cover;
    width: 100%;
}

.portfolio-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.portfolio-body h3 {
    margin-top: 0;
}

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

.tag-list span {
    background: rgba(78, 201, 176, 0.12);
    border: 1px solid rgba(78, 201, 176, 0.28);
    border-radius: 999px;
    color: var(--green);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 9px;
}

.process-section {
    background: var(--bg);
}

.process-layout {
    display: grid;
    gap: 44px;
    grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
}

.process-layout > div p {
    margin-top: 20px;
    max-width: 620px;
}

.process-list {
    background: rgba(21, 26, 33, 0.62);
    border: 1px solid var(--line);
    border-radius: 8px;
    list-style: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
}

.process-list li {
    display: grid;
    gap: 20px;
    grid-template-columns: 62px 1fr;
    padding: 24px;
}

.process-list li + li {
    border-top: 1px solid var(--line);
}

.process-list span {
    color: var(--blue);
    font-family: "JetBrains Mono", monospace;
    font-size: 1rem;
    font-weight: 700;
}

.process-list h3 {
    margin-top: 0;
}

.quote-band {
    background: #1e1e1e;
    border-block: 1px solid var(--line);
    padding: clamp(46px, 7vw, 74px) clamp(18px, 8vw, 140px);
    text-align: center;
}

.quote-band blockquote {
    color: var(--text);
    font-size: clamp(1.6rem, 3.8vw, 3.4rem);
    font-weight: 700;
    line-height: 1.14;
    margin: 0 auto;
    max-width: 980px;
}

.quote-band blockquote::before,
.quote-band blockquote::after {
    color: var(--blue);
}

.quote-band p {
    color: var(--green);
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    margin: 18px 0 0;
}

.contact-panel {
    background: rgba(21, 26, 33, 0.9);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 40px;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
    padding: clamp(24px, 5vw, 50px);
}

.contact-panel p {
    margin-top: 18px;
}

.email-link {
    color: var(--green);
    display: inline-block;
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    margin-top: 24px;
}

.email-link:hover {
    color: var(--yellow);
}

.contact-form {
    display: grid;
    gap: 16px;
}

.contact-form label {
    color: var(--muted);
    display: grid;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 8px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    background: #0d1117;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    outline: none;
    padding: 13px 14px;
    width: 100%;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
}

.contact-form textarea {
    resize: vertical;
}

.form-status {
    color: var(--green);
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    margin: 0;
    min-height: 24px;
}

.site-footer {
    align-items: center;
    background: #0b0f14;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 24px clamp(18px, 5vw, 72px);
}

.site-footer p {
    margin: 0;
}

.site-footer p:first-child {
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-bottom: 62px;
    }

    .editor-preview {
        max-width: 720px;
        width: 100%;
    }

    .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: none;
    }

    .hero-video-grid {
        min-height: 420px;
    }

    .section-heading,
    .page-hero,
    .service-grid,
    .portfolio-grid,
    .process-layout,
    .contact-panel {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 760px) {
    .site-header {
        padding: 12px 18px;
    }

    .menu-toggle {
        display: block;
    }

    .primary-nav {
        background: #151a21;
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: var(--shadow);
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 8px;
        position: absolute;
        right: 18px;
        top: 66px;
        width: min(280px, calc(100vw - 36px));
    }

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

    .primary-nav a {
        padding: 12px;
        width: 100%;
    }

    .hero {
        padding: 104px 18px 48px;
    }

    .page-hero {
        padding: 104px 18px 48px;
    }

    .hero-shade {
        background:
            radial-gradient(circle at 70% 16%, rgba(0, 122, 204, 0.16), transparent 34%),
            linear-gradient(0deg, rgba(13, 17, 23, 0.98) 0%, rgba(13, 17, 23, 0.9) 100%);
    }

    .hero h1 {
        font-size: clamp(2.75rem, 13vw, 4.8rem);
    }

    .hero-logo-lockup {
        max-width: 100%;
    }

    .hero-stats {
        display: none;
    }

    .hero-video-grid {
        min-height: 360px;
        opacity: 0.32;
    }

    .section {
        padding-inline: 18px;
    }

    .portfolio-controls {
        align-items: stretch;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

@media (prefers-reduced-motion: reduce) {
    .hero-video-grid {
        display: none;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
