@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

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

:root {
    --bg:            #080808;
    --bg-panel:      #0e0e0e;
    --bg-card:       #111111;
    --bg-hover:      #161616;
    --border:        #1a2420;
    --border-bright: #243530;
    --green:         #00e676;
    --green-dim:     #00a854;
    --green-muted:   #0d2e1a;
    --amber:         #ffb300;
    --cyan:          #00e5ff;
    --text:          #a8ccb4;
    --text-bright:   #dff0e4;
    --text-dim:      #4e7860;
    --text-muted:    #253a2e;
    --font:          'JetBrains Mono', 'Courier New', monospace;
    --t:             all 0.18s ease;
    --glow:          0 0 24px rgba(0, 230, 118, 0.12);
    --glow-strong:   0 0 40px rgba(0, 230, 118, 0.22);
}

/* Scanlines */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.07) 2px,
        rgba(0, 0, 0, 0.07) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

@keyframes flicker {
    0%, 95%, 100% { opacity: 1; }
    97%            { opacity: 0.96; }
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    scroll-behavior: smooth;
    animation: flicker 12s infinite;
}

::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green-muted); }
::-webkit-scrollbar-thumb:hover { background: var(--green-dim); }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── NAVIGATION ──────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(8, 8, 8, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--green-dim), transparent);
    opacity: 0.35;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 24px;
}

.nav-brand {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--green);
    letter-spacing: 0.04em;
    text-shadow: 0 0 14px rgba(0, 230, 118, 0.45);
}

.nav-brand::before { content: '['; color: var(--text-dim); }
.nav-brand::after  { content: ']'; color: var(--text-dim); }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.15rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.78rem;
    transition: var(--t);
    padding: 0.35rem 0.7rem;
    border: 1px solid transparent;
    display: block;
}

.nav-link::before {
    content: './';
    color: var(--text-muted);
    transition: var(--t);
}

.nav-link:hover,
.nav-link.active {
    color: var(--green);
    border-color: var(--border-bright);
    background: rgba(0, 230, 118, 0.04);
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}

.nav-link:hover::before,
.nav-link.active::before { color: var(--green-dim); }

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: 1px solid var(--border-bright);
    cursor: pointer;
    padding: 6px 8px;
    gap: 4px;
}

.nav-toggle span {
    width: 20px;
    height: 1px;
    background: var(--green);
    transition: var(--t);
    display: block;
}

/* ── HERO ─────────────────────────────────────────── */
.hero {
    margin-top: 53px;
    padding: 5rem 0 4.5rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 30% 110%, rgba(0, 230, 118, 0.035) 0%, transparent 65%);
}

.hero-terminal {
    max-width: 680px;
    border: 1px solid var(--border-bright);
    background: var(--bg-card);
    box-shadow: var(--glow);
    position: relative;
}

.hero-terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.55rem 1rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}

