/* =========================================
   VARIABLES & THEME SETUP
   ========================================= */
:root {
  /* Color Palette */
  --bg-base: #060913;
  --bg-panel: rgba(12, 16, 33, 0.85);
  --accent-cyan: #00f3ff;
  --accent-blue: #0d6efd;
  --accent-red: #ff3366;
  --accent-yellow: #ffc107;
  --accent-green: #00ff66;
  
  /* Text Colors */
  --text-main: #e0e6ed;
  --text-muted: #8a94a6;
  --text-dark: #060913;
  
  /* Borders & Shadows */
  --border-tech: rgba(0, 243, 255, 0.2);
  --border-tech-bright: rgba(0, 243, 255, 0.6);
  --glow-cyan: 0 0 15px rgba(0, 243, 255, 0.3);
  --glow-cyan-strong: 0 0 20px rgba(0, 243, 255, 0.6);
  
  /* Fonts */
  --font-data: 'Share Tech Mono', monospace;
  --font-header: 'Rajdhani', sans-serif;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-data);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  /* CAD Blueprint Grid Background */
  background-image: 
    linear-gradient(var(--border-tech) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-tech) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  background-attachment: fixed;
}

/* Robotic Arm Canvas Background */
#robotic-arm-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none; /* Let clicks pass through */
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
  color: #fff;
  text-shadow: var(--glow-cyan);
}

.highlight {
  color: var(--accent-cyan);
  font-weight: bold;
}

/* =========================================
   HUD OVERLAY (HEADS-UP DISPLAY)
   ========================================= */
.hud-layer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; /* Crucial: allows clicking elements underneath */
  z-index: 1000;
}

.hud-corner {
  position: absolute;
  padding: 15px 20px;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  opacity: 0.8;
}

.top-left { top: 0; left: 0; border-top: 2px solid var(--accent-cyan); border-left: 2px solid var(--accent-cyan); margin: 10px; }
.top-right { top: 0; right: 0; border-top: 2px solid var(--accent-cyan); border-right: 2px solid var(--accent-cyan); margin: 10px; text-align: right; }
.bottom-left { bottom: 0; left: 0; border-bottom: 2px solid var(--accent-cyan); border-left: 2px solid var(--accent-cyan); margin: 10px; }
.bottom-right { bottom: 0; right: 0; border-bottom: 2px solid var(--accent-cyan); border-right: 2px solid var(--accent-cyan); margin: 10px; text-align: right; }

.hud-item { margin-bottom: 4px; }
.hud-label { color: var(--text-muted); margin-right: 8px; }
.hud-value.success { color: var(--accent-green); text-shadow: 0 0 8px var(--accent-green); animation: pulse 2s infinite; }

/* HUD Boundary Lines (Fixed to not cut through navbar) */
.hud-line {
  position: absolute;
  background: var(--border-tech);
}
.line-top { top: 90px; left: 200px; right: 200px; height: 1px; } 
.line-bottom { bottom: 30px; left: 200px; right: 200px; height: 1px; }
.line-left { left: 30px; top: 90px; bottom: 100px; width: 1px; }
.line-right { right: 30px; top: 90px; bottom: 100px; width: 1px; }

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-tech);
  z-index: 999;
}

.nav-flex {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  font-family: var(--font-header);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}
.logo .bracket { color: var(--accent-cyan); }

.ribbon-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.nav-link::before {
  content: attr(data-hover);
  position: absolute;
  top: 0; left: 0;
  color: var(--accent-cyan);
  overflow: hidden;
  width: 0;
  transition: width 0.3s ease;
  white-space: nowrap;
  text-shadow: var(--glow-cyan);
}

.nav-link:hover::before { width: 100%; }

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Fullscreen Toggle Button */
.icon-btn {
    background: transparent;
    border: 1px solid var(--border-tech);
    color: var(--accent-cyan);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 10px var(--glow-cyan);
    border-color: var(--accent-cyan);
}

/* Mechanical Resume Button */
.resume-btn {
  background: var(--bg-base);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  padding: 0.5rem 1.2rem;
  font-family: var(--font-data);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 2px 2px 0 var(--accent-cyan);
  transition: all 0.1s;
}

.resume-btn:hover {
  background: rgba(0, 243, 255, 0.1);
}

.resume-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--accent-cyan); /* Physical click effect */
}

