/**
 * TNG Clean Executive Resume & CV Styles
 * Optimized for Desktop, iPhone/Mobile, Print/PDF, and Distraction-Free Paper Clean Mode.
 */

/* Universal Clean Resume Viewport & Background */
html {
    background-color: #f8fafc !important;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    min-height: 100%;
}
body,
body.tng-clean-resume-page,
body:has(.tng-resume-container) {
    background-color: #f8fafc !important;
    background: #f8fafc !important;
    color: #1e293b !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100% !important;
    position: relative;
    overflow-x: visible !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.tng-embedded-cv,
body.tng-embedded-cv {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    height: auto !important;
    min-height: 100% !important;
}

/* Suppress global scenic background image on clean resume pages */
body::before,
body.tng-clean-resume-page::before,
body:has(.tng-resume-container)::before {
    display: none !important;
    content: none !important;
}

/* Suppress theme navigation header, footer, top contact bar, scenic photo HUD badge, and skip links */
header.wp-block-template-part,
.wp-site-blocks > header,
footer.wp-block-template-part,
.wp-site-blocks > footer,
.fixed-top-contact,
aside.fixed-top-contact,
#tng-fixed-contact-bar,
#tng-scenic-badge-btn,
#tng-scenic-modal,
.skip-link,
#wp-skip-link,
.entry-title,
.wp-block-post-title,
.post-title {
    display: none !important;
}

/* Reset block theme layout wrapper */
.wp-site-blocks,
.wp-site-blocks > main,
main#wp--skip-link--target {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Pure Paper / Clean Mode & Embedded Modal Window Mode */
html.tng-clean-mode .tng-resume-nav-bar,
body.tng-clean-mode .tng-resume-nav-bar,
html.tng-embedded-cv .tng-resume-nav-bar,
body.tng-embedded-cv .tng-resume-nav-bar {
    display: none !important;
}

html.tng-clean-mode .tng-resume-container {
    margin: 20px auto 40px auto !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06) !important;
}

html.tng-embedded-cv .tng-resume-container,
body.tng-embedded-cv .tng-resume-container {
    margin: 10px auto 16px auto !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
    padding: 24px 20px !important;
}

/* Floating Clean Mode Action Dock (Visible on screen ONLY when Clean Mode is active) */
.tng-clean-mode-dock {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 5px 6px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
    align-items: center;
    gap: 6px;
}
html.tng-clean-mode .tng-clean-mode-dock,
body.tng-clean-mode .tng-clean-mode-dock {
    display: inline-flex !important;
}
/* Suppress floating dock inside embedded iframes and print */
html.tng-embedded-cv .tng-clean-mode-dock,
body.tng-embedded-cv .tng-clean-mode-dock {
    display: none !important;
}

.tng-clean-dock-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    outline: none;
    line-height: 1;
}
.tng-clean-dock-btn.btn-print {
    background: #2563eb;
    color: #ffffff;
    padding: 8px 16px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.tng-clean-dock-btn.btn-print:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
}
.tng-clean-dock-btn.btn-exit {
    background: rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 14px;
}
.tng-clean-dock-btn.btn-exit:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .tng-clean-mode-dock {
        bottom: 16px;
        right: 16px;
        gap: 4px;
        padding: 4px 5px;
    }
    .tng-clean-dock-btn.btn-print {
        padding: 7px 12px;
        font-size: 0.78rem;
    }
    .tng-clean-dock-btn.btn-exit {
        padding: 7px 10px;
        font-size: 0.78rem;
    }
}

/* Floating Clean Mode Exit Pill (Legacy Standalone fallback) */
.tng-clean-exit-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tng-clean-exit-pill:hover {
    color: #fed7aa;
}

.mobile-only {
    display: none !important;
}
.desktop-only {
    display: inline-flex !important;
}

