/* =========================================
   BLACKJACK_QWQ PORTFOLIO - MASTER STYLESHEET
   ========================================= */

/* --- MODULE IMPORTS --- */
@import url('LandingPage/Home.css');
@import url('LandingPage/About.css');
@import url('LandingPage/Projects.css');
@import url('LandingPage/Skills.css');
@import url('LandingPage/Contact.css');

/* --- GLOBAL VARIABLES --- */
:root {
    --bg: #05000a;
    --surface: #120024;
    --border: #2a0a4a;
    --text-primary: #f3e8ff;
    --text-secondary: #c0a0e0;
    --accent: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.5);
    --danger: #ff003c;
    --danger-glow: rgba(255, 0, 60, 0.5);
    --success: #00ff9d;
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    
    /* THE VOID: Space that user is not supposed to see */
    --gap-void: 15vh; 
    
    /* NAV GAP: Space between Profile Card and Nav Bar */
    --gap-nav: 1rem;
}

/* --- RESET & BASIC SETUP --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    /* PREVENT TEXT SELECTION (Fixes accidental highlighting) */
    user-select: none;
    -webkit-user-select: none;
}

/* >>> GLOBAL CURSOR REMOVAL <<< 
   Forces the system cursor to be hidden on EVERY element.
   This ensures only the custom JS cursor is seen.
*/
*, html, body, a, button, input, textarea, .dot, canvas { 
    cursor: none !important; 
}

body { 
    background-color: var(--bg); 
    color: var(--text-primary); 
    font-family: var(--font-main); 
    overflow-x: hidden; /* Prevent horizontal scroll */
    background-image: linear-gradient(rgba(168, 85, 247, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(168, 85, 247, 0.03) 1px, transparent 1px); 
    background-size: 30px 30px; 
}

/* --- SCROLL CONTAINER --- */
.scroll-container { 
    height: 100vh; 
    width: 100%; 
    overflow-y: scroll; 
    scroll-snap-type: y mandatory; 
    scroll-behavior: smooth; 
}

/* =========================================
   THE "LINE - VOID - LINE" ARCHITECTURE
   ========================================= */

section { 
    /* 1. SNAP: Snap the top of the section to the top of the viewport */
    scroll-snap-align: start;
    
    /* 2. FIT: Height is auto so lines hug the content */
    min-height: auto; 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; 
    align-items: center; 
    position: relative; 
    
    /* 3. LINES: Top and Bottom borders for standard sections */
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    
    /* 4. THE VOID: Margin strictly OUTSIDE the section (between bottom line and next top line) */
    margin-bottom: var(--gap-void); 
    
    /* 5. INTERNAL SPACING */
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* --- EXCEPTION 1: HOME SECTION --- */
#home {
    /* No borders on the Home section itself (Nav Bar handles the bottom boundary) */
    border-top: none;
    border-bottom: none; 
    
    /* SPACE: Separates Profile Card from Nav Bar */
    margin-bottom: var(--gap-nav); 
    
    padding-top: 0;
    padding-bottom: 0;
}

/* --- NAVIGATION BAR --- */
.main-nav { 
    position: sticky; 
    top: 20px; 
    z-index: 1000; 
    margin: 0 auto;
    width: fit-content; 
    
    /* VISUAL: This acts as the "Bottom Line" for the Top Unit */
    border-bottom: 1px solid var(--border);
    
    /* SPACE: The Void starts AFTER the nav bar */
    margin-bottom: var(--gap-void); 
    
    background: rgba(18, 0, 36, 0.95); 
    backdrop-filter: blur(15px); 
    padding: 1rem 3.5rem; 
    border-radius: 50px; 
    border: 1px solid var(--border); 
    display: flex; 
    gap: 2rem; 
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6); 
    transition: all 0.3s ease; 
}

/* --- EXCEPTION 2: LAST SECTION (CONTACT) --- */
section:last-of-type {
    /* Only Top Line. No Bottom Line. */
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 2rem;
    scroll-snap-align: end; /* Snap to bottom */
}