/* Mobile Nav / Hamburger */
.hamburger-wrap { display: none; }
.menu-icon {
  background: none; border: none; color: var(--accent-cyan); font-size: 1.5rem; cursor: pointer;
}
.hamburger-close { display: none; }
.menu-icon[aria-expanded="true"] .hamburger-bars { display: none; }
.menu-icon[aria-expanded="true"] .hamburger-close { display: inline; }

/* =========================================
   LAYOUT & SECTIONS
   ========================================= */
main { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.section {
  padding: 6rem 0;
  scroll-margin-top: 80px;
}

/* Industrial Section Headers */
.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  gap: 1rem;
}

.section-num {
  font-family: var(--font-data);
  color: var(--accent-cyan);
  font-size: 1.5rem;
}

.section-title {
  font-family: var(--font-header);
  font-size: 2.5rem;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-line {
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-tech) 0%, transparent 100%);
}

/* =========================================
   HERO SECTION
   ========================================= */
.split-hero {
  display: flex;
  min-height: calc(100vh - 80px);
  align-items: center;
  gap: 4rem;
}

.split-left { flex: 0 0 400px; }
.split-right { flex: 1; }

.img-frame {
  position: relative;
  padding: 15px;
  border: 1px solid var(--border-tech);
  background: var(--bg-panel);
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(20%) contrast(120%); /* Slightly gritty industrial look */
  transition: filter 0.3s;
}

.hero-img:hover { filter: grayscale(0%) contrast(100%); }

/* Bracket Corners for Images/Cards */
.corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--accent-cyan);
  border-style: solid;
}
.c-tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.c-tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.c-bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.c-br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.static-name {
  font-family: var(--font-header);
  font-size: 5rem;
  line-height: 1;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.typewriter-container {
  font-size: 1.5rem;
  color: var(--accent-cyan);
  margin-bottom: 2rem;
  font-family: var(--font-data);
}

.cursor { animation: blink 1s infinite; }

.about-header-lines {
  border-left: 2px solid var(--border-tech);
  padding-left: 1.5rem;
  margin-bottom: 3rem;
}

.about-header-main { font-size: 1.2rem; color: #fff; margin-bottom: 0.5rem; }
.about-header-tagline { font-size: 1rem; color: var(--text-muted); }

.hero-actions { display: flex; gap: 1rem; }

/* Mechanical Action Buttons */
.action-btn {
  font-family: var(--font-data);
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid var(--accent-cyan);
  text-transform: uppercase;
  transition: all 0.1s;
}

.action-btn.primary {
  background: var(--accent-cyan);
  color: var(--text-dark);
  box-shadow: 4px 4px 0 rgba(0, 243, 255, 0.3);
}

.action-btn.primary:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 transparent;
}

.action-btn.secondary {
  background: transparent;
  color: var(--accent-cyan);
  box-shadow: 4px 4px 0 rgba(0, 243, 255, 0.1);
}

.action-btn.secondary:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 transparent;
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-wrap {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.about-card {
  flex: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border-tech);
  box-shadow: var(--glow-cyan);
}

.card-header-bar {
  background: rgba(0, 243, 255, 0.1);
  padding: 8px 15px;
  border-bottom: 1px solid var(--border-tech);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: var(--accent-red); }
.dot.yellow { background: var(--accent-yellow); }
.dot.green { background: var(--accent-green); }

.card-title {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-content { padding: 2rem; font-size: 1.1rem; }

.contact-img {
  width: 100%;
  max-width: 350px;
  border: 1px solid var(--border-tech);
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
}

/* =========================================
   TECH STACK GRID
   ========================================= */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.tech-category {
  background: var(--bg-panel);
  border: 1px solid var(--border-tech);
  padding: 2rem;
  position: relative;
}

.tech-category h3 {
  font-family: var(--font-header);
  color: var(--accent-cyan);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-tech);
  padding-bottom: 0.5rem;
}

.tech-icons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.1rem;
}

.tech-item i {
  font-size: 1.5rem;
  color: var(--text-muted);
  width: 30px;
  text-align: center;
  transition: color 0.3s, transform 0.3s;
}

.tech-category:hover .tech-item i { color: var(--accent-cyan); }

/* =========================================
   PROJECTS SECTION
   ========================================= */
.project-subheading {
  font-family: var(--font-data);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.project-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-tech);
  padding: 1rem;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

