/* ================== VARIABLES & DESIGN SYSTEM ================== */
:root {
    --bg: #0a0a0a;
    --surface: #111111;
    --border: #1e1e1e;
    --accent: #00e5a0;
    /* Neon Green */
    --accent-hover: #00b37e;
    --accent2: #0066ff;
    /* Neon Blue */
    --text: #e8e8e8;
    --muted: #888888;
    --mono: 'Space Mono', monospace;
    --sans: 'Poppins', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

/* NOISE OVERLAY */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 10;
    opacity: 0.35;
}

/* ================== PRELOADER ================== */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================== SCROLLBAR ================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ================== NAVIGATION ================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 4rem;
    border-bottom: 1px solid transparent;
    transition: border-color .3s, background .3s;
}

nav.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    border-color: var(--border);
}

.nav-logo {
    font-family: var(--mono);
    font-size: .9rem;
    color: var(--accent);
    letter-spacing: .08em;
    text-decoration: none;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    font-family: var(--mono);
    font-size: .75rem;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

/* Language switcher styling */
.lang-switcher .dropdown-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.72rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.lang-switcher .dropdown-toggle:hover,
.lang-switcher .dropdown-toggle:focus {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--surface);
}

.lang-switcher .dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    min-width: 110px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-top: 5px;
}

.lang-switcher .dropdown-item {
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.72rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.lang-switcher .dropdown-item:hover {
    background: rgba(0, 229, 160, 0.08);
    color: var(--accent);
}

/* ================== SECTIONS ================== */
section {
    position: relative;
    z-index: 2;
}

/* ================== HERO ================== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 4rem;
    overflow: hidden;
    position: relative;
}

#particles-js {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-left {
    display: flex;
    flex-direction: column;
}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: .75rem;
    color: var(--accent);
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-name {
    font-family: var(--mono);
    font-size: clamp(2.5rem, 4.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
    margin-bottom: 1.2rem;
}

.hero-name span {
    color: var(--accent);
}

.hero-role {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
    max-width: 42ch;
}

.hero-role strong {
    color: var(--text);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 2rem;
    background: var(--accent);
    color: #000;
    font-family: var(--mono);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 229, 160, 0.25);
    color: #000;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 2rem;
    background: transparent;
    color: var(--text);
    font-family: var(--mono);
    font-size: .8rem;
    letter-spacing: .05em;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color .2s, color .2s;
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* TERMINAL CARD */
.terminal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    background: #161616;
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.r {
    background: #ff5f57;
}

.dot.y {
    background: #febc2e;
}

.dot.g {
    background: #28c840;
}

.terminal-filename {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--muted);
    margin-left: .5rem;
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--mono);
    font-size: .75rem;
    line-height: 1.8;
}

.t-comment {
    color: #555555;
}

.t-key {
    color: #7ecfff;
}

.t-str {
    color: var(--accent);
}

.t-arr {
    color: #f8a97d;
}

.t-num {
    color: #ff9580;
}

.t-bool {
    color: #c792ea;
}

/* ================== ABOUT ================== */
#about {
    padding: 8rem 4rem;
    border-top: 1px solid var(--border);
}

.about-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 6rem;
    align-items: start;
}

.section-label {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--accent);
    letter-spacing: .18em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-heading {
    font-family: var(--mono);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.about-text p {
    color: #aaa;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    max-width: 60ch;
}

.about-text p strong {
    color: var(--text);
    font-weight: 500;
}

.stat-row {
    display: flex;
    gap: 3.5rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.stat-num {
    font-family: var(--mono);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--muted);
    font-family: var(--mono);
    font-size: .7rem;
    letter-spacing: .08em;
}

/* ================== SKILLS ================== */
#skills {
    padding: 8rem 4rem;
    border-top: 1px solid var(--border);
}

.skills-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.skills-header {
    margin-bottom: 4rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    border-radius: 6px;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    cursor: default;
}