section:nth-child(even) { background-color: rgba(10, 0, 20, 0.5); }
section:nth-child(odd) { background-color: transparent; }

.container { width: 90%; max-width: 1000px; text-align: center; z-index: 2; }
.wide-container { max-width: 100%; padding: 0 2rem; }

/* --- GLOBAL ANIMATIONS --- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 1s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- CUSTOM CURSOR --- */
/* Note: We force 'none' at the top, but this media query ensures logic only runs if user has a mouse */
@media (hover: hover) and (pointer: fine) { body { cursor: none; } }
.cursor-dot, .cursor-outline { position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); border-radius: 50%; z-index: 9999; pointer-events: none; }
.cursor-dot { width: 8px; height: 8px; background-color: white; box-shadow: 0 0 10px white; }
.cursor-outline { width: 40px; height: 40px; border: 1px solid var(--accent); background-color: rgba(168, 85, 247, 0.05); box-shadow: 0 0 15px var(--accent-glow); transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s; }
body.hovering .cursor-outline { width: 60px; height: 60px; background-color: rgba(168, 85, 247, 0.15); border-color: transparent; box-shadow: 0 0 30px var(--accent); }
body.clicking .cursor-outline { width: 25px; height: 25px; background-color: var(--accent); border-color: var(--accent); }

/* Nav Links */
.main-nav a { color: var(--text-primary); text-decoration: none; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease; font-size: 0.95rem; position: relative; padding-bottom: 4px; }
.main-nav a:hover { color: var(--accent); }
.main-nav a.active { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }
.main-nav a.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background-color: var(--accent); box-shadow: 0 0 10px var(--accent); animation: expandWidth 0.3s ease forwards; }
@keyframes expandWidth { from { width: 0; left: 50%; } to { width: 100%; left: 0; } }

/* Nav Dots */
.nav-dots { position: fixed; right: 30px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 20px; z-index: 100; background: rgba(255, 255, 255, 0.03); padding: 15px 10px; border-radius: 30px; border: 1px solid rgba(255, 255, 255, 0.05); backdrop-filter: blur(4px); }
.dot { width: 14px; height: 14px; background-color: rgba(255, 255, 255, 0.2); border-radius: 50%; transition: all 0.3s; cursor: pointer; border: 1px solid transparent; }
.dot:hover { background-color: var(--text-secondary); transform: scale(1.2); }
.dot.active { background-color: var(--accent); transform: scale(1.5); box-shadow: 0 0 15px var(--accent), 0 0 30px var(--accent-glow); border-color: #fff; }

/* Back To Top */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background: var(--surface); border: 2px solid var(--border); border-radius: 12px; color: var(--accent); font-size: 1.2rem; cursor: pointer; opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 900; display: flex; align-items: center; justify-content: center; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { border-color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); transform: translateY(-5px); }

/* Headers */
h2 { 
    font-size: 4.5rem; 
    color: var(--text-primary); 
    text-transform: uppercase; 
    letter-spacing: 4px; 
    background: linear-gradient(to bottom, #fff, var(--text-secondary)); 
    -webkit-background-clip: text; 
    background-clip: text; 
    -webkit-text-fill-color: transparent; 
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); 
    line-height: 1.1;
}

.section-title-up { 
    /* CHANGED: Used var(--gap-nav) to match Home spacing */
    margin-bottom: var(--gap-nav); 
    width: 100%; 
    text-align: center; 
}

/* Mobile */
@media (max-width: 768px) {
    section { padding-top: 0; }
    h2 { font-size: 2.5rem; }
    
    .nav-dots { right: 10px; padding: 10px 5px; }
    .main-nav { width: 90%; justify-content: center; flex-wrap: wrap; padding: 1rem; gap: 1rem; margin-top: 1rem; margin-bottom: 2rem; }
    
    /* On mobile, we might want to restore the default cursor or use touch */
    .cursor-dot, .cursor-outline { display: none; }
    *, html, body, a, button { cursor: auto !important; } /* Restore cursor on mobile */
}