/* ==================== NEON DARK DESIGN SYSTEM ==================== */
:root {
    /* ── Neon Palette ── */
    --neon: #00d4ff;
    /* electric cyan  */
    --neon-blue: #4f8fff;
    /* softer blue    */
    --neon-glow: #00aaff;
    /* glow source    */
    --neon-purple: #a855f7;
    /* accent purple  */
    --accent: var(--neon-blue);
    --accent-mid: #6fa3ff;
    --accent-light: rgba(79, 143, 255, 0.12);
    --accent-dark: #2563cc;

    /* ── Dark Backgrounds ── */
    --bg-primary: #070d17;
    /* near-black navy */
    --bg-secondary: #0d1526;
    /* panel dark      */
    --bg-tertiary: #111e35;
    /* card/input bg   */
    --bg-glass: rgba(13, 21, 38, 0.7);

    /* ── Text ── */
    --text-primary: #e0eeff;
    --text-secondary: #7fa8d4;
    --text-muted: #3f6090;

    /* ── Border ── */
    --border: rgba(79, 143, 255, 0.18);
    --border-neon: rgba(0, 212, 255, 0.35);

    /* ── Spacing ── */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* ── Typography ── */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    /* ── Radius ── */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    /* ── Neon Glow Shadows ── */
    --glow-sm:
        0 0 8px rgba(0, 212, 255, 0.3),
        0 0 2px rgba(79, 143, 255, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.5);

    --glow-md:
        0 0 16px rgba(0, 212, 255, 0.4),
        0 0 6px rgba(79, 143, 255, 0.5),
        0 4px 20px rgba(0, 0, 0, 0.6);

    --glow-lg:
        0 0 30px rgba(0, 212, 255, 0.45),
        0 0 12px rgba(79, 143, 255, 0.55),
        0 8px 40px rgba(0, 0, 0, 0.7);

    --glow-accent:
        0 0 20px rgba(0, 212, 255, 0.6),
        0 0 8px rgba(79, 143, 255, 0.7),
        0 4px 24px rgba(0, 0, 0, 0.5);

    /* legacy compat */
    --shadow-sm: var(--glow-sm);
    --shadow-md: var(--glow-md);
    --shadow-lg: var(--glow-lg);
    --clay-shadow-sm: var(--glow-sm);
    --clay-shadow-md: var(--glow-md);
    --clay-shadow-lg: var(--glow-lg);
    --clay-shadow-accent: var(--glow-accent);

    /* ── Transitions ── */
    --transition: 0.22s ease;
}

/* Dark mode is essentially the same but slight brightness boost */
body.dark-mode {
    --bg-primary: #050b13;
    --bg-secondary: #0a1120;
    --bg-tertiary: #0d1930;
    --text-primary: #eaf3ff;
    --text-secondary: #8ab5e0;
    --text-muted: #3b5880;
    --border: rgba(79, 143, 255, 0.22);
    --border-neon: rgba(0, 212, 255, 0.45);
}

/* ==================== BASE RESET ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    /* Robust full-height: use dvh where supported, fall back to vh */
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background var(--transition), color var(--transition);
}

/* On mobile the body must scroll so preview can sit below the form */
@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* ==================== FULL-WIDTH TOPNAV ==================== */
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    height: 56px;
    min-height: 56px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #080f1e 0%, #0a1425 100%);
    border-bottom: 1px solid var(--border-neon);
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.1), 0 2px 8px rgba(0, 0, 0, 0.6);
    z-index: 100;
}

/* Push all nav links + right controls flush to the right edge */
.topnav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
    /* ← this pushes everything to the right */
    margin-right: 8px;
}

.topnav-right {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

/* ── Nav button base ── */
.nav-btn {
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 20px;
    /* pill shape */
    border: 1.5px solid transparent;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-sans);
}

/* Home — cyan/neon outline pill */
#homeBtn {
    background: rgba(0, 212, 255, 0.08);
    color: var(--neon);
    border-color: rgba(0, 212, 255, 0.35);
}

