/* ==========================================
   DESIGN TOKENS
   ========================================== */
:root {
  --page-bg: #ffffff;
  --viewport-bg: #ececf0;
  --accent: #08544e;
  --accent-light: rgba(8, 84, 78, 0.08);
  --accent-lighter: rgba(8, 84, 78, 0.03);
  --accent-border: rgba(8, 84, 78, 0.25);
  --accent-glow: rgba(0, 0, 0, 0.05);

  --text-heading: #0f172a;
  --text-body: #1e293b;
  --text-light: #475569;
  --text-muted: #5e718d;

  --border: #cbd5e1;
  --border-light: #e2e8f0;
  --card-bg: #f8fafc;

  --radius: 8px;
  --radius-sm: 5px;
  --shadow-page: 0 1px 3px rgba(0,0,0,0.03), 0 12px 32px rgba(0,0,0,0.05), 0 32px 72px rgba(0,0,0,0.04);

  /* Dark mode toggle transition speed */
  --theme-transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* ==========================================
   DARK MODE VARIABLES
   ========================================== */
[data-theme="dark"] {
  --page-bg: #141d2b;
  --viewport-bg: #0d1117;
  --accent: #14b8a6;
  --accent-light: rgba(20, 184, 166, 0.1);
  --accent-lighter: rgba(20, 184, 166, 0.04);
  --accent-border: rgba(20, 184, 166, 0.28);
  --accent-glow: rgba(0, 0, 0, 0.25);

  --text-heading: #f1f5f9;
  --text-body: #cbd5e1;
  --text-light: #94a3b8;
  --text-muted: #7b8fa3;

  --border: #2d3d52;
  --border-light: #1e2d3d;
  --card-bg: #1a2535;
  --shadow-page: 0 1px 3px rgba(0,0,0,0.3), 0 12px 32px rgba(0,0,0,0.4), 0 32px 72px rgba(0,0,0,0.3);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--viewport-bg);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  transition: var(--theme-transition);
}

.bg-glow-sphere, .resume-viewport::before {
  display: none !important;
}



/* ==========================================
   CUSTOM CURSOR
   ========================================== */
.custom-cursor-dot {
  position: fixed;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-100px, -100px, 0);
  transition: width 0.2s, height 0.2s, background-color 0.2s, opacity 0.3s ease;
  will-change: transform;
}

.custom-cursor-ring {
  position: fixed;
  top: -16px;
  left: -16px;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--accent);
  background-color: transparent;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate3d(-100px, -100px, 0);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 0 15px rgba(8, 84, 78, 0.15);
  will-change: transform;
}

.custom-cursor-ring.cursor-hover {
  width: 48px;
  height: 48px;
  top: -24px;
  left: -24px;
  border-color: rgba(8, 84, 78, 0.4);
  background-color: rgba(8, 84, 78, 0.04);
  box-shadow: 0 0 25px rgba(8, 84, 78, 0.25);
}

.custom-cursor-ring.cursor-clickable {
  border-color: var(--accent);
  background-color: rgba(8, 84, 78, 0.08);
}

.cursor-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
}

@media (pointer: fine) {
  body, a, button, [role="button"],
  .skill-badge, .timeline-card, .project-card, .stat-card,
  .header-action-btn, .project-cta-btn {
    cursor: none !important;
  }
}

@media (pointer: coarse) {
  .custom-cursor-dot, .custom-cursor-ring, .cursor-canvas { display: none !important; }
}

/* ==========================================
   NOISE OVERLAY
   ========================================== */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0.015;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================
   VIEWPORT
   ========================================== */
.resume-viewport {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 0 3rem 0;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.35s ease;
}

@keyframes floatGlow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, 2%, 0) scale(1.05); }
}

