/* ==========================================================================
   1. VARIABLES & BASE STYLES
   ========================================================================== */
:root {
    --bg-color: #000000;
    --spotlight-color: rgba(56, 189, 248, 0.05);
    --particle-color: #0058d3;
    --grid-color: rgb(0, 0, 0);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: #e2e8f0;
    background-image:
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
}

section {
    scroll-margin-top: 80px; /* Offset for fixed header */
}


/* ==========================================================================
   2. LAYOUT & GENERAL COMPONENTS
   ========================================================================== */
#constellation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits just above the body background */
}

.content-wrapper {
    position: relative;
    z-index: 10; /* All main content sits on top of background effects */
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: #38bdf8;
    width: 0%;
    z-index: 1000; /* Always on the very top */
    transition: width 0.05s linear;
}


/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: all 0.3s ease-in-out;
}

.site-header.header-scrolled {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    color: #cbd5e1;
    transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.nav-link:hover {
    color: #ffffff;
    background-color: rgba(56, 189, 248, 0.1);
}

.nav-link.active-link {
    color: #ffffff;
    background-color: rgba(56, 189, 248, 0.15);
}


/* ==========================================================================
   4. FOOTER
   ========================================================================== */
.site-footer {
    border-top: 1px solid #334155;
    padding: 3rem 0;
    position: relative; /* This is needed for z-index to work */
    z-index: 10;     /* Ensures footer is on the same layer as content */
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.social-icon-link {
    color: #94a3b8;
    transition: all 0.3s ease;
}

.social-icon-link:hover {
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-copyright {
    color: #64748b;
    font-size: 0.875rem;
}


/* ==========================================================================
   5. UI EFFECTS & ANIMATIONS
   ========================================================================== */
.spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allows clicks to pass through */
    z-index: 5; /* THE FIX: Sits below content (z-index 10) */
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), var(--spotlight-color) 0%, transparent 25%);
    transition: background 0.1s ease-out;
}

.hero-glow {
    background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.1), rgba(255, 255, 255, 0));
}