#homeBtn:hover {
    background: rgba(0, 212, 255, 0.18);
    border-color: var(--neon);
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

/* Services — same cyan/neon as Home */
#servicesBtn {
    background: rgba(0, 212, 255, 0.08);
    color: var(--neon);
    border-color: rgba(0, 212, 255, 0.35);
}

#servicesBtn:hover {
    background: rgba(0, 212, 255, 0.18);
    border-color: var(--neon);
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

/* Contact Us — same cyan/neon as Home */
#contactBtn {
    background: rgba(0, 212, 255, 0.08);
    color: var(--neon);
    border-color: rgba(0, 212, 255, 0.35);
}

#contactBtn:hover {
    background: rgba(0, 212, 255, 0.18);
    border-color: var(--neon);
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

/* Shared active press */
.nav-btn:active {
    transform: scale(0.95) translateY(0);
    filter: brightness(0.9);
}

/* ==================== APP LAYOUT ==================== */
.app {
    display: flex;
    flex: 1;
    /* fill remaining body height after topnav */
    min-height: 0;
    /* allow flex children to shrink below content size */
    overflow: hidden;
}

/* Editor Panel (Left) */
.editor-panel {
    width: 605px;
    background: var(--bg-secondary);
    border-right: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--clay-shadow-lg);
    position: relative;
    z-index: 2;
}

.editor-header {
    display: flex;
    align-items: center;
    padding: 10px var(--space-lg);
    background: rgba(10, 16, 30, 0.9);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    min-height: 40px;
}

.editor-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.logo-section {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.logo span {
    color: var(--neon);
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.8), 0 0 30px rgba(0, 212, 255, 0.4);
}

.signature {
    font-size: 0.45rem;
    font-weight: 300;
    color: var(--text-muted);
    opacity: 0.4;
    vertical-align: middle;
    margin-left: 4px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    cursor: pointer;
    color: #ffffff;
    transition: all var(--transition);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.3) inset,
        0 -1px 0 rgba(0, 0, 0, 0.12) inset,
        0 3px 8px rgba(0, 0, 0, 0.2);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Header Buttons */
.header-buttons {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.nav-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.2) inset,
        0 2px 6px rgba(0, 0, 0, 0.18);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.3) inset,
        0 4px 12px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

/* ── Hamburger Button (mobile only) ── */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--neon);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.6);
}

.hamburger-btn:hover {
    background: rgba(0, 212, 255, 0.16);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

/* ── Mobile Nav Drawer ── */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 999;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.mobile-nav-overlay.hidden {
    display: none;
}

.mobile-nav-drawer {
    width: 260px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-neon);
    box-shadow: -4px 0 30px rgba(0, 212, 255, 0.2);
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    gap: 8px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mobile-nav-close {
    align-self: flex-end;
    width: 32px;
    height: 32px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--border-neon);
    border-radius: 50%;
    color: var(--neon);
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all var(--transition);
}

.mobile-nav-close:hover {
    background: var(--neon);
    color: #000;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

.mobile-nav-btn {
    width: 100%;
    padding: 13px 18px;
    background: rgba(79, 143, 255, 0.07);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition);
}

.mobile-nav-btn:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: var(--border-neon);
    color: var(--neon);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.mobile-nav-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

/* ── Responsive: show hamburger on small screens ── */
@media (max-width: 640px) {
    .desktop-nav {
        display: none !important;
    }

    .hamburger-btn {
        display: flex !important;
    }
}

/* ✦ Liquid Morphism — Services Popup Box */
#popupContent {
    position: relative;
    animation: liquidMorph 6s ease-in-out infinite;
    background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.07) 0%,
            rgba(99, 102, 241, 0.05) 50%,
            rgba(139, 92, 246, 0.07) 100%), var(--bg-secondary);
    box-shadow:
        0 0 0 2px rgba(99, 102, 241, 0.2),
        0 20px 60px rgba(99, 102, 241, 0.18),
        0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(99, 102, 241, 0.18);
    overflow: hidden;
}

