:root {
    --bg: #0f1117;
    --bg-elevated: #161922;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --accent-start: #6366f1;
    --accent-end: #06b6d4;
    --border: rgba(148, 163, 184, 0.15);
    --radius: 16px;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    margin: 0;
    min-height: 100%;
}

body.gateway-page {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

.gateway-bg__canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.gateway-bg__orbs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.gateway-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: gatewayOrbFloat 18s ease-in-out infinite;
}

.gateway-bg__orb--one {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -80px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.55), transparent 70%);
}

.gateway-bg__orb--two {
    width: 360px;
    height: 360px;
    bottom: -100px;
    right: -60px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.5), transparent 70%);
    animation-delay: -6s;
}

.gateway-bg__orb--three {
    width: 280px;
    height: 280px;
    top: 40%;
    left: 55%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 70%);
    animation-delay: -12s;
}

.gateway-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.25rem 4rem;
}

.gateway-header {
    text-align: center;
    max-width: 720px;
    margin-bottom: 2.5rem;
}

.gateway-header__label {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-end);
}

.gateway-header__label span {
    color: var(--text);
}

.gateway-header__title {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--text), var(--accent-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gateway-header__subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    line-height: 1.6;
}

.gateway-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    width: min(1100px, 100%);
}

.gateway-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
    background: rgba(22, 25, 34, 0.82);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    cursor: pointer;
}

.gateway-card,
.gateway-card:visited,
.gateway-card:hover,
.gateway-card:focus-visible {
    text-decoration: none;
    color: var(--text);
}

.gateway-card__glow {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(6, 182, 212, 0.45));
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 0;
}

.gateway-card__frame {
    position: relative;
    z-index: 1;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0b0d12;
}

.gateway-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gateway-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.gateway-card__placeholder--portfolio {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(15, 17, 23, 0.9));
}

.gateway-card__placeholder--unity {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.35), rgba(15, 17, 23, 0.9));
}

.gateway-card__content {
    position: relative;
    z-index: 1;
    padding: 1.25rem 1.35rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.gateway-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.gateway-card__subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.gateway-card__cta {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-end);
    transition: color var(--transition);
}

.gateway-card:hover,
.gateway-card:focus-visible,
.gateway-card.is-hovered {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 28px 60px rgba(6, 182, 212, 0.18), 0 0 40px rgba(99, 102, 241, 0.12);
}

.gateway-card:hover .gateway-card__glow,
.gateway-card:focus-visible .gateway-card__glow,
.gateway-card.is-hovered .gateway-card__glow {
    opacity: 0.55;
}

.gateway-card:hover .gateway-card__image,
.gateway-card:focus-visible .gateway-card__image,
.gateway-card.is-hovered .gateway-card__image {
    transform: scale(1.06);
}

.gateway-card:hover .gateway-card__cta,
.gateway-card:focus-visible .gateway-card__cta,
.gateway-card.is-hovered .gateway-card__cta {
    color: var(--accent-start);
}

.gateway-card:focus-visible {
    outline: 2px solid var(--accent-end);
    outline-offset: 4px;
}

.gateway-animate {
    opacity: 0;
    transform: translateY(28px);
    animation: gatewayCardIn 0.85s ease forwards;
}

.gateway-animate--delay-1 { animation-delay: 0.15s; }
.gateway-animate--delay-2 { animation-delay: 0.3s; }

@keyframes gatewayCardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gatewayOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(24px, -18px) scale(1.08); }
}

.cursor-sparkle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(circle, var(--accent-end), transparent);
    animation: cursorSparkle 0.6s ease-out forwards;
    transform: translate(-50%, -50%);
}

.cursor-glow {
    position: fixed;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.35), transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

@keyframes cursorSparkle {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
}

@media (max-width: 900px) {
    .gateway-cards {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
}

@media (max-width: 600px) {
    .gateway-main {
        padding-top: 2rem;
    }

    .gateway-header {
        margin-bottom: 1.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gateway-animate,
    .gateway-bg__orb {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .gateway-card,
    .gateway-card__image {
        transition: none;
    }

    .cursor-sparkle,
    .cursor-glow {
        display: none;
    }
}

@media (pointer: coarse) {
    .cursor-sparkle,
    .cursor-glow {
        display: none;
    }
}