.text-shimmer {
    background: linear-gradient(90deg, #93c5fd, #ffffff, #93c5fd);
    background-size: 200% auto;
    color: #fff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 5s linear infinite;
}

.hero-image-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

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


/* ==========================================================================
   6. COMPONENT STYLES
   ========================================================================== */
/* --- Skill Cards & Tooltips --- */
.skill-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; transition: transform 0.3s; }
.skill-card:hover { transform: translateY(-5px); }
.skill-icon-container { width: 80px; height: 80px; border-radius: 50%; background-color: rgba(30, 41, 59, 0.5); display: flex; justify-content: center; align-items: center; transition: all 0.3s; }
.skill-card:hover .skill-icon-container { background-color: rgba(56, 189, 248, 0.1); box-shadow: 0 0 20px rgba(56, 189, 248, 0.5); }
.skill-icon { width: 40px; height: 40px; color: #94a3b8; transition: all 0.3s; }
.skill-card:hover .skill-icon { color: #38bdf8; transform: scale(1.1); }
.skill-name { font-weight: 500; color: #cbd5e1; }
.skill-card::before { content: attr(data-tooltip); position: absolute; bottom: 115%; left: 50%; transform: translateX(-50%); background-color: #1e293b; color: #e2e8f0; padding: 0.5rem 0.75rem; border-radius: 0.375rem; font-size: 0.875rem; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; z-index: 20; }
.skill-card::after { content: ''; position: absolute; bottom: 115%; left: 50%; transform: translateX(-50%) translateY(100%); border-width: 5px; border-style: solid; border-color: #1e293b transparent transparent transparent; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; z-index: 20; }
.skill-card:hover::before, .skill-card:hover::after { opacity: 1; visibility: visible; }

/* --- Project Cards --- */
.project-card { background-color: rgba(30, 41, 59, 0.5); border: 1px solid #334155; border-radius: 0.75rem; padding: 1.5rem; display: flex; flex-direction: column; transition: all 0.3s; backdrop-filter: blur(5px); }
.project-card:hover { transform: translateY(-5px); border-color: #38bdf8; box-shadow: 0 0 20px rgba(56, 189, 248, 0.2); }
.project-title { font-size: 1.25rem; font-weight: bold; color: #ffffff; margin-bottom: 0.5rem; }
.project-description { color: #cbd5e1; font-size: 0.9rem; line-height: 1.6; flex-grow: 1; }
.project-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1.5rem; font-size: 0.875rem; }
.project-link { color: #7dd3fc; text-decoration: none; font-weight: 500; transition: color 0.3s; }
.project-link:hover { color: #ffffff; }
.project-live-link { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; margin-bottom: 1rem; }
.project-live-link a { color: #7dd3fc; font-size: 0.875rem; font-weight: 500; text-decoration: none; transition: color 0.3s; }
.project-live-link a:hover { color: #ffffff; }
.project-live-link svg { width: 16px; height: 16px; color: #7dd3fc; }
.project-languages-container { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.language-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; }
.language-dot { width: 10px; height: 10px; border-radius: 50%; }

/* --- Contact Links & Form --- */
.contact-link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border: 1px solid #334155; border-radius: 9999px; color: #cbd5e1; transition: all 0.3s; }
.contact-link:hover { background-color: rgba(56, 189, 248, 0.1); border-color: #38bdf8; color: #ffffff; transform: translateY(-3px); box-shadow: 0 0 15px rgba(56, 189, 248, 0.3); }
.contact-link svg { transition: transform 0.3s ease-in-out; }
.contact-link:hover svg { transform: scale(1.2); }
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.form-input, .form-textarea { width: 100%; padding: 0.75rem 1rem; background-color: rgba(30, 41, 59, 0.5); border: 1px solid #334155; border-radius: 0.5rem; color: #cbd5e1; transition: all 0.3s; backdrop-filter: blur(5px); }
.form-input:focus, .form-textarea:focus { outline: none; border-color: #38bdf8; box-shadow: 0 0 15px rgba(56, 189, 248, 0.3); }
.form-textarea { min-height: 150px; resize: vertical; }
.submit-button { padding: 0.75rem 1.5rem; background-color: #0ea5e9; color: #ffffff; font-weight: bold; border-radius: 9999px; border: none; cursor: pointer; transition: all 0.3s; }
.submit-button:hover { background-color: #0284c7; transform: translateY(-3px); }
.copy-notification { position: fixed; bottom: 2rem; left: 50%; background-color: #1e293b; color: #e2e8f0; padding: 0.75rem 1.5rem; border-radius: 9999px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); opacity: 0; visibility: hidden; transform: translate(-50%, 1rem); transition: all 0.3s ease-in-out; z-index: 1000; }
.copy-notification.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* --- "View More" Button --- */
.view-more-container { text-align: center; margin-top: 2rem; }
.view-more-button { display: inline-block; padding: 0.75rem 1.5rem; background-color: transparent; border: 1px solid #334155; border-radius: 9999px; color: #cbd5e1; font-weight: 500; text-decoration: none; transition: all 0.3s; }
.view-more-button:hover { background-color: rgba(56, 189, 248, 0.1); border-color: #38bdf8; color: #ffffff; transform: translateY(-3px); box-shadow: 0 0 15px rgba(56, 189, 248, 0.3); }


/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    .hero-glow h1 { font-size: 2.75rem; line-height: 1.2; }
    .section-title { font-size: 1.875rem; }
    .content-wrapper { padding-left: 1.5rem; padding-right: 1.5rem; }
    .footer-content { gap: 1.5rem; }
    .footer-nav { gap: 1.5rem; }
}

@media (max-width: 480px) {
    .hero-glow h1 { font-size: 2.25rem; }
    .contact-link { width: 100%; justify-content: center; }
    .footer-nav { flex-direction: column; gap: 1rem; text-align: center; }
}
/* ==========================================================================
   8. VANTA BACKGROUND FIX
   ========================================================================== */
.vanta-canvas {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh !important;
    z-index: 0 !important;
}

/* Ensure the main content is layered on top of the fixed background */
.content-wrapper {
    position: relative;
    z-index: 10;
}