:root {
    color-scheme: dark;
    --bg: #0f1117;
    --surface: rgba(20, 24, 34, .78);
    --surface-strong: rgba(28, 34, 46, .94);
    --text: #f3f6fb;
    --muted: #a9b3c4;
    --line: rgba(255, 255, 255, .08);
    --accent: #8b7cff;
    --accent-2: #4fd1c5;
    --accent-3: #f38bb7;
    --shadow: 0 20px 60px rgba(0, 0, 0, .28);
    --code-bg: rgba(255, 255, 255, .06);
    --radius-lg: 30px;
    --radius-md: 22px;
    --radius-sm: 14px;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1117;
    --surface: rgba(20, 24, 34, .78);
    --surface-strong: rgba(28, 34, 46, .94);
    --text: #f3f6fb;
    --muted: #a9b3c4;
    --line: rgba(255, 255, 255, .08);
    --accent: #8b7cff;
    --accent-2: #4fd1c5;
    --accent-3: #f38bb7;
    --shadow: 0 20px 60px rgba(0, 0, 0, .28);
    --code-bg: rgba(255, 255, 255, .06);
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f3ef;
    --surface: rgba(255, 255, 255, .76);
    --surface-strong: rgba(255, 255, 255, .95);
    --text: #141414;
    --muted: #5f6368;
    --line: rgba(20, 20, 20, .12);
    --accent: #7c3aed;
    --accent-2: #0891b2;
    --accent-3: #db2777;
    --shadow: 0 24px 80px rgba(31, 41, 55, .13);
    --code-bg: rgba(20, 20, 20, .04);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 28rem),
        radial-gradient(circle at 88% 0%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 24rem),
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, .02), transparent 32rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.01), rgba(0, 0, 0, .10));
    z-index: -2;
}

.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .04;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .noise {
    opacity: .025;
}

html[data-theme="light"] .noise {
    opacity: .03;
}

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

ul,
ol {
    padding-left: 1.35rem;
}

li::marker {
    color: var(--accent-2);
}


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

