:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #1aff00;
    --dark-bg: #0d0d1a;
    --dark-card-bg: #15152a;
    --text-color-light: #e0e0e0;
    --text-color-dark: #b0b0b0;
    --border-color: #2a2a40;
    --container-width: 1100px;
    --section-padding: 100px 0;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-techy: 'Space Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-color-light);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.05),
        rgba(0, 0, 0, 0.05) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 0;
    opacity: 0.2;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color-light);
    margin-bottom: 25px;
    letter-spacing: 1px;
}

h1 { font-size: 3.8em; text-shadow: 0 0 20px rgba(26, 255, 0, 0.7); }
h2 {
    font-size: 3em;
    text-align: center;
    margin-bottom: 50px;
    color: var(--accent-color);
    position: relative;
    padding-bottom: 10px;
    display: table;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 0 10px rgba(26, 255, 0, 0.5);
}
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.7);
}
h3 { font-size: 2em; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: var(--section-padding);
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.4s ease;
    cursor: pointer;
    text-align: center;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--dark-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 25px var(--accent-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-color);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
}

.hidden {
    display: none !important;
}

.main-header {
    background-color: rgba(15, 15, 29, 0.95);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid var(--border-color);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-color-light);
    text-shadow: none;
}

.codename-logo {
    font-family: var(--font-techy);
    font-size: 0.7em;
    vertical-align: super;
    margin-left: 5px;
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(26, 255, 0, 0.7);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 40px;
}

.main-nav ul li a {
    color: var(--text-color-light);
    font-weight: 600;
    font-size: 1.05em;
    position: relative;
    font-family: var(--font-body);
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--accent-color);
    left: 50%;
    transform: translateX(-50%);
    bottom: -8px;
    transition: width 0.3s ease-in-out;
    border-radius: 2px;
}

.main-nav ul li a:hover::after,
.main-nav ul li.active a::after {
    width: 100%;
}

.main-nav ul li.active a {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(26, 255, 0, 0.5);
}


.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1100;
}

