@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    /* Dark Theme (Default) */
    --bg-color: #080808;
    --second-bg-color: #131313;
    --text-color: #ffffff;
    --main-color: #00f2fe;
    /* Cyber Blue */
    --accent-color: #4facfe;
    /* Darker Blue */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.05);
    --nav-bg: rgba(15, 12, 41, 0.6);
    --card-bg: rgba(255, 255, 255, 0.01);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--bg-color), var(--main-color), var(--bg-color));
    border-radius: 5px;
    border: 2px solid var(--bg-color);
    /* Creates padding effect */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--main-color);
}

/* Light Theme Variables */
.light-theme {
    --bg-color: #f0f2f5;
    --second-bg-color: #e2e6ea;
    --text-color: #333;
    --main-color: #007bff;
    /* Blue */
    --accent-color: #ff007a;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.1);
    --input-bg: rgba(255, 255, 255, 0.8);
    --nav-bg: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(255, 255, 255, 0.6);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: linear-gradient(to bottom right, var(--bg-color), var(--second-bg-color));
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* --- Floating Navbar (Glass Pill) --- */
.header {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    padding: 1.5rem 3rem;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.3s ease;
}

.header.sticky {
    top: 1rem;
    padding: 1rem 3rem;
    width: 95%;
}

.logo {
    font-size: 2.8rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
}

.navbar a {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 3rem;
    transition: .3s;
    font-weight: 600;
    position: relative;
}

.navbar a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: var(--main-color);
    transition: width 0.3s;
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

.burger {
    font-size: 2.8rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

.burger .ri-close-line {
    display: none;
}

.burger.active .ri-menu-line {
    display: none;
}

.burger.active .ri-close-line {
    display: block;
}

/* --- Theme Toggle --- */
.theme-toggle {
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    margin-left: 2rem;
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    color: var(--main-color);
}

/* --- Global Section Styles --- */
section {
    min-height: 100vh;
    padding: 12rem 9% 5rem;
    position: relative;
    overflow: hidden;
}

/* --- Matrix Canvas Background --- */
#cyber-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind everything */
    background: var(--bg-color);
    /* Fallback */
}

/* --- Animated Background Blobs (Hidden for Matrix Mode) --- */
.blob {
    display: none !important;
    /* 
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    z-index: 1;
    opacity: 0.8;
    animation: floatBlob 10s infinite alternate ease-in-out;
    will-change: transform;
    display: block;
    mix-blend-mode: screen;
    box-shadow: 0 0 20px 10px currentColor;
    */
}

.light-theme .blob {
    opacity: 0.6;
    filter: blur(60px);
    mix-blend-mode: multiply;
    /* Better for light backgrounds */
}

.blob-1 {
    top: 10%;
    /* Moved inward */
    left: 10%;
    width: 400px;
    height: 400px;
    background: var(--main-color);
    color: var(--main-color);
    /* For box-shadow */
    animation-delay: 0s;
}

.blob-2 {
    bottom: 10%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    color: var(--accent-color);
    animation-delay: -5s;
}

.blob-3 {
    top: 25%;
    left: 45%;
    width: 300px;
    height: 300px;
    background: #9d00ff;
    color: #9d00ff;
    filter: blur(30px);
    opacity: 0.7;
}

.blob-4 {
    bottom: 15%;
    left: 25%;
    width: 250px;
    height: 250px;
    background: #00ffaa;
    color: #00ffaa;
    filter: blur(30px);
    opacity: 0.7;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* --- Home Section --- */
.home {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-content h2,
.h3-style {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.home-content h2 span,
.h3-style span {
    color: var(--main-color);
    text-shadow: 0 0 10px var(--main-color);
}

.home-content h1 {
    font-size: 9rem;
    font-weight: 900;
    line-height: 1;
    margin: 1rem 0;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.5);
}

.home-content p {
    font-size: 1.8rem;
    margin: 2.5rem 0;
    max-width: 700px;
    color: var(--text-color);
}

/* --- Content Layering --- */
.home-content,
.about-content,
.home-img {
    position: relative;
    z-index: 10;
}

/* --- Liquid Profile Image --- */
.home-img {
    flex: 1 1 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.liquid-shape {
    position: relative;
    width: 350px;
    height: 350px;
    background-color: var(--second-bg-color);
    background: url('profile.webp') no-repeat center top;
    background-size: cover;
    box-shadow: 0 0 50px var(--main-color);
    border: 4px solid var(--main-color);
    animation: liquidMorph 8s ease-in-out infinite;
    z-index: 1;
    will-change: border-radius;
}

/* Unique shape for About section */
.about-img .liquid-shape {
    background-image: url('about_img.webp');
    box-shadow: 0 0 50px var(--main-color);
    border-color: var(--main-color);
    animation-direction: reverse;
}

@keyframes liquidMorph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

/* --- Social Icons --- */
.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    font-size: 2.2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .4s ease;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.social-media a:hover {
    background: var(--main-color);
    color: #fff;
    transform: translateY(-5px);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 50px;
    box-shadow: 0 0 15px var(--main-color);
    font-size: 1.6rem;
    color: #fff;
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    cursor: pointer;
    border: 2px solid var(--main-color);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.light-theme .btn {
    color: #fff;
}

.btn:hover {
    background: transparent;
    color: var(--main-color);
    box-shadow: none;
    text-shadow: none;
}

.btn.btn-secondary {
    background: transparent;
    color: var(--main-color);
    box-shadow: none;
}

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

/* --- About Section --- */
.about {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    background: transparent;
}

.heading {
    text-align: center;
    font-size: 6rem;
    margin-bottom: 5rem;
    font-weight: 800;
}

.about-content h2 {
    text-align: left;
    margin-bottom: 2.5rem;
    font-size: 6rem;
}

.about-content h3 {
    font-size: 3.5rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 1.8rem;
    line-height: 1.8;
    margin-bottom: 3.5rem;
    position: relative;
    overflow: hidden;
    max-height: 160px;
    transition: max-height 0.5s ease-in-out;
}

.about-content p.expanded {
    max-height: 1000px;
}

/* --- Projects Section --- */
.projects {
    background: transparent;
}

.light-theme .skill-item:nth-last-child(-n+3) img {
    filter: invert(0.8);
}

.light-theme .project-box,
.light-theme .header,
.light-theme .skill-item,
.light-theme .contact form .input-box input,
.light-theme .contact form textarea {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.light-theme .project-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0.3;
    pointer-events: none;
    border-radius: 20px;
}

.projects h2 {
    margin-bottom: 8rem;
    text-align: center;
    font-size: 6.5rem;
    font-weight: 800;
}

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

.project-box {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px var(--shadow-color);
    transition: 0.5s ease;
}

.light-theme .project-box {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 240, 255, 0.15);
    border-color: var(--main-color);
}

.project-box img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: .5s ease;
    border-bottom: 1px solid var(--glass-border);
}

.project-box:hover img {
    transform: scale(1.05);
}

.project-layer {
    padding: 2rem;
    background: linear-gradient(to top, rgba(15, 12, 41, 0.8), transparent);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.light-theme .project-layer {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent);
}

.project-layer h3 {
    font-size: 2.2rem;
    color: var(--main-color);
    margin-bottom: 0.5rem;
}

.project-layer p {
    font-size: 1.4rem;
    color: #ddd;
    margin-bottom: 1.5rem;
}

.light-theme .project-layer p {
    color: #555;
}

.project-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    margin-top: 1.5rem;
}

.project-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 5.5rem;
    height: 5.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-links a:hover {
    background: var(--main-color);
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 0 25px var(--main-color);
}

.project-links a i {
    font-size: 2.8rem;
    color: var(--text-color);
    transition: 0.3s;
}

.project-links a:hover i {
    color: #000;
}

/* --- Loader --- */
.loader-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--main-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Skills Section --- */
.skills {
    background: transparent;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.skill-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: 0.3s;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.skill-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(255, 0, 122, 0.15);
}

.skill-item img {
    width: 50px;
    height: 50px;
}

/* --- Contact Section --- */
.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: .8rem;
    margin: .7rem 0;
    transition: 0.3s;
}

.contact form .input-box input:focus,
.contact form textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 10px rgba(0, 238, 255, 0.2);
}

