/* ============================================
   HERO SECTION - MOBILE FIX COMPLETE
   ============================================ */

.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 0 3rem;
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
    box-sizing: border-box;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 240, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(252, 191, 73, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(214, 40, 40, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(0,240,255,0.02) 50%, transparent 100%);
    pointer-events: none;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hero-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1.5rem var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Hero Text */
.hero-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-greeting {
    color: var(--cyber-neon);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    flex-wrap: wrap;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    min-height: 3.8rem;
    color: var(--text-light);
    letter-spacing: -1px;
}

.typing-text {
    background: linear-gradient(135deg, var(--cyber-text) 0%, var(--golden) 50%, var(--cyber-neon) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cursor {
    color: var(--cyber-neon);
    animation: blink 1s infinite;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 500px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.hero-socials {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Code Window - Desktop */
.code-window {
    background: rgba(5, 7, 20, 0.8);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--cyber-border);
    width: 100%;
    max-width: 420px;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: var(--transition-slow);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.5),
        0 0 0 1px rgba(252, 191, 73, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.6),
        0 0 30px rgba(0, 240, 255, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.1);
    border-color: rgba(0, 240, 255, 0.3);
}

.window-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--cyber-border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.dot.red { background: var(--vibrant-red); }
.dot.yellow { background: var(--golden); }
.dot.green { background: #10B981; }

.window-title {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-body {
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    overflow-x: auto;
    color: var(--cyber-text);
}

.window-body pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.85rem;
    line-height: 1.7;
}

/* Code Syntax Colors */
.code-keyword { color: var(--cyber-neon); text-shadow: 0 0 5px rgba(0, 240, 255, 0.3); }
.code-variable { color: #9cdcfe; }
.code-property { color: var(--text-light); }
.code-string { color: var(--golden); }
.code-number { color: #b5cea8; }
.code-boolean { color: var(--bright-red); }

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 2;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--cyber-neon);
    border-radius: 15px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--cyber-neon);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================
   TABLET BREAKPOINT - 1024px
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-socials {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .code-window {
        max-width: 380px;
        transform: perspective(1000px) rotateY(-3deg) rotateX(3deg);
    }
}

/* ============================================
   MOBILE BREAKPOINT - 768px
   ============================================ */
@media (max-width: 768px) {
    .hero {
        padding: 72px 0 2.5rem;
        min-height: auto;
    }

    .hero-content {
        padding: 1.5rem 1rem;
        gap: 2rem;
    }

    .hero-text {
        gap: 0.875rem;
    }

    .hero-greeting {
        font-size: 0.9rem;
        letter-spacing: 1px;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
        min-height: 2.6rem;
        line-height: 1.25;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.65;
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0.5rem auto;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        padding: 0.875rem 1.25rem;
    }

    .hero-socials {
        justify-content: center;
        margin-top: 0.75rem;
    }

    /* Code Window Mobile - Fixed */
    .hero-image {
        width: 100%;
        max-width: 100%;
    }

    .code-window {
        max-width: 100%;
        width: 100%;
        transform: none;
        border-radius: 10px;
    }

    .window-header {
        padding: 0.625rem 0.875rem;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .window-title {
        font-size: 0.75rem;
        max-width: 120px;
    }

    .window-body {
        padding: 1rem;
        font-size: 0.75rem;
        line-height: 1.6;
    }

    .window-body pre {
        font-size: 0.75rem;
        line-height: 1.6;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ============================================
   SMALL MOBILE - 480px
   ============================================ */
@media (max-width: 480px) {
    .hero {
        padding: 68px 0 2rem;
    }

    .hero-content {
        padding: 1.25rem 0.875rem;
        gap: 1.5rem;
    }

    .hero-greeting {
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }

    .hero-title {
        font-size: 1.75rem;
        min-height: 2.3rem;
    }

    .hero-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .hero-buttons {
        max-width: 260px;
        gap: 0.625rem;
    }

    .hero-buttons .btn {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Code Window Small */
    .code-window {
        border-radius: 8px;
    }

    .window-header {
        padding: 0.5rem 0.75rem;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .window-title {
        font-size: 0.7rem;
        max-width: 100px;
    }

    .window-body {
        padding: 0.875rem;
        font-size: 0.7rem;
        line-height: 1.55;
    }

    .window-body pre {
        font-size: 0.7rem;
        line-height: 1.55;
    }
}

/* ============================================
   EXTRA SMALL MOBILE - 375px
   ============================================ */
@media (max-width: 375px) {
    .hero {
        padding: 64px 0 1.5rem;
    }

    .hero-content {
        padding: 1rem 0.75rem;
        gap: 1.25rem;
    }

    .hero-greeting {
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: 1.5rem;
        min-height: 2rem;
    }

    .hero-description {
        font-size: 0.85rem;
    }

    .hero-buttons {
        max-width: 240px;
    }

    .hero-buttons .btn {
        padding: 0.7rem 0.875rem;
        font-size: 0.75rem;
    }

    /* Code Window Extra Small */
    .window-header {
        padding: 0.5rem 0.625rem;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .window-title {
        font-size: 0.65rem;
        max-width: 80px;
    }

    .window-body {
        padding: 0.75rem;
        font-size: 0.65rem;
        line-height: 1.5;
    }

    .window-body pre {
        font-size: 0.65rem;
        line-height: 1.5;
    }
}

/* ============================================
   TINY MOBILE - 320px
   ============================================ */
@media (max-width: 320px) {
    .hero {
        padding: 60px 0 1.5rem;
    }

    .hero-content {
        padding: 0.875rem 0.5rem;
        gap: 1rem;
    }

    .hero-title {
        font-size: 1.35rem;
        min-height: 1.8rem;
    }

    .hero-description {
        font-size: 0.8rem;
    }

    /* Code Window Tiny */
    .window-header {
        padding: 0.4rem 0.5rem;
    }

    .window-title {
        font-size: 0.6rem;
        max-width: 70px;
    }

    .window-body {
        padding: 0.625rem;
        font-size: 0.6rem;
        line-height: 1.45;
    }

    .window-body pre {
        font-size: 0.6rem;
        line-height: 1.45;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 60px 0 2rem;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: start;
    }

    .hero-image {
        order: 0;
    }

    .code-window {
        max-width: 280px;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ============================================
   SAFE AREA INSETS (Notch devices)
   ============================================ */
@supports (padding: max(0px)) {
    .hero {
        padding-top: max(80px, env(safe-area-inset-top) + 60px);
    }

    @media (max-width: 768px) {
        .hero {
            padding-top: max(72px, env(safe-area-inset-top) + 56px);
        }
    }

    @media (max-width: 480px) {
        .hero {
            padding-top: max(68px, env(safe-area-inset-top) + 52px);
        }
    }

    @media (max-width: 375px) {
        .hero {
            padding-top: max(64px, env(safe-area-inset-top) + 48px);
        }
    }

    @media (max-width: 320px) {
        .hero {
            padding-top: max(60px, env(safe-area-inset-top) + 44px);
        }
    }
}
