/* 
   1. THE VARIABLES (Dark Systems Aesthetic)
 */
:root {
    --bg-color: #0d1117;        /* GitHub Dark background - deep, matte slate */
    --card-bg: #161b22;         /* Slightly lighter slate for structural elevation */
    --text-main: #e6edf3;       /* High legibility off-white for primary text */
    --text-title: #c9d1d9;      /* Subtle off-white for titles and highlights */
    --text-muted: #7d8590;      /* Technical gray for secondary info */
    --accent-glow: #2f81f7;     /* High-voltage blue for interactive elements */
    --white-glow: #d9f2f2;
}

/* 
   2. THE RESET & BASE (Cleaning the Canvas)
  */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scrollbar breaking the layout */
}

/* 
   2.5 BACKGROUND PHYSICS ENGINE
*/
#network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Pushes it behind all content */
    pointer-events: none; /* Crucial: Lets clicks pass through it to your buttons */
    background-color: var(--bg-color);
}

/* 
   3. THE HERO SECTION & TERMINAL
*/
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

#hero h1 {
    font-size: 4rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

#hero h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 400;
}
#hero h3 {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Terminal Cursor Physics */
.terminal-container {
    margin: 20px 0;
    font-family: monospace; /* Enforces the code aesthetic */
    font-size: 1.2rem;
}

.prompt {
    color: var(--accent-glow);
    font-weight: bold;
}

.cursor {
    animation: blink 1s step-end infinite;
}

/* 
   4. LAYOUT: PROJECT GRID
*/
#projects {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

#projects h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

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

/*
   5. COMPONENTS: CARDS & TAGS
*/
.project-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    
    /* Animation initial state */
    opacity: 0; 
    transform: translateY(30px);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out, box-shadow 0.3s ease;
}

.project-card.show {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--accent-glow);
}

.tech-stack {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tech-tag {
    background-color: var(--bg-color);
    color: var(--accent-glow);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* 
   6. COMPONENTS: NAVIGATION TABS & SLIDER
 */
.tab-navigation {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(9, 45, 94, 0.2); /* Corrected contrast for visibility */
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-main);
    border-color: rgba(9, 45, 94, 0.5); /* Corrected contrast */
    transform: translateY(-2px);
}

.tab-btn.active {
    color: var(--text-main);
    border-color: var(--text-main);
    padding-left: 30px;
}

.tab-btn.active::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-glow);
    box-shadow: 0 0 8px var(--accent-glow);
    animation: pulse 2s infinite;
}

.slider-window {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.slider-track {
    display: flex;
    width: 400%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); 
}

.slider-panel {
    width: 25%;
    padding: 0 15px;
}

/*
   7. COMPONENTS: BUTTONS & LINKS
*/
.repo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: transparent;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: 1px solid var(--text-muted);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.repo-link:hover {
    background-color: var(--text-main);
    color: var(--card-bg);
    border-color: var(--text-main);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* 
   THE HERO DIRECTORY (Command Console)
*/
.hero-directory {
    display: grid;
    /* Forces 4 columns on desktop, wraps to 2x2 or 1x4 on smaller screens */
    grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
    gap: 15px;
    width: 60%;
    max-width: 900px;
    margin-top: 50px;
    margin-bottom: 80px;
    padding: 0 20px;
}

.dir-card {
    background: transparent;
    border: 1px solid rgba(250, 250, 251, 0.1); /* Subtle outline */
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(5px); /* Gives it a slight glass effect over the particles */
}


.dir-title {
    align-self: center;
    color: var(--text-title);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

/* The Hover Physics */
.dir-card:hover {
    border-color: var(--text-main);
    transform: translateY(-5px);
    background: rgba(47, 129, 247, 0.05); /* Very faint blue fill */
}

.dir-card:hover .dir-title {
    color: var(--accent-glow); /* Text brightens to pure white */
}

.scroll-indicator {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin: 40px auto 0;
}

.scroll-indicator:hover {
    opacity: 1;
    transform: translateY(4px);
}

/* 
   8. CONTEXT-AWARE SCROLL HINT
*/
.scroll-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-main);
    color: var(--card-bg);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out;
}

.scroll-hint.visible {
    opacity: 1;
    pointer-events: auto; /* ALLOWS the user to click it */
    cursor: pointer;      /* Changes the mouse cursor to a hand */
    animation: gentle-bounce 2s infinite;
}

/* Added a subtle hover effect so it feels like a real button */
.scroll-hint.visible:hover {
    background-color: var(--accent-glow);
    transform: translateX(-50%) scale(1.05); /* Slight enlargement */
    animation: none; /* Stops bouncing when they hover over it */
}


/* 
   9. KEYFRAMES & PHYSICS ENGINE
 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

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

/* ==========================================
   10. SOCIAL GRID LAYOUT
   ========================================== */
#social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

