/* Kompaniec — dark premium portfolio */
:root {
    --bg: #000000;
    --bg-elevated: #111113;
    --bg-soft: #1c1c1e;
    --bg-hover: #1a1a1c;
    --ink: #f5f5f7;
    --ink-secondary: #a1a1a6;
    --ink-tertiary: #6e6e73;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent: #2997ff;
    --accent-hover: #0077ed;
    --accent-soft: rgba(41, 151, 255, 0.14);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --radius: 22px;
    --radius-sm: 14px;
    --nav-h: 52px;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --font: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.47;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    width: min(1120px, calc(100% - 48px));
    margin-inline: auto;
}

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

/* ——— Nav ——— */
.site-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-nav.scrolled {
    border-bottom-color: var(--line);
    background: rgba(0, 0, 0, 0.88);
}

.nav-inner {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    z-index: 2;
}

.nav-brand img {
    height: 32px;
    width: auto;
}

.nav-links.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links.desktop-nav a {
    font-size: 0.8rem;
    color: var(--ink-secondary);
    transition: color 0.2s var(--ease);
}

.nav-links.desktop-nav a:hover,
.nav-links.desktop-nav a.is-active {
    color: var(--ink);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    background: var(--accent);
    color: #fff !important;
    border-radius: 980px;
    font-size: 0.75rem !important;
    font-weight: 500;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-cta:hover {
    background: var(--accent-hover);
    color: #fff !important;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    z-index: 120;
    position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--ink);
    position: relative;
    transition: 0.25s var(--ease);
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

/* Mobile menu — outside backdrop-filter stacking context */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(0, 0, 0, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s var(--ease), visibility 0.28s;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    padding: 2rem;
    text-align: center;
}

.mobile-menu-inner a {
    font-size: 1.45rem;
    font-weight: 500;
    color: var(--ink);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), color 0.2s;
}

.mobile-menu.open .mobile-menu-inner a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-menu-inner a:nth-child(1) { transition-delay: 0.04s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(2) { transition-delay: 0.08s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(3) { transition-delay: 0.12s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(4) { transition-delay: 0.16s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(5) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(6) { transition-delay: 0.24s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(7) { transition-delay: 0.28s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(8) { transition-delay: 0.32s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(9) { transition-delay: 0.36s; }

.mobile-menu-inner a:hover { color: var(--accent); }

.mobile-menu-inner .nav-cta {
    margin-top: 0.5rem;
    font-size: 1rem !important;
    padding: 0.85rem 1.6rem;
    opacity: 1;
}

body.menu-open {
    overflow: hidden;
}

/* ——— Hero ——— */
.hero {
    position: relative;
    min-height: 100svh;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #000;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.94) 100%),
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(41, 151, 255, 0.18), transparent 55%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 0 0 clamp(3.5rem, 10vh, 6.5rem);
    color: #f5f5f7;
}

.hero-brand {
    font-size: clamp(3.2rem, 9vw, 6.5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.95;
    margin-bottom: 1.25rem;
    opacity: 0;
    animation: rise 1s var(--ease) 0.15s forwards;
}

.hero-headline {
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    max-width: 22ch;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.92);
    opacity: 0;
    animation: rise 1s var(--ease) 0.3s forwards;
}

.hero-sub {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 36ch;
    margin-bottom: 2rem;
    opacity: 0;
    animation: rise 1s var(--ease) 0.42s forwards;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    opacity: 0;
    animation: rise 1s var(--ease) 0.55s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.5rem;
    border-radius: 980px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}

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

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(8px);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }

.btn-outline {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ——— Sections ——— */
.section {
    padding: clamp(4.5rem, 10vw, 7.5rem) 0;
}

.section-head {
    text-align: center;
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.section-lead {
    font-size: 1.125rem;
    color: var(--ink-secondary);
    max-width: 38ch;
    margin-inline: auto;
}

/* ——— Projects: text cards ——— */
.projects-rail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}

.project {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 168px;
    padding: 1.35rem 1.35rem 1.4rem;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s, background 0.3s;
}

.project:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.22);
    background: #161618;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.project-meta {
    position: relative;
    z-index: 1;
    padding: 0;
    padding-top: 1.5rem;
}

.project-index {
    position: absolute;
    top: 1.1rem;
    left: 1.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.28);
    font-variant-numeric: tabular-nums;
}

.project-arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    opacity: 0.45;
    transition: opacity 0.3s, background 0.25s, transform 0.3s;
}

.project:hover .project-arrow {
    opacity: 1;
    background: rgba(255, 255, 255, 0.14);
    transform: translate(1px, -1px);
}

.project-name {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.project-domain {
    font-size: 0.78rem;
    color: #86868b;
    font-weight: 500;
    margin-bottom: 0.55rem;
}

.project-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.45;
    max-height: none;
    opacity: 1;
    overflow: visible;
}

.project.featured {
    grid-column: span 2;
    min-height: 168px;
    justify-content: center;
}

.project.featured .project-name {
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
}

.project.featured .project-desc {
    max-width: 42ch;
}

/* ——— Game ——— */
.game-section {
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(41, 151, 255, 0.1), transparent 55%),
        #050506;
    color: #f5f5f7;
    overflow: hidden;
    border-block: 1px solid var(--line);
}

.game-section .section-eyebrow { color: #2997ff; }
.game-section .section-lead { color: rgba(255, 255, 255, 0.5); }

.game-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr 0.9fr;
    gap: 2rem;
    align-items: center;
}

.game-copy h3 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 0.85rem;
}

.game-copy p {
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.25rem;
    font-size: 0.98rem;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.game-tags span {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.7rem;
    border-radius: 980px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
}

.arcade-stage {
    position: relative;
    text-align: center;
    align-self: center;
}

.arcade-stage img.arcade {
    width: min(100%, 260px);
    height: auto;
    margin-inline: auto;
    filter: drop-shadow(0 20px 40px rgba(41, 151, 255, 0.18));
    transition: transform 0.5s var(--ease);
}

.arcade-stage:hover img.arcade {
    transform: translateY(-4px);
}

.arcade-logo {
    position: absolute;
    top: 26%;
    left: 50%;
    transform: translateX(-50%);
    width: 52%;
    max-height: 72px;
    object-fit: contain;
    pointer-events: none;
    animation: floaty 4s ease-in-out infinite;
}

@keyframes floaty {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

.character-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0c0c0e;
}

.character-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #111;
    overflow: hidden;
}

.character-panel img.character {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.45s var(--ease), filter 0.3s;
    filter: drop-shadow(0 10px 30px rgba(41, 151, 255, 0.15));
}

.character-panel:hover img.character {
    transform: scale(1.03);
    filter: drop-shadow(0 14px 36px rgba(41, 151, 255, 0.28));
}

.champion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.95rem 1rem 1.05rem;
    background: rgba(255, 255, 255, 0.04);
    border-top: 1px solid var(--line);
    min-width: 0;
    width: 100%;
    border-radius: 0;
}

