:root {
    --bg-color: #1e1e24;
    --bg-alt: #2b2b36;
    --text-primary: #ffffff;
    --text-secondary: #dddddd;
    --neon-green: #0aff0a;
    --neon-green-dim: rgba(10, 255, 10, 0.2);
    --neon-cyan: #00f3ff;
    --neon-purple: #bd00ff;
    --alert-red: #ff3333;

    --font-mono: 'Fira Code', 'Courier New', monospace;
    --font-heading: 'Share Tech Mono', monospace;
    --font-glitch: 'Orbitron', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    overflow-x: hidden;
    line-height: 1.6;
}

/* CRT Scanline Effect */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* background: radial-gradient(circle, rgba(16, 16, 16, 0) 0%, rgba(0, 0, 0, 0.8) 100%); */
    background: transparent;
    /* Uniform overlay */
    pointer-events: none;
    z-index: 998;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    width: 100%;
    background: rgba(30, 30, 36, 0.9);
    border-bottom: 1px solid var(--neon-green-dim);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.logo {
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 5px var(--neon-green));
    transition: 0.3s;
}

.nav-logo-img:hover {
    filter: drop-shadow(0 0 10px var(--neon-cyan));
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--neon-green);
    cursor: pointer;
}

.glitch-link:hover::before {
    content: attr(data-text);
    position: absolute;
    left: -2px;
    text-shadow: 1px 0 red;
    background: var(--bg-color);
    overflow: hidden;
    animation: glitch-anim 0.3s infinite linear alternate-reverse;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 5%;
}

.hero-content {
    z-index: 2;
    /* Ensure above matrix rain */
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.terminal-prompt {
    color: var(--neon-green);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 50px;
    color: #ffffff;
    border-left: 5px solid var(--neon-green);
    padding-left: 20px;
}

.hash {
    color: var(--neon-purple);
}

.user {
    color: var(--neon-purple);
    font-weight: bold;
}

.path {
    color: var(--neon-cyan);
}

h1.glitch {
    font-size: 4rem;
    color: var(--text-primary);
    font-family: var(--font-glitch);
    position: relative;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

h1.glitch::before,
h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

h1.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

h1.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

.console-text {
    font-size: 1.8rem;
    color: var(--neon-cyan);
    margin-bottom: 30px;
    min-height: 1.8em;
}

.cursor {
    display: inline-block;
    width: 10px;
    background-color: var(--neon-green);
    animation: blink 1s infinite;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    padding: 12px 24px;
    border: 1px solid var(--neon-green);
    background: transparent;
    color: var(--neon-green);
    font-family: var(--font-mono);
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
}

.btn:hover {
    box-shadow: 0 0 15px var(--neon-green);
    background: var(--neon-green-dim);
}

.secondary-btn {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

.secondary-btn:hover {
    box-shadow: 0 0 15px var(--neon-purple);
    background: rgba(189, 0, 255, 0.2);
}

/* Canvas Background */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    /* Below content, above body bg */
    opacity: 0.5;
}

/* Common Section Styles */
.container {
    padding: 80px 10%;
    border-top: 1px solid #3b3b4a;
    position: relative;
    z-index: 2;
    /* Ensure above matrix rain */
}

/* About Section */
.about-grid {
    display: flex;
    justify-content: center;
}

.terminal-window {
    background: #2b2b36;
    border: 1px solid #4a4a5a;
    border-radius: 5px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-right: 20px;
    margin-bottom: 30px;
}

.terminal-header {
    background: #3b3b4a;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #4a4a5a;
    border-radius: 5px 5px 0 0;
    position: relative;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #aaa;
    font-size: 0.8rem;
}

.terminal-body {
    padding: 30px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.terminal-body p {
    margin-bottom: 10px;
}

.comment {
    color: #8c93a0;
}

/* Skills Section */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.skill-category h3 {
    margin-bottom: 20px;
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-item span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.bar-container {
    width: 100%;
    height: 8px;
    background: #3b3b4a;
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-alt);
    border: 1px solid #4a4a5a;
    padding: 25px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 243, 255, 0.1);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--neon-cyan);
}

.project-header h3 {
    margin: 0;
    white-space: nowrap;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.project-tech span {
    display: inline-block;
    background: #3b3b4a;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-right: 8px;
    color: var(--neon-green);

}

.project-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.project-links a:hover {
    color: var(--neon-cyan);
}

/* Certifications */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250, 1fr));
    gap: 20px;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-alt);
    padding: 20px;
    border-left: 3px solid var(--neon-purple);
}

.cert-icon {
    font-size: 2rem;
    color: var(--neon-purple);
}

/* Contact */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--neon-green);
}

input,
textarea {
    width: 100%;
    padding: 12px;
    background: #2b2b36;
    border: 1px solid #4a4a5a;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 5px var(--neon-green-dim);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.social-btn {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.social-btn:hover {
    color: var(--neon-cyan);
    transform: scale(1.2);
}

footer {
    text-align: center;
    padding: 30px;
    background: #1a1a20;
    color: #999;
    font-size: 0.8rem;
    border-top: 1px solid #3b3b4a;
}

/* Animations */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(24px, 9999px, 91px, 0);
        transform: skew(0.6deg);
    }

    10% {
        clip: rect(85px, 9999px, 140px, 0);
        transform: skew(0.8deg);
    }

    100% {
        clip: rect(0, 9999px, 0, 0);
        transform: skew(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero-content {
        padding-top: 0;
    }

    h1.glitch {
        font-size: 2.5rem;
    }

    .console-text {
        font-size: 1.2rem;
    }
}

.cert-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    /* Allocated space for icon/badge */
}

.cert-img-badge {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 0 5px var(--neon-purple));
    transition: transform 0.3s ease;
}

.cert-item:hover .cert-img-badge {
    transform: scale(1.1) rotate(5deg);
}

/* OSEP Specific Overrides */
.osep-item .cert-img-badge {
    filter: none;
    /* Remove pink/purple glow form badge */
}

.hash {
    color: var(--neon-purple);
}