.resume-viewport::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 0%, rgba(8,84,78,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(8,84,78,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: floatGlow 15s infinite ease-in-out;
}

.bg-glow-sphere {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 84, 78, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.bg-glow-1 { top: -100px; left: -100px; }
.bg-glow-2 { bottom: -100px; right: -100px; }
.bg-glow-3 { top: 40%; left: 60%; width: 500px; height: 500px; }

/* ==========================================
   RESUME WRAPPER & PAGE
   ========================================== */
.resume-wrapper {
  position: relative;
  width: 210mm;
  height: auto;
  z-index: 1;
}

.resume-page {
  width: 210mm;
  min-height: 297mm;
  height: auto;
  background: var(--page-bg);
  box-shadow: var(--shadow-page);
  border-radius: 6px;
  overflow: visible;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: background-color 0.35s ease;
}

.resume-inner {
  padding: 44px 48px 40px 48px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ==========================================
   HEADER
   ========================================== */
.resume-header {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 24px;
  transition: border-color 0.35s ease;
}

@keyframes profileFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


.header-photo-container {
  position: relative;
  width: 135px;
  height: 135px;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 4px;
  background: var(--border);
  border: 1.5px solid var(--border-light);
  animation: profileFloat 6s ease-in-out infinite;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  perspective: 800px;
  transform-style: preserve-3d;
}

.header-photo-container:hover {
  transform: scale(1.08) rotate(5deg) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.header-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.header-identity { flex: 1; }

.header-name {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 2px;
}

.header-name .char { display: inline-block; will-change: transform, opacity; }

.header-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.header-tagline {
  font-size: 10px;
  color: var(--text-muted);
  max-width: 340px;
  line-height: 1.5;
  font-weight: 450;
}

/* ==========================================
   AVAILABILITY STATUS BADGE
   ========================================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 2px;
  padding: 3px 10px 3px 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 700;
  color: #059669;
  letter-spacing: 0.03em;
}

[data-theme="dark"] .status-badge {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
    transform: scale(1.15);
  }
}

/* ==========================================
   CONTACT
   ========================================== */
.header-contact {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  font-size: 9px;
  color: var(--text-light);
  text-align: right;
  flex-shrink: 0;
}

.header-contact a {
  color: var(--text-body);
  text-decoration: none;
  transition: var(--theme-transition);
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.header-contact a:hover {
  color: var(--accent);
  background-color: var(--accent-light);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
}

.contact-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.header-qr {
  width: 58px;
  height: 58px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--card-bg);
  overflow: hidden;
  transition: var(--theme-transition), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-qr:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px var(--accent-glow);
  transform: translateY(-2px) !important;
}

.header-qr img { width: 100%; height: 100%; object-fit: contain; }

/* ==========================================
   HEADER ACTION PILLS
   ========================================== */
.header-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.header-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-body);
  font-size: 8.5px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--theme-transition), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  will-change: transform, border-color, background-color, color, box-shadow;
}

.header-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.header-action-btn:active { transform: translateY(-1px) scale(0.97) !important; }

.whatsapp-btn {
  background: #25D366 !important;
  color: #ffffff !important;
  border-color: #128C7E !important;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.2) !important;
}

.whatsapp-btn:hover {
  background: #128C7E !important;
  border-color: #075E54 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
}

.btn-ripple {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(8, 84, 78, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: rippleAnim 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}
@keyframes rippleAnim {
  to { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* ==========================================
   BODY LAYOUT
   ========================================== */
.resume-body {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 32px;
  flex: 1;
}

.resume-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resume-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================
   SECTION STYLES
   ========================================== */
.section { will-change: transform, opacity; }

.section-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--border-light);
}

.title-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.summary-text {
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--text-body);
  font-weight: 450;
}

/* ==========================================
   SKILL PROGRESS BARS
   ========================================== */
.skills-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.skill-bar-item { }

.skill-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 4px;
}

.skill-pct {
  font-family: 'Fira Code', monospace;
  font-size: 8px;
  font-weight: 700;
  color: var(--accent);
}

