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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background-color: #f1f5f9;
}

code, .mono {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', 'Courier New', monospace;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0 24px rgba(0,0,0,0.12);
    position: relative;
}

/* ─── LANGUAGE TOGGLE ─── */
.language-toggle {
    position: absolute;
    top: 18px;
    right: 24px;
    display: flex;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    padding: 6px 10px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.lang-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 3px 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.lang-btn.active {
    background: white;
    color: #0f172a;
}

.lang-btn:hover:not(.active) {
    color: white;
}

.save-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    font-size: 16px;
    cursor: pointer;
    padding: 3px 6px;
    transition: all 0.2s ease;
}

.save-btn:hover {
    transform: scale(1.2);
    color: white;
}

/* ─── HEADER ─── */
.header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0e4d6b 100%);
    color: white;
    padding: 36px 40px 30px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
    position: relative;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.header-photo img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid #38bdf8;
    object-fit: cover;
    flex-shrink: 0;
}

.header-content h1 {
    font-size: 30px;
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-content .title {
    font-size: 12px;
    margin-bottom: 14px;
    color: #7dd3fc;
    font-weight: 600;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    letter-spacing: 0.3px;
}

.header-content .contact {
    font-size: 11px;
    color: #94a3b8;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px 16px;
    max-width: 580px;
}

.header-content .contact div {
    white-space: nowrap;
}

.header-content .contact a {
    color: #bae6fd;
    text-decoration: none;
    transition: color 0.2s;
}

.header-content .contact a:hover {
    color: white;
}

.github-link {
    color: #86efac !important;
}

/* ─── MAIN ─── */
.main {
    padding: 28px 32px;
}

/* ─── PROFILE ─── */
.profile-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.profile-section p {
    font-size: 13px;
    line-height: 1.85;
    color: #475569;
}

/* ─── SECTION HEADERS ─── */
.section-title {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    padding-bottom: 7px;
    border-bottom: 2px solid #38bdf8;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .comment {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* ─── TECH STACK ─── */
.stack-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.stack-section .section-title {
    border-bottom-color: #38bdf8;
}

.stack-category {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 9px;
}

.stack-category-name {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    padding-top: 2px;
    min-width: 110px;
    color: #64748b;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    line-height: 1.6;
}

.tag-blue   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tag-cyan   { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.tag-yellow { background: #fefce8; color: #854d0e; border: 1px solid #fde68a; }
.tag-green  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.tag-purple { background: #faf5ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.tag-orange { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.tag-red    { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ─── SECTION ─── */
.section {
    margin-bottom: 18px;
    page-break-inside: avoid;
}

/* ─── PERSONAL PROJECTS ─── */
.personal-projects-section .section-title {
    border-bottom-color: #94a3b8;
}

.personal-project {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    page-break-inside: avoid;
}

.personal-project:last-child {
    border-bottom: none;
}

.personal-project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3px;
    gap: 12px;
}

.personal-project-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

.personal-project-status {
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
}

.personal-project-stack {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 6px;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

.personal-project-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.personal-project-bullets li {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
    padding-left: 14px;
    position: relative;
    line-height: 1.6;
}

.personal-project-bullets li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #94a3b8;
}

/* ─── EXPERIENCE ─── */
.experience-section .section-title {
    border-bottom-color: #38bdf8;
}

.experience-item {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    page-break-inside: avoid;
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
    gap: 8px;
}

.experience-title {
    font-weight: 700;
    font-size: 12px;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.experience-dates {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

.experience-company {
    font-size: 11px;
    color: #38bdf8;
    margin-bottom: 4px;
    font-weight: 600;
}

.experience-stack {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 7px;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

.experience-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.experience-bullets li {
    font-size: 11.5px;
    color: #475569;
    margin-bottom: 4px;
    padding-left: 14px;
    position: relative;
    line-height: 1.6;
}

.experience-bullets li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #38bdf8;
    font-weight: bold;
}

/* ─── CLIENT PROJECTS ─── */
.client-projects-section .section-title {
    border-bottom-color: #a78bfa;
}

.client-project {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    page-break-inside: avoid;
}

.client-project:last-child {
    border-bottom: none;
}

.client-project-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3px;
}

.client-project-stack {
    font-size: 10px;
    color: #a78bfa;
    font-weight: 600;
    margin-bottom: 6px;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

.client-project-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.client-project-bullets li {
    font-size: 11px;
    color: #475569;
    margin-bottom: 3px;
    padding-left: 14px;
    position: relative;
    line-height: 1.6;
}

.client-project-bullets li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #a78bfa;
}

/* ─── EDUCATION ─── */
.education-section .section-title {
    border-bottom-color: #fb923c;
}

.edu-item {
    padding-bottom: 8px;
}

.edu-title {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.edu-school {
    font-size: 11px;
    color: #fb923c;
    margin-bottom: 2px;
    font-weight: 600;
}

.edu-date {
    font-size: 10px;
    color: #94a3b8;
    margin-bottom: 4px;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

.edu-item p {
    font-size: 11px;
    color: #475569;
}

/* ─── CERTIFICATIONS ─── */
.certifications-section .section-title {
    border-bottom-color: #f472b6;
}

.certifications-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.certification-badge {
    background: #fdf4ff;
    padding: 7px 10px;
    border-radius: 6px;
    border-left: 3px solid #f472b6;
    font-size: 10.5px;
    color: #64748b;
    font-weight: 500;
}

/* ─── BOTTOM ROW ─── */
.bottom-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 2px;
}

/* ─── LANGUAGES ─── */
.languages-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #38bdf8;
    border-radius: 6px;
    padding: 10px 14px;
}

.languages-box h4 {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.languages-box p {
    font-size: 11px;
    color: #475569;
    line-height: 1.8;
}

/* ─── PRINT ─── */
@media print {
    .language-toggle { display: none !important; }
    .save-btn { display: none !important; }

    body { background-color: white !important; }

    .container {
        box-shadow: none !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .header {
        padding: 20px 28px !important;
        gap: 18px !important;
    }

    .header-content h1 { font-size: 24px !important; }

    .header-photo img {
        width: 85px !important;
        height: 85px !important;
    }

    .main { padding: 20px 28px !important; }

    .experience-section { page-break-before: always !important; }
    .client-projects-section { page-break-before: always !important; }
    .education-section { page-break-before: always !important; }

    .personal-project,
    .experience-item,
    .client-project {
        page-break-inside: avoid !important;
    }
}

/* ─── MOBILE ─── */
@media screen and (max-width: 768px) {
    .header {
        padding: 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .header-content h1 { font-size: 22px !important; }

    .header-content .contact {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .main { padding: 18px; }

    .stack-category { flex-direction: column; gap: 5px; }
    .stack-category-name { min-width: unset; }

    .certifications-grid { grid-template-columns: 1fr; }
    .bottom-row { grid-template-columns: 1fr; }

    .language-toggle { top: 8px; right: 8px; padding: 4px 8px; }
    .lang-btn { font-size: 11px; padding: 2px 8px; }
}

@media screen and (max-width: 480px) {
    .header-content .contact {
        grid-template-columns: 1fr;
    }

    .personal-project-header {
        flex-direction: column;
        gap: 4px;
    }
}
