/* ══════════════════════════════════════════
   CSS VARIABLES — DARK  (default)
══════════════════════════════════════════ */
:root {
    /* Panel / page palette */
    --panel-bg:        #070c1a;
    --panel-surface:   #0d1528;
    --panel-card:      #111d35;
    --panel-border:    #1c2d4a;
    --accent-cyan:     #00d4ff;
    --accent-purple:   #7b2fff;
    --accent-glow:     rgba(0, 212, 255, 0.12);
    --text-primary:    #ddeeff;
    --text-secondary:  #7a9abb;
    --text-muted:      #3a5a78;

    /* Navbar — dark-mode defaults */
    --nav-bg:          #040810;
    --nav-border:      transparent;
    --nav-shadow:      none;
    --nav-logo-color:  #00d4ff;
    --nav-logo-accent: #39ff14;
    --nav-text:        #8aa8c8;
    --nav-status:      #22aa10;

    /* Typography */
    --font-display:    'Rajdhani', sans-serif;
    --font-body:       'Figtree', sans-serif;
    --font-mono:       'JetBrains Mono', monospace;
}

/* ══════════════════════════════════════════
   CSS VARIABLES — LIGHT
   Panel / text vars only — terminal vars
   live in terminal.css and are never touched.
══════════════════════════════════════════ */
[data-theme="light"] {
    --panel-bg:        #f0f5ff;
    --panel-surface:   #ffffff;
    --panel-card:      #e6eeff;
    --panel-border:    #c0d0ec;
    --accent-cyan:     #0077aa;
    --accent-purple:   #6012dd;
    --accent-glow:     rgba(0, 119, 170, 0.08);
    --text-primary:    #0a1628;
    --text-secondary:  #3a5270;
    --text-muted:      #6882a0;

    /* Navbar — light-mode overrides */
    --nav-bg:          #ffffff;
    --nav-border:      #e0e8f8;
    --nav-shadow:      0 1px 12px rgba(0,0,0,0.07);
    --nav-logo-color:  #0077aa;
    --nav-logo-accent: #229900;
    --nav-text:        #4a6888;
    --nav-status:      #229900;
}

/* ══════════════════════════════════════════
   RESET / BASE
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0; padding: 0;
    background: var(--panel-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow: hidden;
}

/* ══════════════════════════════════════════
   NAVBAR
   Uses CSS variables so both themes work
   without duplication.
══════════════════════════════════════════ */
.site-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 54px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--nav-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    transition: background .25s, border-color .25s, box-shadow .25s;
}

/* Gradient accent rule at the bottom of the navbar */
.site-navbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        var(--nav-logo-accent) 0%,
        var(--accent-cyan)     40%,
        var(--accent-purple)   100%);
    opacity: 0.5;
}

/* Logo */
.nav-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--nav-logo-color);
    text-decoration: none;
    transition: color .25s;
}
.nav-logo span {
    color: var(--nav-logo-accent);
    transition: color .25s;
}

/* ── Theme toggle button ── */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    background: rgba(128,128,128,0.08);
    border: 1px solid rgba(128,128,128,0.18);
    border-radius: 20px;
    color: var(--nav-text);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
.theme-toggle i { font-size: 0.75rem; }
.theme-toggle:hover {
    background: var(--accent-glow);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Status badge */
.nav-status {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--nav-status);
    transition: color .25s;
}

.dot-pulse {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ══════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════ */
.main-wrap {
    display: flex;
    height: calc(100vh - 54px);
    margin-top: 54px;
    overflow: hidden;
    position: relative;   /* for .term-toggle-btn absolute positioning */
}

/* ══════════════════════════════════════════
   PANEL TOGGLE BUTTON
   Sits on the divider; slides to right edge
   when the terminal panel is collapsed.
══════════════════════════════════════════ */
.term-toggle-btn {
    position: absolute;
    left: 66.666%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    color: var(--text-secondary);
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: left 0.3s cubic-bezier(0.4,0,0.2,1),
                background .18s, border-color .18s, color .18s;
}
.term-toggle-btn:hover {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #fff;
}

/* Floats to right edge when terminal is hidden */
.main-wrap.terminal-hidden .term-toggle-btn {
    left: calc(100% - 13px);
}

/* Toggle button hidden below 1025 px — handled in the tablet media query below */

/* ══════════════════════════════════════════
   LEFT — PROFILE PANEL  (67%)
══════════════════════════════════════════ */
.profile-panel {
    flex: 0 0 66.666%;
    max-width: 66.666%;
    overflow-y: auto;
    padding: 1.5rem 1.75rem;
    background: var(--panel-bg);
    border-right: 1px solid var(--panel-border);
    transition: flex-basis 0.3s cubic-bezier(0.4,0,0.2,1),
                max-width  0.3s cubic-bezier(0.4,0,0.2,1),
                background .25s, border-color .25s;
}
.profile-panel::-webkit-scrollbar { width: 4px; }
.profile-panel::-webkit-scrollbar-track { background: transparent; }
.profile-panel::-webkit-scrollbar-thumb { background: var(--panel-border); border-radius: 2px; }

/* Expand to full width when terminal is hidden */
.main-wrap.terminal-hidden .profile-panel {
    flex: 0 0 100%;
    max-width: 100%;
}

/* ── Profile Card ── */
.profile-card {
    position: relative;
    overflow: hidden;
    background: var(--panel-surface);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    animation: fadeUp 0.4s ease both;
    transition: background .25s, border-color .25s;
}
/* top gradient accent bar */
.profile-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
}