.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 229, 160, 0.05);
}

.skill-icon-text {
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.skill-name {
    font-family: var(--mono);
    font-size: .85rem;
    color: var(--text);
    letter-spacing: .04em;
    font-weight: 700;
}

.skill-type {
    font-size: .72rem;
    color: var(--muted);
}

.skill-bar {
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: .5rem;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: var(--accent);
    transition: width .6s ease;
}

/* ================== PROJECTS ================== */
#projects {
    padding: 8rem 4rem;
    border-top: 1px solid var(--border);
}

.projects-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.projects-header {
    margin-bottom: 4rem;
}

.project-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface);
}

.project-info {
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
}

.project-tag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .12em;
    color: var(--accent);
    background: rgba(0, 229, 160, 0.06);
    border: 1px solid rgba(0, 229, 160, 0.2);
    padding: .3rem .7rem;
    border-radius: 4px;
    width: fit-content;
}

.project-title {
    font-family: var(--mono);
    font-size: 1.8rem;
    font-weight: 700;
}

.project-desc {
    color: #999;
    font-size: .95rem;
    line-height: 1.8;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}

.tech-badge {
    font-family: var(--mono);
    font-size: .68rem;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: .25rem .65rem;
    border-radius: 3px;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: .5rem;
}

.project-visual {
    background: #0d0d0d;
    border-left: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    min-height: 440px;
}

.browser-mockup {
    width: 100%;
    max-width: 460px;
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1rem;
    background: #1c1c1c;
    border-bottom: 1px solid #2a2a2a;
}

.browser-dots {
    display: flex;
    gap: .35rem;
}

.browser-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.browser-url {
    flex: 1;
    background: #252525;
    border: 1px solid #333;
    border-radius: 3px;
    padding: .3rem .7rem;
    font-family: var(--mono);
    font-size: .65rem;
    color: #666;
    text-align: center;
}

