﻿/* ==========================================================================
   INTERACTIVE 3D & DUAL CURSOR SYSTEM
   Prompts 3 & 4: Paper Float, Tilt, Matte Lighting, Dual Cursor & Parallax
   ========================================================================== */

/* Entrance Animation (Prompt 3 #10) */
@keyframes paperEntrance {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.resume-sheet {
  animation: paperEntrance 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: box-shadow 0.3s ease;
  position: relative;
}

/* Matte Paper Surface Cursor Lighting Sheen (Prompt 3 #3, Prompt 4 #4) */
.paper-surface-light {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
  background: radial-gradient(
    circle 320px at var(--light-x, 50%) var(--light-y, 50%),
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    transparent 80%
  );
  mix-blend-mode: soft-light;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

/* Micro 3D Section Number Highlights (Prompt 3 #5) */
.section-num {
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8), 0 -1px 1px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   DUAL CUSTOM CURSOR SYSTEM (Prompt 4 #1, #2, #3)
   ========================================================================== */

/* Hide default cursor on devices with fine pointers */
@media (pointer: fine) {
  body.custom-cursor-active,
  body.custom-cursor-active a,
  body.custom-cursor-active button,
  body.custom-cursor-active .skill-chip,
  body.custom-cursor-active .project-card,
  body.custom-cursor-active .timeline-item {
    cursor: none !important;
  }
}

/* Inner Cursor Dot (4-6px instant track) */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: var(--color-accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
  will-change: transform;
}

/* Outer Cursor Ring (28-36px smooth trailing lag) */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--color-accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  opacity: 0.55;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.28s ease,
              border-color 0.28s ease,
              background-color 0.28s ease;
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contextual Label inside / beside cursor (Prompt 4 #2) */
.cursor-label {
  position: absolute;
  font-family: var(--font-heading);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #FFFFFF;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* Hover States for Custom Cursor */
.cursor-ring.is-hovering {
  width: 46px;
  height: 46px;
  border-color: var(--color-accent-primary);
  background-color: rgba(29, 78, 216, 0.08);
  opacity: 0.9;
}

.cursor-ring.is-action {
  width: 52px;
  height: 52px;
  background-color: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  opacity: 1;
}

.cursor-ring.is-action .cursor-label {
  opacity: 1;
  transform: scale(1);
}

.cursor-dot.is-hidden {
  opacity: 0;
}

/* Magnetic Transform Class (Prompt 4 #3) */
.is-magnetic {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* ==========================================================================
   RESPONSIVE BEHAVIOR (Prompt 1 #RESPONSIVE, Prompt 3 #14, Prompt 4 #18)
   ========================================================================== */

/* Tablet Scaling */
@media (max-width: 900px) {
  body {
    padding: 20px 10px;
  }
  .resume-sheet {
    width: 96vw;
    max-width: 820px;
    min-height: auto;
  }
}

/* Mobile Layout */
@media (max-width: 680px) {
  body {
    padding: 10px 6px;
  }
  
  .resume-sheet {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 6px;
    transform: none !important;
  }

  .resume-sidebar {
    padding: 24px 18px;
    border-right: none;
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .resume-main {
    padding: 24px 18px;
  }

  .education-container {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Disable Custom Cursor & 3D Tilt on Touch Devices */
  .cursor-dot, .cursor-ring {
    display: none !important;
  }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .resume-sheet {
    transform: none !important;
  }
}