/* Blueprint Hover Effect */
.project-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan-strong);
  transform: translateY(-5px);
}

.card-corner {
  position: absolute;
  width: 15px; height: 15px;
  border-color: var(--accent-cyan);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.3s;
}
.card-corner.top-right { top: -5px; right: -5px; border-width: 2px 2px 0 0; }
.card-corner.bottom-left { bottom: -5px; left: -5px; border-width: 0 0 2px 2px; }

.project-card:hover .card-corner { opacity: 1; }

.project-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}

.card-body h3 {
  font-family: var(--font-header);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.project-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tags span {
  font-size: 0.75rem;
  padding: 2px 8px;
  border: 1px solid var(--border-tech);
  color: var(--accent-cyan);
  background: rgba(0, 243, 255, 0.05);
}

/* =========================================
   PROJECT MODALS (POPUP)
   ========================================= */
.modal-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 9, 19, 0.9); /* Dark overlay */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.modal-bg.open {
  opacity: 1;
  visibility: visible;
}

.project-modal {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.15);
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  /* Blueprint Grid Inside Modal */
  background-image: 
    linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.modal-bg.open .project-modal {
  transform: translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}

.modal-close:hover {
  color: var(--accent-red);
  transform: scale(1.1);
}

.project-modal h3 {
  grid-column: 1 / -1;
  font-family: var(--font-header);
  font-size: 2rem;
  color: #fff;
  border-bottom: 1px solid var(--border-tech);
  padding-bottom: 1rem;
  margin-top: 0;
}

.project-modal h3 .bracket {
  color: var(--accent-cyan);
}

.modal-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-content p {
  color: var(--text-main);
  font-size: 1.1rem;
  line-height: 1.6;
}

.modal-left .achievement {
  background: rgba(0, 255, 102, 0.05);
  border-left: 3px solid var(--accent-green);
  padding: 1rem;
  color: var(--text-main);
}

.modal-left .achievement i {
  color: var(--accent-green);
  margin-right: 8px;
}

.modal-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

/* Default Modal Image Style (Desktop) */
.modal-right img {
  width: 100%;
  height: auto;          /* Let the height adjust naturally */
  max-height: 60vh;      /* Cap height at 60% of viewport so it fits on screen */
  object-fit: contain;   /* KEY FIX: Ensures the WHOLE image is visible, never cropped */
  border: 1px solid var(--border-tech);
  background: rgba(0,0,0,0.3); /* Adds a dark backing for the image */
}

/* =========================================
   EXPERIENCE TIMELINE
   ========================================= */
.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border-tech);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 3rem;
}

.timeline-dot {
  position: absolute;
  left: 13px;
  top: 20px;
  width: 16px;
  height: 16px;
  background: var(--bg-base);
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  box-shadow: var(--glow-cyan);
}

.exp-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-tech);
  transition: border-color 0.3s;
}

.exp-card:hover { border-color: var(--accent-cyan); }

.exp-header {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  background: rgba(0, 243, 255, 0.02);
}

.exp-header-left { display: flex; flex-direction: column; }
.exp-title { font-family: var(--font-header); font-size: 1.4rem; color: #fff; }
.exp-subtitle { color: var(--text-muted); font-size: 1rem; }
.exp-dates { color: var(--accent-cyan); font-weight: bold; }

.exp-body {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}

.exp-card.open .exp-body {
  padding: 1.5rem;
  max-height: 600px; /* arbitrary large number */
  opacity: 1;
}

.exp-body ul { padding-left: 1.5rem; color: var(--text-main); }
.exp-body li { margin-bottom: 0.8rem; }

/* =========================================
   CONTACT & FOOTER
   ========================================= */
.centered-contact { justify-content: center; }

.contact-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--border-tech);
  color: var(--text-main);
  background: var(--bg-panel);
  transition: all 0.2s;
}

.contact-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.footer {
  border-top: 1px solid var(--border-tech);
  padding: 2rem;
  margin-top: 4rem;
  text-align: center;
  background: var(--bg-panel);
}