.browser-content {
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Simulated Online Market */
.om-sim {
    background: #fff;
    min-height: 300px;
    font-size: 0;
}

.om-header-sim {
    background: #1a1a2e;
    padding: .4rem .8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.om-logo-sim {
    font-family: var(--mono);
    font-size: .65rem;
    color: #00e5a0;
}

.om-nav-sim {
    display: flex;
    gap: .5rem;
}

.om-nav-sim span {
    font-size: .5rem;
    color: #888;
}

.om-hero-sim {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 1.2rem .8rem;
    text-align: center;
}

.om-title-sim {
    font-family: var(--mono);
    font-size: .7rem;
    color: #fff;
    margin-bottom: .3rem;
}

.om-sub-sim {
    font-size: .55rem;
    color: #00e5a0;
    margin-bottom: .8rem;
}

.om-cats-sim {
    display: flex;
    justify-content: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.om-cat {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 3px;
    padding: .2rem .5rem;
    font-size: .5rem;
    color: #ccc;
}

.om-products-sim {
    padding: .8rem;
    background: #f5f5f5;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .4rem;
}

.om-product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 3px;
    padding: .4rem;
}

.om-product-img {
    height: 30px;
    background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
    border-radius: 2px;
    margin-bottom: .25rem;
}

.om-product-name {
    font-size: .5rem;
    color: #333;
    margin-bottom: .15rem;
}

.om-product-price {
    font-size: .55rem;
    color: #00aa77;
    font-weight: bold;
}

.om-features {
    padding: .6rem .8rem;
    display: flex;
    gap: .4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.om-feature-chip {
    font-size: .48rem;
    background: #f0fff8;
    border: 1px solid #00e5a0;
    color: #00aa77;
    padding: .15rem .4rem;
    border-radius: 2px;
}

/* Simulated Gov Doc Secure */
.gd-sim {
    background: #0f172a;
    min-height: 300px;
    display: flex;
    font-size: 0.75rem;
    color: #e2e8f0;
}

.gd-sidebar-sim {
    width: 100px;
    background: #1e293b;
    border-right: 1px solid #334155;
    padding: 0.8rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gd-logo-sim {
    font-size: 0.55rem;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.05em;
    text-align: center;
}

.gd-menu-sim {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gd-menu-sim span {
    font-size: 0.5rem;
    padding: 0.25rem 0.4rem;
    border-radius: 3px;
    color: #94a3b8;
    cursor: default;
}

.gd-menu-sim span.active {
    background: #334155;
    color: #fff;
}

.gd-main-sim {
    flex: 1;
    padding: 0.8rem;
    background: #0f172a;
    display: flex;
    flex-direction: column;
}

.gd-doc-sim {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gd-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gd-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.45rem;
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
    font-weight: 700;
}

.gd-doc-id {
    font-family: var(--mono);
    font-size: 0.45rem;
    color: #64748b;
}

.gd-doc-title {
    font-weight: 600;
    font-size: 0.65rem;
    color: #f1f5f9;
}

.gd-doc-meta {
    font-size: 0.48rem;
    color: #94a3b8;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.3rem;
}

.gd-doc-body {
    font-size: 0.48rem;
    color: #cbd5e1;
    line-height: 1.4;
    flex: 1;
}

.gd-signature-sim {
    border-top: 1px dashed #334155;
    padding-top: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sig-title {
    font-size: 0.45rem;
    font-weight: 600;
    color: #38bdf8;
}

.sig-hash {
    font-family: var(--mono);
    font-size: 0.4rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================== CONTACT ================== */
#contact {
    padding: 8rem 4rem;
    border-top: 1px solid var(--border);
}

.contact-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.contact-description {
    color: #999;
    margin: 1.5rem 0 2.5rem;
    font-size: 1rem;
    line-height: 1.8;
    max-width: 40ch;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.1rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
    font-size: .9rem;
    transition: border-color .2s, background .2s, transform .2s;
}

.contact-link:hover {
    border-color: var(--accent);
    background: rgba(0, 229, 160, 0.04);
    transform: translateX(4px);
    color: var(--text);
}

.contact-link-icon {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
    color: var(--accent);
}

.contact-link-label {
    font-family: var(--mono);
    font-size: .75rem;
    color: var(--muted);
    display: block;
    margin-bottom: .1rem;
}

.contact-link-value {
    font-size: .9rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.form-group label {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--muted);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    padding: .9rem 1.1rem;
    font-family: var(--sans);
    font-size: .95rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 229, 160, 0.1);
}

.form-group textarea {
    min-height: 140px;
}

/* ================== FOOTER ================== */
footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    font-family: var(--mono);
    font-size: .85rem;
    color: var(--accent);
    font-weight: 700;
}

.footer-text {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--muted);
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a {
    color: var(--muted);
    text-decoration: none;
    font-size: .8rem;
    transition: color .2s;
    font-family: var(--mono);
}

.footer-socials a:hover {
    color: var(--accent);
}

/* ================== ANIMATIONS ================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================== RESPONSIVE DESIGN ================== */
@media (max-width: 992px) {
    nav {
        padding: 1.2rem 2rem;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Mobile navbar hides links, keeping brand & lang */
    #hero {
        padding: 0 2rem;
        padding-top: 7rem;
        min-height: auto;
        padding-bottom: 6rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .terminal-card {
        display: none;
    }

    /* Kept clean layout on tablets */
    #about {
        padding: 5rem 2rem;
    }

    .about-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .stat-row {
        gap: 2rem;
        flex-wrap: wrap;
    }

    #skills {
        padding: 5rem 2rem;
    }

    #projects {
        padding: 5rem 2rem;
    }

    .project-feature {
        grid-template-columns: 1fr;
    }

    .project-visual {
        min-height: 320px;
        border-left: none;
        border-top: 1px solid var(--border);
    }

    #contact {
        padding: 5rem 2rem;
    }

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 2.5rem 2rem;
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}