:root {
    --bg-color: #000000; /* Black */
    --primary-color: #00e6e6; /* Electric Blue */
    --secondary-color: #00e6e6; /* Consistent Electric Blue */
    --text-color: #ffffff; /* White */
    --title-font: 'Audiowide', cursive;
    --body-font: 'Share Tech Mono', monospace;
    --border-glow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 15px var(--primary-color);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--body-font);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image:
        linear-gradient(rgba(0, 230, 230, 0.1) 1px, transparent 1px), /* Very subtle electric blue grid */
        linear-gradient(to right, rgba(0, 230, 230, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: pan-grid 60s linear infinite;
    position: relative; /* For the overlay */
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
    z-index: -1; /* Place behind content but above background grid */
}

@keyframes pan-grid {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 1000px 1000px;
    }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    font-family: var(--title-font);
    color: var(--primary-color);
    text-shadow: var(--border-glow);
    margin-bottom: 2rem;
    font-size: 2rem;
    text-transform: uppercase;
    position: relative;
    z-index: 1; /* Ensure title is above the body overlay */
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 4rem 0;
    min-height: 300px;
}

.hero-title {
    font-family: var(--title-font);
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: var(--border-glow);
    margin-bottom: 1rem;
    position: relative;
    animation: glitch 5s infinite;
}

.hero-title::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes glitch {
    0%, 20%, 25%, 100% {
        transform: none;
        opacity: 1;
    }
    21% {
        transform: skewX(10deg);
        opacity: 0.8;
    }
    23% {
        transform: skewX(-10deg);
        opacity: 0.8;
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-color);
    text-shadow: 0 0 5px #000;
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: rgba(0, 0, 0, 0.4); /* Subtle black for content overlay */
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
    z-index: 1; /* Ensure content is above the body overlay */
}

.skill-category::before,
.skill-category::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--primary-color); /* Use primary color for borders */
    border-style: solid;
    transition: all 0.3s ease;
}

.skill-category::before {
    top: -5px;
    left: -5px;
    border-width: 2px 0 0 2px;
}

.skill-category::after {
    bottom: -5px;
    right: -5px;
    border-width: 0 2px 2px 0;
}

.skill-category:hover {
    box-shadow: var(--border-glow);
    transform: translateY(-5px);
}

.skill-category:hover::before,
.skill-category:hover::after {
    width: calc(100% + 10px);
    height: calc(100% + 10px);
}

.skill-category h3 {
    font-family: var(--title-font);
    color: var(--primary-color); /* Use primary color for headers */
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.skill-category ul li::before {
    content: '>>';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}


/* --- Projects Section --- */
.projects-section {
    margin-top: 4rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: rgba(0, 0, 0, 0.4); /* Subtle black for content overlay */
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
    z-index: 1; /* Ensure content is above the body overlay */
}

.project-card::before,
.project-card::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--primary-color); /* Use primary color for borders */
    border-style: solid;
    transition: all 0.3s ease;
}

.project-card::before {
    top: -5px;
    left: -5px;
    border-width: 2px 0 0 2px;
}

.project-card::after {
    bottom: -5px;
    right: -5px;
    border-width: 0 2px 2px 0;
}

.project-card:hover {
    box-shadow: var(--border-glow);
    transform: translateY(-5px);
}

.project-card:hover::before,
.project-card:hover::after {
    width: calc(100% + 10px);
    height: calc(100% + 10px);
}

.project-card h3 {
    font-family: var(--title-font);
    color: var(--primary-color); /* Use primary color for headers */
    margin-bottom: 1rem;
}

/* --- Contact Section --- */
.contact-section {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    border-top: 1px solid var(--primary-color); /* Use primary color for border */
    position: relative;
    z-index: 1; /* Ensure content is above the body overlay */
}

.contact-links a {
    color: var(--primary-color); /* Use primary color for links */
    text-decoration: none;
    font-family: var(--body-font);
    margin: 0 1rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-shadow: var(--border-glow);
}

.contact-links a:hover {
    color: var(--primary-color); /* Keep primary color on hover for consistency */
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
}

.skill-category, .project-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.skill-category.visible, .project-card.visible {
    opacity: 1;
    transform: translateY(0);
}