/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #0c0c0c;
    color: #fff;
}

/* VARIABLES */
:root {
    --primary: #00ff1e;
    --dark: #000;
    --card: #111;
}

/* HEADER */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    padding: 15px 10%;
    display: flex;
    justify-content: space-between;
    background: #000;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 30, 0.2);
}

.logo {
    color: var(--primary);
    font-weight: bold;
}

.navbar a {
    margin-left: 20px;
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
}

.navbar a:hover {
    color: var(--primary);
}

#menu-icon {
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    display: none;
}

/* HOME */
.home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 120px 10%;
    min-height: 100vh;
}

.home-content h1 {
    font-size: 48px;
    margin: 18px 0;
}

.home-content h3 {
    color: var(--primary);
    margin: 12px 0;
}

.home-content p {
    margin: 20px 0;
    color: #aaa;
}

.btn-group {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}


/* BUTTONS */
.btn {
    background: var(--primary);
    color: black;
    padding: 10px 20px;
    margin-right: 10px;
    text-decoration: none;
    border-radius: 20px;
    transition: 0.3s;
}

.btn:hover {
    box-shadow: 0 0 15px var(--primary);
}

.btn-outline {
    border: 2px solid var(--primary);
    padding: 10px 20px;
    color: var(--primary);
    border-radius: 20px;
    transition: 0.3s;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--primary);
    color: black;
}

/* SECTIONS */
section {
    padding: 80px 10%;
}

.section-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary);
}

/* TERMINAL WINDOW */
.terminal-window {
    border: 1px solid var(--primary);
    background: var(--card);
    margin-top: 20px;
}

.terminal-header {
    background: #222;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-title {
    color: #aaa;
    font-size: 12px;
    margin-left: 10px;
}

.terminal-body {
    padding: 20px;
    color: #ccc;
}

/* PROMPT STYLE */
.prompt {
    color: var(--primary);
    margin-right: 5px;
}

/* SKILLS */
.skills-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    /* Center them on mobile/desktop better */
    margin-top: 20px;
}

.skill-card {
    padding: 12px 24px;
    border: 1px solid rgba(0, 255, 30, 0.4);
    background: #111;
    color: #eee;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-card::before {
    content: "> ";
    color: var(--primary);
    font-weight: bold;
}

.skill-card:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    transform: translateY(-5px);
}

.skill-card:hover::before {
    color: #000;
}

/* PROJECTS */
.project-card {
    margin-bottom: 20px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 255, 30, 0.3);
    border-color: var(--primary);
}

.project-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.tech-tag {
    font-size: 11px;
    font-family: 'Courier New', Courier, monospace;
    padding: 3px 8px;
    border: 1px solid rgba(0, 255, 30, 0.3);
    color: var(--primary);
    background: rgba(0, 255, 30, 0.05);
    border-radius: 4px;
    transition: 0.3s;
}

.tech-tag:hover {
    background: var(--primary);
    color: #000;
}

/* CONTACT */
.contact p {
    margin: 10px 0;
}

.contact .terminal-body a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.3s;
}

.contact .terminal-body a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* SOCIAL LINKS */
.social-links {
    display: flex;
    gap: 18px;
    margin-top: 25px;
}

.social-links a {
    color: var(--primary);
    font-size: 28px;
    transition: transform 0.3s, color 0.3s, text-shadow 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    transform: translateY(-4px);
    text-shadow: 0 0 12px var(--primary);
    color: #fff;
}

body.light .social-links a {
    color: #007a10;
}

body.light .social-links a:hover {
    color: #005a0c;
    text-shadow: 0 0 12px rgba(0, 130, 20, 0.5);
}

body.light .contact .terminal-body a {
    color: #007a10;
}


/* MOBILE */
@media (max-width: 768px) {

    .home {
        flex-direction: column;
        text-align: center;
        padding: 100px 5% 50px;
        justify-content: center;
    }

    .home-content h1 {
        font-size: 34px;
        line-height: 1.2;
    }

    .home-content h3 {
        font-size: 18px;
    }

    .btn-group {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        margin-top: 25px;
    }

    .btn,
    .btn-outline {
        margin: 0;
    }

    .home-img {
        margin-top: 40px;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .profile-terminal {
        width: 100%;
        max-width: 300px;
    }

    .home-img img {
        margin-top: 20px;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 10px 0;
        background: #000;
        border-bottom: 1px solid rgba(0, 255, 30, 0.2);
        display: none;
        flex-direction: column;
        text-align: center;
        transition: 0.3s;
    }

    .navbar a {
        display: block;
        margin: 15px 0;
        font-size: 20px;
    }

    .navbar.active {
        display: flex;
    }

    #menu-icon {
        display: block;
    }

    body.light .navbar {
        background: #fff;
        border-bottom: 1px solid #ddd;
    }
}