/* Shimmering highlight sweep inside popup */
#popupContent::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(99, 102, 241, 0.12) 50%,
            rgba(139, 92, 246, 0.08) 100%);
    z-index: 0;
    animation: liquidMorph 6s ease-in-out infinite reverse;
    pointer-events: none;
}

/* Keep popup content above the shimmer */
#popupContent>* {
    position: relative;
    z-index: 1;
}

body.dark-mode #popupContent {
    background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.12) 0%,
            rgba(99, 102, 241, 0.10) 50%,
            rgba(139, 92, 246, 0.12) 100%), var(--bg-secondary);
    box-shadow:
        0 0 0 2px rgba(139, 92, 246, 0.3),
        0 20px 60px rgba(99, 102, 241, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.4);
}

@keyframes liquidMorph {
    0% {
        border-radius: 28px 18px 26px 20px / 20px 26px 20px 26px;
    }

    20% {
        border-radius: 20px 26px 18px 28px / 28px 18px 26px 20px;
    }

    40% {
        border-radius: 26px 20px 30px 16px / 22px 24px 18px 28px;
    }

    60% {
        border-radius: 18px 28px 22px 24px / 26px 20px 28px 18px;
    }

    80% {
        border-radius: 22px 24px 20px 26px / 18px 28px 22px 24px;
    }

    100% {
        border-radius: 28px 18px 26px 20px / 20px 26px 20px 26px;
    }
}




/* Popup Styles */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.popup-overlay.hidden {
    display: none;
}

.popup-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    min-width: 320px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: popIn 0.3s ease;
}

.popup-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.popup-close:hover {
    background: var(--accent);
    color: white;
}

/* ── Popup Header ── */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.popup-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon);
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
    letter-spacing: 0.02em;
}

.popup-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-neon);
    background: rgba(0, 212, 255, 0.08);
    border-radius: 50%;
    font-size: 0.85rem;
    color: var(--neon);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: var(--neon);
    color: #000;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.7);
}

.popup-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.popup-text a:hover {
    text-decoration: underline;
}

.contact-item-popup {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.contact-icon-popup {
    font-size: 1.2rem;
}

/* ==================== SOCIAL LINKS (Services Popup) ==================== */
.social-divider {
    height: 1px;
    background: var(--border);
    margin: 18px 0 14px;
}

.social-connect-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.22s ease;
    border: 2px solid transparent;
    flex: 1;
}

.social-icon {
    width: 32px;
    height: 32px;
    display: block;
    transition: transform 0.22s ease;
}

.social-card:hover .social-icon {
    transform: scale(1.15);
}

.social-name {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* Gmail — warm red */
.social-gmail {
    color: #ea4335;
    background: #fff5f5;
    border-color: #fecaca;
}

.social-gmail:hover {
    background: #fee2e2;
    border-color: #ea4335;
    box-shadow: 0 4px 16px rgba(234, 67, 53, 0.25);
    transform: translateY(-2px);
}

/* Instagram — vivid magenta/purple gradient via background on hover */
.social-instagram {
    color: #e1306c;
    background: #fff0f5;
    border-color: #fbcfe8;
}

.social-instagram:hover {
    background: linear-gradient(135deg, #fdf2fb 0%, #fff0f5 100%);
    border-color: #e1306c;
    box-shadow: 0 4px 16px rgba(225, 48, 108, 0.25);
    transform: translateY(-2px);
}

/* GitHub — dark charcoal, but accent tinted for dark mode compat */
.social-github {
    color: #24292e;
    background: #f6f8fa;
    border-color: #d1d5db;
}

.social-github:hover {
    background: #eaedf0;
    border-color: #24292e;
    box-shadow: 0 4px 16px rgba(36, 41, 46, 0.2);
    transform: translateY(-2px);
}

/* Dark mode adjustments */
body.dark-mode .social-gmail {
    background: rgba(234, 67, 53, .12);
    border-color: rgba(234, 67, 53, .3);
}

body.dark-mode .social-instagram {
    background: rgba(225, 48, 108, .12);
    border-color: rgba(225, 48, 108, .3);
}

body.dark-mode .social-github {
    color: #e6edf3;
    background: rgba(230, 237, 243, .08);
    border-color: rgba(230, 237, 243, .2);
}

body.dark-mode .social-github:hover {
    background: rgba(230, 237, 243, .14);
    border-color: #e6edf3;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Controls Bar */
.controls-bar {
    display: flex;
    gap: var(--space-md);
    padding: 14px var(--space-lg);
    border-bottom: none;
    background: var(--bg-tertiary);
    box-shadow: 0 2px 8px rgba(59, 126, 222, 0.08);
}

.control-group {
    flex: 1;
}

.control-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.control-group select {
    width: 100%;
    padding: 9px var(--space-md);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: var(--clay-shadow-sm);
    transition: all var(--transition);
}

.control-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--clay-shadow-md), 0 0 0 3px var(--accent-light);
}

/* Form Sections */
.form-sections {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
}

.form-section {
    margin-bottom: var(--space-lg);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--accent-light);
}