.site-header {
    position: sticky;
    top: 16px;
    z-index: 20;
    width: min(1140px, calc(100% - 32px));
    margin: 16px auto 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
    backdrop-filter: blur(18px) saturate(120%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -.02em;
    padding-left: 6px;
}

.brand.small {
    padding-left: 0;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 30px rgba(124, 58, 237, .3);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a,
.theme-toggle {
    border: 0;
    color: var(--muted);
    background: transparent;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.site-nav a:hover,
.theme-toggle:hover {
    color: var(--text);
    background: var(--surface);
    transform: translateY(-1px);
}

.theme-toggle {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 999px;
}

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

.hero {
    min-height: calc(100vh - 96px);
    display: grid;
    grid-template-columns: 1.03fr .97fr;
    align-items: center;
    gap: 44px;
    padding: 72px 0 48px;
}

.hero-content,
.page-hero div {
    max-width: 720px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 12px;
}

.eyebrow span {
    width: 36px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

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

h1 {
    margin-bottom: 22px;
    font-size: clamp(48px, 8vw, 92px);
    line-height: .88;
    letter-spacing: -.08em;
}

h2 {
    margin-bottom: 14px;
    font-size: clamp(32px, 4.8vw, 56px);
    line-height: .96;
    letter-spacing: -.055em;
}

h3 {
    margin-bottom: 10px;
    font-size: 21px;
    letter-spacing: -.03em;
}

.hero-text,
.section-heading p,
.page-hero p,
.contact-band p,
.contact-card p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

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

.button.primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 42px rgba(124, 58, 237, .28);
}

.button.secondary,
.button.ghost {
    background: var(--surface);
}

.button.ghost:hover,
.button.secondary:hover {
    border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 42px;
}

.stats div {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.stats strong {
    display: block;
    font-size: 26px;
    letter-spacing: -.04em;
}

.stats span {
    color: var(--muted);
    font-size: 13px;
}

.hero-visual {
    min-height: 580px;
    position: relative;
    display: grid;
    place-items: center;
}

.visual-card {
    width: min(440px, 100%);
    min-height: 520px;
    border: 1px solid var(--line);
    border-radius: 42px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.16), transparent),
        var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.main-preview::before,
.main-preview::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(4px);
}

.main-preview::before {
    width: 260px;
    height: 260px;
    right: -80px;
    top: -70px;
    background: rgba(167, 139, 250, .38);
}

.main-preview::after {
    width: 240px;
    height: 240px;
    left: -90px;
    bottom: -80px;
    background: rgba(34, 211, 238, .28);
}

.preview-topline {
    position: absolute;
    top: 28px;
    left: 28px;
    right: 28px;
    height: 56px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.08);
}

.preview-title {
    position: absolute;
    left: 32px;
    bottom: 158px;
    font-size: clamp(46px, 7vw, 76px);
    font-weight: 900;
    letter-spacing: -.08em;
    line-height: .85;
    max-width: 320px;
}

.preview-grid {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.preview-grid span {
    aspect-ratio: 1;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(167, 139, 250, .9), rgba(34, 211, 238, .65));
}

.floating-card {
    position: absolute;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    padding: 18px 22px;
    font-weight: 900;
}

.card-a { left: 0; top: 18%; transform: rotate(-6deg); }
.card-b { right: 0; top: 44%; transform: rotate(7deg); }
.card-c { left: 12%; bottom: 9%; transform: rotate(4deg); }

.section-block {
    padding: 72px 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.services-grid,
.work-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.service-card,
.work-card,
.contact-card,
.category-card,
.portfolio-section {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.service-card {
    padding: 24px;
    min-height: 250px;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    background: var(--surface-strong);
}

.service-card span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 48px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 900;
}

.service-card p,
.work-body span,
.process-list p,
.category-card p,
.portfolio-section-head p,
.contact-list span {
    color: var(--muted);
    line-height: 1.6;
}

.split-block {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 24px;
    align-items: start;
}

.process-list {
    display: grid;
    gap: 12px;
}

.process-list div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 16px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.process-list span {
    color: var(--accent-2);
    font-weight: 900;
}

.process-list p {
    margin: 0;
    font-size: 18px;
}

.work-grid.compact {
    grid-template-columns: repeat(4, 1fr);
}

.work-card {
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease;
}

.work-card:hover,
.work-card:focus {
    outline: none;
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--accent-2) 45%, transparent);
}

.work-art {
    min-height: 210px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background:
        radial-gradient(circle at 80% 20%, rgba(167, 139, 250, .55), transparent 120px),
        linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.02));
}

.work-art div {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 36px;
    right: -22px;
    top: -18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    transform: rotate(18deg);
}

.work-art span {
    position: absolute;
    width: 84px;
    height: 84px;
    left: 20px;
    top: 24px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
}

.work-art strong {
    position: relative;
    z-index: 1;
    max-width: 210px;
    color: #fff;
    font-size: 34px;
    line-height: .95;
    letter-spacing: -.06em;
}

.art-2 { background: radial-gradient(circle at 25% 25%, rgba(34, 211, 238, .42), transparent 120px), linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.02)); }
.art-3 { background: radial-gradient(circle at 75% 30%, rgba(244, 114, 182, .45), transparent 120px), linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.02)); }
.art-4 { background: radial-gradient(circle at 40% 80%, rgba(167, 139, 250, .45), transparent 130px), linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.02)); }
.art-5 { background: radial-gradient(circle at 70% 60%, rgba(34, 211, 238, .32), transparent 140px), linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.02)); }
.art-6 { background: radial-gradient(circle at 45% 20%, rgba(244, 114, 182, .4), transparent 130px), linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.02)); }

.work-body {
    padding: 20px;
}

.work-body p {
    margin-bottom: 8px;
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 800;
}

.center-action {
    margin-top: 26px;
    display: flex;
    justify-content: center;
}

.contact-band {
    margin-top: 40px;
    margin-bottom: 72px;
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 90% 15%, rgba(34, 211, 238, .2), transparent 250px),
        var(--surface);
    box-shadow: var(--shadow);
}