/* Executive Utility Navbar */
.tng-resume-nav-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.04);
    padding: 10px 24px;
    width: 100%;
    box-sizing: border-box;
}
.tng-resume-nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
}
.tng-resume-nav-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tng-resume-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 700;
    transition: color 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.tng-resume-brand-link:hover {
    color: #0f172a;
}
.tng-resume-brand-link svg {
    stroke: #64748b;
    transition: transform 0.15s ease, stroke 0.15s ease;
}
.tng-resume-brand-link:hover svg {
    stroke: #0f172a;
    transform: translateX(-3px);
}
.tng-resume-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.tng-resume-toggle-group {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
    border: 1px solid #e2e8f0;
}
.tng-resume-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    font-size: 0.80rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.tng-resume-toggle-btn:hover {
    color: #0f172a;
}
.tng-resume-toggle-btn.is-active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.tng-resume-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: 0.80rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
}
.tng-resume-action-btn.btn-clean {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}
.tng-resume-action-btn.btn-clean:hover {
    background: #ffffff;
    color: #0f172a;
    border-color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}
.tng-resume-action-btn.btn-print {
    background: #0f172a;
    color: #ffffff;
}
.tng-resume-action-btn.btn-print:hover {
    background: #1e293b;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
    transform: translateY(-1px);
}
.tng-resume-action-btn.btn-share {
    background: #ffffff;
    color: #ea580c;
    border-color: #fed7aa;
}
.tng-resume-action-btn.btn-share:hover {
    background: #fff7ed;
    border-color: #ea580c;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.15);
    transform: translateY(-1px);
}
.tng-toast-msg {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: #0f172a;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99999;
    pointer-events: none;
}
.tng-toast-msg.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Clean Paper Document Container */
.tng-resume-container {
    max-width: 880px;
    margin: 24px auto 50px auto;
    padding: 44px 52px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    color: #1e293b;
    line-height: 1.65;
    box-sizing: border-box;
}
.resume-header {
    border-bottom: 2.5px solid #ea580c;
    padding-bottom: 20px;
    margin-bottom: 28px;
}
.resume-header h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
    line-height: 1.15;
    letter-spacing: -0.025em;
    text-wrap: balance;
}
.resume-subtitle {
    font-size: 1.15rem;
    color: #ea580c;
    font-weight: 600;
    margin-top: 6px;
    margin-bottom: 12px;
    line-height: 1.35;
    text-wrap: balance;
}
.resume-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 0.92rem;
    color: #475569;
    align-items: center;
}
.resume-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.resume-meta a {
    color: #475569;
    text-decoration: none;
    transition: color 0.15s ease;
}
.resume-meta a:hover {
    color: #ea580c;
    text-decoration: underline;
}
.resume-section {
    margin-bottom: 28px;
}
.resume-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-wrap: balance;
}
.resume-section p {
    margin-bottom: 12px;
    color: #334155;
    font-size: 0.96rem;
    line-height: 1.68;
    text-wrap: pretty;
}
.xp-item {
    margin-bottom: 22px;
}
.xp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px 12px;
}
.xp-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}
.xp-company {
    font-weight: 700;
    color: #ea580c;
}
.xp-date {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}
.xp-details {
    margin: 0;
    padding-left: 20px;
    color: #334155;
}
.xp-details li {
    margin-bottom: 6px;
    font-size: 0.94rem;
    line-height: 1.6;
    text-wrap: pretty;
}
.xp-details a {
    color: #0284c7;
    text-decoration: underline;
}
.xp-details a:hover {
    color: #0369a1;
}

.resume-meta .meta-item svg {
    stroke: #ea580c;
    flex-shrink: 0;
}

