/* ==============================
   1. GLOBAL STYLES AND UTILITIES
   ============================== */
:root {
    --bg: #121212;
    --bg-deep: #0d0d0d;
    --text: #e0e0e0;
    --accent: #9a9a9a;
    --card: #1e1e1e;
    --border: #2c2c2c;
    --highlight: #cfcfcf;
    --badge: #2b2b2b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", Arial, Helvetica, sans-serif;
    background: radial-gradient(circle at top left, var(--bg), var(--bg-deep));
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    line-height: 1.5;
    cursor: default;
}

body.modal-open {
    overflow: hidden;
}

::selection {
    background-color: var(--accent);
    color: var(--bg-deep);
}

/* ==============================
   2. LAYOUT AND HEADER COMPONENTS
   ============================== */
.container {
    background: var(--card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    max-width: 640px;
    width: 100%;
}

.profile-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center top;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.015);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

.tagline {
    text-align: center;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

/* ==============================
   3. LINK LIST AND BUTTONS
   ============================== */
.link-list {
    list-style: none;
}

.link-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.link-item:last-child {
    border-bottom: none;
}

.link-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--highlight);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.35s ease;
}

.link-item:hover::before,
.link-item:focus-within::before {
    transform: scaleY(1);
}

.label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    color: var(--accent);
    text-transform: capitalize;
    transition: color 0.35s;
    margin-left: 20px;
    cursor: pointer;
}

.label i {
    font-size: 1.25rem;
}

.action-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.45rem 1.2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    position: relative;
    right: 15px;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.35s;
}

.action-btn i {
    font-size: 0.9rem;
}

.link-item:hover .label,
.link-item:focus-within .label {
    color: var(--text);
}

.link-item:hover .action-btn,
.link-item:focus-within .action-btn {
    background: var(--highlight);
    color: var(--bg);
    border-color: var(--highlight);
}

.action-btn:focus-visible {
    outline: 2px solid var(--highlight);
    outline-offset: 4px;
}

/* ==============================
   4. CONTACT FORM AND FOOTER
   ============================== */
.contact {
    margin-top: 2rem;
    text-align: center;
}

.contact p {
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-size: 0.9rem;
}

.contact-form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.email-input {
    flex: 1 1 220px;
    max-width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-deep);
    color: var(--text);
    font-size: 0.9rem;
}

.email-input::placeholder {
    color: var(--accent);
}

.send-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.35s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.send-btn:hover,
.send-btn:focus-visible {
    background: var(--highlight);
    color: var(--bg);
    border-color: var(--highlight);
}

.footer {
    text-align: center;
    margin-top: 1.75rem;
}

.clock {
    display: inline-block;
    background: var(--badge);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--accent);
    animation: pulseClock 3s ease-in-out infinite;
}

/* ==============================
   5. MODAL SYSTEM
   ============================== */
/* ==============================
   5. MODAL SYSTEM
   ============================== */
#cv-modal,
#resume-modal,
#notification-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#cv-modal.show,
#resume-modal.show,
#notification-modal.show {
    display: flex;
    opacity: 1;
}

#resume-modal .modal-dialog {
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: auto;
    /* Ensure centering works even if flex parent has issues */
}



/* Ensure inline styles from HTML are respected or overridden if needed */
/* But strictly speaking, the HTML has style="..." so that takes precedence.
   However, we need to ensure the container behaves nicely. */

#cv-modal .viewer {
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
    display: none;
}

/* CV Viewer (Desktop only) */
.cv-viewer {
    width: 90%;
    max-width: 920px;
    height: 85vh;
    flex-direction: column;
}

.cv-viewer iframe {
    flex: 1;
    width: 100%;
    border: none;
    overflow: auto;
}

.modal-controls {
    display: flex;
    justify-content: center;
    padding: 0.6rem;
    background: var(--bg);
}

.download-btn {
    background: var(--highlight);
    color: var(--bg);
    border: none;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    width: 100%;
    text-decoration: none;
    display: block;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.download-btn:hover,
.download-btn:focus-visible {
    background: var(--text);
    color: var(--bg);
}

/* Notification Dialog */
.notification-viewer {
    max-width: 400px;
    padding: 1.5rem;
    display: none;
    text-align: left;
}

.notification-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-title {
    font-size: 1.25rem;
    color: var(--highlight);
    margin-top: 0.25rem;
    text-align: left;
}

.notification-message {
    font-size: 0.95rem;
    color: var(--accent);
    line-height: 1.4;
    padding-bottom: 0.75rem;
    text-align: left;
}

.notification-actions {
    display: flex;
    margin-top: 0.5rem;
}

.notification-actions .action-btn {
    position: static;
    flex: 1 1 100%;
    max-width: 100%;
    padding: 0.6rem 1rem;
    justify-content: center;
}

.notification-actions .ok-btn {
    background: var(--highlight);
    border-color: var(--highlight);
    color: var(--bg-deep);
    font-weight: 600;
}

.notification-actions .ok-btn:hover {
    background: var(--text);
    border-color: var(--text);
}

/* ==============================
   6. ANIMATIONS AND MEDIA QUERIES
   ============================== */
@keyframes pulseClock {

    0%,
    100% {
        opacity: 0.85;
    }

    50% {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .label {
        font-size: 0.95rem;
    }

    .action-btn {
        padding: 0.45rem 1rem;
    }

    .cv-viewer {
        width: 90%;
        height: auto;
        margin-top: 2.5vh;
        display: none;
    }

    .notification-viewer {
        width: 90%;
        max-width: none;
        display: flex !important;
    }

    .notification-actions .action-btn {
        width: 100%;
        max-width: 100%;
    }
}

/* ==============================
   PDF JS TEXT LAYER FIX
   ============================== */
.textLayer {
    opacity: 0 !important;
    mix-blend-mode: multiply;
    line-height: 1.0;
    pointer-events: auto;
    /* Allow text selection */
}

/* ==============================
   ZOOM WRAPPER CENTERING
   ============================== */
#zoom-wrapper {
    margin: 0 auto;
    position: relative;
    transform-origin: top center;
}