.contact-band h2 {
    margin-bottom: 8px;
}

.contact-band p {
    max-width: 620px;
    margin-bottom: 0;
}

.page-hero {
    padding: 92px 0 34px;
}

.page-hero h1 {
    font-size: clamp(48px, 7vw, 82px);
}

.portfolio-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.category-card {
    color: var(--text);
    text-align: left;
    padding: 22px;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.category-card:hover,
.category-card.active {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    background: var(--surface-strong);
}

.category-card span {
    display: block;
    margin-bottom: 10px;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -.035em;
}

.category-card strong {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-2);
}

.portfolio-tabs {
    position: sticky;
    top: 88px;
    z-index: 10;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
    backdrop-filter: blur(16px);
}

.tab-button {
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 800;
}

.tab-button.active,
.tab-button:hover {
    color: var(--text);
    border-color: var(--line);
    background: var(--surface);
}

.portfolio-sections {
    display: grid;
    gap: 22px;
    padding-bottom: 40px;
}

.portfolio-section {
    padding: 24px;
}

.portfolio-section.is-hidden {
    display: none;
}

.portfolio-section-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.portfolio-section-head h2 {
    margin-bottom: 8px;
    font-size: clamp(28px, 4vw, 44px);
}

.text-link {
    align-self: start;
    color: var(--accent-2);
    font-weight: 900;
    white-space: nowrap;
}

.portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
}

.small-band {
    margin-top: 8px;
}

.contact-layout {
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    gap: 20px;
    align-items: start;
    padding-bottom: 72px;
}

.contact-layout-simple {
    grid-template-columns: repeat(2, 1fr);
}

.contact-card {
    padding: 28px;
}

.contact-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.contact-list a,
.contact-list span {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--surface-strong) 40%, transparent);
}

.site-footer {
    width: min(1140px, calc(100% - 32px));
    margin: 0 auto 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.site-footer p {
    margin: 12px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.footer-links a {
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
}

.footer-links a:hover {
    color: var(--text);
    background: var(--surface-strong);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s ease;
}

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

.delay-1 { transition-delay: .12s; }

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .portfolio-tabs,
html[data-theme="dark"] .floating-card,
html[data-theme="dark"] .contact-list a,
html[data-theme="dark"] .contact-list span {
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
}

html[data-theme="dark"] .service-card:hover,
html[data-theme="dark"] .work-card:hover,
html[data-theme="dark"] .work-card:focus,
html[data-theme="dark"] .category-card:hover,
html[data-theme="dark"] .category-card.active {
    background: rgba(34, 40, 55, .98);
}


@media (max-width: 980px) {
    .hero,
    .split-block,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 56px;
    }

    .hero-visual {
        min-height: 500px;
    }

    .services-grid,
    .work-grid.compact,
    .portfolio-picker,
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-band,
    .site-footer,
    .portfolio-section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .site-header {
        top: 10px;
        width: min(100% - 20px, 1140px);
        border-radius: 24px;
        align-items: flex-start;
    }

    .menu-button {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 24px;
        background: var(--surface-strong);
        box-shadow: var(--shadow);
    }

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

    .theme-toggle {
        width: 100%;
    }

    .hero,
    .page-hero {
        padding-top: 54px;
    }

    h1 {
        font-size: clamp(42px, 15vw, 62px);
    }

    .stats,
    .services-grid,
    .work-grid.compact,
    .portfolio-picker,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .visual-card {
        min-height: 440px;
    }

    .floating-card {
        display: none;
    }

    .contact-band,
    .contact-card,
    .portfolio-section {
        padding: 22px;
    }

    .portfolio-tabs {
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}


.text-page {
    max-width: 900px;
    color: var(--muted);
}

.text-page h2 {
    color: var(--text);
    margin-top: 28px;
}

.text-page code {
    color: var(--text);
    background: var(--code-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2px 6px;
}


/* FIX LOGO OVERSIZE */
.brand-logo {
    height: 42px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

img {
    max-width: 100%;
    height: auto;
}
