/* Landing Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Mono:wght@400;700&display=swap');

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

body {
    font-family: 'Space Mono', monospace;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    cursor: crosshair;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 1s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    text-align: center;
}

.neural-network {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border: 3px solid #00ffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Space Background */
#space-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

/* Landing Content */
.landing-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Glitch Effect */
.glitch-wrapper {
    margin-bottom: 30px;
}

.glitch {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    position: relative;
    color: #fff;
    letter-spacing: 5px;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

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

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #00ffff;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #ff00ff;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); }
    20% { clip-path: inset(20% 0 30% 0); }
    40% { clip-path: inset(50% 0 20% 0); }
    60% { clip-path: inset(10% 0 60% 0); }
    80% { clip-path: inset(80% 0 5% 0); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(30% 0 40% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(5% 0 70% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(60% 0 20% 0); transform: translate(-2px, -2px); }
    80% { clip-path: inset(15% 0 50% 0); transform: translate(2px, 2px); }
}

@keyframes glitch-skew {
    0%, 100% { transform: skew(0deg); }
    20% { transform: skew(-2deg); }
    40% { transform: skew(1deg); }
    60% { transform: skew(-1deg); }
    80% { transform: skew(2deg); }
}

/* Typing Animation */
.subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typed-text {
    color: #00ffff;
}

.cursor {
    display: inline-block;
    margin-left: 3px;
    width: 3px;
    animation: blink 1s infinite;
}

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

/* Bio Preview */
.bio-preview {
    max-width: 800px;
    padding: 30px;
    margin: 30px auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

.glassmorphism {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* Tech Stack Float */
.tech-stack-float {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.tech-icon {
    position: absolute;
    font-size: 2rem;
    color: rgba(0, 255, 255, 0.3);
    animation: float-random 20s infinite linear;
}

.tech-icon:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.tech-icon:nth-child(2) { top: 60%; left: 80%; animation-delay: 3s; }
.tech-icon:nth-child(3) { top: 30%; right: 15%; animation-delay: 6s; }
.tech-icon:nth-child(4) { bottom: 20%; left: 20%; animation-delay: 9s; }
.tech-icon:nth-child(5) { top: 50%; right: 30%; animation-delay: 12s; }

@keyframes float-random {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(100px, -100px) rotate(90deg); }
    50% { transform: translate(-100px, -200px) rotate(180deg); }
    75% { transform: translate(-200px, 100px) rotate(270deg); }
}

/* Enter Button */
.enter-portfolio {
    position: relative;
    padding: 20px 60px;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border: none;
    border-radius: 50px;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.enter-portfolio:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
}

.enter-portfolio span {
    position: relative;
    z-index: 2;
}

.button-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    z-index: 1;
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;          
    margin: 24px auto 0;   
    width: fit-content;    
    text-align: center;
    animation: bounce 2s infinite;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid #00ffff;
    border-radius: 15px;
    margin: 0 auto 10px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 8px;
    background: #00ffff;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

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

@keyframes scroll {
    0% { opacity: 0; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

/* Responsive */
@media (max-width: 768px) {
    .glitch {
        font-size: 3rem;
        letter-spacing: 2px;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .bio-preview {
        font-size: 1rem;
        padding: 20px;
    }
    
    .enter-portfolio {
        padding: 15px 40px;
        font-size: 1rem;
    }
}

/* ======== Responsive: phones & small tablets ======== */
@media (max-width: 768px) {
  /* Big title + typed line: scale cleanly without overflow */
  /* This grouped selector is non-destructive: it targets whichever exists */
  #home h1, .hero h1, .main-title, .title, .name-title, h1 {
    font-size: clamp(36px, 10vw, 96px);
    line-height: 1.05;
    text-align: center;
    word-break: keep-all;
  }

  .subtitle, .typed, .typed-text, #typed-text, h2 {
    font-size: clamp(16px, 4.5vw, 22px);
    line-height: 1.25;
    text-align: center;
  }

  /* The dark summary box under the title */
  .summary, .tagline, .intro-banner, .hero-card, .summary-box {
    max-width: min(92vw, 680px);
    margin-left: auto;
    margin-right: auto;
    padding: clamp(12px, 3.5vw, 20px) clamp(14px, 4vw, 22px);
    box-sizing: border-box;
  }

  /* CTA button: sized for thumbs, never off-screen */
  .enter-portfolio {
    width: min(88vw, 340px);
    padding: 14px 20px;
    font-size: clamp(14px, 4.2vw, 18px);
    border-radius: 28px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Scroll indicator: tighter spacing on phones (we already centered it) */
  .scroll-indicator {
    margin-top: 16px;
    gap: 6px;
  }

  /* Ensure no horizontal scrollbars on small devices */
  html, body {
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  /* Slightly smaller on very narrow devices */
  #home h1, .hero h1, .main-title, .title, .name-title, h1 {
    font-size: clamp(32px, 12vw, 80px);
  }
  .enter-portfolio {
    width: min(92vw, 320px);
    font-size: clamp(14px, 4.6vw, 17px);
  }
}