.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red    { background: #ff453a; }
.terminal-dot.yellow { background: #ffd60a; }
.terminal-dot.green  { background: #30d158; }

.hero-terminal-title {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-left: 0.5rem;
}

.hero-terminal-body {
    padding: 1.5rem 2rem 2rem;
}

.hero-prompt-line {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.prompt-user   { color: var(--green); }
.prompt-at     { color: var(--text-dim); }
.prompt-host   { color: var(--cyan); }
.prompt-colon,
.prompt-dollar { color: var(--text-dim); }
.prompt-path   { color: var(--amber); }
.prompt-cmd    { color: var(--text-bright); margin-left: 0.5ch; }

.hero-output { margin-bottom: 1.5rem; }

.hero-output-line {
    font-size: 0.875rem;
    margin-bottom: 0.45rem;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.75rem;
    align-items: baseline;
}

.output-key { color: var(--text-dim); }

.output-val { color: var(--text-bright); }

.output-val.name-val {
    color: var(--green);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 0 22px rgba(0, 230, 118, 0.35);
}

.output-val.role-val {
    color: var(--cyan);
    font-size: 0.95rem;
    font-weight: 600;
}

.hero-contact-line {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    color: var(--green-dim);
    text-decoration: none;
    font-size: 0.82rem;
    transition: var(--t);
    border-bottom: 1px solid transparent;
}

.contact-link:hover {
    color: var(--green);
    border-bottom-color: var(--green-dim);
}

.hero-cursor {
    display: inline-block;
    width: 0.55em;
    height: 1.1em;
    background: var(--green);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 8px var(--green-dim);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── SECTIONS ─────────────────────────────────────── */
.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.section-alt { background: var(--bg-panel); }

.section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::before {
    content: '##';
    color: var(--green-dim);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    max-width: 160px;
}

/* ── PROFILE ──────────────────────────────────────── */
.profile-content { max-width: 820px; }

.profile-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.25rem 1.75rem;
    margin-bottom: 1px;
}

.profile-block-header {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
    letter-spacing: 0.1em;
}

.profile-text {
    font-size: 0.875rem;
    line-height: 1.85;
    color: var(--text);
}

.profile-kv {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.55rem 1rem;
    font-size: 0.855rem;
}

.profile-key {
    color: var(--text-dim);
}
.profile-key::after { content: ':'; }

.profile-val { color: var(--text-bright); }

/* ── PROJECTS ─────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.project-card {
    background: var(--bg-card);
    transition: var(--t);
    position: relative;
}

.project-card:hover {
    background: var(--bg-hover);
    box-shadow: var(--glow);
    z-index: 1;
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 1.25rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}

.project-tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--amber);
    padding: 0.12rem 0.45rem;
    border: 1px solid rgba(255, 179, 0, 0.3);
}

.project-cmd {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.project-card-body { padding: 1.25rem 1.5rem 1.5rem; }

.project-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.3rem;
}

.project-title::before {
    content: '> ';
    color: var(--green-dim);
}

.project-subtitle {
    font-size: 0.78rem;
    color: var(--cyan);
    margin-bottom: 1rem;
    padding-left: 1.1rem;
}

.project-description {
    font-size: 0.8rem;
    line-height: 1.75;
    color: var(--text-dim);
    margin-bottom: 0.65rem;
    padding-left: 1.1rem;
}

/* ── LAB ──────────────────────────────────────────── */
.lab-tag {
    color: var(--cyan);
    border-color: rgba(0, 229, 255, 0.3);
}

.lab-tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
}

.lab-pill {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--border-bright);
    color: var(--cyan);
    font-family: var(--font);
    background: rgba(0, 229, 255, 0.04);
}

.project-title-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--green-muted);
    transition: var(--t);
}

.project-title-link:hover {
    color: var(--green);
    border-bottom-color: var(--green-dim);
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}

.project-card-body code {
    font-family: var(--font);
    font-size: 0.78rem;
    color: var(--amber);
    background: rgba(255, 179, 0, 0.08);
    padding: 0.1rem 0.3rem;
}

/* ── EXPERIENCE ───────────────────────────────────── */
.experience-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 1px;
    transition: var(--t);
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--green-muted);
    transition: var(--t);
}

.experience-item:hover { background: var(--bg-hover); }

.experience-item:hover::before {
    background: var(--green);
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.5);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.1rem 1.5rem 0.9rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.experience-title-group {
    flex: 1;
    min-width: 240px;
}

.experience-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.3rem;
}

.experience-company {
    font-size: 0.82rem;
    color: var(--green);
    font-weight: 600;
}

.experience-company::before {
    content: '@';
    color: var(--text-dim);
    margin-right: 1px;
}

.experience-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    text-align: right;
}

.experience-location {
    color: var(--text-dim);
    font-size: 0.78rem;
}

.experience-date {
    color: var(--amber);
    font-size: 0.78rem;
    font-weight: 600;
}

.experience-body { padding: 1.1rem 1.5rem 1.25rem; }

.experience-context {
    font-size: 0.83rem;
    line-height: 1.75;
    color: var(--text-dim);
    margin-bottom: 1.1rem;
    padding: 0.7rem 1rem;
    background: var(--bg-panel);
    border-left: 2px solid var(--border-bright);
}

.experience-context strong { color: var(--text); }

.skills-subtitle {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--green-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.65rem;
}

.skills-subtitle::before {
    content: '# ';
    color: var(--text-muted);
}

.skills-list,
.missions-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.1rem;
}

.skills-list li,
.missions-list li {
    padding: 0.25rem 0 0.25rem 1.75rem;
    position: relative;
    line-height: 1.7;
    color: var(--text);
    font-size: 0.83rem;
    border-bottom: 1px solid transparent;
}

.skills-list li::before,
.missions-list li::before {
    content: '->';
    position: absolute;
    left: 0;
    color: var(--green-dim);
    font-size: 0.72rem;
    top: 0.35rem;
}

.experience-skills,
.experience-missions { margin-bottom: 0.75rem; }

.tech-stack {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-dim);
}

.tech-stack strong { color: var(--cyan); }

