/* ================================
   BLACK & WHITE SPACE THEME
   ================================ */

:root {
    --black: #000000;
    --white: #ffffff;
    --gray: #808080;
    --light-gray: #cccccc;
    --dark-gray: #333333;

    --font-mono: 'Courier New', 'Monaco', monospace;
}

/* ================================
   STARFIELD CANVAS
   ================================ */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--black);
}

/* ================================
   RESET
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    cursor: none;
}

/* ================================
   CUSTOM CURSOR
   ================================ */
body::after {
    content: '█';
    position: fixed;
    font-size: 16px;
    color: var(--white);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ================================
   NAVIGATION
   ================================ */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    background: var(--black);
    border-bottom: 1px solid var(--white);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 18px;
    font-weight: bold;
}

.nav-logo::before {
    content: '> ';
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    position: relative;
}

.nav-link::before {
    content: '[ ';
    opacity: 0;
    transition: opacity 0.2s;
}

.nav-link::after {
    content: ' ]';
    opacity: 0;
    transition: opacity 0.2s;
}

.nav-link:hover::before,
.nav-link:hover::after,
.nav-link.active::before,
.nav-link.active::after {
    opacity: 1;
}

.nav-link:hover {
    background: var(--white);
    color: var(--black);
    padding: 0 5px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--white);
}

/* ================================
   HERO SECTION
   ================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 120px 40px 40px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-content {
    width: 100%;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: normal;
    white-space: pre;
}

.ascii-art {
    font-size: 12px;
    line-height: 1.2;
    margin-bottom: 30px;
    white-space: pre;
    font-family: var(--font-mono);
}

.hero-subtitle {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--light-gray);
}

.typewriter {
    display: inline-block;
    border-right: 2px solid var(--white);
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
    50% { border-color: transparent; }
}

.hero-info {
    margin-top: 30px;
    border: 1px solid var(--white);
    padding: 20px;
    max-width: 600px;
}

.hero-info p {
    margin-bottom: 10px;
}

.hero-info p:last-child {
    margin-bottom: 0;
}

.hero-cta {
    margin-top: 30px;
}

.cta-btn {
    display: inline-block;
    padding: 12px 30px;
    color: var(--black);
    background: var(--white);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s;
    border: 2px solid var(--white);
}

.cta-btn:hover {
    background: var(--black);
    color: var(--white);
}

.cta-btn::before {
    content: '>> ';
}

/* ================================
   CONTENT SECTION
   ================================ */
.content {
    padding: 80px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.container {
    width: 100%;
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--white);
    padding-bottom: 10px;
}

.section-title::before {
    content: '# ';
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    border: 1px solid var(--white);
    padding: 30px;
    transition: all 0.3s;
    background: var(--black);
}

.card:hover {
    background: var(--white);
    color: var(--black);
    transform: translate(5px, -5px);
    box-shadow: -5px 5px 0 var(--white);
}

.card:hover .project-link {
    color: var(--black);
    background: transparent;
}

.card:hover .project-link:hover {
    background: var(--black);
    color: var(--white);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: normal;
}

.card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: bold;
}

.card h3::before {
    content: '└─ ';
}

.card p {
    font-size: 14px;
    line-height: 1.6;
}

/* ================================
   TRANSITIONS
   ================================ */
.wormhole {
    display: none;
}

/* ================================
   SCROLL INDICATOR
   ================================ */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 12px;
}

.scroll-line {
    width: 2px;
    height: 30px;
    background: var(--white);
    margin: 0 auto 10px auto;
}

/* ================================
   BLACKHOLE (CONVERT TO ASCII)
   ================================ */
.blackhole {
    display: none;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    body::after {
        display: none;
    }

    .nav {
        padding: 15px 20px;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        background: var(--black);
        width: 100%;
        padding: 20px;
        border-bottom: 1px solid var(--white);
        transition: left 0.3s;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 20px 40px 20px;
    }

    .hero-title {
        font-size: 28px;
    }

    .ascii-art {
        font-size: 8px;
    }

    .content {
        padding: 60px 20px;
    }

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

/* ================================
   BLACKHOLE
   ================================ */
.blackhole {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    z-index: -1;
    pointer-events: none;
}

.blackhole-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--black);
    border-radius: 50%;
    box-shadow: 0 0 40px 20px rgba(255, 255, 255, 0.3);
}

.accretion-disk {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 2px solid var(--white);
    border-radius: 50%;
    opacity: 0.6;
    animation: rotate 20s linear infinite;
}

.accretion-disk:nth-child(2) {
    width: 250px;
    height: 250px;
    opacity: 0.4;
    animation: rotate 15s linear infinite reverse;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ================================
   SPACESHIP PAGE TRANSITIONS
   ================================ */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
}

.spaceship {
    position: absolute;
    top: 50%;
    left: -100px;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 24px;
    color: var(--white);
    white-space: pre;
    line-height: 1;
    z-index: 10001;
}


.laser {
    position: absolute;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 20px;
    color: var(--white);
    z-index: 10000;
    opacity: 1;
}

.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9998;
}

/* Slide animations */
body.sliding-out .hero,
body.sliding-out .content,
body.sliding-out .blackhole {
    animation: slideOutRight 1.5s linear forwards;
}

/* Keep nav visible and interactive during transitions */
body.sliding-out .nav,
html.page-loading .nav,
html.page-enter .nav {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: none;
}

/* Initially hide content when transitioning */
html.page-loading .hero,
html.page-loading .content,
html.page-loading .blackhole {
    transform: translateX(-100vw) !important;
    opacity: 0 !important;
}

html.page-enter .hero,
html.page-enter .content,
html.page-enter .blackhole {
    animation: slideInFromLeft 0.8s ease-out forwards;
}

/* Prevent flash on initial load during transitions */
.hero, .content, .blackhole {
    will-change: transform, opacity;
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100vw);
        opacity: 0;
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100vw);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes meteorFly {
    0% {
        transform: translate(-20vw, -20vh) rotate(20deg) scale(0.8);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    20% {
        transform: translate(20vw, 10vh) rotate(20deg) scale(1);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translate(140vw, 90vh) rotate(20deg) scale(1.1);
        opacity: 0;
    }
}

@keyframes spaceshipChase {
    0% {
        left: -150px;
        opacity: 1;
    }
    100% {
        left: calc(100vw + 150px);
        opacity: 1;
    }
}


