:root {
    --primary: #06b6d4;
    --bg-dark: #020202;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-cyan: 0 0 10px rgba(6, 182, 212, 0.7), 0 0 20px rgba(6, 182, 212, 0.5);
}

body {
    background-color: var(--bg-dark);
    -webkit-tap-highlight-color: transparent;
}

/* =========================================
   UTILITIES & ANIMATIONS
   ========================================= */

/* FONTS */
.font-tech { font-family: 'Rajdhani', sans-serif; }
.font-orbitron { font-family: 'Orbitron', sans-serif; }

/* CANVAS (Thunder/Storm Background) */
#storm-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    will-change: opacity;
}

/* FLASH OVERLAY - Z-INDEX 100 to cover Navbar */
#flash-overlay {
    position: fixed; 
    inset: 0; 
    background: white;
    opacity: 0; 
    pointer-events: none; 
    z-index: 100; 
    transition: opacity 0.08s ease-out;
}

/* TEXT EFFECTS */
.text-glow { text-shadow: var(--neon-cyan); }

/* Glitch Animation */
.glitch-active {
    animation: glitch 0.2s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: #06b6d4;
}

@keyframes glitch {
    0% { transform: translate(0) }
    20% { transform: translate(-4px, 4px) }
    40% { transform: translate(-4px, -4px) }
    60% { transform: translate(4px, 4px) }
    80% { transform: translate(4px, -4px) }
    100% { transform: translate(0) }
}

.animate-fade-in-down {
    animation: fadeInDown 1s ease-out forwards;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* TIMER BOXES */
.timer-box {
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s;
}
.timer-box:hover {
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* =========================================
   DEPARTMENT PAGE STYLES
   ========================================= */

/* Base 3D Props */
.dept-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Filter Transitions */
.filter {
    transition: filter 0.5s ease, transform 0.5s ease;
}

/* DESKTOP: 3D Tilt Effect */
@media (min-width: 768px) {
    .dept-card:hover .relative {
        transform: rotateX(5deg) rotateY(5deg);
        box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    }
}

/* MOBILE: Optimizations */
@media (max-width: 768px) {
    /* Disable heavy 3D on phone */
    .dept-card { transform: none !important; }
    
    /* Make touch targets bigger */
    .dept-card a { padding-top: 15px; padding-bottom: 15px; }
    
    /* Adjust grid gap */
    #dept-grid { 
        grid-template-columns: 1fr;
        gap: 1.5rem; 
    }
}

/* =========================================
   DEVELOPER / STAFF PAGE STYLES
   ========================================= */

/* 1. PROFESSIONAL GRID BACKGROUND */
.bg-grid {
    background-size: 30px 30px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    /* Added webkit prefix for Chrome/Safari support */
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    z-index: -1;
}

/* 2. CARD CLIP PATH (The Notch) */
.dev-card {
    clip-path: polygon(
        0 0, 
        100% 0, 
        100% calc(100% - 15px), 
        calc(100% - 15px) 100%, 
        0 100%
    );
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 3. IMAGE FILTERS */
.dev-image {
    /* Slightly brighter B&W so faces are clearly visible */
    filter: grayscale(100%) brightness(0.9) contrast(1.1);
    transition: filter 0.3s ease-out, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 4. HOVER EFFECTS */
.dev-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.dev-card:hover .dev-image {
    /* Full color restore + zoom */
    filter: grayscale(0%) brightness(1.05) contrast(1);
    transform: scale(1.06);
}

/* 5. LIGHTNING FLASH ON CARD HOVER */
@keyframes card-flash-anim {
    0% { opacity: 0; }
    10% { opacity: 0.6; }
    20% { opacity: 0; }
    30% { opacity: 0.3; }
    100% { opacity: 0; }
}

.dev-card:hover .card-flash {
    animation: card-flash-anim 0.3s ease-out forwards;
}

/* 6. HUD CORNERS */
.hud-corner {
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    z-index: 30;
}

.dev-card:hover .hud-corner {
    width: 25px;
    height: 25px;
}