.contact form ::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.light-theme .contact form ::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* --- Footer --- */
.footer {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 9% 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.footer-col h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--main-color);
}

.footer-col p {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li a {
    font-size: 1.8rem;
    color: var(--text-color);
    display: block;
    margin-bottom: 0.8rem;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: var(--main-color);
    transform: translateX(5px);
}

.social-links a {
    display: inline-block;
    margin-right: 1rem;
    transition: .3s;
}

.social-links a:hover {
    transform: scale(1.1);
}

.social-links img {
    width: 32px;
    height: 32px;
}

.subscribe-form input {
    width: 100%;
    padding: 1rem;
    font-size: 1.4rem;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: .8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* --- Animations --- */
.hidden {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Breakpoints --- */
@media (max-width: 991px) {
    .header {
        width: 100%;
        border-radius: 0;
        top: 0;
        padding: 2rem 5%;
        background: var(--nav-bg);
    }

    section {
        padding: 10rem 5% 2rem;
    }
}

@media (max-width: 768px) {

    /* Header Reordering */
    .header {
        justify-content: flex-start;
        gap: 1.5rem;
    }

    .burger {
        display: block;
        order: 1;
    }

    .logo {
        order: 2;
    }

    .header-controls {
        order: 3;
        margin-left: auto;
        /* Pushes everything in this div to the right */
        display: flex;
        gap: 1.5rem;
    }

    .theme-toggle {
        margin-left: 0;
        /* Reset previous rule */
    }

    .home {
        flex-direction: column;
        text-align: center;
    }

    .home-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .home-content h1 {
        font-size: 4rem;
    }

    .home-img {
        margin-top: 4rem;
    }

    .liquid-shape {
        width: 280px;
        height: 280px;
    }

    .social-media {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .home-buttons {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        width: 100%;
    }

    .about {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-content {
        display: contents;
    }

    .about-content h2 {
        order: 1;
        text-align: center;
        width: 100%;
        margin-bottom: 2rem;
    }

    .about-img {
        order: 2;
        margin: 0 auto 3rem;
    }

    .about-content h3,
    .about-content p {
        order: 3;
        width: 100%;
    }

    .about-content #read-more-btn {
        order: 4;
        margin: 0 auto;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--nav-bg);
        border-top: 1px solid var(--glass-border);
        display: none;
        order: 4;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        margin: 3rem 0;
        text-align: center;
    }

    .burger {
        display: block;
    }
}

/* --- CYBER WARRIOR UPGRADES --- */

/* 1. CRT Scanlines Overlay */
.scanlines {
    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.1) 50%,
            rgba(0, 0, 0, 0.1));
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    /* Click-through */
    animation: scanlineMove 10s linear infinite;
    opacity: 0.7;
}

@keyframes scanlineMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

/* 2. Glitch Text Effect */
.glitch {
    position: relative;
    color: var(--text-color);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--main-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--accent-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

.glitch:hover::before,
.glitch:hover::after {
    display: block;
}

.glitch::before,
.glitch::after {
    display: none;
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(60px, 9999px, 10px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 5px, 0);
    }

    80% {
        clip: rect(30px, 9999px, 40px, 0);
    }

    100% {
        clip: rect(50px, 9999px, 70px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 10px, 0);
    }

    40% {
        clip: rect(20px, 9999px, 50px, 0);
    }

    60% {
        clip: rect(60px, 9999px, 80px, 0);
    }

    80% {
        clip: rect(90px, 9999px, 30px, 0);
    }

    100% {
        clip: rect(40px, 9999px, 20px, 0);
    }
}

/* --- Typed JS Cursor Animation --- */
.typed-cursor {
    font-size: 5rem;
    color: var(--main-color);
    animation: blink 0.7s infinite;
}

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

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* --- TERMINAL MODAL --- */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.terminal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.terminal-window {
    width: 800px;
    max-width: 90%;
    height: 500px;
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid var(--main-color);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 238, 255, 0.2);
    display: flex;
    flex-direction: column;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.terminal-overlay.active .terminal-window {
    transform: scale(1);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.terminal-title {
    color: #ccc;
    font-size: 1.4rem;
}

.terminal-close {
    cursor: pointer;
    color: #fff;
    font-size: 1.8rem;
    transition: 0.3s;
}

.terminal-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.terminal-body {
    flex: 1;
    padding: 20px;
    color: #fff;
    font-size: 1.6rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--main-color) transparent;
}

.terminal-line {
    margin-bottom: 5px;
    line-height: 1.5;
}

.cmd {
    color: var(--main-color);
    font-weight: bold;
}

.result-link {
    color: var(--accent-color);
    text-decoration: underline;
    cursor: pointer;
}

.terminal-input-area {
    display: flex;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    align-items: center;
}

.prompt {
    color: var(--main-color);
    margin-right: 10px;
    font-weight: bold;
    font-size: 1.8rem;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    font-family: 'Courier New', monospace;
    caret-color: var(--main-color);
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 4px;
}

#terminal-btn {
    display: none;
    /* Initially Hidden, Unlocked via CTF */
    animation: fadeIn 1s ease-in-out;
}