.profile-avatar {
    flex-shrink: 0;
    width: 68px; height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 0 22px rgba(0,212,255,.25);
}

.profile-info { flex: 1; min-width: 0; }

.profile-name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: .5px;
    margin: 0 0 .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .25s;
}
.profile-title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    margin: 0 0 .45rem;
    transition: color .25s;
}
.profile-status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .74rem;
    color: var(--nav-status);
}

/* Social buttons */
.profile-socials {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-left: auto;
}
.social-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .32rem .7rem;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: .74rem;
    text-decoration: none;
    transition: border-color .18s, color .18s, background .18s;
    cursor: pointer;
}
.social-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: var(--accent-glow);
}

/* ── Tab Navigation ── */
.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--panel-border);
    margin-bottom: 1.25rem;
    animation: fadeUp 0.4s 0.05s ease both;
    transition: border-color .25s;
}
.profile-tab {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.2rem;
    font-family: var(--font-body);
    font-size: .84rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .18s, border-color .18s;
    white-space: nowrap;
}
.profile-tab i { font-size: .78rem; }
.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}

/* ── Tab Panes ── */
.tab-pane { display: none; animation: fadeUp 0.25s ease both; }
.tab-pane.active { display: block; }

/* Bio card — Bootstrap handles text reflow as bio grows */
.bio-card {
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    font-size: .9rem;
    line-height: 1.75;
    color: var(--text-primary);
    transition: background .25s, border-color .25s, color .25s;
}
.bio-card h4 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: .6rem;
    color: var(--text-primary);
}

/* Stat cards grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    margin-bottom: 1rem;
}
.stat-card {
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: border-color .2s, background .25s;
}
.stat-card:hover { border-color: var(--accent-cyan); }
.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    line-height: 1;
    margin-bottom: .25rem;
}
.stat-label { font-size: .72rem; color: var(--text-secondary); }

/* Placeholder card */
.placeholder-card {
    background: var(--panel-card);
    border: 1px dashed var(--panel-border);
    border-radius: 10px;
    padding: 2.5rem;
    text-align: center;
    transition: background .25s, border-color .25s;
}
.placeholder-card i {
    display: block;
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: .75rem;
}
.placeholder-label {
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: .5rem;
}
.placeholder-card p {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text-muted);
    margin: 0;
}

/* ══════════════════════════════════════════
   SHARED ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════
   MOBILE FAB — floating terminal toggle button
   Hidden on desktop; appears on tablet / phone.
══════════════════════════════════════════ */
.term-fab {
    display: none; /* desktop: hidden */
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 650;  /* above backdrop + drawer */
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #0a0a0a;
    border: 1.5px solid #39ff14;
    color: #39ff14;
    font-size: 1.15rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(57,255,20,.35), 0 4px 16px rgba(0,0,0,.5);
    transition: transform .2s, box-shadow .2s, background .2s;
}
.term-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 0 28px rgba(57,255,20,.55), 0 6px 20px rgba(0,0,0,.55);
}
/* Rotate to X when drawer is open */
.term-fab.open {
    background: #111;
    border-color: #ff5555;
    color: #ff5555;
    box-shadow: 0 0 18px rgba(255,85,85,.3), 0 4px 16px rgba(0,0,0,.5);
}

@media (max-width: 1024px) {
    .term-fab { display: flex; }
}