.add-btn {
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    border: 1.5px solid rgba(59, 126, 222, 0.25);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--clay-shadow-sm);
}

.add-btn:hover {
    background: var(--accent);
    color: white;
    box-shadow: var(--clay-shadow-accent);
    transform: translateY(-1px);
}

/* Photo Upload */
.photo-upload {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

.photo-preview.hidden {
    display: none;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.upload-label:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.upload-icon {
    font-size: 1.5rem;
}

/* Inputs */
.input-row {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.input,
.textarea {
    flex: 1;
    padding: 9px var(--space-md);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    box-shadow: var(--clay-shadow-sm);
}

.input:focus,
.textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--clay-shadow-md), 0 0 0 3px var(--accent-light);
}

.textarea {
    resize: none;
    /* JS controls height; user can't break the layout */
    min-height: 60px;
    overflow: hidden;
    /* Required for scrollHeight auto-grow trick */
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    /* Preserves line-breaks and wraps long lines */
}

/* Dynamic List Items */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.list-item {
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--grey-mid);
    box-shadow: var(--clay-shadow-sm);
    transition: box-shadow var(--transition);
}

.list-item:hover {
    box-shadow: var(--clay-shadow-md);
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.list-item-header strong {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.delete-btn {
    padding: 4px 10px;
    font-size: 0.7rem;
    color: #dc2626;
    background: #fee2e2;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 2px 0 rgba(255, 255, 255, 0.7) inset, 0 2px 6px rgba(220, 38, 38, 0.15);
    transition: all var(--transition);
}

.delete-btn:hover {
    background: #dc2626;
    color: white;
    box-shadow: 0 2px 0 rgba(255, 100, 100, 0.3) inset, 0 4px 12px rgba(220, 38, 38, 0.35);
    transform: translateY(-1px);
}

.list-item .input,
.list-item .textarea {
    margin-bottom: var(--space-sm);
    background: var(--bg-secondary);
}

/* Action Bar — always pinned at the bottom of the editor panel */
.action-bar {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-neon);
    background: var(--bg-secondary);
    flex-shrink: 0;
    /* never shrink so it stays visible */
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
}

/* ── Buttons: base (desktop-first) ── */
.btn {
    flex: 1;
    padding: 11px 20px;
    /* desktop: generous padding */
    font-family: inherit;
    font-size: 0.88rem;
    /* desktop size */
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    letter-spacing: 0.03em;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Primary — neon blue gradient */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    box-shadow:
        0 0 14px rgba(0, 212, 255, 0.35),
        0 4px 14px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* Secondary — glass dark */
.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1.5px solid var(--border-neon);
    box-shadow: var(--glow-sm);
}

/* ── Desktop hover (pointer devices only) ── */
@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover {
        background: linear-gradient(135deg, var(--accent-mid) 0%, var(--accent) 100%);
        box-shadow:
            0 0 22px rgba(0, 212, 255, 0.55),
            0 0 8px rgba(79, 143, 255, 0.5),
            0 8px 24px rgba(0, 0, 0, 0.25);
        transform: translateY(-2px);
    }

    .btn-secondary:hover {
        background: var(--accent-light);
        border-color: var(--neon);
        box-shadow:
            0 0 16px rgba(0, 212, 255, 0.3),
            0 4px 12px rgba(0, 0, 0, 0.2);
        transform: translateY(-1px);
        color: var(--neon);
    }

    .nav-btn:hover {
        background: rgba(0, 212, 255, 0.18);
        border-color: var(--neon);
        color: var(--neon);
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
        transform: translateY(-1px);
    }

    .add-btn:hover {
        background: var(--accent);
        color: #fff;
        box-shadow: var(--glow-accent);
        transform: translateY(-1px);
    }
}

