/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --bg: #080d18;
    --bg-card: #0f1623;
    --bg-card2: #141c2e;
    --sidebar-bg: #0b1120;
    --border: rgba(255,255,255,0.07);
    --border-accent: rgba(0, 220, 255, 0.25);

    --text-1: #f0f4ff;
    --text-2: #94a3b8;
    --text-3: #64748b;

    --cyan: #00dcff;
    --cyan-dim: rgba(0, 220, 255, 0.12);
    --purple: #a78bfa;
    --purple-dim: rgba(167, 139, 250, 0.12);
    --emerald: #34d399;
    --emerald-dim: rgba(52, 211, 153, 0.12);

    --grad-cyan: linear-gradient(135deg, #00dcff 0%, #4facfe 100%);
    --grad-purple: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);

    --font-head: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --sidebar-w: 260px;
    --radius: 12px;
    --radius-sm: 8px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-1);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--text-1); font-weight: 600; }

/* ============================================================
   TOP NAV
   ============================================================ */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(8, 13, 24, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1.5rem;
}

.nav-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-2);
}

.nav-brand .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.nav-actions { display: flex; gap: 0.6rem; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--text-2);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-body);
    color: #050c1a;
    background: var(--grad-cyan);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(0, 220, 255, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 220, 255, 0.45); }

/* ============================================================
   TWO-COLUMN LAYOUT
   ============================================================ */
.page-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
    gap: 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    position: sticky;
    top: 52px;
    height: calc(100vh - 52px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

/* Identity Block */
.identity-block {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.avatar-ring {
    width: 72px;
    height: 72px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    background: var(--grad-cyan);
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 800;
    color: var(--cyan);
    letter-spacing: 0.05em;
}

.name {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-1);
    line-height: 1.25;
    margin-bottom: 0.3rem;
}

.title-line {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-2);
    line-height: 1.4;
}

.title-line.accent { color: var(--cyan); }

/* Sidebar Section */
.sidebar-section { display: flex; flex-direction: column; gap: 0.6rem; }

.sidebar-heading {
    font-family: var(--font-head);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* Contact List */
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-2);
}

.contact-list li svg { flex-shrink: 0; margin-top: 2px; color: var(--cyan); }
.contact-list a { color: var(--text-2); word-break: break-all; }
.contact-list a:hover { color: var(--cyan); }

/* Languages */
.lang-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}
.lang-name { color: var(--text-1); font-weight: 500; }
.lang-level {
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--cyan-dim);
    color: var(--cyan);
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
}

/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-2);
}

.tag-web3 { background: var(--purple-dim); border-color: rgba(167, 139, 250, 0.2); color: var(--purple); }
.tag-ops  { background: var(--emerald-dim); border-color: rgba(52, 211, 153, 0.2); color: var(--emerald); }

/* Stats */
.stat-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.stat-num {
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--grad-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label { font-size: 0.75rem; color: var(--text-2); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    padding: 2.5rem 2.5rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Section Headings */
.cv-section { display: flex; flex-direction: column; gap: 1.25rem; }

.section-heading {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-1);
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-heading::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1.1em;
    background: var(--grad-cyan);
    border-radius: 99px;
    flex-shrink: 0;
}

/* Summary */
.summary-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    font-size: 0.92rem;
    color: var(--text-2);
    line-height: 1.7;
    position: relative;
    overflow: hidden;
}

.summary-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--grad-cyan);
}

/* Expertise Grid */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.expertise-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
    transition: border-color 0.2s, transform 0.2s;
}

.expertise-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.exp-icon { font-size: 1.25rem; margin-bottom: 0.5rem; }

.expertise-card h3 {
    font-family: var(--font-head);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 0.65rem;
}

.expertise-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.expertise-card ul li {
    font-size: 0.78rem;
    color: var(--text-2);
    padding-left: 0.8rem;
    position: relative;
}

.expertise-card ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--cyan);
    font-weight: 700;
}

/* Experience Entries */
.exp-entry {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    position: relative;
    overflow: hidden;
}

.exp-entry::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--grad-cyan);
    border-radius: 99px 0 0 99px;
}

.exp-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exp-title {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-1);
}

.exp-company {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyan);
    margin-top: 0.15rem;
}

.exp-period {
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--cyan-dim);
    color: var(--cyan);
    border: 1px solid rgba(0, 220, 255, 0.2);
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    white-space: nowrap;
}

.exp-summary {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.65;
}

.sub-block { display: flex; flex-direction: column; gap: 0.45rem; }

.sub-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: 0.02em;
}

.bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-left: 0;
}

.bullet-list li {
    font-size: 0.85rem;
    color: var(--text-2);
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.55;
}

.bullet-list li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--cyan);
    font-weight: 700;
}

/* Projects */
.section-head-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.filter-group { display: flex; gap: 0.4rem; }

.filter-btn {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--cyan-dim);
    border-color: rgba(0, 220, 255, 0.3);
    color: var(--cyan);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.proj-badge {
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
}

.badge-blue {
    background: var(--cyan-dim);
    color: var(--cyan);
    border: 1px solid rgba(0, 220, 255, 0.25);
}

.badge-purple {
    background: var(--purple-dim);
    color: var(--purple);
    border: 1px solid rgba(167, 139, 250, 0.25);
}

.proj-year { font-size: 0.72rem; color: var(--text-3); font-weight: 500; }

.proj-title {
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.3;
}

.proj-role { font-size: 0.75rem; color: var(--text-3); font-weight: 500; }

.proj-desc { font-size: 0.82rem; color: var(--text-2); line-height: 1.55; }