@media (max-width: 768px) {
    #terminal-btn {
        display: none !important;
    }
}

@keyframes popIn {
    0% {
        transform: translate(-50%, -60%) scale(0.5);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* --- Resume Button in Nav --- */
.btn-nav {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: var(--main-color);
    color: #fff !important;
    border-radius: 4rem;
    font-size: 1.6rem !important;
    /* Smaller than links */
    font-weight: 600;
    margin-left: 2rem;
    transition: 0.3s ease;
    box-shadow: 0 0 10px var(--main-color);
}

.btn-nav:hover {
    background: transparent;
    color: var(--main-color) !important;
    box-shadow: none;
    border: 2px solid var(--main-color);
}

.navbar .btn-nav:hover::after {
    width: 0;
    /* Disable underline for button */
}

/* --- Cyber Timeline --- */
.timeline {
    background: transparent;
    padding-bottom: 4rem;
}

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

/* Center Line */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--glass-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    box-shadow: 0 0 15px var(--main-color);
    animation: glowLine 4s infinite alternate;
}

@keyframes glowLine {
    0% {
        box-shadow: 0 0 5px var(--main-color);
        opacity: 0.5;
    }

    100% {
        box-shadow: 0 0 20px var(--main-color);
        opacity: 1;
    }
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background: inherit;
    width: 50%;
}

/* Left and Right placement */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

/* Dots */
.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--main-color);
    border-radius: 50%;
    position: absolute;
    top: 20px;
    right: -10px;
    z-index: 10;
    box-shadow: 0 0 10px var(--main-color);
    transition: 0.3s;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    background: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color);
}