/* ── Touch / active press feedback (all devices) ── */
.btn:active,
.nav-btn:active,
.add-btn:active,
.icon-btn:active {
    transform: scale(0.96) translateY(1px);
    filter: brightness(0.9);
    transition: transform 0.08s ease, filter 0.08s ease;
}

/* ── Responsive sizing ── */

/* Large tablets ≤1024px */
@media (max-width: 1024px) {
    .btn {
        padding: 10px 16px;
        font-size: 0.84rem;
    }
}

/* Small tablets ≤900px */
@media (max-width: 900px) {
    .btn {
        padding: 9px 14px;
        font-size: 0.82rem;
    }
}

/* Mobile ≤768px */
@media (max-width: 768px) {
    .btn {
        padding: 10px 12px;
        font-size: 0.8rem;
        min-height: 44px;
        /* comfortable tap target */
        border-radius: var(--radius-sm);
    }
}

/* Small phones ≤480px */
@media (max-width: 480px) {
    .btn {
        padding: 11px 10px;
        font-size: 0.78rem;
        min-height: 46px;
    }
}

/* Very small phones ≤360px */
@media (max-width: 360px) {
    .btn {
        padding: 10px 8px;
        font-size: 0.72rem;
        min-height: 44px;
    }
}

/* ==================== PREVIEW PANEL ==================== */
.preview-panel {
    flex: 1;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: auto;
    min-height: 0;
}

/* Zoom slider bar */
.zoom-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(13, 21, 38, 0.95);
    border-bottom: 1px solid var(--border-neon);
    flex-shrink: 0;
    z-index: 5;
    position: sticky;
    top: 0;
}

.zoom-label {
    font-size: 1rem;
    opacity: 0.8;
}

.zoom-slider {
    flex: 1;
    max-width: 220px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    accent-color: var(--neon);
    transition: background var(--transition);
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.7);
    cursor: pointer;
    transition: box-shadow var(--transition);
}

.zoom-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 14px rgba(0, 212, 255, 1);
}

.zoom-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neon);
    border: none;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.7);
    cursor: pointer;
}

.zoom-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--neon);
    min-width: 36px;
    text-align: right;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

/* ── Preview Button variant (eye / purple) ── */
.btn-preview {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: #fff;
    border: 1px solid rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 14px rgba(124, 58, 237, 0.35), 0 4px 14px rgba(0, 0, 0, 0.3);
}

@media (hover: hover) and (pointer: fine) {
    .btn-preview:hover {
        background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
        box-shadow: 0 0 22px rgba(139, 92, 246, 0.6), 0 8px 24px rgba(0, 0, 0, 0.25);
        transform: translateY(-2px);
    }
}

/* ── Full-Screen Preview Popup ── */
.preview-popup {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

.preview-popup.hidden {
    display: none;
}

/* Sticky header bar inside popup */
.preview-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #080f1e 0%, #0a1425 100%);
    border-bottom: 1px solid var(--border-neon);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.preview-popup-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--neon);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* Actions row: slider + zoom% + close button */
.preview-popup-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    /* fill remaining header space */
    justify-content: flex-end;
    flex-wrap: nowrap;
    /* keep it on one line */
    min-width: 0;
}

