/* --- Retro-Futuristic Coder Theme --- */
:root {
    --primary-accent: #9333ea;    /* Electric Purple */
    --accent-hover: #a855f7;       /* Lighter Purple */
    --secondary-accent: #38bdf8;  /* Cool Cyan/Blue */
    --background-color: #0A041A;  /* Deep Navy/Purple */
    --surface-color: #1c152e;    /* Darker Purple Surface */
    --text-color: #d1d5db;        /* Soft Gray */
    --heading-color: #f9fafb;     /* Bright White */
    --border-color: #3c3252;      /* Subtle Purple Border */
    --font-primary: 'Poppins', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

/* --- General Styles & Reset --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
}
h1, h2, h3 { color: var(--heading-color); margin-bottom: 1rem; font-weight: 600; }
h1 { font-size: 3.5rem; font-weight: 700; font-family: var(--font-mono); }
h2 { font-size: 2.75rem; text-align: center; font-family: var(--font-mono); }
h3 { font-size: 1.5rem; }
section { padding: 5rem 2rem; position: relative; z-index: 2; }
.page-section { background-color: var(--surface-color); }

/* --- Navigation Bar --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(10, 4, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}
nav .logo {
    font-family: var(--font-mono);
    color: var(--heading-color);
    font-weight: 500;
    font-size: 1.5rem;
    text-decoration: none;
}
nav .nav-links { list-style: none; display: flex; gap: 2rem; }
nav a { color: var(--text-color); text-decoration: none; transition: color 0.3s; font-weight: 600; }
nav a:hover { color: var(--primary-accent); }

/* --- Hero Section & Background Animation --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    overflow: hidden;
}
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}
.hero p { font-size: 1.25rem; color: var(--text-color); max-width: 600px; min-height: 5rem; } /* Adjusted min-height */

/* --- Glitch Animation for Hero Title --- */
.glitch { position: relative; z-index: 2; }
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    overflow: hidden;
}
.glitch::before { left: 2px; text-shadow: -1px 0 var(--secondary-accent); animation: glitch-anim-1 2.5s infinite linear alternate-reverse; }
.glitch::after { left: -2px; text-shadow: -1px 0 var(--primary-accent); animation: glitch-anim-2 3s infinite linear alternate-reverse; }
@keyframes glitch-anim-1 { 0% { clip-path: inset(42% 0 44% 0); } 10% { clip-path: inset(12% 0 60% 0); } 20% { clip-path: inset(80% 0 5% 0); } 30% { clip-path: inset(27% 0 50% 0); } 40% { clip-path: inset(5% 0 75% 0); } 50% { clip-path: inset(33% 0 55% 0); } 60% { clip-path: inset(45% 0 50% 0); } 70% { clip-path: inset(12% 0 80% 0); } 80% { clip-path: inset(60% 0 15% 0); } 90% { clip-path: inset(18% 0 78% 0); } 100% { clip-path: inset(40% 0 55% 0); } }
@keyframes glitch-anim-2 { 0% { clip-path: inset(20% 0 50% 0); } 10% { clip-path: inset(33% 0 40% 0); } 20% { clip-path: inset(90% 0 5% 0); } 30% { clip-path: inset(45% 0 55% 0); } 40% { clip-path: inset(22% 0 78% 0); } 50% { clip-path: inset(95% 0 2% 0); } 60% { clip-path: inset(33% 0 55% 0); } 70% { clip-path: inset(10% 0 80% 0); } 80% { clip-path: inset(55% 0 25% 0); } 90% { clip-path: inset(22% 0 70% 0); } 100% { clip-path: inset(1% 0 90% 0); } }