/* PROFILE TERMINAL */
.profile-terminal {
    width: 280px;
    overflow: hidden;
    border-radius: 10px;
    animation: pulse 2s infinite alternate;
}

/* IMAGE INSIDE TERMINAL */
.image-body {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-body img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.image-body img:hover {
    transform: scale(1.05);
}


@keyframes pulse {
    from {
        box-shadow: 0 0 10px var(--primary);
    }

    to {
        box-shadow: 0 0 25px var(--primary);
    }
}

#typing-text::after,
#typing-role::after {
    content: "|";
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.init-text {
    color: #00ff1e;
    margin-bottom: 5px;
    font-size: 14px;
    opacity: 0.8;
}

#theme-toggle {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 5px 10px;
    cursor: pointer;
}

/* ======== LIGHT MODE ======== */
body, .header, .terminal-window, .terminal-header, .terminal-body,
.skill-card, .project-card, .navbar {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body.light {
    background: #f0f0f0;
    color: #111;
}

body.light .header {
    background: #fff;
    border-bottom: 1px solid rgba(0, 160, 20, 0.3);
}

body.light .logo {
    color: #007a10;
}

body.light .navbar a {
    color: #333;
}

body.light .navbar a:hover,
body.light .navbar a.active {
    color: #007a10;
}

body.light #menu-icon {
    color: #111;
}

body.light .navbar {
    background: #fff;
    border-bottom: 1px solid #ddd;
}

/* Home content */
body.light .home-content h1 { color: #111; }
body.light .home-content h3 { color: #007a10; }
body.light .home-content p  { color: #444; }
body.light .init-text        { color: #007a10; }
body.light .prompt           { color: #007a10; }

/* Terminals */
body.light .terminal-window {
    background: #fff;
    border-color: rgba(0, 130, 20, 0.4);
}
body.light .terminal-header { background: #e8e8e8; }
body.light .terminal-title  { color: #666; }
body.light .terminal-body   { color: #222; }

/* Section titles */
body.light .section-title { color: #007a10; }

/* Skill cards */
body.light .skill-card {
    background: #fff;
    border-color: rgba(0, 130, 20, 0.35);
    color: #111;
}
body.light .skill-card::before { color: #007a10; }
body.light .skill-card:hover {
    background: #007a10;
    color: #fff;
    border-color: #007a10;
    box-shadow: 0 0 15px rgba(0, 130, 20, 0.4);
}
body.light .skill-card:hover::before { color: #fff; }

/* Project cards */
body.light .project-card h3 { color: #007a10; }
body.light .project-card:hover {
    box-shadow: 0 5px 20px rgba(0, 130, 20, 0.2);
    border-color: #007a10;
}

/* Project Tech Light Mode */
body.light .tech-tag {
    border-color: rgba(0, 122, 16, 0.3);
    color: #007a10;
    background: rgba(0, 122, 16, 0.05);
}

body.light .tech-tag:hover {
    background: #007a10;
    color: #fff;
}

/* Project links */
body.light .project-links a {
    border-color: #007a10;
    color: #007a10;
}
body.light .project-links a:hover {
    background: #007a10;
    color: #fff;
}

/* Buttons */
body.light .btn { background: #007a10; color: #fff; }
body.light .btn:hover { box-shadow: 0 0 15px rgba(0, 130, 20, 0.5); }
body.light .btn-outline { border-color: #007a10; color: #007a10; }
body.light .btn-outline:hover { background: #007a10; color: #fff; }

/* Theme toggle */
body.light #theme-toggle { border-color: #007a10; color: #007a10; }

/* Preloader */
body.light .preloader      { background: #f0f0f0; }
body.light .terminal-loader{ color: #007a10; }
body.light .loader-cursor  { background: #007a10; }

/* Profile terminal glow */
body.light .profile-terminal { animation: pulse-light 2s infinite alternate; }
@keyframes pulse-light {
    from { box-shadow: 0 0 10px rgba(0, 130, 20, 0.3); }
    to   { box-shadow: 0 0 25px rgba(0, 130, 20, 0.5); }
}

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

.project-links {
    margin-top: 15px;
}

.project-links a {
    display: inline-block;
    margin-right: 10px;
    padding: 6px 12px;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.project-links a:hover {
    background: var(--primary);
    color: black;
}

/* PRELOADER */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.terminal-loader {
    font-size: 20px;
    color: var(--primary);
    font-weight: bold;
    display: flex;
    align-items: center;
}

.loader-cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background: var(--primary);
    animation: blink 1s infinite alternate;
    margin-left: 5px;
}

body.light .preloader {
    background: #fff;
}