/* ══════════════════════════════════════════
   PROFILE PHOTO
══════════════════════════════════════════ */
.profile-avatar { position: relative; overflow: hidden; }
.profile-avatar img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.profile-avatar img.loaded { opacity: 1; }

/* ══════════════════════════════════════════
   SKILLS TAB
══════════════════════════════════════════ */
.skills-section {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.skills-category-group {
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: background .25s, border-color .25s;
}
.skills-category {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin: 0 0 .65rem;
    padding-bottom: .55rem;
    border-bottom: 1px solid var(--panel-border);
    transition: color .25s, border-color .25s;
}
.skills-category i { font-size: .8rem; flex-shrink: 0; }
.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.skill-tag {
    display: inline-flex;
    align-items: center;
    padding: .3rem .7rem;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 6px;
    font-size: .78rem;
    color: var(--text-secondary);
    cursor: default;
    transition: background .18s, border-color .18s, color .18s;
}
.skill-tag:hover {
    background: var(--accent-glow);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ══════════════════════════════════════════
   EXPERIENCE TAB
══════════════════════════════════════════ */
.experience-card {
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
    margin-bottom: .85rem;
    position: relative;
    overflow: hidden;
    transition: background .25s, border-color .25s;
}
.experience-card:last-child { margin-bottom: 0; }
.experience-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
}
.exp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .85rem;
    flex-wrap: wrap;
}
.exp-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 .15rem;
    line-height: 1.3;
    transition: color .25s;
}
.exp-company {
    display: block;
    font-family: var(--font-mono);
    font-size: .73rem;
    color: var(--accent-cyan);
    opacity: .85;
    transition: color .25s, opacity .25s;
}
.exp-date {
    font-family: var(--font-mono);
    font-size: .68rem;
    color: var(--text-muted);
    background: var(--panel-surface);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: .22rem .7rem;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    transition: background .25s, border-color .25s, color .25s;
}
.exp-bullets {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.exp-bullets li {
    font-size: .86rem;
    color: var(--text-secondary);
    line-height: 1.65;
    transition: color .25s;
}

/* ══════════════════════════════════════════
   CONTACT TAB
══════════════════════════════════════════ */
.contact-card {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: .9rem 1.2rem;
    transition: border-color .18s, background .25s;
}
.contact-item:hover { border-color: var(--accent-cyan); }
.contact-item > i {
    font-size: 1.1rem;
    color: var(--accent-cyan);
    flex-shrink: 0;
    width: 1.4rem;
    text-align: center;
    transition: color .25s;
}
.contact-item a,
.contact-item span {
    font-size: .86rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .18s;
}
.contact-item a:hover { color: var(--accent-cyan); }
.contact-links {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

/* ══════════════════════════════════════════
   CERTIFICATIONS TAB
══════════════════════════════════════════ */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}
.cert-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: .95rem 1.1rem;
    cursor: pointer;
    transition: border-color .18s, background .2s, transform .15s;
}
.cert-card:hover {
    border-color: var(--accent-cyan);
    background: var(--panel-surface);
    transform: translateY(-1px);
}
.cert-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cert-icon i { font-size: 1.1rem; color: var(--accent-cyan); }
.cert-icon--gold {
    background: rgba(255, 193, 7, 0.12);
    border-color: rgba(255, 193, 7, 0.3);
}
.cert-icon--gold i { color: #ffc107; }
.cert-body { flex: 1; min-width: 0; }
.cert-title {
    font-size: .84rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 .15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .25s;
}
.cert-label {
    font-family: var(--font-mono);
    font-size: .67rem;
    color: var(--text-muted);
    letter-spacing: .4px;
    transition: color .25s;
}
.cert-view {
    flex-shrink: 0;
    width: 28px; height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: .82rem;
    transition: color .18s, background .18s;
}
.cert-card:hover .cert-view {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
}

/* Certification Lightbox */
.cert-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}
.cert-modal.active {
    opacity: 1;
    pointer-events: all;
}
.cert-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 16, 0.88);
    backdrop-filter: blur(4px);
}
.cert-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 1000px);
    height: min(88vh, 800px);
    background: var(--panel-surface);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96) translateY(8px);
    transition: transform .22s ease;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,255,0.08);
}
.cert-modal.active .cert-modal-dialog {
    transform: scale(1) translateY(0);
}
.cert-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1.2rem;
    border-bottom: 1px solid var(--panel-border);
    flex-shrink: 0;
    gap: 1rem;
    background: var(--panel-card);
    transition: background .25s, border-color .25s;
}
.cert-modal-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .25s;
}
.cert-modal-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.cert-open-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .75rem;
    background: var(--accent-glow);
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 6px;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: .7rem;
    text-decoration: none;
    transition: background .18s, border-color .18s;
}
.cert-open-tab-btn:hover {
    background: rgba(0, 212, 255, 0.16);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}