.skill-bar-track {
  width: 100%;
  height: 5px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.skill-bar-fill {
  height: 100%;
  width: 0%; /* starts at 0, animated via JS */
  background: linear-gradient(90deg, var(--accent) 0%, #14b8a6 100%);
  border-radius: 999px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

/* Animated shimmer on fill */
.skill-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 2s 1.2s ease infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* Secondary small skill badges below bars */
.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.skill-badge {
  font-size: 8.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  transition: var(--theme-transition), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.skill-badge:hover {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 10px rgba(8, 84, 78, 0.2);
}

/* ==========================================
   TOOLS
   ========================================== */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.tool-item {
  font-size: 9px;
  color: var(--text-body);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.tool-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ==========================================
   LANGUAGES
   ========================================== */
.lang-list { display: flex; flex-direction: column; gap: 7px; }

.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5px;
}

.lang-name { color: var(--text-body); font-weight: 600; }
.lang-level { color: var(--text-muted); font-size: 8px; font-weight: 500; }

.lang-bar {
  width: 50px;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}

.lang-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #14b8a6 100%);
  border-radius: 2px;
}

/* ==========================================
   EDUCATION
   ========================================== */
.edu-item { font-size: 9.5px; }

.edu-degree {
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1px;
}

.edu-detail {
  color: var(--text-muted);
  font-size: 8.5px;
  font-weight: 500;
}

/* ==========================================
   EXPERIENCE TIMELINE
   ========================================== */
.timeline { display: flex; flex-direction: column; gap: 16px; }

.timeline-card {
  padding: 14px 16px 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  position: relative;
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: var(--theme-transition), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, border-color, box-shadow, background-color;
}

.timeline-card:hover {
  border-color: var(--accent);
  background-color: var(--page-bg);
  transform: translateY(-6px) scale(1.02) !important;
  box-shadow: 0 16px 32px -12px rgba(8, 84, 78, 0.12), 0 6px 16px -8px rgba(8, 84, 78, 0.06), 0 0 0 1.5px rgba(8, 84, 78, 0.05);
}

.timeline-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2.5px;
  background: var(--accent);
  border-radius: 2px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.timeline-role {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.3;
}

.timeline-company {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
}

.timeline-period {
  font-family: 'Fira Code', monospace;
  font-size: 8px;
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-desc {
  font-size: 9.5px;
  color: var(--text-body);
  line-height: 1.6;
  font-weight: 450;
}

.timeline-desc strong {
  color: var(--accent);
  font-weight: 700;
}

.timeline-tech { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }

.timeline-tech-tag {
  font-family: 'Fira Code', monospace;
  font-size: 8px;
  padding: 2px 7px;
  background: var(--accent-lighter);
  color: var(--accent);
  border-radius: 3px;
  font-weight: 600;
}

/* ==========================================
   BROWSER MOCKUP SHOWCASE (PROOF OF WORK)
   ========================================== */
.browser-mock-frame {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-page);
  display: flex;
  flex-direction: column;
  transition: var(--theme-transition), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s, box-shadow 0.5s;
  will-change: transform, border-color, box-shadow;
  position: relative;
}

.browser-mock-frame:hover {
  border-color: var(--accent);
  transform: translateY(-4px) scale(1.01) !important;
  box-shadow: 0 16px 36px -12px rgba(8, 84, 78, 0.16), 0 6px 16px -8px rgba(8, 84, 78, 0.08);
}

.browser-header-bar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: var(--border-light);
  border-bottom: 1px solid var(--border-light);
  transition: var(--theme-transition);
}

.browser-dots {
  display: flex;
  gap: 6px;
  margin-right: 16px;
  flex-shrink: 0;
}

.browser-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: block;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.browser-address-field {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--page-bg);
  padding: 3px 12px;
  border-radius: 4px;
  font-size: 8px;
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
  transition: var(--theme-transition);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 240px;
  margin: 0 auto;
  border: 1px solid var(--border-light);
}

.browser-content-showcase {
  position: relative;
  width: 100%;
  height: 180px;
  background: #0d1117;
  overflow: hidden;
}

.screenshot-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-slide.active {
  opacity: 1;
  visibility: visible;
}

.screenshot-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.browser-mock-frame:hover .screenshot-slide.active img {
  transform: scale(1.02);
}

.showcase-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--border-light);
  transition: var(--theme-transition);
  border-top: 1px solid var(--border-light);
}