.hamburger {
    display: block;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    width: 30px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-open .hamburger {
    transform: rotate(45deg);
}

.nav-open .hamburger::before {
    transform: rotate(90deg) translate(-8px);
    opacity: 0;
}

.nav-open .hamburger::after {
    transform: rotate(90deg) translate(8px);
    top: 0;
}

.hero {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('images/hero-bg.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, transparent 24%, rgba(26, 255, 0, 0.05) 25%, transparent 26%, transparent 74%, rgba(26, 255, 0, 0.05) 75%, transparent 76%) top left / 100% 100px repeat-y;
    background-size: 100% 100px;
    animation: scanline 15s linear infinite;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}


.hero-content {
    max-width: 900px;
    padding: 30px;
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: 4.5em;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-shadow: 0 0 30px rgba(26, 255, 0, 0.9), 0 0 50px rgba(26, 255, 0, 0.5);
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.8em;
    margin-bottom: 40px;
    color: var(--text-color-light);
    text-shadow: 0 0 5px rgba(255,255,255,0.3);
}

.hero-buttons .btn {
    margin: 0 15px;
}

.about-me {
    background: linear-gradient(to bottom, var(--dark-bg), var(--dark-card-bg));
    padding: var(--section-padding);
    position: relative;
}

.about-me::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cyberpunk.png') repeat;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}


.codename {
    font-family: var(--font-techy);
    font-size: 0.8em;
    vertical-align: middle;
    color: var(--primary-color);
    font-weight: normal;
    opacity: 0.8;
}

.highlight-codename {
    font-family: var(--font-techy);
    color: var(--accent-color);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(26, 255, 0, 0.7);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    align-items: center;
    background-color: rgba(15, 15, 29, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 123, 255, 0.2);
    position: relative;
    z-index: 1;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-color-dark);
    font-size: 1.15em;
}

.about-image {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 123, 255, 0.5), 0 0 50px rgba(26, 255, 0, 0.7);
    transition: transform 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.about-image img:hover {
    transform: scale(1.08) rotate(3deg);
    border-color: var(--accent-color);
    box-shadow: 0 0 40px rgba(26, 255, 0, 0.9), 0 0 60px rgba(0, 123, 255, 0.5);
}

.about-facts {
    list-style: none;
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.about-facts li {
    background-color: rgba(0, 123, 255, 0.08);
    border-left: 6px solid var(--primary-color);
    padding: 18px 25px;
    border-radius: 10px;
    color: var(--text-color-light);
    font-weight: bold;
    display: flex;
    align-items: center;
    transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.about-facts li:hover {
    background-color: rgba(26, 255, 0, 0.12);
    border-color: var(--accent-color);
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-color);
}

.about-facts li i {
    color: var(--accent-color);
    margin-right: 20px;
    font-size: 1.6em;
    text-shadow: 0 0 5px rgba(26, 255, 0, 0.7);
}


.skills {
    background: linear-gradient(to bottom, var(--dark-card-bg), var(--dark-bg));
    padding: var(--section-padding);
    position: relative;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cyberpunk.png') repeat;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}


.skill-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    background-color: rgba(15, 15, 29, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 123, 255, 0.2);
    position: relative;
    z-index: 1;
}

.skill-category {
    background-color: var(--dark-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    border: 1px solid rgba(51, 51, 68, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(26, 255, 0, 0.04) 0%, rgba(0, 123, 255, 0.04) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.skill-category:hover::before {
    opacity: 1;
    animation: rotateGlow 5s linear infinite;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-color);
    border-color: var(--accent-color);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 1.8em;
    position: relative;
    z-index: 2;
}

.skill-category h3 i {
    font-size: 1.3em;
    margin-right: 12px;
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(26, 255, 0, 0.7);
}

.skill-category ul {
    list-style: none;
    position: relative;
    z-index: 2;
}

.skill-category ul li {
    margin-bottom: 10px;
    color: var(--text-color-dark);
    font-size: 1em;
    position: relative;
    padding-left: 20px;
    transition: color 0.3s ease;
}

.skill-category ul li:hover {
    color: var(--text-color-light);
}

.skill-category ul li::before {
    content: '\2023';
    color: var(--accent-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    position: absolute;
    left: 0;
    text-shadow: 0 0 5px rgba(26, 255, 0, 0.5);
}

.skill-category ul li .tool-description {
    font-size: 0.9em;
    color: var(--text-color-dark);
    margin-top: 5px;
    margin-left: 20px;
    line-height: 1.4;
}


.contact {
    background-color: var(--dark-bg);
    padding: var(--section-padding);
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    justify-content: center;
}

.contact-form-container {
    flex: 2;
    min-width: 350px;
    background-color: var(--dark-card-bg);
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 18px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #20203a;
    color: var(--text-color-light);
    font-size: 1.05em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 10px rgba(26, 255, 0, 0.5);
}


.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-color-dark);
    opacity: 0.7;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
}

.contact-details {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.contact-details p {
    margin-bottom: 20px;
    color: var(--text-color-dark);
    font-size: 1.2em;
    display: flex;
    align-items: center;
}

.contact-details p i {
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 1.4em;
    text-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.social-links {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links a {
    color: var(--text-color-light);
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 2.5em;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-5px) scale(1.1);
    text-shadow: 0 0 20px rgba(26, 255, 0, 0.9), 0 0 30px rgba(0, 123, 255, 0.5);
}

.form-note {
    font-size: 0.9em;
    color: var(--secondary-color);
    margin-top: 20px;
    text-align: center;
}

.main-footer {
    background-color: var(--dark-card-bg);
    color: var(--text-color-dark);
    padding: 40px 0;
    text-align: center;
    font-size: 0.95em;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.main-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: var(--text-color-dark);
    margin-left: 25px;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(0, 123, 255, 0.7);
}

@media (max-width: 900px) {
    h1 { font-size: 3.5em; }
    h2 { font-size: 2.5em; }

    .main-nav {
        display: none; /* Crucial for hiding desktop nav on mobile by default */
        position: absolute;
        top: 100%; /* Below header */
        left: 0;
        width: 80%; /* Takes 80% width, previously 100% */
        height: calc(100vh - 80px); /* Adjust height */
        background-color: var(--dark-card-bg); /* New background */
        flex-direction: column;
        align-items: center;
        padding-top: 100px; /* Padding for list */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
        border-right: 1px solid var(--border-color);
        transform: translateX(-100%); /* Start off-screen */
        transition: transform 0.4s ease-out;
        z-index: 999; /* Ensure it's above other content */
    }

    .main-nav.nav-open {
        transform: translateX(0); /* Slide in */
        display: flex; /* Show when open */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .main-nav ul li {
        margin: 20px 0; /* Vertical spacing */
    }

    .nav-toggle {
        display: block; /* Show hamburger on mobile */
    }

    .hero-content h1 {
        font-size: 3em;
    }

    .hero-content p {
        font-size: 1.4em;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .hero-buttons .btn {
        margin: 0;
        width: 90%;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        padding: 30px;
        gap: 30px;
    }
    .about-image {
        order: -1;
        min-width: unset;
    }
    .about-image img {
        width: 150px;
        height: 150px;
        border: 4px solid var(--primary-color);
    }

    .about-text {
        min-width: unset;
        width: 100%;
    }
    .about-facts {
        justify-content: center;
    }
    .about-facts li {
        text-align: left;
        justify-content: flex-start;
        transform: translateX(0);
    }
    .about-facts li:hover {
        transform: translateX(0) scale(1.02);
    }

    .about-me h2::after, .skills h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .skill-categories {
        gap: 20px;
    }
    .skill-category {
        padding: 25px;
        width: 100%;
    }
    .skill-category:hover {
        transform: translateY(0);
    }

    .contact-content {
        flex-direction: column;
        text-align: center;
        padding: 30px;
        gap: 30px;
    }
    .contact-form-container {
        min-width: unset;
        width: 100%;
    }
    .contact-details {
        align-items: center;
    }
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    h1 { font-size: 2.5em; }
    h2 { font-size: 2em; }
    .logo { font-size: 1.2em; }

    .hero-content h1 {
        font-size: 2.2em;
    }
    .hero-content p {
        font-size: 1.1em;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .hero-buttons .btn {
        margin: 0;
        width: 90%;
    }

    .main-nav {
        width: 100%; /* Ensure it takes full width when open */
    }

    .contact-form-container {
        padding: 30px;
    }
    .social-links {
        justify-content: center;
    }

    .main-footer .container {
        flex-direction: column;
        gap: 10px;
    }
    .footer-links a {
        margin: 0 8px;
    }
}