.proj-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.proj-list li {
    font-size: 0.78rem;
    color: var(--text-2);
    padding-left: 1rem;
    position: relative;
    line-height: 1.45;
}

.proj-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--cyan);
    font-size: 1rem;
    line-height: 1;
    top: 2px;
}

.impact-bar {
    background: rgba(0, 220, 255, 0.04);
    border-left: 2px solid var(--cyan);
    padding: 0.5rem 0.75rem;
    font-size: 0.76rem;
    color: var(--text-2);
    border-radius: 0 6px 6px 0;
    line-height: 1.5;
}

.impact-label {
    font-weight: 700;
    color: var(--cyan);
    margin-right: 0.4rem;
}

/* Career Highlights */
.highlights-list { display: flex; flex-direction: column; gap: 0.6rem; }

.hl-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.87rem;
    color: var(--text-2);
    line-height: 1.5;
}

.hl-icon {
    color: var(--cyan);
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 3px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--cyan);
    color: #040c1a;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 999;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Print-only heading */
.print-only-heading { display: none; }

/* ============================================================
   PRINT / PDF MEDIA QUERY
   ============================================================ */
@media print {
    @page {
        size: A4;
        margin: 12mm 14mm;
    }

    :root {
        --bg: #ffffff;
        --bg-card: #ffffff;
        --bg-card2: #f8fafc;
        --sidebar-bg: #f1f5f9;
        --border: #e2e8f0;
        --border-accent: #cbd5e1;
        --text-1: #0f172a;
        --text-2: #334155;
        --text-3: #64748b;
        --cyan: #0284c7;
        --cyan-dim: #e0f2fe;
        --purple: #7c3aed;
        --purple-dim: #ede9fe;
        --emerald: #059669;
        --emerald-dim: #d1fae5;
    }

    body { background: #fff !important; font-size: 9pt; }

    .no-print { display: none !important; }
    .print-only-heading { display: flex !important; }

    .page-wrapper {
        grid-template-columns: 200px 1fr;
        min-height: unset;
        max-width: 100%;
    }

    .sidebar {
        position: static;
        height: auto;
        overflow: visible;
        padding: 0 1rem 0 0;
        border-right: 1px solid #e2e8f0;
        background: #f8fafc !important;
        gap: 1rem;
    }

    .main-content {
        padding: 0 0 0 1.25rem;
        gap: 1.25rem;
    }

    .identity-block { padding-bottom: 1rem; }

    .avatar-ring {
        width: 52px;
        height: 52px;
    }

    .name { font-size: 0.9rem; }
    .title-line { font-size: 0.65rem; }
    .stat-num { font-size: 1rem; }

    .summary-block {
        border: none;
        padding: 0;
        background: transparent;
    }

    .summary-block::before { display: none; }

    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .expertise-card {
        border: 1px solid #e2e8f0;
        padding: 0.6rem;
        break-inside: avoid;
    }

    .expertise-card h3 { font-size: 0.78rem; margin-bottom: 0.35rem; }
    .expertise-card ul li { font-size: 0.7rem; }

    .exp-entry {
        border: none;
        border-bottom: 1px solid #e2e8f0;
        border-radius: 0;
        padding: 0.75rem 0 0.75rem 0.75rem;
        break-inside: avoid;
    }

    .exp-entry::before { background: #0284c7; }

    .exp-title { font-size: 0.9rem; }
    .exp-company { color: #0284c7 !important; font-size: 0.78rem; }
    .exp-period {
        background: #e0f2fe;
        color: #0284c7;
        border-color: #bae6fd;
        font-size: 0.68rem;
    }

    .exp-summary { font-size: 0.78rem; }
    .bullet-list li { font-size: 0.75rem; }
    .sub-label { font-size: 0.73rem; }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .project-card {
        border: 1px solid #e2e8f0;
        padding: 0.75rem;
        break-inside: avoid;
    }

    .proj-title { font-size: 0.83rem; }
    .proj-desc { font-size: 0.74rem; }
    .proj-list li { font-size: 0.7rem; }

    .badge-blue {
        background: #e0f2fe !important;
        color: #0284c7 !important;
        border-color: #bae6fd !important;
    }

    .badge-purple {
        background: #ede9fe !important;
        color: #7c3aed !important;
        border-color: #c4b5fd !important;
    }

    .impact-bar {
        background: #f0f9ff;
        border-left-color: #0284c7;
        font-size: 0.7rem;
    }

    .impact-label { color: #0284c7 !important; }

    .section-heading {
        font-size: 0.92rem;
        border-bottom-color: #e2e8f0;
    }

    .section-heading::before { background: #0284c7; }

    .tag { font-size: 0.62rem; background: #f1f5f9; border-color: #e2e8f0; color: #334155; }
    .tag-web3 { background: #ede9fe !important; border-color: #c4b5fd !important; color: #7c3aed !important; }
    .tag-ops  { background: #d1fae5 !important; border-color: #6ee7b7 !important; color: #059669 !important; }

    .lang-level { background: #e0f2fe; color: #0284c7; }

    .hl-item {
        border: none;
        padding: 0.3rem 0;
        background: transparent;
        font-size: 0.78rem;
    }

    .section-head-flex { border-bottom: 1px solid #e2e8f0; }
}

/* ============================================================
   RESPONSIVE (Tablet)
   ============================================================ */
@media (max-width: 900px) {
    :root { --sidebar-w: 220px; }
    .expertise-grid, .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .page-wrapper { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .main-content { padding: 1.5rem; }
    .projects-grid { grid-template-columns: 1fr; }
}
