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

:root {
    --color-background-primary:   #1C1C21;
    --color-background-secondary: #24242B;
    --color-border-tertiary:      rgba(255, 255, 255, 0.09);
    --color-border-secondary:     rgba(255, 255, 255, 0.15);
    --color-text-primary:         #F0F0F5;
    --color-text-secondary:       #9A9AAD;
    --color-text-tertiary:        #65657A;
    --badge-bg:                   #162208;
    --badge-color:                #82C940;
    --badge-border:               #2A4510;
    --badge-dot:                  #5A9E20;
    --border-radius-lg:           10px;
    --border-radius-md:           6px;
    --sidebar-width:              220px;
    --topbar-height:              42px;
    --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html.light {
    --color-background-primary:   #FFFFFF;
    --color-background-secondary: #F8F7FD;
    --color-border-tertiary:      rgba(0, 0, 0, 0.08);
    --color-border-secondary:     rgba(0, 0, 0, 0.13);
    --color-text-primary:         #16161F;
    --color-text-secondary:       #5C5C70;
    --color-text-tertiary:        #9B9BAA;
    --badge-bg:                   #EAF3DE;
    --badge-color:                #3B6D11;
    --badge-border:               #C0DD97;
    --badge-dot:                  #639922;
}

body {
    font-family: var(--font);
    font-weight: 400;
    background: var(--color-background-primary);
    color: var(--color-text-primary);
    display: flex;
    min-height: 100vh;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* ── Sidebar ────────────────────────────────────── */

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--color-background-secondary);
    border-right: 0.5px solid var(--color-border-tertiary);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    gap: 1.75rem;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #EEEDFE;
    color: #534AB7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    object-fit: cover;
    font-weight: 500;
}

.sidebar-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-top: 10px;
}

.sidebar-title {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.badge-open {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--badge-bg);
    color: var(--badge-color);
    border: 0.5px solid var(--badge-border);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 99px;
    margin-top: 8px;
    width: fit-content;
}

.badge-open::before {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--badge-dot);
    flex-shrink: 0;
}

/* ── Nav ────────────────────────────────────────── */

.nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    margin-top: 8px;
}

.nav a {
    display: block;
    text-align: center;
    padding: 6px 10px;
    border-radius: var(--border-radius-md);
    font-size: 13px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 400;
    border: 0.5px solid transparent;
}

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

.nav a.active {
    background: var(--color-background-primary);
    border-color: var(--color-border-tertiary);
    color: var(--color-text-primary);
    font-weight: 500;
}

/* ── Social icons ───────────────────────────────── */

.sidebar-social {
    display: flex;
    gap: 7px;
    margin-top: 14px;
}

.social-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--border-radius-md);
    border: 0.5px solid var(--color-border-tertiary);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    text-decoration: none;
}

.social-btn:hover {
    color: var(--color-text-primary);
    border-color: var(--color-border-secondary);
}

.social-btn svg {
    width: 13px;
    height: 13px;
}

/* ── Main ───────────────────────────────────────── */

.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Mobile menu toggle - hidden by default */
.mobile-menu-toggle {
    display: none;
}

.topbar {
    height: var(--topbar-height);
    border-bottom: 0.5px solid var(--color-border-tertiary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    background: var(--color-background-primary);
    z-index: 10;
    gap: 12px;
}

.topbar-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.topbar-subtitle {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

.content {
    padding: 1.75rem;
    flex: 1;
}

/* ── Hero ───────────────────────────────────────── */

.hero {
    border: 0.5px solid var(--color-border-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--color-background-secondary);
}

.hero-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #EEEDFE;
    color: #534AB7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    flex-shrink: 0;
    object-fit: cover;
}

.hero-headline {
    font-size: 17px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 5px;
}

.hero-bio {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 340px;
}

.hero-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ── Buttons ────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--border-radius-md);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    font-family: var(--font);
    border: none;
}

.btn-primary {
    background: var(--color-text-primary);
    color: var(--color-background-primary);
}