.showcase-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: var(--theme-transition);
}

.showcase-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.showcase-btn:active {
  transform: scale(0.92);
}

.showcase-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
}

.indicator-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

.indicator-dot:hover,
.indicator-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ==========================================
   KEY RESULTS STATS
   ========================================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat-card {
  text-align: center;
  padding: 12px 8px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--theme-transition), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.stat-card:hover {
  border-color: var(--accent);
  background-color: var(--page-bg);
  transform: translateY(-6px) scale(1.02) !important;
  box-shadow: 0 16px 32px -12px rgba(8, 84, 78, 0.12), 0 6px 16px -8px rgba(8, 84, 78, 0.06);
}

.stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-label {
  font-size: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
  font-weight: 600;
}

.sparkline {
  width: 100%;
  height: 24px;
  margin-top: 6px;
  display: block;
  overflow: visible;
}

/* ==========================================
   RESUME FOOTER LINE
   ========================================== */
.resume-footer-line {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.last-updated {
  font-size: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-family: 'Fira Code', monospace;
  letter-spacing: 0.03em;
}

/* ==========================================
   MAGIC TIP
   ========================================== */
.magic-tip {
  margin-top: 1rem;
  font-size: 10px;
  color: var(--text-light);
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.8;
  animation: pulseGlow 3s infinite ease-in-out;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.9; text-shadow: 0 0 8px rgba(20, 184, 166, 0.15); }
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================
   FLOATING DOCUMENT TOOLBAR
   ========================================== */
.doc-toolbar {
  position: fixed;
  top: 50%;
  left: calc(50% - 210mm / 2 - 68px); /* Float exactly next to A4 sheet */
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: var(--theme-transition);
}

.toolbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--page-bg);
  color: var(--text-heading);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: var(--theme-transition), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toolbar-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: scale(1.1);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.toolbar-btn:active {
  transform: scale(0.95);
}

/* Adjust position dynamically if page is scaled down but viewport is wide */
@media (max-width: 1024px) {
  .doc-toolbar {
    left: 1rem;
  }
}

@media (max-width: 768px) {
  .doc-toolbar {
    top: auto;
    bottom: 1.5rem;
    right: 1.5rem;
    left: auto;
    transform: none;
    flex-direction: row;
    padding: 8px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(255,255,255,0.4);
  }
  
  [data-theme="dark"] .doc-toolbar {
    background: rgba(26, 37, 53, 0.85);
    border-color: rgba(255,255,255,0.08);
  }
  
  .toolbar-btn {
    width: 42px;
    height: 42px;
  }
}

/* ==========================================
   PRINT STYLES (Single Page Budgeting)
   ========================================== */