/* Date */
.timeline-date {
    position: absolute;
    top: 18px;
    right: -100px;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--main-color);
    width: 80px;
    text-align: left;
}

.timeline-item:nth-child(odd) .timeline-date {
    right: -100px;
    text-align: left;
}

.timeline-item:nth-child(even) .timeline-date {
    left: -100px;
    text-align: right;
}

/* Content Box */
.timeline-content {
    padding: 20px 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    transition: 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
    border-color: var(--main-color);
}

.timeline-content h3 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.timeline-content p {
    font-size: 1.4rem;
    line-height: 1.6;
}

/* --- Hacking Achievements --- */
.achievements-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.achievement-card {
    background: rgba(15, 12, 41, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 3rem;
    width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: 0.4s;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.achievement-card.glow {
    border-color: var(--main-color);
    box-shadow: 0 0 20px rgba(0, 238, 255, 0.1);
}

.achievement-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px var(--main-color);
}

.card-icon {
    font-size: 4rem;
    color: var(--main-color);
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
}

.achievement-card h3 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.achievement-card p.status {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.achievement-card p.desc {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.status .green {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.status .red {
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000;
}

.card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-around;
    font-size: 1.4rem;
    color: var(--accent-color);
}

/* Locked State */
.achievement-card.locked {
    opacity: 0.7;
    filter: grayscale(1);
}

.achievement-card.locked:hover {
    opacity: 1;
    filter: grayscale(0);
}

/* --- Mobile Timeline --- */
@media (max-width: 768px) {
    .timeline-container::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 21px;
        right: auto;
    }

    .timeline-date {
        position: relative;
        top: 0;
        left: 0 !important;
        right: auto !important;
        margin-bottom: 0.5rem;
        display: block;
        text-align: left !important;
        width: 100%;
    }
}

/* --- Footer Social Icons Visibility --- */
/* Default (Dark Theme) - Make icons White */
.social-links a img {
    filter: brightness(0) invert(1);
    transition: 0.3s;
    width: 24px;
    /* Ensure size consistency */
    height: 24px;
}

.social-links a:hover img {
    transform: scale(1.2);
}

/* Light Theme - Revert to Original Colors */
body.light-theme .social-links a img {
    filter: none;
}

/* --- Professional Contact Form --- */
.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--input-bg);
    border-radius: .8rem;
    margin: .7rem 0;
    border: 2px solid transparent;
    /* Prepare for gradient border or simple color */
    transition: 0.3s;
    backdrop-filter: blur(10px) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    /* Force visibility */
}

.contact form .input-box input:focus,
.contact form textarea:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--main-color);
    box-shadow: 0 0 15px var(--main-color);
    transform: scale(1.02);
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
}

/* Button Alignment for Contact Form */
.contact form .btn {
    display: block;
    margin-left: auto;
    /* Push to right */
    margin-top: 2rem;
    /* Add gap */
    width: auto;
    /* Prevent full width */
    min-width: 150px;
}

.contact form .input-box input {
    width: 49%;
}

