/* --- NASA-INSPIRED TECH THEME --- */

/* Define CSS variables for dark theme (Mission Control vibe) */
:root {
    --background-color: #0d1117;  /* Deep space blue/black */
    --primary-color: #e6edf3;     /* Off-white for primary text */
    --secondary-color: #8b949e;   /* Lighter gray for secondary text */
    --accent-red: #FC3D21;        /* NASA "worm" logo red */
    --accent-blue: #0B3D91;       /* NASA blue */
    --card-bg: #161b22;           /* Slightly lighter card background */
    --border-color: #30363d;      
    --nav-bg-opacity: 0.85;
    --hero-overlay-color: rgba(13, 17, 23, 0.7); /* Dark overlay for hero */
}

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

body {
    font-family: 'Roboto Mono', monospace; 
    background-color: var(--background-color);
    color: var(--secondary-color);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(252, 61, 33, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(11, 61, 145, 0.1) 0%, transparent 50%),
        radial-gradient(var(--secondary-color) 0.5px, transparent 0.5px);
    background-size: 400px 400px, 400px 400px, 20px 20px;
    background-attachment: fixed;
}

h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    transition: color 0.3s ease;
    font-weight: 700;
    text-transform: uppercase;
}

.text-accent { 
    color: var(--accent-red); 
    transition: color 0.3s ease; 
}

.bg-card { 
    background-color: var(--card-bg); 
    transition: background-color 0.3s ease; 
}

/* Navigation */
#navbar {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background-color: rgba(13, 17, 23, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu */
#mobile-menu {
    backdrop-filter: blur(10px);
}

/* Hero Section */
.hero-bg {
    position: relative;
    overflow: hidden;
}

.hero-background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.8) 0%, rgba(252, 61, 33, 0.3) 100%);
    z-index: 1;
    transition: background-color 0.3s ease;
}

/* Card Hover Effects */
.project-card, .education-card, .blog-post {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.project-card:hover, .education-card:hover, .blog-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 25px rgba(252, 61, 33, 0.3);
    border-color: var(--accent-red);
}

.project-card .project-content { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}

.project-card .project-description { 
    flex-grow: 1; 
}

/* Skills button hover effect */
.skills-button, .filter-btn, .category-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    border: 1px solid var(--border-color);
}

.skills-button:hover, .filter-btn:hover, .category-btn:hover {
    transform: scale(1.05);
    color: var(--accent-red);
    box-shadow: 0 0 15px rgba(252, 61, 33, 0.3);
}

/* Social icon hover effect */
.social-icon {
    transition: transform 0.3s ease, color 0.3s ease, text-shadow 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
    color: var(--accent-red);
    text-shadow: 0 0 10px rgba(252, 61, 33, 0.5);
}

/* Button glow */
.glow-button {
    position: relative; 
    overflow: hidden; 
    z-index: 1;
    border: 1px solid var(--accent-red); 
    color: var(--accent-red);
    background-color: transparent;
    transition: all 0.3s ease;
}

.glow-button:hover {
    color: var(--background-color); 
    background-color: var(--accent-red);
    box-shadow: 0 0 25px rgba(252, 61, 33, 0.5);
    transform: translateY(-2px);
}

/* Education Timeline Styles */
.timeline-container { 
    position: relative; 
    padding-left: 20px; 
}

.timeline-container::before {
    content: ''; 
    position: absolute; 
    left: 10px; 
    top: 0; 
    bottom: 0;
    width: 2px; 
    background-color: var(--border-color); 
    z-index: 0;
}

.timeline-item { 
    position: relative; 
    margin-bottom: 3rem; 
    padding-left: 20px; 
    display: flex; 
    align-items: flex-start; 
}

.timeline-dot {
    width: 16px; 
    height: 16px; 
    border: 2px solid var(--accent-red);
    background-color: var(--background-color); 
    position: absolute;
    left: 0; 
    top: 5px; 
    transform: translateX(-50%); 
    border-radius: 50%;
    z-index: 2; 
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot { 
    background-color: var(--accent-red); 
    box-shadow: 0 0 10px rgba(252, 61, 33, 0.5); 
}

.education-card { 
    margin-left: 10px; 
    width: calc(100% - 30px); 
    flex-grow: 1; 
}

/* Section divider style */
.section-divider {
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-bottom: 5rem;
    padding-top: 5rem;
}

.section-divider::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-red);
}

/* Particles Animation */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(252, 61, 33, 0.5);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.particles::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.particles::after {
    top: 60%;
    left: 80%;
    animation-delay: 5s;
}

@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Form Styles */
input, textarea, select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 10px rgba(252, 61, 33, 0.2);
}

/* FAQ Toggle */
.faq-toggle i {
    transition: transform 0.3s ease;
}

.faq-toggle i.rotate-180 {
    transform: rotate(180deg);
}

/* Code Blocks */
pre {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}

code {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Blog Post Styling */
.prose {
    max-width: none;
}

.prose h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    scroll-margin-top: 100px;
}

.prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul, .prose ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose blockquote {
    border-left: 4px solid var(--accent-red);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-container { 
        padding-left: 0; 
    }
    
    .timeline-container::before, .timeline-dot { 
        display: none; 
    }
    
    .timeline-item { 
        padding-left: 0; 
        margin-bottom: 1.5rem; 
    }
    
    .education-card { 
        margin-left: 0; 
        width: 100%; 
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: rgba(252, 61, 33, 0.3);
    color: var(--primary-color);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-red);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e63946;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s infinite;
}

/* Hover Effects for Interactive Elements */
.interactive {
    transition: all 0.3s ease;
    cursor: pointer;
}

.interactive:hover {
    transform: scale(1.02);
}

/* Custom Cursor (Optional - can be enabled for desktop) */
@media (min-width: 1024px) {
    .cursor-custom {
        cursor: none;
    }
    
    .cursor-dot, .cursor-outline {
        pointer-events: none; 
        position: fixed; 
        top: 50%; 
        left: 50%; 
        border-radius: 50%;
        opacity: 0; 
        transform: translate(-50%, -50%);
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
        z-index: 9999;
    }
    
    .cursor-dot { 
        width: 8px; 
        height: 8px; 
        background-color: var(--accent-red); 
    }
    
    .cursor-outline { 
        width: 40px; 
        height: 40px; 
        border: 2px solid var(--accent-red); 
        opacity: 0.3; 
        transition: all 0.1s ease-out; 
    }
    
    body:hover .cursor-dot, 
    body:hover .cursor-outline { 
        opacity: 1; 
    }
    
    a:hover ~ .cursor-outline, 
    button:hover ~ .cursor-outline, 
    .interactive:hover ~ .cursor-outline { 
        transform: translate(-50%, -50%) scale(1.5); 
        opacity: 0.4; 
        box-shadow: 0 0 15px rgba(252, 61, 33, 0.5); 
    }
    
    a:hover ~ .cursor-dot, 
    button:hover ~ .cursor-dot, 
    .interactive:hover ~ .cursor-dot { 
        transform: translate(-50%, -50%) scale(0.7); 
    }
}