.btn-primary:hover {
    background: #2a2a36;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-primary);
    border: 0.5px solid var(--color-border-secondary);
}

.btn-ghost:hover {
    background: var(--color-background-secondary);
}

/* ── Section label ──────────────────────────────── */

.section-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 10px;
}

/* ── Project grid ───────────────────────────────── */

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.project-card {
    border: 0.5px solid var(--color-border-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    background: var(--color-background-primary);
}

.card-category {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 5px;
}

.card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.card-description {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    flex: 1;
}

.card-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}

.stack-tag {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 99px;
    border: 0.5px solid var(--color-border-secondary);
    color: var(--color-text-secondary);
}

.stack-tag--lg {
    font-size: 12px;
    padding: 4px 11px;
}

/* purple */
.stack-tag--c0 { background: rgba(83,74,183,0.18); border-color: rgba(83,74,183,0.45); color: #a89ff0; }
/* blue */
.stack-tag--c1 { background: rgba(56,139,253,0.15); border-color: rgba(56,139,253,0.4); color: #79b8ff; }
/* yellow */
.stack-tag--c2 { background: rgba(234,179,8,0.15); border-color: rgba(234,179,8,0.4); color: #fde047; }
/* green */
.stack-tag--c3 { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.35); color: #86efac; }
/* orange */
.stack-tag--c4 { background: rgba(251,146,60,0.15); border-color: rgba(251,146,60,0.4); color: #fdba74; }

html.light .stack-tag--c0 { background: rgba(83,74,183,0.1); border-color: rgba(83,74,183,0.35); color: #534AB7; }
html.light .stack-tag--c1 { background: rgba(56,139,253,0.1); border-color: rgba(56,139,253,0.35); color: #1a6fd4; }
html.light .stack-tag--c2 { background: rgba(234,179,8,0.1); border-color: rgba(234,179,8,0.4); color: #a16207; }
html.light .stack-tag--c3 { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: #16a34a; }
html.light .stack-tag--c4 { background: rgba(251,146,60,0.1); border-color: rgba(251,146,60,0.35); color: #c2610a; }

/* ── Experience ─────────────────────────────────── */

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.experience-card {
    border: 0.5px solid var(--color-border-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.exp-role {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.exp-company {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.exp-team {
    font-size: 11px;
    color: var(--color-text-tertiary);
    margin-top: 2px;
}

.exp-period {
    font-size: 12px;
    color: var(--color-text-tertiary);
    white-space: nowrap;
}

.exp-description {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ── Skills ─────────────────────────────────────── */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.skill-group {
    border: 0.5px solid var(--color-border-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
}

.skill-group .section-label {
    margin-bottom: 10px;
}

/* ── About / Contact ────────────────────────────── */

.prose-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.prose-card .hero-avatar--lg {
    width: 56px;
    height: 56px;
    font-size: 16px;
}

.prose-heading {
    font-size: 17px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.prose-text {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.75;
}

.prose-heading--sm {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prose-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prose-list li::before {
    content: "–  ";
    color: var(--color-text-tertiary);
}

.error-page {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 40px;
}

.error-code {
    font-size: 72px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1;
}

.error-message {
    font-size: 22px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.error-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.contact-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* ── Landing page ───────────────────────────────── */

.landing-hero {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 0.5px solid var(--color-border-tertiary);
}

.landing-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #EEEDFE;
    color: #534AB7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 4px;
    object-fit: cover;
}

.landing-name {
    font-size: 26px;
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.landing-title {
    font-size: 13px;
    color: var(--color-text-tertiary);
    letter-spacing: 0.02em;
}

.landing-bio {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 480px;
    margin-top: 2px;
}

.landing-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 4px;
}

.stat-card {
    border: 0.5px solid var(--color-border-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 22px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

/* ── Certifications ─────────────────────────────── */

.cert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.cert-card {
    border: 0.5px solid var(--color-border-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.cert-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 99px;
    border: 0.5px solid transparent;
}

.cert-badge--active {
    background: var(--badge-bg);
    color: var(--badge-color);
    border-color: var(--badge-border);
}

.cert-badge--expired {
    background: transparent;
    color: var(--color-text-tertiary);
    border-color: var(--color-border-tertiary);
}

.cert-issuer {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.cert-dates {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--color-text-tertiary);
    margin-top: 4px;
}

.cert-dot {
    color: var(--color-border-secondary);
}

.cert-credential-id {
    font-size: 10px;
    color: var(--color-text-tertiary);
    font-family: monospace;
    margin-top: 2px;
}

.cert-link {
    font-size: 11px;
    color: #534AB7;
    text-decoration: none;
    margin-top: 4px;
}

.cert-link:hover {
    text-decoration: underline;
}

/* ── Theme toggle ───────────────────────────────── */

.theme-toggle {
    width: 28px;
    height: 28px;
    border-radius: var(--border-radius-md);
    border: 0.5px solid var(--color-border-tertiary);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0;
}

.theme-toggle:hover {
    color: var(--color-text-primary);
    border-color: var(--color-border-secondary);
}

.theme-toggle svg {
    width: 13px;
    height: 13px;
}

.icon-sun  { display: none; }
.icon-moon { display: block; }

html.light .icon-sun  { display: block; }
html.light .icon-moon { display: none; }

/* ══════════════════════════════════════════════════════════════════════════ */
/* ── RESPONSIVE DESIGN ──────────────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet: 768px ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 180px;
    }

    .content {
        padding: 1.5rem;
    }

    .project-grid,
    .focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .cert-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .sidebar {
        padding: 1.25rem 1rem;
        gap: 1.5rem;
    }

    .avatar {
        width: 48px;
        height: 48px;
        font-size: 14px;
    }

    .sidebar-name {
        font-size: 14px;
    }

    .sidebar-title {
        font-size: 11px;
    }

    .nav a {
        font-size: 12px;
        padding: 5px 8px;
    }

    .topbar-title {
        font-size: 12px;
    }

    .topbar-subtitle {
        display: none;
    }
}

/* ── Mobile: 768px and below ───────────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
        --topbar-height: 48px;
    }

    body {
        font-size: 13px;
        flex-direction: column;
    }

    /* Hide sidebar on mobile */
    .sidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 220px;
        z-index: 100;
        border-right: 0.5px solid var(--color-border-tertiary);
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Mobile menu toggle button */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--border-radius-md);
        border: 0.5px solid var(--color-border-tertiary);
        background: transparent;
        color: var(--color-text-secondary);
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
    }

    .mobile-menu-toggle:hover {
        color: var(--color-text-primary);
        border-color: var(--color-border-secondary);
    }

    .mobile-menu-toggle svg {
        width: 16px;
        height: 16px;
    }

    /* Mobile overlay */
    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Main layout adjustments */
    .main {
        margin-left: 0;
        width: 100%;
    }

    .topbar {
        height: var(--topbar-height);
        padding: 0 1rem;
        justify-content: space-between;
        flex-wrap: nowrap;
        align-items: center;
    }

    .topbar-title {
        width: auto;
        font-size: 13px;
        margin-bottom: 0;
        flex: 1;
        text-align: center;
        order: 2;
    }

    .mobile-menu-toggle {
        order: 1;
    }

    .topbar > div:last-child {
        order: 3;
    }

    .content {
        padding: 1rem;
        width: 100%;
    }

    /* Typography adjustments for mobile */
    .landing-name {
        font-size: 22px;
    }

    .landing-title {
        font-size: 12px;
    }

    .landing-bio {
        font-size: 12px;
        max-width: 100%;
    }

    .landing-avatar {
        width: 56px;
        height: 56px;
        font-size: 18px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.25rem;
    }

    .hero-avatar {
        width: 48px;
        height: 48px;
        font-size: 14px;
    }

    .hero-bio {
        max-width: 100%;
    }

    .hero-headline {
        font-size: 15px;
    }

    .prose-heading {
        font-size: 15px;
    }

    .prose-text {
        font-size: 12px;
    }

    /* Button improvements for mobile */
    .btn {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 40px;
        min-width: 40px;
        border-radius: var(--border-radius-md);
    }

    .landing-actions,
    .hero-actions,
    .contact-links {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .btn-primary,
    .btn-ghost {
        flex: 1;
        min-width: 120px;
    }

    /* Grid adjustments for mobile */
    .project-grid,
    .focus-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stats-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stat-card {
        padding: 0.875rem;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 10px;
    }

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

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .project-card,
    .skill-group,
    .cert-card,
    .stat-card,
    .experience-card {
        padding: 0.875rem;
    }

    .card-title {
        font-size: 12px;
    }

    .card-description {
        font-size: 11px;
    }

    .exp-role {
        font-size: 12px;
    }

    .exp-company {
        font-size: 11px;
    }

    .exp-team {
        font-size: 10px;
    }

    .exp-description {
        font-size: 11px;
    }

    /* Flexible touch targets */
    .theme-toggle,
    .social-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .theme-toggle svg,
    .social-btn svg {
        width: 16px;
        height: 16px;
    }

    .nav a {
        padding: 8px 10px;
        min-height: 40px;
        display: block;
        text-align: center;
    }

    /* Experience header for mobile */
    .exp-header {
        flex-direction: column;
        gap: 8px;
    }

    .exp-period {
        white-space: normal;
    }

    /* Reduce gaps and margins */
    .sidebar {
        gap: 1.25rem;
        padding: 1.25rem 1rem;
    }

    .landing-hero {
        gap: 8px;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .section-label {
        margin-bottom: 8px;
    }
}

/* ── Small Mobile: 480px and below ─────────────────────────────────────── */
@media (max-width: 480px) {
    :root {
        --border-radius-lg: 8px;
        --border-radius-md: 4px;
    }

    .landing-name {
        font-size: 20px;
    }

    .landing-title {
        font-size: 11px;
    }

    .landing-avatar {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }

    .hero-headline {
        font-size: 14px;
    }

    .prose-heading {
        font-size: 14px;
    }

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

    .card-title {
        font-size: 11px;
    }

    .card-description {
        font-size: 10px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .content {
        padding: 0.875rem;
    }

    .hero,
    .project-card,
    .skill-group,
    .cert-card,
    .stat-card,
    .experience-card {
        padding: 0.75rem;
    }

    .topbar {
        padding: 0 0.875rem;
    }

    .hero {
        gap: 0.75rem;
    }

    .landing-hero {
        gap: 6px;
        margin-bottom: 16px;
        padding-bottom: 16px;
    }

    .section-label {
        font-size: 9px;
        margin-bottom: 6px;
    }

    .stack-tag {
        font-size: 9px;
        padding: 2px 5px;
    }

    .cert-badge {
        font-size: 9px;
        padding: 1px 5px;
    }
}

/* ── Landscape Mobile (up to 900px height) ─────────────────────────────── */
@media (max-height: 600px) and (max-width: 768px) {
    .sidebar {
        padding: 1rem 0.875rem;
        gap: 1rem;
    }

    .avatar {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }

    .sidebar-name {
        font-size: 13px;
    }

    .sidebar-title {
        font-size: 10px;
    }

    .nav a {
        padding: 4px 8px;
        font-size: 11px;
    }

    .sidebar-social {
        gap: 4px;
    }

    .social-btn {
        width: 32px;
        height: 32px;
    }
}

/* ── Ensure proper touch interactions ──────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .nav a:hover {
        background: transparent;
    }

    .btn:hover {
        opacity: 0.8;
    }

    /* Add active state for touch */
    .btn:active,
    .nav a:active {
        opacity: 0.6;
    }
}
