/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #c9c9c9; 
    overflow: hidden; /* Disables default vertical page scrolling at the root level */
}

/* Mobile Scrolling Wrapper Integration */
.portfolio-wrapper {
    height: 100vh;
    width: 100vw;
    overflow-x: auto; 
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; 
}

/* Main Container: Anchors hotspots and forces width on mobile */
.interactive-container {
    position: relative;
    height: 100%;
    width: 100%;
    min-width: 1200px; /* Forces horizontal scroll on narrower screens */
    white-space: nowrap;
}

/* Background Image Sizing */
.background-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none; /* Prevents users from dragging the image file */
}

/* Hotspot Base Class: The invisible clickable areas */
.hotspot {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

/* Tooltip: The Apple-style Hover Annotation */
.tooltip {
    opacity: 0;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1d1d1f;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Hover Animation Trigger */
.hotspot:hover .tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Specific Coordinates */
.cv-hotspot {
    top: 75%;
    left: 36%;
    width: 22%;
    height: 20%;
}

.linkedin-hotspot {
    top: 38%;
    left: 60%;
    width: 36%;
    height: 40%;
}

.projects-hotspot {
    top: 50%;
    left: 3%;
    width: 32%;
    height: 35%;
}

.calendar-hotspot {
    top: 4%;
    left: 70%;
    width: 21%;
    height: 30%;
}

/* =========================================
   NEW MODAL STYLES
   ========================================= */

/* The Modal Background Overlay */
.modal {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.4s ease, visibility 0.4s;
    overflow-y: auto; 
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
    padding-bottom: 60px;
}

/* Trigger Class for JavaScript */
.modal.active {
    visibility: visible;
    opacity: 1;
}

/* Wrapper for the CV and Button */
.modal-content-wrapper {
    position: relative;
    width: 85%;
    max-width: 800px;
    transform: translateY(40px);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Slide up animation when active */
.modal.active .modal-content-wrapper {
    transform: translateY(0);
}

/* The CV Image and Link Wrapper */
.cv-image-link {
    display: block;
    width: 100%;
    margin-bottom: 25px;
}

.cv-modal-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Subtle hover effect to indicate it is clickable */
.cv-image-link:hover .cv-modal-image {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* Close Button (The 'X') */
.close-btn {
    position: fixed;
    top: 20px;
    right: 40px;
    color: #ffffff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
    line-height: 1;
}

.close-btn:hover {
    color: #cccccc;
}

/* Download / Open Full PDF Button */
.download-btn {
    background-color: #1d1d1f;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.download-btn:hover {
    background-color: #333333;
    transform: scale(1.03);
}

/* Ensure mobile views center the content wrapper instead of locking left */
@media (max-width: 768px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: auto;
  }
  
  .portfolio-wrapper {
    margin: 0 auto;
    display: flex;
    justify-content: center;
  }

  .interactive-container {
    margin: 0 auto;
  }
}

/* Mobile Nav Hints & Dynamic Moving Arrows Styling */
.mobile-nav-hints {
  display: none;
}

@media (max-width: 768px) {
  .mobile-nav-hints {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
  }

  .hint-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 23, 28, 0.75);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-family: sans-serif;
    letter-spacing: -0.01em;
    backdrop-filter: blur(4px);
  }

  .left-arrow {
    left: 15px;
    animation: bounceLeft 1.5s ease-in-out infinite;
  }

  .right-arrow {
    right: 15px;
    animation: bounceRight 1.5s ease-in-out infinite;
  }
}

@keyframes bounceLeft {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(-6px); }
}

@keyframes bounceRight {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(6px); }
}