@media (max-width: 768px) {
    .contact form .input-box input {
        width: 100%;
    }

    /* Center Alignment for All Sections on Mobile */
    section {
        text-align: center;
    }

    .home-content,
    .about-content,
    .projects h2,
    .skills h2,
    .timeline h2,
    .contact h2 {
        text-align: center;
        align-items: center;
    }

    .home-content p,
    .about-content p {
        text-align: center;
    }

    .home-content {
        align-items: center;
    }

    /* Center Form Button on Mobile */
    .contact form .btn {
        margin: 2rem auto;
        /* Center horizontal */
    }

    /* Ensure Timeline and Achievements centered */
    .achievements-container {
        justify-content: center;
    }
}

/* --- Cyber Toast Notifications --- */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cyber-toast {
    background: rgba(10, 10, 10, 0.95);
    color: #fff;
    padding: 15px 25px;
    border-left: 4px solid var(--main-color);
    border-radius: 4px;
    font-size: 1.4rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    min-width: 250px;
    transform: translateX(100%);
    animation: slideIn 0.3s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Header Controls --- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Hide Terminal Button on Mobile initially */
@media (max-width: 768px) {
    #terminal-btn {
        display: none !important;
    }

    .terminal-overlay {
        display: none !important;
        /* Force hide modal */
    }

    /* Hide specific CTF features */
    #context-menu,
    #scan-overlay {
        display: none !important;
    }
}

.cyber-toast.success {
    border-color: #00ff00;
    color: #00ff00;
}

.cyber-toast.error {
    border-color: #ff0000;
    color: #ff0000;
}

.cyber-toast.warning {
    border-color: #ffaa00;
    color: #ffaa00;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* --- Full Screen Scan Animation --- */
#scan-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99998;
    display: none;
    /* Hidden by default */
    background: rgba(0, 255, 0, 0.02);
}

#scan-overlay .scan-line {
    width: 100%;
    height: 5px;
    background: var(--main-color);
    box-shadow: 0 0 15px var(--main-color);
    animation: scanMove 2s linear infinite;
    opacity: 0.5;
}

@keyframes scanMove {
    0% {
        transform: translateY(-100vh);
    }

    100% {
        transform: translateY(100vh);
    }
}

/* --- Custom Context Menu --- */
.context-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200px;
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--main-color) !important;
    /* Bright border */
    border-radius: 10px;
    padding: 10px;
    z-index: 99999 !important;
    /* Max Z-Index */
    display: none;
    /* Hidden by default */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: fadeInMenu 0.2s ease;
}

.context-menu .menu-item {
    padding: 10px 15px;
    font-size: 1.4rem;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}

.context-menu .menu-item:hover {
    background: var(--main-color);
    color: #000;
}

.context-menu .menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Live Radar Scan Overlay --- */
.radar-scan-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 255, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    z-index: 99998;
    /* Below context menu */
    pointer-events: none;
    animation: radarSweep 1.5s linear infinite;
}

.radar-scan-overlay::after {
    content: "SYSTEM SCANNING...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #0f0;
    font-family: monospace;
    font-weight: bold;
    text-shadow: 0 0 10px #0f0;
    animation: blinkText 0.5s infinite;
}

@keyframes radarSweep {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

@keyframes blinkText {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- Terminal Modal (Fixed Visibility) --- */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    visibility: hidden;
    /* Extra safety */
}

/* JS uses 'active' class, not 'show' */
.terminal-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.terminal-overlay.hidden {
    display: none !important;
}

.terminal-window {
    width: 600px;
    max-width: 90%;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scaleIn 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border: 1px solid var(--main-color);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.terminal-title {
    margin-left: 20px;
    color: #888;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    flex-grow: 1;
    text-align: center;
}

.terminal-close {
    cursor: pointer;
    color: #888;
    transition: 0.2s;
}

.terminal-close:hover {
    color: #fff;
}

.terminal-body {
    padding: 1rem;
    color: #fff;
    font-size: 0.95rem;
    height: 350px;
    /* CLS Fix: Fixed height */
    overflow-y: auto;
    font-family: 'Courier New', monospace;
}

.terminal-line {
    margin-bottom: 5px;
}

.terminal-line .cmd {
    color: var(--main-color);
    font-weight: bold;
}

.terminal-input-area {
    display: flex;
    padding: 10px;
    background: #111;
    border-top: 1px solid #333;
}

.prompt {
    color: var(--main-color);
    margin-right: 10px;
    font-weight: bold;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #fff;
    flex-grow: 1;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    outline: none;
}