/* --- CTA Button --- */
.cta-button {
    z-index: 2;
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background-color: transparent;
    color: var(--heading-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    border: 2px solid var(--primary-accent);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.cta-button:hover {
    color: white;
    box-shadow: 0 0 20px 5px rgba(147, 51, 234, 0.4);
    background-color: var(--primary-accent);
}

/* --- Universal Section & Card Styling --- */
.skills-section, .projects-section, .jams-section, .about-section { border-top: 1px solid var(--border-color); }
.skills-section { background-color: var(--background-color); }
.projects-section { background-color: var(--surface-color); }
.jams-section { background-color: var(--background-color); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; margin-top: 2rem; }
.jam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 2rem; }
.project-card, .jam-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}
.project-card:hover, .jam-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px 0 rgba(147, 51, 234, 0.3);
    border-color: var(--primary-accent);
}
.project-card img { width: 100%; height: 250px; object-fit: cover; display: block; }
.project-card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-card-content h3 { margin-bottom: 0.5rem; }
.project-card-content p { flex-grow: 1; margin-bottom: 1.5rem; }
.project-links a { margin-right: 1rem; color: var(--secondary-accent); text-decoration: none; font-weight: bold; transition: color 0.3s; }
.project-links a:hover { color: var(--accent-hover); }

.jam-card { background-color: var(--surface-color); text-decoration: none; color: var(--text-color); }
.jam-card img { width: 100%; height: 200px; object-fit: cover; display: block; border-bottom: 3px solid var(--primary-accent); }
.jam-card-content { padding: 1.5rem; flex-grow: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
.view-all-container { text-align: center; margin-top: 2.5rem; }

/* --- Skills Section --- */
.skills-container { max-width: 800px; margin: 2rem auto 0; padding: 0 1rem; display: flex; flex-direction: column; gap: 2rem; }
.skill-item { display: flex; flex-direction: column; gap: 0.75rem; }
.skill-header { display: flex; justify-content: space-between; align-items: baseline; }
.skill-name { font-weight: bold; color: var(--heading-color); font-size: 1.1rem; }
.skill-level { font-size: 0.9rem; color: var(--text-color); opacity: 0.8; font-style: italic; font-family: var(--font-mono); }
.progress-bar { width: 100%; background-color: var(--surface-color); border-radius: 5px; height: 25px; box-shadow: inset 0 1px 3px rgba(0,0,0,0.4); overflow: hidden; position: relative; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--secondary-accent) 0%, var(--primary-accent) 100%); border-radius: 5px; width: 0; transition: width 1.5s ease-in-out; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; color: var(--heading-color); font-size: 0.9rem; font-weight: bold; position: relative; z-index: 2; }

/* --- About & Footer --- */
.about-section { background-color: var(--surface-color); max-width: 800px; margin: 4rem auto; padding: 3rem; text-align: center; border-radius: 8px; border: 1px solid var(--border-color); }
footer { text-align: center; padding: 4rem 1rem; background-color: var(--background-color); border-top: 1px solid var(--border-color); }
footer a { color: var(--secondary-accent); }
.social-links { margin-top: 1rem; }
.social-links a { margin: 0 0.5rem; text-decoration: none; font-size: 1.1rem; transition: color 0.3s; }
.social-links a:hover { color: var(--primary-accent); }

/* --- Scroll Animation Styles --- */
.hidden { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.show { opacity: 1; transform: translateY(0); }

/* --- Hamburger Menu & Mobile Nav Styles --- */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 10px; z-index: 101; }
.hamburger-bar { display: block; width: 25px; height: 3px; margin: 5px 0; background-color: var(--heading-color); transition: all 0.3s ease-in-out; }
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    section { padding: 3rem 1rem; }
    .nav-links { position: fixed; top: 0; right: 0; height: 100vh; width: 70%; max-width: 300px; background-color: var(--surface-color); flex-direction: column; justify-content: center; align-items: center; gap: 2rem; transform: translateX(100%); transition: transform 0.3s ease-in-out; box-shadow: -5px 0 15px rgba(0,0,0,0.3); }
    .nav-links.active { transform: translateX(0); }
    .hamburger { display: block; }
    .hamburger.active .hamburger-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .hamburger-bar:nth-child(2) { opacity: 0; }
    .hamburger.active .hamburger-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}