/* ── SKILLS ───────────────────────────────────────── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.skill-category {
    background: var(--bg-card);
    padding: 1.5rem;
    transition: var(--t);
}

.skill-category:hover { background: var(--bg-hover); }

.skill-category-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    margin-bottom: 1.1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-bright);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.skill-tag {
    display: inline-block;
    padding: 0.27rem 0.6rem;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.78rem;
    border: 1px solid var(--border-bright);
    transition: var(--t);
    cursor: default;
    font-family: var(--font);
}

.skill-tag:hover {
    background: var(--green-muted);
    color: var(--green);
    border-color: var(--green-dim);
    text-shadow: 0 0 8px rgba(0, 230, 118, 0.35);
}

/* ── EDUCATION ────────────────────────────────────── */
.education-item {
    background: var(--bg-card);
    padding: 1.1rem 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.2rem 1rem;
    transition: var(--t);
}

.education-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-bright);
}

.education-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-bright);
    grid-column: 1;
    grid-row: 1;
}

.education-institution {
    font-size: 0.82rem;
    color: var(--cyan);
    grid-column: 1;
    grid-row: 2;
}

.education-date {
    color: var(--amber);
    font-size: 0.78rem;
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    text-align: right;
}

.certifications,
.languages,
.competitions {
    margin-top: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.certifications-title,
.languages-title,
.competitions-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    padding: 0.7rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-panel);
}

.certifications-list,
.competitions-list {
    list-style: none;
    padding: 0;
}

.certifications-list li,
.competitions-list li {
    padding: 0.55rem 1.5rem;
    color: var(--text);
    font-size: 0.83rem;
    border-bottom: 1px solid var(--border);
    line-height: 1.7;
}

.certifications-list li:last-child,
.competitions-list li:last-child { border-bottom: none; }

.certifications-list li strong,
.competitions-list li strong { color: var(--amber); }

.language-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.1rem 1.5rem;
}

.language-item {
    padding: 0.28rem 0.7rem;
    border: 1px solid var(--border-bright);
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--font);
}

/* ── FOOTER ───────────────────────────────────────── */
.footer {
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    padding: 3.5rem 0 2rem;
}

.footer .section-title { color: var(--text-dim); }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.contact-info p { font-size: 0.875rem; color: var(--text-dim); }

.contact-info a {
    color: var(--green-dim);
    text-decoration: none;
    transition: var(--t);
    border-bottom: 1px solid transparent;
}

.contact-info a:hover {
    color: var(--green);
    border-bottom-color: var(--green-dim);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* ── FADE-IN ANIMATION ────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 53px;
        flex-direction: column;
        background: var(--bg);
        border-right: 1px solid var(--border-bright);
        width: 200px;
        height: calc(100vh - 53px);
        padding: 0.75rem 0;
        gap: 0;
        transition: left 0.2s ease;
    }

    .nav-menu.active { left: 0; }

    .nav-link {
        border: none;
        border-bottom: 1px solid var(--border);
        padding: 0.7rem 1.25rem;
    }

    .nav-toggle { display: flex; }

    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(3px, 5px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(3px, -5px); }

    .hero-terminal { max-width: 100%; }
    .hero-terminal-body { padding: 1.1rem 1.25rem 1.5rem; }
    .output-val.name-val { font-size: 1.1rem; }
    .hero-output-line { grid-template-columns: 90px 1fr; }

    .projects-grid { grid-template-columns: 1fr; }
    .skills-grid   { grid-template-columns: 1fr; }

    .experience-header { flex-direction: column; }
    .experience-meta   { align-items: flex-start; text-align: left; }

    .hero-contact-line { flex-direction: column; gap: 0.6rem; }

    .education-item { grid-template-columns: 1fr; }
    .education-date { grid-column: 1; grid-row: auto; text-align: left; color: var(--amber); }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding: 2.5rem 0 2rem; }
    .section { padding: 2.5rem 0; }
    .profile-kv { grid-template-columns: 1fr; }
    .profile-key::after { content: ':'; }
}

/* ── PRINT ────────────────────────────────────────── */
@media print {
    body::after { display: none; }
    .navbar, .nav-toggle { display: none; }
    .hero { margin-top: 0; }
    body {
        background: white;
        color: #111;
        font-family: 'Courier New', monospace;
        animation: none;
    }
    :root {
        --bg: white; --bg-card: #f5f5f5; --bg-panel: #eee;
        --text: #222; --text-bright: #000; --text-dim: #555;
        --border: #ccc; --border-bright: #bbb;
        --green: #006600; --green-dim: #004400;
        --cyan: #005577; --amber: #775500;
    }
    .experience-item::before { background: #999; }
    body::after { display: none; }
}