/* Popup zoom slider — visible and wide */
.preview-popup-actions .zoom-slider {
    flex: 1;
    min-width: 90px;
    max-width: 180px;
}

.preview-popup-actions .zoom-value {
    min-width: 38px;
    font-size: 0.78rem;
}

/* On very small screens, wrap title + actions to separate rows */
@media (max-width: 480px) {
    .preview-popup-header {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .preview-popup-actions {
        width: 100%;
        justify-content: space-between;
    }

    .preview-popup-actions .zoom-slider {
        flex: 1;
        min-width: 80px;
        max-width: none;
    }
}

/* Close button */
.preview-popup-close {
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.12);
    color: #ff6b6b;
    border: 1.5px solid rgba(220, 38, 38, 0.35);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.preview-popup-close:hover {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 0 14px rgba(220, 38, 38, 0.5);
    transform: translateY(-1px);
}

.preview-popup-close:active {
    transform: scale(0.96);
}

/* Scrollable body — padding-top 0 so top of resume isn't cut */
.preview-popup-body {
    flex: 1;
    overflow: auto;
    background: var(--bg-primary);
    display: block;
    /* plain block so scroll works predictably */
    padding: var(--space-md);
    -webkit-overflow-scrolling: touch;
}

/* Wrapper: centres the scaled resume and collapses scaled whitespace */
.preview-popup-scaler-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* min-height keeps the scaler visible without extra dead space */
    min-height: min-content;
    width: 100%;
}

/* The actual scale transform; JS overrides transform + margin-bottom dynamically */
.preview-popup-scaler {
    transform-origin: top center;
    transform: scale(0.7);
    margin-bottom: calc(-297mm * 0.3);
    flex-shrink: 0;
}


.preview-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding: var(--space-lg);
    overflow: auto;
    /* scroll to reach any part of the preview */
    flex: 1;
}

/* The scaler div transforms for the visual preview ONLY */
.preview-scaler {
    transform-origin: top center;
    transform: scale(0.6);
    /* JS overrides this via the slider */
    /* Collapse the extra whitespace from the visual scaling */
    margin-bottom: calc(-297mm * 0.4);
}

/* Resume Page (A4) - NO transform here so PDF captures correctly */
.resume-page {
    width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

/* ==================== RESPONSIVE ==================== */

/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .editor-panel {
        width: 520px;
    }

    .preview-panel {
        padding: var(--space-md);
    }

    .preview-scaler {
        transform: scale(0.55);
        margin-bottom: calc(-297mm * 0.45);
    }
}

/* Tablets - Side by side but scaled */
@media (max-width: 1024px) {
    .editor-panel {
        width: 440px;
    }

    .preview-scaler {
        transform: scale(0.48);
        margin-bottom: calc(-297mm * 0.52);
    }

    .controls-bar {
        flex-wrap: wrap;
    }

    .control-group {
        flex: 1 1 45%;
        min-width: 120px;
    }
}

