/* ============================================
   DILEMMA.STUDIO - Cyberpunk Game Studio
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --void-black: #0a0a0f;
    --electric-cyan: #00f0ff;
    --warning-magenta: #ff2d6b;
    --terminal-green: #39ff14;
    --gunmetal: #1a1a2e;
    --ash: #8a8a9a;
    --cyan-60: rgba(0, 240, 255, 0.6);
    --cyan-20: rgba(0, 240, 255, 0.2);
    --magenta-30: rgba(255, 45, 107, 0.3);
    --green-10: rgba(57, 255, 20, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void-black);
    color: var(--ash);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    overflow-x: hidden;
    cursor: default;
}

/* --- Scanline Overlay --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.05) 2px,
        rgba(0, 0, 0, 0.05) 3px
    );
    opacity: 0;
    transition: opacity 0.8s ease;
}

.scanlines.active {
    opacity: 1;
}

/* --- HUD Overlay --- */
.hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.hud-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hud-corner.active {
    opacity: 1;
}

.hud-top-left {
    top: 16px;
    left: 16px;
    border-top: 2px solid var(--cyan-60);
    border-left: 2px solid var(--cyan-60);
}

.hud-top-right {
    top: 16px;
    right: 16px;
    border-top: 2px solid var(--cyan-60);
    border-right: 2px solid var(--cyan-60);
}

.hud-bottom-left {
    bottom: 16px;
    left: 16px;
    border-bottom: 2px solid var(--cyan-60);
    border-left: 2px solid var(--cyan-60);
}

.hud-bottom-right {
    bottom: 16px;
    right: 16px;
    border-bottom: 2px solid var(--cyan-60);
    border-right: 2px solid var(--cyan-60);
}

.hud-label {
    position: absolute;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--cyan-60);
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

.hud-label.active {
    opacity: 1;
}

.hud-label-top {
    top: 20px;
    left: 70px;
}

.hud-label-bottom {
    bottom: 20px;
    right: 70px;
}

/* --- Boot Sequence Overlay --- */
.boot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--void-black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
}

.boot-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.boot-overlay.hidden {
    display: none;
}

.boot-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--terminal-green);
    white-space: pre-wrap;
    max-width: 600px;
    padding: 2rem;
    line-height: 1.8;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: crosshair;
}

.binary-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.rain-column {
    position: absolute;
    top: -100%;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: var(--terminal-green);
    opacity: 0.08;
    writing-mode: vertical-lr;
    animation: rain-fall linear infinite;
    white-space: nowrap;
}

@keyframes rain-fall {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(250vh);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.studio-name {
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--electric-cyan);
    position: relative;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.studio-name.visible {
    opacity: 1;
}

/* Glitch effect */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-text::before {
    color: var(--warning-magenta);
    z-index: -1;
}

.glitch-text::after {
    color: var(--electric-cyan);
    z-index: -1;
}

.glitch-text.glitching::before {
    opacity: 0.8;
    animation: glitch-shift-1 200ms steps(2) forwards;
}

.glitch-text.glitching::after {
    opacity: 0.8;
    animation: glitch-shift-2 200ms steps(2) forwards;
}

@keyframes glitch-shift-1 {
    0% {
        clip-path: inset(0 0 66% 0);
        transform: translateX(-5px);
    }
    25% {
        clip-path: inset(33% 0 33% 0);
        transform: translateX(4px);
    }
    50% {
        clip-path: inset(66% 0 0 0);
        transform: translateX(-3px);
    }
    75% {
        clip-path: inset(10% 0 60% 0);
        transform: translateX(5px);
    }
    100% {
        clip-path: inset(0 0 66% 0);
        transform: translateX(-4px);
    }
}

@keyframes glitch-shift-2 {
    0% {
        clip-path: inset(66% 0 0 0);
        transform: translateX(5px);
    }
    25% {
        clip-path: inset(0 0 66% 0);
        transform: translateX(-3px);
    }
    50% {
        clip-path: inset(33% 0 33% 0);
        transform: translateX(4px);
    }
    75% {
        clip-path: inset(55% 0 10% 0);
        transform: translateX(-5px);
    }
    100% {
        clip-path: inset(66% 0 0 0);
        transform: translateX(3px);
    }
}

.studio-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.5rem;
    color: var(--ash);
    margin-top: -0.5rem;
    letter-spacing: 0.3em;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.studio-tagline.visible {
    opacity: 1;
}

.studio-desc {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: var(--ash);
    margin-top: 1.5rem;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.studio-desc.visible {
    opacity: 1;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
}

.hero-scroll-hint.visible {
    opacity: 1;
}

.scroll-arrow {
    font-size: 1.5rem;
    color: var(--electric-cyan);
    animation: bounce-arrow 1.5s ease-in-out infinite;
}

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

.scroll-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: var(--cyan-60);
    letter-spacing: 0.2em;
}

/* --- Portfolio Section --- */
.portfolio {
    position: relative;
    padding: 80px 0 80px 0;
    overflow: hidden;
}

.section-header {
    padding: 0 60px;
    margin-bottom: 40px;
}

.section-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--terminal-green);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--electric-cyan);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.gallery-container {
    display: flex;
    gap: 24px;
    padding: 0 60px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 20px;
}