/* Mobile Viewport Refinement (< 768px - iPhone & Android) */
@media (max-width: 768px) {
    .mobile-only {
        display: inline-flex !important;
    }
    .desktop-only {
        display: none !important;
    }
    .tng-resume-nav-bar {
        position: relative !important;
        padding: 8px 12px;
    }
    .tng-resume-nav-inner {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }
    .tng-resume-nav-row-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .tng-resume-brand-link {
        font-size: 0.82rem;
    }
    .tng-resume-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap !important;
        gap: 5px;
    }
    .tng-resume-toggle-group {
        padding: 1.5px;
        gap: 1px;
    }
    .tng-resume-toggle-btn {
        padding: 3px 6px;
        font-size: 0.74rem;
    }
    .tng-resume-action-btn {
        padding: 3px 8px;
        font-size: 0.74rem;
    }
    .tng-resume-container {
        padding: 20px 15px;
        margin: 10px 8px 30px 8px;
        border-radius: 10px;
    }
    .resume-header {
        padding-bottom: 14px;
        margin-bottom: 18px;
    }
    .resume-header h1 {
        font-size: 1.65rem;
        line-height: 1.18;
    }
    .resume-subtitle {
        font-size: 0.95rem;
        margin-top: 4px;
        margin-bottom: 10px;
    }
    .resume-meta {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px 12px;
        font-size: 0.82rem;
    }
    .resume-meta .meta-item {
        font-size: 0.82rem;
    }
    .resume-section {
        margin-bottom: 20px;
    }
    .resume-section h2 {
        font-size: 1.05rem;
        padding-bottom: 4px;
        margin-bottom: 10px;
        letter-spacing: 0.03em;
    }
    .resume-section p {
        font-size: 0.89rem;
        line-height: 1.6;
        margin-bottom: 10px;
    }
    .xp-item {
        margin-bottom: 16px;
    }
    .xp-header {
        flex-direction: column;
        gap: 2px;
        margin-bottom: 4px;
    }
    .xp-title {
        font-size: 0.96rem;
    }
    .xp-date {
        font-size: 0.80rem;
    }
    .xp-details {
        padding-left: 16px;
    }
    .xp-details li {
        font-size: 0.88rem;
        line-height: 1.52;
        margin-bottom: 5px;
    }
}

@media print {
    .no-print,
    .tng-resume-nav-bar,
    .tng-toast-msg,
    .tng-clean-mode-dock,
    .tng-clean-dock-btn,
    .tng-clean-exit-pill,
    #tng-clean-mode-dock,
    #tng-clean-mode-print,
    #tng-clean-mode-exit,
    header,
    footer,
    nav,
    .site-header,
    .site-footer,
    #wpadminbar,
    .wp-block-template-part,
    .widget-area {
        display: none !important;
        visibility: hidden !important;
    }
    *,
    *::before,
    *::after,
    html,
    body,
    #page,
    #content,
    .site-content,
    main,
    article,
    .entry-content,
    .post-thumbnail,
    .wp-block-group,
    div,
    section,
    p,
    ul,
    li,
    h1,
    h2,
    span,
    .wp-site-blocks,
    .wp-site-blocks > main,
    .tng-resume-container {
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        background-color: transparent !important;
        gap: 0 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        filter: none !important;
        -webkit-filter: none !important;
        border: none !important;
        border-radius: 0 !important;
    }
    .tng-resume-container {
        max-width: 100% !important;
        font-size: 9.5pt !important;
        line-height: 1.35 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .resume-header {
        padding-bottom: 5px !important;
        margin-bottom: 10px !important;
        border-bottom: 2px solid #ea580c !important;
    }
    .resume-header h1 {
        font-size: 18pt !important;
        color: #000000 !important;
    }
    .resume-subtitle {
        font-size: 11pt !important;
        margin-top: 2px !important;
        margin-bottom: 4px !important;
        color: #ea580c !important;
    }
    .resume-meta {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px 14px !important;
        margin-top: 4px !important;
        font-size: 8.5pt !important;
        color: #475569 !important;
    }
    .resume-section {
        margin-top: 8px !important;
        margin-bottom: 8px !important;
    }
    .resume-section h2 {
        font-size: 10.5pt !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-bottom: 2px !important;
        margin-bottom: 4px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
    }
    .resume-section p {
        margin-bottom: 4px !important;
        color: #000000 !important;
    }
    .xp-item {
        margin-top: 5px !important;
        margin-bottom: 5px !important;
        page-break-inside: avoid !important;
    }
    .xp-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: baseline !important;
        margin-bottom: 2px !important;
    }
    .xp-title {
        font-size: 9.5pt !important;
        font-weight: 700 !important;
        color: #000000 !important;
    }
    .xp-company {
        color: #ea580c !important;
    }
    .xp-date {
        font-size: 8.5pt !important;
        color: #475569 !important;
    }
    .xp-details {
        margin: 0 !important;
        padding-left: 14px !important;
        color: #000000 !important;
    }
    .xp-details li {
        margin-bottom: 2px !important;
    }
    a {
        text-decoration: underline !important;
        color: #000000 !important;
    }
    @page {
        size: A4;
        margin: 8mm 12mm;
    }
}