/* Small tablets - Stacked layout */
@media (max-width: 900px) {
    .app {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .editor-panel {
        width: 100%;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        overflow: visible;
    }

    .form-sections {
        max-height: 55vh;
        overflow-y: auto;
    }

    .preview-panel {
        width: 100%;
        min-height: 50vh;
        padding: var(--space-md);
        align-items: flex-start;
    }

    .preview-container {
        padding: var(--space-md) 0;
    }

    .preview-scaler {
        transform: scale(0.42);
        margin-bottom: calc(-297mm * 0.58);
    }

    .action-bar {
        flex-wrap: nowrap;
        gap: var(--space-sm);
    }
}


/* Mobile — full-page scroll layout: form first, preview below */
@media (max-width: 768px) {

    /* Let the whole page scroll naturally */
    .app {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    /* Editor: natural height, no viewport lock */
    .editor-panel {
        width: 100%;
        height: auto;
        max-height: none;
        overflow: visible;
        display: block;
        border-right: none;
        border-bottom: 1px solid var(--border-neon);
    }

    /* Form: full height, no clipping */
    .form-sections {
        overflow-y: visible;
        padding: var(--space-md);
        max-height: none;
        flex: none;
    }

    /* Action bar sits below the form naturally */
    .action-bar {
        position: static;
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-sm);
    }

    /* ── Preview panel: visible BELOW the form ── */
    .preview-panel {
        display: flex;
        width: 100%;
        min-height: unset;
        padding: var(--space-md) var(--space-sm) var(--space-xl);
        background: var(--bg-primary);
        justify-content: center;
        align-items: flex-start;
        overflow: visible;
    }

    .preview-container {
        width: 100%;
        padding: 0;
        display: flex;
        justify-content: center;
        overflow: visible;
    }

    /* Scale A4 to fit phone width comfortably */
    .preview-scaler {
        transform: scale(0.42);
        transform-origin: top center;
        margin-bottom: calc(-297mm * 0.58);
    }

    .editor-header {
        padding: var(--space-sm) var(--space-md);
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .logo {
        font-size: 1.25rem;
    }

    .header-buttons {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .nav-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.7rem;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .controls-bar {
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-sm);
    }

    .input-row {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .input,
    .textarea {
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    .add-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8rem;
    }
}


/* Mobile portrait */
@media (max-width: 480px) {
    .logo-section {
        width: 100%;
    }

    .header-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .control-group {
        flex: 1 1 100%;
    }

    .control-group select {
        padding: var(--space-sm);
    }

    .section-title {
        font-size: 0.75rem;
    }

    .add-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.75rem;
    }

    .photo-upload {
        flex-direction: column;
        align-items: flex-start;
    }

    .photo-preview {
        width: 60px;
        height: 60px;
    }

    .upload-label {
        width: 100%;
        padding: var(--space-sm) var(--space-md);
    }

    /* form-sections inherits flex:1 + overflow-y:auto from 768px rule — no max-height needed */

    .resume-page {
        transform: scale(0.35);
        margin-bottom: calc(-297mm * 0.65);
    }

    /* Two compact buttons side by side */
    .btn {
        flex: 1;
        padding: 10px var(--space-sm);
        font-size: 0.8rem;
        min-height: 42px;
        white-space: nowrap;
    }

    .popup-box {
        min-width: 280px;
        padding: var(--space-lg);
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .resume-page {
        transform: scale(0.28);
        margin-bottom: calc(-297mm * 0.72);
    }

    .logo {
        font-size: 1.1rem;
    }

    .nav-btn {
        padding: 4px 6px;
        font-size: 0.65rem;
    }
}

/* ── Hamburger Button (mobile only) ── */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--neon);
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.6);
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: rgba(0, 212, 255, 0.16);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

/* ── Mobile Nav Drawer ── */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 999;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.mobile-nav-overlay.hidden {
    display: none;
}

.mobile-nav-drawer {
    width: 260px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-neon);
    box-shadow: -4px 0 30px rgba(0, 212, 255, 0.2);
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    gap: 8px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mobile-nav-close {
    align-self: flex-end;
    width: 32px;
    height: 32px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--border-neon);
    border-radius: 50%;
    color: var(--neon);
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all var(--transition);
}

.mobile-nav-close:hover {
    background: var(--neon);
    color: #000;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

.mobile-nav-btn {
    width: 100%;
    padding: 13px 18px;
    background: rgba(79, 143, 255, 0.07);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition);
}

.mobile-nav-btn:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: var(--border-neon);
    color: var(--neon);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.mobile-nav-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

/* ── Responsive breakpoint ── */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }

    .hamburger-btn {
        display: flex !important;
    }

    .topnav {
        padding: 0 var(--space-md);
    }

    /* Stack panels vertically on mobile */
    .app {
        flex-direction: column;
        /* DON'T override height — inherits flex:1 from global rule */
    }

    /* Editor takes top half; flex% is relative to the .app container */
    .editor-panel {
        width: 100%;
        flex: 0 0 50%;
        height: 50%;
        min-height: 0;
        overflow: hidden;
    }

    /* form-sections fills remainder of editor height and scrolls */
    .form-sections {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Preview takes bottom half */
    .preview-panel {
        flex: 1;
        min-height: 0;
        overflow: auto;
    }
}