.cert-close-btn {
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: .8rem;
    cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
}
.cert-close-btn:hover {
    background: rgba(255, 85, 85, 0.1);
    border-color: #ff5555;
    color: #ff5555;
}
.cert-modal-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: var(--panel-bg);
}

@media (max-width: 575.98px) {
    .certs-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════
   PHOTO ZOOM MODAL
══════════════════════════════════════════════════ */
.profile-avatar { cursor: pointer; }
.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}
.photo-modal.active {
    opacity: 1;
    pointer-events: all;
}
.photo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 16, 0.9);
    backdrop-filter: blur(10px);
    cursor: zoom-out;
}
.photo-modal-frame {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
}
.photo-modal-img {
    display: block;
    width: min(72vw, 420px);
    height: min(72vw, 420px);
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.3), 0 24px 80px rgba(0,0,0,0.7);
    transform: scale(0.9);
    opacity: 1;
    transition: transform .22s ease, opacity .18s ease;
}
.photo-modal.active .photo-modal-img { transform: scale(1); }
.photo-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px; height: 40px;
    background: rgba(4, 8, 16, 0.75);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 50%;
    color: var(--accent-cyan);
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .18s, border-color .18s, transform .15s;
}
.photo-nav:hover {
    background: rgba(0, 212, 255, 0.18);
    border-color: var(--accent-cyan);
    transform: translateY(-50%) scale(1.1);
}
.photo-nav--prev { left: -20px; }
.photo-nav--next { right: -20px; }

/* ══════════════════════════════════════════
   RESPONSIVE — page / panel breakpoints
   Terminal is hidden below 1025 px (see terminal.css).
   Breakpoints:
     ≥ 1025 px → desktop  (side-by-side, interactive terminal)
     < 1025 px → tablet / phone  (single column, no terminal)
     < 576  px → small phone  (extra compact tweaks)
══════════════════════════════════════════ */

/* ── Tablet + Phone  (< 1025 px) ───────────────────
   • Main-wrap stays full-viewport-height so nothing scrolls
     at the page level — only the profile panel scrolls inside.
   • Tabs row gets horizontal scroll so all 5 tabs are reachable.
   • Theme toggle collapses to icon-only.
   • Status badge and panel divider button are hidden.
─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .main-wrap {
        flex-direction: column;
        height: calc(100vh - 54px);
        overflow: hidden;
    }

    .profile-panel {
        flex: 1 1 auto !important;
        max-width: 100% !important;
        width: 100%;
        overflow-y: auto;
        border-right: none;
    }

    /* Tabs scroll horizontally — no clipping on narrow screens */
    .profile-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .profile-tabs::-webkit-scrollbar { display: none; }

    /* Icon-only theme toggle — text hidden */
    #themeLabel { display: none; }

    .nav-status      { display: none; }
    .term-toggle-btn { display: none; }
    .profile-socials { margin-left: 0; margin-top: .75rem; }
}

/* ── Small phone  (< 576 px) ──────────────────────── */
@media (max-width: 575.98px) {
    .site-navbar { padding: 0 1rem; }

    .profile-card  { flex-direction: column; align-items: flex-start; }
    .profile-name  { white-space: normal; font-size: 1.15rem; }
    .social-btn    { font-size: .68rem; padding: .28rem .55rem; }
    .stats-grid    { grid-template-columns: repeat(2, 1fr); }
    .profile-tab   { padding: .45rem .8rem; font-size: .78rem; }
}

/* ══════════════════════════════════════════
   RESUME TAB — inline iframe
══════════════════════════════════════════ */
.tab-pane--resume {
    padding: 0;
    margin: -0.25rem -0.5rem 0;
}

.resume-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .75rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--panel-border);
    border-radius: 6px 6px 0 0;
    gap: 1rem;
}

.resume-toolbar-label {
    font-size: .78rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: .4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resume-dl-btn {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem .8rem;
    border-radius: 5px;
    background: var(--accent-cyan);
    color: #000;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity .15s;
}

.resume-dl-btn:hover { opacity: .85; color: #000; }

.resume-frame {
    display: block;
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 0 0 6px 6px;
}
