:root {
    --bg: #000000;
    --glass: rgba(15, 15, 15, 0.4);
    --border: rgba(255, 255, 255, 0.15);
    --primary: #00f3ff;
    --text: #ffffff;
    --text-dim: #9ca3af;
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* --- GLASS CARD STYLING --- */
.glass {
    background: var(--glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* --- HERO SECTION --- */
.hero-section {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 50px;
    margin-top: 5vh;
    margin-bottom: 60px;
}

/* Fixed Profile Container to prevent layout collapse */
.profile-container {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    background-color: #111;
    display: block;
}

.online-status {
    position: absolute;
    bottom: 5px;
    right: 0px;
    background: #000;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    white-space: nowrap;
}

.blink {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-text h1 {
    font-family: var(--font-head);
    font-size: 3.5rem;
    margin: 0 0 10px 0;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 25px;
}

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

.tech-stack span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.9rem;
}

/* --- BUTTONS --- */
.cta-group { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn.primary {
    background: var(--primary);
    color: #000;
}

.btn.primary:hover {
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.btn.secondary {
    border: 1px solid var(--border);
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.btn.secondary:hover { background: rgba(255,255,255,0.1); }

/* --- SECTIONS --- */
.content-block { margin-bottom: 60px; }

.section-heading {
    font-family: var(--font-head);
    font-size: 1.8rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.card { padding: 30px; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.card-header h3 { margin: 0; font-size: 1.4rem; color: #fff; }
.date { color: var(--primary); font-family: monospace; }
.role-title { color: var(--text-dim); margin-top: 0; margin-bottom: 20px; }

ul { padding-left: 20px; color: #d1d5db; line-height: 1.6; }
li { margin-bottom: 8px; }

/* --- 3D GRID & CARDS --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    perspective: 1000px; /* Essential for 3D tilt */
}

.project-card {
    min-height: 300px;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.1s ease; /* Smooth mouse follow */
    will-change: transform;
}

.card-content {
    transform-style: preserve-3d;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    /* JS handles the rotation, CSS handles the gloss */
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.15);
}

.tag {
    /* CHANGED: Removed 'position: absolute' so it pushes text down */
    position: relative; 
    align-self: flex-end; /* Keeps it on the right side */
    margin-bottom: 10px;  /* Adds space between the tag and the title */
    
    /* Visual Styles (Kept same) */
    font-size: 0.75rem;
    background: rgba(0, 243, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--primary);
    border: 1px solid rgba(0, 243, 255, 0.2);
    
    /* 3D Depth */
    transform: translateZ(20px); 
}

.link-btn {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
    margin-top: 20px;
}
.link-btn:hover { color: var(--primary); }

footer {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 40px;
    color: var(--text-dim);
}
/* --- NEW VISUAL ELEMENTS --- */

/* 1. Giant Background Watermark */
.bg-icon {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 8rem; /* Huge size */
    color: rgba(255, 255, 255, 0.03); /* Very faint */
    transform: rotate(-15deg);
    pointer-events: none; /* Ignore clicks */
    z-index: 0; /* Sit behind everything */
    transition: all 0.3s ease;
}

/* On hover, the icon glows slightly */
.project-card:hover .bg-icon {
    color: rgba(255, 255, 255, 0.08);
    transform: rotate(0deg) scale(1.1);
}

/* 2. Tech Stack Row */
.tech-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tech-pill {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    transition: all 0.3s ease;
}

.project-card:hover .tech-pill {
    border-color: var(--primary);
    color: #fff;
    background: rgba(0, 243, 255, 0.1);
}

/* Ensure text sits ON TOP of the watermark */
.card-content h3, 
.card-content p, 
.tech-row, 
.project-meta, 
.link-btn {
    position: relative;
    z-index: 1;
}

/* Hide overflow so the giant icon doesn't stick out of the rounded corners */
.project-card {
    overflow: hidden; 
}
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 9999; /* Sit on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out; /* Smooth fade out */
}

/* The Scanner Animation */
.scanner span {
    color: transparent;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to right, #00f3ff, #fff, #00f3ff);
    -webkit-background-clip: text;
    background-clip: text;
    background-size: 200% auto;
    animation: shine 2s linear infinite;
}

/* Add a glowing ring around it */
.scanner {
    position: relative;
    padding: 20px 40px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 50px;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.scanner::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 50px;
    background: linear-gradient(45deg, #00f3ff, transparent, #00f3ff);
    z-index: -1;
    animation: rotateBorder 2s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

@keyframes rotateBorder {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Class to hide the loader */
.fade-out {
    opacity: 0;
    pointer-events: none; /* Allows clicking through it once hidden */
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    .hero-text h1 { font-size: 2.5rem; }
    .tech-stack { justify-content: center; }
    .cta-group { justify-content: center; width: 100%; }
    .btn { flex: 1; justify-content: center; }
    .card-header { flex-direction: column; gap: 5px; }
    
    /* Disable 3D tilt on mobile for performance */
    .project-card { transform: none !important; }
}