/* ==================== CONTACT POPUP + BOT ==================== */

/* 3 social cards row */
.contact-cards {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.ccard {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all 0.22s ease;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.ccard-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.ccard-label {
    font-size: 0.78rem;
    font-weight: 700;
}

.ccard-sub {
    font-size: 0.62rem;
    opacity: 0.65;
}

/* Portfolio – neon blue */
.ccard-portfolio {
    color: var(--neon-blue);
    background: rgba(79, 143, 255, 0.07);
    border-color: rgba(79, 143, 255, 0.25);
}

.ccard-portfolio:hover {
    background: rgba(79, 143, 255, 0.18);
    border-color: var(--neon-blue);
    box-shadow: 0 0 16px rgba(79, 143, 255, 0.4);
    transform: translateY(-2px);
}

/* Telegram – cyan */
.ccard-telegram {
    color: #29b6f6;
    background: rgba(41, 182, 246, 0.07);
    border-color: rgba(41, 182, 246, 0.25);
}

.ccard-telegram:hover {
    background: rgba(41, 182, 246, 0.18);
    border-color: #29b6f6;
    box-shadow: 0 0 16px rgba(41, 182, 246, 0.4);
    transform: translateY(-2px);
}

/* Instagram – magenta */
.ccard-instagram {
    color: #e1306c;
    background: rgba(225, 48, 108, 0.07);
    border-color: rgba(225, 48, 108, 0.25);
}

.ccard-instagram:hover {
    background: rgba(225, 48, 108, 0.18);
    border-color: #e1306c;
    box-shadow: 0 0 16px rgba(225, 48, 108, 0.35);
    transform: translateY(-2px);
}

/* Bot trigger button */
.bot-trigger-btn {
    width: 100%;
    padding: 11px 18px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12) 0%, rgba(79, 143, 255, 0.1) 100%);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-sm);
    color: var(--neon);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
    letter-spacing: 0.03em;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.15);
    margin-bottom: 12px;
}

.bot-trigger-btn:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.22) 0%, rgba(79, 143, 255, 0.18) 100%);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.35);
    transform: translateY(-1px);
}

/* Bot panel */
.bot-panel {
    flex-direction: column;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    padding: 12px;
    max-height: 320px;
    overflow: hidden;
}

/* Chat feed */
.bot-feed {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 130px;
    padding-right: 4px;
    margin-bottom: 8px;
}

.bot-feed::-webkit-scrollbar {
    width: 4px;
}

.bot-feed::-webkit-scrollbar-track {
    background: transparent;
}

.bot-feed::-webkit-scrollbar-thumb {
    background: var(--border-neon);
    border-radius: 4px;
}

/* Chat bubbles */
.bot-bubble {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.5;
    max-width: 88%;
    animation: popIn 0.2s ease;
}

.bot-bubble-bot {
    background: rgba(79, 143, 255, 0.1);
    border: 1px solid rgba(79, 143, 255, 0.22);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.bot-bubble-user {
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid var(--border-neon);
    color: var(--neon);
    align-self: flex-end;
    text-align: right;
    border-bottom-right-radius: 4px;
}

/* Question buttons */
.bot-questions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bot-qlabel {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.bot-qbtn {
    padding: 7px 10px;
    background: rgba(79, 143, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s ease;
}

.bot-qbtn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--border-neon);
    color: var(--neon);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

/* Reset button */
.bot-reset {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.18s ease;
    align-self: flex-start;
    margin-top: 4px;
}

.bot-reset:hover {
    border-color: var(--border-neon);
    color: var(--neon);
}

/* ==================== PRINT STYLES ==================== */
@media print {
    body * {
        visibility: hidden;
    }

    .resume-page,
    .resume-page * {
        visibility: visible;
    }

    .resume-page {
        position: absolute;
        left: 0;
        top: 0;
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 0;
        box-shadow: none;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