.champion-label {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.champion-name {
    font-weight: 600;
    font-size: 1rem;
}

.champion-score {
    font-size: 0.85rem;
    color: #2997ff;
}

/* ——— Services ——— */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.service {
    background: var(--bg-elevated);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    transition: background 0.25s var(--ease), transform 0.35s var(--ease);
}

.service:hover {
    background: var(--bg-hover);
}

.service-wide {
    grid-column: 1 / -1;
    min-height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
}

.service-wide .service-desc {
    flex: 1;
    min-width: 220px;
    margin-bottom: 0;
}

.service-wide .service-price {
    margin-bottom: 0;
}

.service-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}

.service-desc {
    font-size: 0.92rem;
    color: var(--ink-secondary);
    flex: 1;
    margin-bottom: 1.25rem;
}

.service-price {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.service-price span {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--ink-tertiary);
}

.service .btn {
    align-self: flex-start;
    padding: 0.65rem 1.15rem;
    font-size: 0.85rem;
}

/* ——— Contact ——— */
.contact-band {
    background:
        radial-gradient(ellipse 70% 80% at 15% 20%, rgba(41, 151, 255, 0.1), transparent 50%),
        var(--bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.contact-link {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.75rem;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.contact-link:hover {
    border-color: rgba(41, 151, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.contact-link strong {
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.contact-link span {
    font-size: 0.88rem;
    color: var(--ink-secondary);
}

.contact-link em {
    font-style: normal;
    font-size: 0.8rem;
    color: var(--accent);
    margin-top: 0.5rem;
}

/* ——— Footer ——— */
.site-footer {
    padding: 2.5rem 0 3rem;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-inner p {
    font-size: 0.8rem;
    color: var(--ink-tertiary);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--ink-secondary);
}

.footer-links a:hover {
    color: var(--accent);
}

/* ——— Modal ——— */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.25s var(--ease);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: #161618;
    border: 1px solid var(--line);
    border-radius: 24px;
    width: min(560px, 100%);
    max-height: min(90vh, 820px);
    overflow-y: auto;
    padding: 2rem 1.75rem 1.75rem;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    transform: translateY(12px);
    animation: modalIn 0.35s var(--ease) forwards;
}

@keyframes modalIn {
    to { transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.35rem;
    line-height: 1;
    color: var(--ink-secondary);
    display: grid;
    place-items: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--ink);
}

.modal h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.form-group { margin-bottom: 1.15rem; }

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.45rem;
    color: var(--ink-secondary);
}

.required { color: #ff453a; }

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.radio-option:hover,
.radio-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.radio-option input { accent-color: var(--accent); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0a0a0c;
    font: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea.form-control {
    resize: vertical;
    min-height: 88px;
}

.submit-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.95rem;
    border-radius: 980px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.submit-btn:hover { background: var(--accent-hover); }

.form-message {
    text-align: center;
    margin-top: 0.85rem;
    font-size: 0.85rem;
    padding: 0.6rem;
    border-radius: 10px;
}

.form-message.success {
    background: rgba(48, 209, 88, 0.12);
    color: #30d158;
}

.form-message.error {
    background: rgba(255, 69, 58, 0.12);
    color: #ff453a;
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ——— Tablet / Mobile ——— */
@media (max-width: 1024px) {
    .projects-rail {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .project.featured {
        grid-column: span 2;
    }
}

@media (max-width: 960px) {
    .game-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .game-copy {
        order: 1;
        max-width: 420px;
        margin-inline: auto;
    }

    .arcade-stage { order: 2; }
    .character-panel { order: 3; }

    .game-tags { justify-content: center; }
    .game-copy .btn { margin-inline: auto; }

    .services-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links.desktop-nav {
        display: none;
    }

    .container,
    .container-wide,
    .hero-content {
        width: calc(100% - 28px);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .projects-rail {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.55rem;
    }

    .project,
    .project.featured {
        grid-column: auto;
        min-height: 140px;
        border-radius: 14px;
        padding: 1rem 0.9rem 1rem;
    }

    .project.featured .project-name,
    .project-name { font-size: 0.92rem; }
    .project-domain { font-size: 0.65rem; margin-bottom: 0.35rem; }
    .project-desc {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.75rem;
    }
    .project-arrow { display: none; }
    .project-meta { padding-top: 1.25rem; }

    .character-panel {
        max-width: 100%;
    }
    .character-frame {
        aspect-ratio: 4 / 5;
    }

    .project:active {
        transform: scale(0.98);
    }

    .service-wide {
        flex-direction: column;
        align-items: flex-start;
    }

    .radio-group,
    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-brand { font-size: 2.75rem; }
    .section { padding: 3.5rem 0; }
    .modal {
        padding: 1.5rem 1.15rem 1.25rem;
        border-radius: 18px;
    }

    .project-name {
        font-size: 0.8rem;
    }
}

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

/* ——— Extra animations & pages ——— */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.28), transparent 45%);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.btn-glow:hover::after { opacity: 1; }

.hero-scroll {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 22px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 14px;
    display: grid;
    place-items: start center;
    padding-top: 6px;
    animation: fadeIn 1.2s 1.2s both;
}

.hero-scroll span {
    width: 3px;
    height: 8px;
    border-radius: 3px;
    background: #fff;
    animation: scrollDot 1.6s ease-in-out infinite;
}

@keyframes scrollDot {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.float-soft {
    animation: floatSoft 5s ease-in-out infinite;
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.methods-section {
    background:
        radial-gradient(ellipse 50% 60% at 80% 20%, rgba(41,151,255,0.08), transparent 50%),
        #050506;
    border-block: 1px solid var(--line);
}

.methods-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.method-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.4rem;
    min-height: 220px;
    transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
}

.method-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}

.method-num {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--ink-tertiary);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.method-card h3 {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
}

.method-card p {
    color: var(--ink-secondary);
    font-size: 0.92rem;
}

.page-hero {
    padding: calc(var(--nav-h) + 3rem) 0 4.5rem;
}

.page-hero-copy {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-hero-copy .section-title {
    margin-bottom: 0.75rem;
}

.empty-note {
    color: var(--ink-secondary);
    text-align: center;
    grid-column: 1 / -1;
    padding: 2rem;
}

.empty-note code {
    color: #fff;
    background: #1c1c1e;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
}

/* Soft library */
.soft-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 880px;
    margin-inline: auto;
}

.soft-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 1.25rem;
    padding: 1.35rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}

.soft-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.soft-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--line);
}

.soft-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.soft-top {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.soft-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.soft-version {
    font-size: 0.75rem;
    color: var(--ink-tertiary);
    background: rgba(255,255,255,0.06);
    padding: 0.2rem 0.55rem;
    border-radius: 980px;
}

.soft-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
    font-size: 0.78rem;
    color: var(--ink-tertiary);
    margin-bottom: 0.65rem;
}

.soft-desc {
    color: var(--ink-secondary);
    font-size: 0.92rem;
    margin-bottom: 0.85rem;
}

.soft-changelog {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.soft-changelog strong {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-tertiary);
    margin-bottom: 0.4rem;
}

.soft-changelog pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--ink-secondary);
    line-height: 1.45;
}

/* Blog */
.blog-search {
    display: flex;
    gap: 0.65rem;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.blog-auth-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 920px;
    margin: 0 auto 2rem;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--ink-secondary);
    font-size: 0.9rem;
}

.blog-auth-bar > span a,
.blog-auth-bar > a { color: #c7c7cc; }
.blog-auth-bar .btn { margin-left: 0.4rem; }
.blog-auth-bar .btn-outline {
    color: #fff !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
    background: transparent;
}
.blog-auth-bar .btn-outline:hover {
    background: rgba(255,255,255,0.08);
    color: #fff !important;
}
.blog-auth-bar .btn-primary {
    color: #fff !important;
    background: #0071e3;
}
.blog-auth-bar .btn-primary:hover {
    background: #0077ed;
    color: #fff !important;
}
.auth-form .btn-primary {
    color: #fff !important;
    background: #0071e3;
}
.auth-form .btn-primary:hover {
    background: #0077ed;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 22px 50px rgba(0,0,0,0.4);
}

.blog-cover {
    aspect-ratio: 16 / 10;
    background: #111;
    overflow: hidden;
}

.blog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.blog-card:hover .blog-cover img {
    transform: scale(1.05);
}

.blog-card-body {
    padding: 1.25rem 1.3rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}

.blog-card-body time {
    font-size: 0.75rem;
    color: var(--ink-tertiary);
}

.blog-card-body h2 {
    font-size: 1.2rem;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.blog-card-body p {
    color: var(--ink-secondary);
    font-size: 0.9rem;
    flex: 1;
}

.blog-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #86868b;
    margin-top: 0.5rem;
}

/* Article */
.article-page {
    padding: calc(var(--nav-h) + 2.5rem) 0 4rem;
}

.article-narrow {
    max-width: 760px;
}

.back-link {
    display: inline-block;
    color: #86868b;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.back-link:hover { color: #fff; }

.article-header time {
    color: var(--ink-tertiary);
    font-size: 0.85rem;
}

.article-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin: 0.75rem 0;
}

.article-excerpt {
    font-size: 1.1rem;
    color: var(--ink-secondary);
    margin-bottom: 1.25rem;
}

.article-byline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.article-byline img {
    border-radius: 50%;
    border: 1px solid var(--line);
}

.article-byline strong { display: block; font-size: 0.95rem; }
.article-byline span { font-size: 0.8rem; color: var(--ink-tertiary); }

.article-cover {
    margin: 0 0 2rem;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.article-cover img {
    width: 100%;
    height: auto;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(245,245,247,0.9);
}

.article-content p,
.article-content ul,
.article-content figure {
    margin-bottom: 1.25rem;
}

.article-content ul {
    padding-left: 1.2rem;
}

.article-content a {
    color: #a1a1a6;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content a:hover { color: #fff; }

.article-content img {
    max-width: 100%;
    border-radius: 14px;
}

.article-content figcaption {
    font-size: 0.85rem;
    color: var(--ink-tertiary);
    margin-top: 0.5rem;
}

.article-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 2.5rem 0 2rem;
    padding: 1.1rem 1.2rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
}

.article-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #86868b;
}

.comments h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.comments-login {
    color: var(--ink-secondary);
    margin-bottom: 1.5rem;
}

.comments-login a { color: #a1a1a6; text-decoration: underline; }

.comment-item {
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}

.comment-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.comment-head time {
    color: var(--ink-tertiary);
    font-size: 0.78rem;
}

.comment-item p {
    color: var(--ink-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-wrap {
    max-width: 420px;
    margin-inline: auto;
    text-align: center;
}

.auth-form {
    text-align: left;
    margin-top: 1.5rem;
}

.auth-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-switch {
    margin-top: 1.25rem;
    color: var(--ink-secondary);
    font-size: 0.9rem;
}

.auth-switch a { color: #a1a1a6; text-decoration: underline; }

.contact-link span,
.contact-link em,
.footer-links a {
    color: #86868b;
}

.footer-links a:hover,
.contact-link:hover em {
    color: #c7c7cc;
}

.contact-link em { color: #86868b; }

@media (max-width: 960px) {
    .methods-grid {
        grid-template-columns: 1fr 1fr;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .methods-grid {
        grid-template-columns: 1fr;
    }
    .soft-card {
        grid-template-columns: 1fr;
    }
    .soft-icon {
        width: 64px;
        height: 64px;
    }
    .blog-search {
        flex-direction: column;
    }
    .hero-scroll { display: none; }
}