.footer-content {
  display: flex;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.separator { color: var(--accent-cyan); }

/* Hide Gyro Button on Desktop (Only shows on mobile, but JS hides it anyway on tablet/mobile if needed) */
@media (min-width: 1401px) {
  #gyro-button {
    display: none;
  }
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { text-shadow: 0 0 8px var(--accent-green); } 50% { text-shadow: 0 0 15px var(--accent-green), 0 0 2px #fff; } }

.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-element.visible { opacity: 1; transform: translateY(0); }

/* =========================================
   RESPONSIVE DESIGN: THE TRIPLE LOCK
   Targets: Landscape Tablets, Portrait Tablets, Phones
   Locks: Max Width 1400px OR Coarse Pointer OR No Hover
   ========================================= */
@media (max-width: 1400px), (pointer: coarse), (hover: none) {
  /* 1. HIDE ROBOTIC ARM COMPLETELY */
  #robotic-arm-bg { display: none !important; }
  
  /* 2. HIDE GYRO BUTTON */
  #gyro-button { display: none !important; }
  
  /* 3. HIDE HUD */
  .hud-layer { display: none; }
  
  /* 4. LAYOUT ADJUSTMENTS */
  .split-hero { flex-direction: column; text-align: center; gap: 2rem; padding-top: 2rem; }
  .split-left { flex: auto; max-width: 350px; margin: 0 auto; }
  .static-name { font-size: 3.5rem; }
  .hero-actions { justify-content: center; }
  .about-wrap { flex-direction: column; }
  .about-header-lines { border-left: none; border-top: 2px solid var(--border-tech); padding: 1rem 0 0 0; }

  /* 5. FORCE HAMBURGER NAV (Fixes the cluttered Nav bar) */
  .ribbon-nav { display: none !important; }
  .resume-btn { display: none !important; }
  .hamburger-wrap { display: block; position: relative; }
  
  .mobile-nav {
    position: absolute; top: 100%; right: 0; background: var(--bg-panel); border: 1px solid var(--border-tech);
    padding: 1rem; display: flex; flex-direction: column; gap: 1rem; min-width: 220px;
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease;
  }
  .mobile-nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .mobile-link { color: var(--text-main); font-family: var(--font-header); font-size: 1.2rem; text-transform: uppercase; }
  .highlight-link { color: var(--accent-cyan); border-top: 1px solid var(--border-tech); padding-top: 1rem; }

  .exp-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  
  /* === KEY FIX: MODAL IMAGES FOR TABLET/MOBILE === */
  /* Force a simple vertical flex layout to avoid grid stretching issues */
  .project-modal { 
    display: flex; 
    flex-direction: column; 
    padding: 1.5rem; 
    max-height: 90vh;
  }
  
  /* Reset container properties */
  .modal-right {
    width: 100%;
    margin-top: 1rem;
    display: block; /* Removes flex interference */
  }

  /* Force image to contain properly within the viewport height */
  .modal-right img {
    width: 100% !important;
    height: auto !important;
    max-height: 50vh !important; /* Cap height to 50% of viewport */
    object-fit: contain !important; /* Prevent cropping at all costs */
    background: rgba(0,0,0,0.5); /* Make letterboxing look intentional */
  }
}

@media (max-width: 480px) {
  .static-name { font-size: 2.5rem; }
  .action-btn { padding: 0.6rem 1rem; font-size: 0.9rem; }
}

/* =========================================
   PRINT / PDF EXPORT STYLES
   ========================================= */
@media print {
  /* 1. Force the browser to render your dark theme and backgrounds */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* 2. Hide UI elements that don't make sense in a PDF */
  #main-navbar,
  .hud-layer,
  #robotic-arm-bg,
  .hero-actions,
  #modal-bg {
    display: none !important;
  }

  /* 3. Reset body layout for continuous printing */
  body, main {
    overflow: visible !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: var(--bg-base) !important;
  }

  /* 4. Ensure sections don't have massive empty gaps */
  .section {
    padding: 2rem 0 !important;
    page-break-inside: avoid;
  }

  .split-hero {
    min-height: auto !important;
    padding-top: 2rem !important;
  }

  /* 5. Prevent cards from being split in half across two pages */
  .project-card, 
  .exp-card, 
  .tech-category, 
  .about-card {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-bottom: 20px !important;
  }

  /* 6. EXPAND ALL HIDDEN CONTENT (Crucial for your experience timeline) */
  .exp-body {
    max-height: none !important;
    opacity: 1 !important;
    padding: 1.5rem !important;
    overflow: visible !important;
  }
}