@media print {
  @page { size: A4; margin: 0; }

  /* Force light theme for printing regardless of active theme */
  :root, [data-theme="dark"] {
    --page-bg: #ffffff !important;
    --viewport-bg: #ffffff !important;
    --text-heading: #0f172a !important;
    --text-body: #1e293b !important;
    --text-muted: #5e718d !important;
    --text-light: #475569 !important;
    --border: #cbd5e1 !important;
    --border-light: #e2e8f0 !important;
    --card-bg: #f8fafc !important;
    --accent: #08544e !important;
    --accent-light: rgba(8, 84, 78, 0.08) !important;
  }

  html, body {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  .resume-viewport {
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    width: 210mm !important;
    height: 297mm !important;
    overflow: hidden !important;
    background: none !important;
  }
  
  .resume-viewport::before, .bg-glow-sphere, .magic-tip,
  .dark-mode-toggle, .section-nav, .doc-toolbar { display: none !important; }

  .resume-wrapper {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .resume-page {
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 210mm !important;
    height: 297mm !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Compact the inner paddings for print to fit A4 */
  .resume-inner {
    padding: 24px 34px 20px 34px !important;
    gap: 0 !important;
  }

  .resume-header {
    gap: 18px !important;
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
  }

  .header-photo-container {
    width: 56px !important;
    height: 56px !important;
  }

  .header-name {
    font-size: 20px !important;
  }

  .header-title {
    font-size: 9px !important;
    margin-bottom: 2px !important;
  }

  .header-tagline {
    font-size: 8px !important;
    max-width: 300px !important;
  }

  .header-contact {
    gap: 2px !important;
    font-size: 7.5px !important;
  }

  .resume-body {
    gap: 22px !important;
  }

  .section {
    margin-bottom: 10px !important;
  }

  .section-title {
    font-size: 8.5px !important;
    margin-bottom: 5px !important;
  }

  .summary-text {
    font-size: 8.5px !important;
    line-height: 1.45 !important;
  }

  .skills-bars {
    gap: 4px !important;
    margin-bottom: 4px !important;
  }

  .skill-bar-label {
    font-size: 7.5px !important;
    margin-bottom: 1px !important;
  }

  .skill-bar-track {
    height: 3px !important;
  }

  .skill-badge {
    font-size: 7px !important;
    padding: 2px 5px !important;
  }

  .tool-item {
    font-size: 7.5px !important;
    padding: 1.5px 0 !important;
  }

  .lang-list {
    gap: 3px !important;
  }
  .lang-item {
    font-size: 8px !important;
  }

  .edu-degree {
    font-size: 8.5px !important;
  }

  .edu-detail {
    font-size: 7.5px !important;
  }

  .cert-section .edu-item {
    margin-top: 4px !important;
  }

  .timeline {
    gap: 6px !important;
  }

  .timeline-card {
    padding: 8px 10px 8px 12px !important;
    border-radius: 5px !important;
  }

  .timeline-role {
    font-size: 9.5px !important;
  }

  .timeline-company {
    font-size: 8px !important;
  }

  .timeline-period {
    font-size: 7px !important;
    padding: 1px 5px !important;
  }

  .timeline-desc {
    font-size: 8px !important;
    line-height: 1.4 !important;
  }

  .timeline-tech {
    margin-top: 3px !important;
    gap: 2px !important;
  }

  .timeline-tech-tag {
    font-size: 6.5px !important;
    padding: 1px 3px !important;
  }

  .browser-content-showcase {
    height: 110px !important;
  }

  .stats-row {
    gap: 6px !important;
  }

  .stat-card {
    padding: 6px 3px !important;
    border-radius: 5px !important;
  }

  .stat-value {
    font-size: 13px !important;
  }

  .stat-label {
    font-size: 6.5px !important;
  }

  .sparkline {
    height: 14px !important;
    margin-top: 2px !important;
  }

  /* Hide screen-only elements */
  .header-actions, .noise-overlay, .custom-cursor-dot,
  .custom-cursor-ring, .cursor-canvas, .project-ctas,
  .header-qr, .showcase-controls { display: none !important; }

  /* Skill bars — show filled for print */
  .skill-bar-fill { transition: none !important; }

  .section { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation: none !important; transition: none !important; }
}

/* ==========================================
   PRINT-ONLY QR FOOTER
   (hidden on screen, shown only on print)
   ========================================== */
.print-qr-footer {
  display: none; /* hidden on screen */
  align-items: center;
  gap: 8px;
  padding: 10px 48px;
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
  justify-content: flex-end;
}

.print-qr-img {
  width: 42px;
  height: 42px;
  border-radius: 4px;
}

.print-qr-label {
  font-family: 'Fira Code', monospace;
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
}

/* ==========================================
   RESPONSIVE & MOBILE STYLES
   ========================================== */
@media (max-width: 768px) {
  .resume-viewport {
    padding: 0.75rem 8px 1.5rem 8px;
  }
  


  .resume-wrapper {
    width: 100% !important;
    max-width: 580px;
    height: auto !important;
    margin: 0 auto;
  }

  .resume-page {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    border-radius: var(--radius);
    overflow: visible;
  }

  .resume-inner {
    padding: 24px 16px;
    gap: 20px;
  }

  .resume-header {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    text-align: center;
  }

  .header-photo-container {
    width: 120px !important;
    height: 120px !important;
    flex-shrink: 0;
    margin: 0 auto !important;
  }

  /* Hide QR on mobile screens */
  .header-qr {
    display: none !important;
  }

  /* ── Identity block ── */
  .header-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .header-name {
    font-size: 22px;
    text-align: center;
  }

  .header-title {
    font-size: 11.5px;
    letter-spacing: 0.05em;
    text-align: center;
  }

  .header-tagline {
    font-size: 11px;
    line-height: 1.6;
    max-width: 100%;
    margin: 5px auto 0;
    text-align: center;
  }

  /* ── Action buttons: 2-col grid ── */
  .header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
  }

  .header-actions .header-action-btn {
    width: 100% !important;
    justify-content: center;
    font-size: 11px;
    padding: 9px 12px;
    margin: 0 !important;
    white-space: nowrap;
  }

  .header-actions .whatsapp-btn {
    grid-column: 1 / -1;
    font-size: 12px;
    padding: 10px 16px;
  }

  /* ── Contact info: 2-col card grid ── */
  .header-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    width: 100%;
    margin-top: 4px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    text-align: left;
  }

  .contact-item {
    justify-content: flex-start;
    font-size: 10.5px;
    overflow: hidden;
  }

  .contact-item a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: inline-block;
  }


  .resume-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .resume-left, .resume-right {
    width: 100%;
    gap: 20px;
  }

  .summary-text {
    font-size: 12px;
    line-height: 1.75;
  }

  .section-title {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .skill-bar-label {
    font-size: 11px;
  }

  .skill-pct {
    font-size: 10px;
  }

  .skill-badge {
    font-size: 10px;
    padding: 5px 10px;
  }

  .tool-item {
    font-size: 11px;
  }

  .lang-name {
    font-size: 11px;
  }

  .lang-level {
    font-size: 9px;
  }

  .edu-degree {
    font-size: 11px;
  }

  .edu-detail {
    font-size: 10px;
  }

  .timeline-role {
    font-size: 13px;
  }

  .timeline-company {
    font-size: 11px;
  }

  .timeline-period {
    font-size: 9px;
    padding: 3px 9px;
    align-self: flex-start;
  }

  .timeline-desc {
    font-size: 11.5px;
    line-height: 1.7;
  }

  .timeline-tech-tag {
    font-size: 9px;
    padding: 3px 8px;
  }

  .browser-content-showcase {
    height: 140px;
  }

  .browser-address-field {
    font-size: 7.5px;
    max-width: 170px;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 9px;
  }

  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  .timeline-card {
    padding: 14px 16px;
  }

  .timeline-header {
    flex-direction: column;
    gap: 6px;
  }

  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .service-card {
    padding: 12px !important;
  }

  .magic-tip {
    display: none !important; /* Touch devices don't hover */
  }
}

@media (max-width: 900px) and (min-width: 769px) {
  .resume-viewport { padding: 1.5rem 1rem; }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    transform: none !important;
  }

  .custom-cursor-dot, .custom-cursor-ring, .cursor-canvas,
  .bg-glow-sphere, .magic-tip { display: none !important; }

  .resume-page {
    transform: scale(var(--page-scale, 1)) !important;
    filter: none !important;
    opacity: 1 !important;
  }

  .skill-bar-fill { transition: none !important; }
}