.gallery-container::-webkit-scrollbar {
    display: none;
}

.game-card {
    flex: 0 0 auto;
    width: 300px;
    aspect-ratio: 9 / 16;
    scroll-snap-align: center;
    perspective: 1000px;
}

.card-inner {
    width: 100%;
    height: 100%;
    background: var(--gunmetal);
    border: 1px solid var(--cyan-20);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.card-inner:hover {
    box-shadow: 0 0 30px var(--cyan-20), inset 0 0 30px rgba(0, 240, 255, 0.03);
}

/* HUD brackets on cards */
.card-inner::before,
.card-inner::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 3;
    pointer-events: none;
}

.card-inner::before {
    top: 8px;
    left: 8px;
    border-top: 1px solid var(--cyan-60);
    border-left: 1px solid var(--cyan-60);
}

.card-inner::after {
    bottom: 8px;
    right: 8px;
    border-bottom: 1px solid var(--cyan-60);
    border-right: 1px solid var(--cyan-60);
}

.card-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-visual-1 {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
}
.card-visual-2 {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a0a1e 50%, #0a0a0f 100%);
}
.card-visual-3 {
    background: linear-gradient(135deg, #0a0a0f 0%, #0a1a0e 50%, #0a0a0f 100%);
}
.card-visual-4 {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0a1a 100%);
}
.card-visual-5 {
    background: linear-gradient(135deg, #0a0a0f 0%, #0a1a2e 50%, #0a0a0f 100%);
}
.card-visual-6 {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a0a0e 50%, #0a0a0f 100%);
}

.card-icon {
    font-size: 4rem;
    opacity: 0.3;
    filter: grayscale(0.5);
}

.card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-status {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: var(--terminal-green);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.card-status.status-dev {
    color: var(--warning-magenta);
}

.card-status.status-proto {
    color: var(--electric-cyan);
}

.card-title {
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-desc {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--ash);
    line-height: 1.6;
}

.card-genre {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: var(--cyan-60);
    letter-spacing: 0.15em;
    margin-top: 4px;
}

.gallery-nav {
    display: flex;
    gap: 16px;
    padding: 24px 60px 0 60px;
}

.gallery-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--electric-cyan);
    background: transparent;
    border: 1px solid var(--cyan-60);
    padding: 10px 24px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.gallery-btn:hover {
    background: var(--electric-cyan);
    color: var(--void-black);
}

/* --- About Section --- */
.about {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 80px 40px;
    background: linear-gradient(180deg, var(--void-black) 0%, #0d0d18 50%, var(--void-black) 100%);
}

.about-layers {
    position: relative;
    width: 100%;
    max-width: 900px;
}

.about-layer {
    transition: transform 0.1s ease-out;
}

.layer-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.floating-code {
    position: absolute;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--terminal-green);
    opacity: 0.12;
    white-space: nowrap;
}

.floating-code:nth-child(1) {
    top: 10%;
    left: -5%;
}

.floating-code.code-right {
    top: 50%;
    right: -10%;
    left: auto;
}

.floating-code.code-low {
    bottom: 10%;
    top: auto;
    left: 10%;
}

.layer-mid {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.about-title {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--electric-cyan);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.layer-front {
    position: relative;
    z-index: 2;
}

.about-text-block {
    position: relative;
    padding: 2rem;
    border-left: 2px solid var(--cyan-60);
}

.about-text-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1px;
    width: 20px;
    height: 2px;
    background: var(--cyan-60);
}

.about-text-block::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -1px;
    width: 20px;
    height: 2px;
    background: var(--cyan-60);
}

.about-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    color: var(--ash);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* --- Contact / Footer --- */
.contact {
    position: relative;
    padding: 80px 40px;
    text-align: center;
    border-top: 1px solid var(--cyan-20);
}

.contact-inner {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.contact-hud-bracket {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 30px auto;
}

.contact-hud-bracket::before,
.contact-hud-bracket::after {
    content: '';
    position: absolute;
}

.contact-hud-bracket::before {
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--cyan-60);
    border-left: 2px solid var(--cyan-60);
}

.contact-hud-bracket::after {
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--cyan-60);
    border-right: 2px solid var(--cyan-60);
}

.contact-title {
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 2rem;
    color: var(--electric-cyan);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.contact-email {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    color: var(--warning-magenta);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.contact-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.contact-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--electric-cyan);
    text-decoration: none;
    letter-spacing: 0.15em;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--terminal-green);
}

.contact-sep {
    color: var(--ash);
    opacity: 0.4;
}

.contact-copy {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: var(--ash);
    opacity: 0.5;
    letter-spacing: 0.1em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-header {
        padding: 0 24px;
    }

    .gallery-container {
        padding: 0 24px;
        gap: 16px;
    }

    .game-card {
        width: 240px;
    }

    .gallery-nav {
        padding: 24px 24px 0 24px;
    }

    .about {
        padding: 60px 24px;
    }

    .contact {
        padding: 60px 24px;
    }
}

@media (max-width: 480px) {
    .game-card {
        width: 200px;
    }

    .hud-corner {
        width: 24px;
        height: 24px;
    }

    .hud-label {
        display: none;
    }
}
