/* ═══════════════════════════════════════
   CSS CUSTOM PROPERTIES & PREMIUM DESIGN SYSTEM
   ═══════════════════════════════════════ */
:root {
  --bg-primary: #121218; /* Sophisticated, softer dark background */
  --bg-secondary: #181822; /* Clean, slightly lighter dark secondary */
  --bg-card: #20202d; /* Premium slate-indigo card background */
  --bg-card-hover: #28283a; /* Elegant hover state */
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #6366f1; /* Premium Indigo */
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.2);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.6);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Fira Code', Consolas, Monaco, monospace;
  --max-width: 1000px;
}

[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #f4f4f5;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --text-primary: #18181b;
  --text-secondary: #4b5563; /* slightly darker for better readability */
  --text-muted: #6b7280;
  --accent: #4f46e5;
  --accent-light: #6366f1;
  --accent-glow: rgba(79, 70, 229, 0.12);
  --border: rgba(24, 24, 27, 0.09); /* crisper, more visible high contrast border */
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03); /* premium iOS visual depth */
  --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.06), 0 12px 24px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

/* ═══════════════════════════════════════
   CANVAS BACKGROUND
   ═══════════════════════════════════════ */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 1.5rem;
  transition: all var(--transition);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: transparent;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(9, 9, 11, 0.8);
  border-bottom-color: var(--border);
}

[data-theme="light"] .nav.scrolled {
  background: rgba(248, 250, 252, 0.85);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  cursor: pointer;
}

.logo-svg {
  width: 22px;
  height: 22px;
  color: var(--accent-light);
  transition: all var(--transition);
}

.nav-logo:hover .logo-svg {
  color: var(--accent);
  transform: translateX(3px);
}

.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  width: 0;
  z-index: 1001;
  box-shadow: 0 0 8px var(--accent-light);
  transition: width 0.08s ease-out;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--accent-glow);
}

/* Premium Pill Switch for Language */
.lang-switch {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  height: 38px;
  width: 72px;
  padding: 2px;
  box-sizing: border-box;
  position: relative;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-switch-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color var(--transition);
  z-index: 2;
  position: relative;
  box-sizing: border-box;
  padding: 0;
}

.lang-switch-btn:hover {
  color: var(--text-primary);
}

.lang-switch-btn.active {
  color: #ffffff !important;
}

[data-theme="light"] .lang-switch-btn.active {
  color: #ffffff !important;
}

.lang-switch-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  z-index: 1;
  transition: transform var(--transition), background var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* Language switch slider sliding transitions */
html[lang="es"] .lang-switch-slider {
  transform: translateX(0);
}
html[lang="en"] .lang-switch-slider {
  transform: translateX(36px);
}
html:not([lang="en"]) .lang-switch-slider {
  transform: translateX(0);
}

/* Premium Slider Switch for Light/Dark Theme */
.theme-switch {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  height: 38px;
  width: 68px;
  padding: 2px;
  box-sizing: border-box;
  position: relative;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition);
}

.theme-switch-icon {
  font-size: 0.82rem;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
  pointer-events: none;
}

.theme-switch-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  z-index: 1;
  transition: transform var(--transition), background var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* Theme Switch slider translation logic based on html[data-theme] */
html[data-theme="light"] .theme-switch-slider {
  transform: translateX(0);
}
html[data-theme="dark"] .theme-switch-slider {
  transform: translateX(30px);
}
html:not([data-theme="light"]) .theme-switch-slider {
  transform: translateX(30px);
}

.accent-dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0 0.5rem;
  border-radius: 20px;
  height: 38px;
  box-sizing: border-box;
}

.accent-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
  box-sizing: border-box;
}

.accent-dot:hover {
  transform: scale(1.25);
}

.accent-dot.active {
  border-color: #ffffff;
  transform: scale(1.1);
}

html.theme-classic-light .accent-dot.active {
  border-color: #000000;
}

.dot-indigo { background: #6366f1; }
.dot-matrix { background: #10b981; }
.dot-dracula { background: #bd93f9; }
.dot-cyber { background: #ff007f; }
.dot-classic { background: #9ca3af; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ═══════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 6rem 1.5rem 3rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-text-col {
  text-align: left;
}

.hero-avatar-col {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-avatar-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  position: relative;
  animation: fadeInUp 0.6s ease 0.15s both;
  background: var(--bg-card);
  padding: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.hero-avatar:hover {
  transform: scale(1.03);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #10b981;
  margin-bottom: 1.25rem;
  width: fit-content;
  animation: fadeInUp 0.6s ease 0.15s both;
}

[data-theme="light"] .hero-badge {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.25);
  color: #059669;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

[data-theme="light"] .hero-badge-dot {
  background: #059669;
  box-shadow: 0 0 8px #059669;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  letter-spacing: -1.5px;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero h1 span#heroGreeting {
  color: var(--text-secondary);
  font-weight: 600;
}

.hero h1 span#heroName {
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--accent-light);
  margin-bottom: 0.5rem;
  font-weight: 600;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.typing-wrapper {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 1.6em;
  animation: fadeInUp 0.6s ease 0.5s both;
}

.typing-text::after {
  content: "|";
  animation: blink 1s infinite;
  color: var(--accent);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-summary {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 520px;
  animation: fadeInUp 0.6s ease 0.55s both;
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.6s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-1.5px);
}

.download-links {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-start; /* Aligned beautifully with primary buttons on desktop */
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.7s both;
}

.download-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
}

.download-link:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  transform: translateY(-1.5px);
}

/* Premium Vector SVG Icon Styling */
.btn-svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.skill-svg {
  width: 18px;
  height: 18px;
  color: var(--accent-light);
  flex-shrink: 0;
}

.contact-svg {
  width: 18px;
  height: 18px;
  color: var(--accent-light);
  flex-shrink: 0;
}

.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.hero-scroll svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

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

/* ═══════════════════════════════════════
   SECTIONS COMMON
   ═══════════════════════════════════════ */
section {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem;
}

.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.75px;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* Reveal animations using standard transitions */
.reveal, .reveal-left, .reveal-right {
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal { transform: translateY(24px); }
.reveal-left { transform: translateX(-24px); }
.reveal-right { transform: translateX(24px); }

.reveal.visible, .reveal-left.visible, .reveal-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ═══════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* Premium High Contrast Card Styling */
.stat-card,
.timeline-card,
.skill-category,
.edu-card,
.contact-card,
[elevation="2"],
[style*="elevation: 2"] {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.stat-card:hover,
.edu-card:hover,
.contact-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1.1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

/* ═══════════════════════════════════════
   EXPERIENCE TIMELINE
   ═══════════════════════════════════════ */
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

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

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 14px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  z-index: 1;
  transition: all var(--transition);
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  transform: scale(1.2);
}

.timeline-card {
  padding: 1.75rem;
}

.timeline-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateX(3px);
  box-shadow: var(--shadow-hover);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-light);
  display: inline-block;
  margin-bottom: 0.4rem;
}

.timeline-role {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.timeline-company {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.timeline-desc li {
  margin-bottom: 0.5rem;
  list-style: none;
  position: relative;
  padding-left: 1rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.timeline-desc li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-light);
}

.metric-chip {
  color: var(--accent-light);
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(99, 102, 241, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: inline-block;
  font-size: 0.85rem;
}

[data-theme="light"] .metric-chip {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.2);
  color: var(--accent);
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.25rem 0.65rem;
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--accent-light);
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}

.tag.tag-highlight {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* ═══════════════════════════════════════
   SKILLS / STACK SECTION
   ═══════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  padding: 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.skill-category:hover {
  border-color: var(--accent-light);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.skill-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent-light);
  flex-shrink: 0;
}

.skill-svg {
  width: 20px;
  height: 20px;
}

.skill-category-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.stack-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: default;
  letter-spacing: 0.1px;
}

.stack-tag:hover {
  background: var(--accent-glow);
  border-color: var(--accent-light);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

[data-theme="light"] .stack-tag {
  background: #ffffff;
  border-color: rgba(24, 24, 27, 0.1);
  color: #18181b;
}

[data-theme="light"] .stack-tag:hover {
  background: rgba(79, 70, 229, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-light);
  box-shadow: var(--shadow-hover);
}

.project-image {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-type {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-light);
  margin-bottom: 0.35rem;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.project-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.project-links {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition);
}

.project-link:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   EDUCATION
   ═══════════════════════════════════════ */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.edu-card {
  padding: 1.75rem;
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-light);
  display: inline-block;
  margin-bottom: 0.35rem;
}

.edu-degree {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.edu-school {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════ */
.contact-wrapper {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  max-width: 720px;
  margin: 2rem auto 0;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
}

.contact-card .icon {
  font-size: 1.1rem;
}

.contact-card .info {
  text-align: left;
}

.contact-card .label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.contact-card .value {
  font-size: 0.82rem;
  font-weight: 600;
}

.contact-copy-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.45rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition);
}

.contact-copy-btn:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
}

.contact-copy-btn .copy-svg {
  width: 15px;
  height: 15px;
}

.contact-copy-btn .copy-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 50%;
  transform: translateX(50%) translateY(4px);
  background: #10b981;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  z-index: 100;
}

.contact-copy-btn.copied .copy-tooltip {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer .heart {
  color: #ef4444;
  display: inline-block;
  animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-text-col {
    text-align: center;
    order: 2;
  }

  .hero-avatar-col {
    order: 1;
  }

  .hero-avatar {
    width: 180px;
    height: 180px;
  }

  .hero-summary {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons,
  .download-links {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-stats {
    order: -1;
  }

  .timeline::before {
    left: 14px;
  }

  .timeline-item {
    padding-left: 40px;
  }

  .timeline-dot {
    left: 8px;
  }

  section {
    padding: 4rem 1rem;
  }
}

@media (max-width: 480px) {
  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }


}

/* ═══════════════════════════════════════
   CUSTOM SCROLLBAR
   ═══════════════════════════════════════ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ═══════════════════════════════════════
   BACK TO TOP
   ═══════════════════════════════════════ */
.back-to-top {
  position: fixed !important;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999 !important;
  opacity: 0;
  transform: translateY(12px);
  transition: all var(--transition);
  font-size: 1rem;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

/* ═══════════════════════════════════════
   PREMIUM ELITE MODERN ADDITIONS (Spotlight, Terminal, Modal)
   ═══════════════════════════════════════ */

/* 1. Mouse Border Spotlight Glow (Composite Mask - Border Only) */
.stat-card,
.timeline-card,
.skill-category,
.edu-card,
.contact-card,
.modal-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before,
.timeline-card::before,
.skill-category::before,
.edu-card::before,
.contact-card::before,
.modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    200px circle at var(--mouse-x, 0) var(--mouse-y, 0),
    var(--accent-light),
    transparent 70%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.stat-card:hover::before,
.timeline-card:hover::before,
.skill-category:hover::before,
.edu-card:hover::before,
.contact-card:hover::before,
.modal-card:hover::before {
  opacity: 1;
}

/* Ensure contents stay on top of the spotlight borders */
.stat-card > *,
.timeline-card > *,
.skill-category > *,
.edu-card > *,
.contact-card > *,
.modal-card > * {
  position: relative;
  z-index: 2;
}

/* 2. Glassmorphic CV Download Selection Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 520px;
  width: 90%;
  padding: 1.75rem;
  transform: translateY(20px);
  transition: transform var(--transition);
}

.modal-overlay[aria-hidden="false"] .modal-container {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
}

.modal-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.modal-card-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-glow);
  color: var(--accent-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-svg {
  width: 18px;
  height: 18px;
}

.modal-card-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.modal-card-info p {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* 3. Interactive Developer Command Shell Console */
.terminal-trigger {
  position: fixed !important;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999 !important;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.terminal-trigger svg {
  width: 16px;
  height: 16px;
  color: var(--accent-light);
  transition: transform var(--transition);
}

.terminal-trigger:hover {
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.terminal-trigger:hover svg {
  color: #ffffff;
}

.terminal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 25000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  padding: 1rem;
}

.terminal-overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.terminal-container {
  background: #0a0a0d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  width: 100%;
  max-width: 660px;
  height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition);
}

.terminal-overlay[aria-hidden="false"] .terminal-container {
  transform: scale(1) translateY(0);
}

.terminal-header {
  background: #141419;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  flex-shrink: 0;
}

.terminal-buttons {
  display: flex;
  gap: 0.45rem;
}

.t-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  transition: filter 0.15s ease;
}

.t-btn:hover {
  filter: brightness(0.85);
}

.t-btn::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1;
  opacity: 0;
  transition: opacity 0.1s ease;
  pointer-events: none;
}

.t-close { background: #ff5f56; }
.t-minimize { background: #ffbd2e; }
.t-maximize { background: #27c93f; }

.t-close::before { content: "×"; font-size: 9px; }
.t-minimize::before { content: "−"; font-size: 8px; }
.t-maximize::before { content: "+"; font-size: 8px; }

.terminal-buttons:hover .t-btn::before,
.t-btn:hover::before {
  opacity: 1;
}

/* Fullscreen and Minimized Container Window layout modes */
.terminal-container.fullscreen {
  position: fixed;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  z-index: 2200 !important;
  transform: none !important;
}

.terminal-container.minimized {
  height: 36px !important;
  width: 250px !important;
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: none !important;
}

.terminal-container.minimized .terminal-body {
  display: none !important;
}

.terminal-overlay.minimized-mode {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none;
}

.terminal-overlay.minimized-mode .terminal-container {
  pointer-events: auto;
}

/* Global accent themes shared between site and terminal */
html.theme-matrix {
  --accent: #10b981;
  --accent-light: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.25);
}
html[data-theme="light"].theme-matrix {
  --accent: #059669; /* Rich forest green */
  --accent-light: #10b981;
  --accent-glow: rgba(5, 150, 105, 0.15);
}
html.theme-matrix .terminal-container {
  border-color: rgba(16, 185, 129, 0.3) !important;
}

html.theme-dracula {
  --accent: #bd93f9;
  --accent-light: #ff79c6;
  --accent-glow: rgba(189, 147, 249, 0.25);
}
html[data-theme="light"].theme-dracula {
  --accent: #7c3aed; /* Deep violet */
  --accent-light: #9f67ff;
  --accent-glow: rgba(124, 58, 237, 0.15);
}
html.theme-dracula .terminal-container {
  border-color: rgba(189, 147, 249, 0.3) !important;
}

html.theme-cyber {
  --accent: #ff007f;
  --accent-light: #00ffff;
  --accent-glow: rgba(255, 0, 127, 0.25);
}
html[data-theme="light"].theme-cyber {
  --accent: #db2777; /* Deep neon pink */
  --accent-light: #0891b2; /* Contrastful cyan-blue */
  --accent-glow: rgba(219, 39, 119, 0.15);
}
html.theme-cyber .terminal-container {
  border-color: rgba(255, 0, 127, 0.35) !important;
}
html[data-theme="light"].theme-cyber .terminal-container {
  border-color: rgba(219, 39, 119, 0.25) !important;
}
html.theme-cyber .terminal-prompt {
  color: var(--accent) !important;
}

html.theme-classic {
  --accent: #9ca3af;
  --accent-light: #e5e7eb;
  --accent-glow: rgba(156, 163, 175, 0.15);
}
html[data-theme="light"].theme-classic {
  --accent: #4b5563; /* Slate/gray */
  --accent-light: #1f2937; /* Dark charcoal */
  --accent-glow: rgba(75, 85, 99, 0.12);
}
html.theme-classic .terminal-container {
  border-color: rgba(255, 255, 255, 0.15) !important;
}
.terminal-sync-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all var(--transition);
  margin-left: auto;
  z-index: 10;
}

.terminal-sync-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Classic Light terminal theme */
.terminal-container.theme-classic-light {
  background: #f4f4f5 !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.terminal-container.theme-classic-light .terminal-header {
  background: #e4e4e7 !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

.terminal-container.theme-classic-light .terminal-title {
  color: rgba(0, 0, 0, 0.5) !important;
}

.terminal-container.theme-classic-light .terminal-sync-btn {
  color: rgba(0, 0, 0, 0.4) !important;
}
.terminal-container.theme-classic-light .terminal-sync-btn:hover {
  color: #000000 !important;
  background: rgba(0, 0, 0, 0.05) !important;
}

.terminal-container.theme-classic-light .terminal-body {
  color: #18181b !important;
}

.terminal-container.theme-classic-light .terminal-input {
  color: #000000 !important;
}

.terminal-container.theme-classic-light .terminal-prompt {
  color: #4f46e5 !important;
}

.terminal-container.theme-classic-light .terminal-line.type-welcome {
  color: #059669 !important;
}

.terminal-container.theme-classic-light .terminal-line.type-info {
  color: #2563eb !important;
}

.terminal-container.theme-classic-light .terminal-line.type-error {
  color: #dc2626 !important;
}

.terminal-container.theme-classic-light .terminal-line .cmd {
  color: #d97706 !important;
}

.terminal-container.theme-classic-light .terminal-line .user-input-line {
  color: #000000 !important;
}

/* Zsh status-bar footer keyboard guide */
.terminal-footer-guide {
  background: #0d0d11;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.38rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  pointer-events: none;
  box-sizing: border-box;
}

.terminal-footer-guide b {
  color: var(--accent-light);
  font-weight: bold;
}

/* Localization styling in light mode */
.terminal-container.theme-classic-light .terminal-footer-guide {
  background: #e4e4e7 !important;
  border-top-color: rgba(0, 0, 0, 0.08) !important;
  color: rgba(0, 0, 0, 0.5) !important;
}

.terminal-container.theme-classic-light .terminal-footer-guide b {
  color: #4f46e5 !important;
}

.terminal-title {
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.terminal-body {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #e4e4e7;
  line-height: 1.5;
  text-align: left;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.terminal-prompt {
  color: var(--accent-light);
  font-weight: bold;
  flex-shrink: 0;
}

.terminal-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  flex: 1;
  outline: none;
}

.terminal-line {
  margin-bottom: 0.35rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-line.type-welcome {
  color: #10b981;
  font-weight: bold;
}

.terminal-line.type-info {
  color: #60a5fa;
}

.terminal-line.type-error {
  color: #ef4444;
}

.terminal-line .cmd {
  color: #fbbf24;
  font-weight: 600;
}

.terminal-line .cat-title {
  color: var(--accent-light);
  font-weight: bold;
}

.terminal-line .role-title {
  color: #ffffff;
  font-weight: bold;
}

.terminal-line .user-input-line {
  color: #ffffff;
  font-weight: bold;
}

.term-link {
  color: var(--accent-light);
  text-decoration: underline;
  cursor: pointer;
}
.term-link:hover {
  color: var(--accent);
}

/* Premium Vercel-style Tooltips */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1e1e24;
  color: #f4f4f5;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 10005;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] [data-tooltip]::after {
  background: #ffffff;
  color: #18181b;
  border-color: rgba(24, 24, 27, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Position tooltips inside the fixed navigation bar BELOW the elements to prevent clipping */
.nav [data-tooltip]::after {
  bottom: auto;
  top: 135%;
  transform: translateX(-50%) translateY(-4px);
}

.nav [data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════
   ACCESSIBILITY & FOCUS VISIBILITY
   ═══════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--accent-light) !important;
  outline-offset: 3px !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-light) !important;
  outline-offset: 2px !important;
}

/* ═══════════════════════════════════════
   MOBILE STICKY ACTION BAR
   ═══════════════════════════════════════ */
.mobile-cta-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: rgba(18, 18, 24, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    gap: 0.75rem;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
  }

  [data-theme="light"] .mobile-cta-bar {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  }

  .mobile-cta-bar.visible {
    transform: translateY(0);
  }

  /* Move floating utility buttons with clear breathing room above mobile sticky bar */
  .back-to-top {
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
    right: 1.25rem !important;
    width: 38px !important;
    height: 38px !important;
  }

  .terminal-trigger {
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
    left: 1.25rem !important;
    width: 38px !important;
    height: 38px !important;
  }

  .mobile-cta-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
  }

  .btn-cta-download {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text-primary);
  }

  [data-theme="light"] .btn-cta-download {
    background: #f4f4f5;
  }

  .btn-cta-contact {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--accent-glow);
  }
}

/* Hide floating buttons and sticky bar when modal or terminal is open */
body.modal-open .mobile-cta-bar,
body.modal-open .back-to-top,
body.modal-open .terminal-trigger,
body:has(#downloadModal[aria-hidden="false"]) .mobile-cta-bar,
body:has(#downloadModal[aria-hidden="false"]) .back-to-top,
body:has(#downloadModal[aria-hidden="false"]) .terminal-trigger,
body:has(#terminalOverlay[aria-hidden="false"]:not(.minimized-mode)) .mobile-cta-bar,
body:has(#terminalOverlay[aria-hidden="false"]:not(.minimized-mode)) .back-to-top,
body:has(#terminalOverlay[aria-hidden="false"]:not(.minimized-mode)) .terminal-trigger {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(24px) !important;
}

/* ═══════════════════════════════════════
   PRINT STYLESHEET (ATS & BROWSER PRINT)
   ═══════════════════════════════════════ */
@media print {
  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  @page {
    size: A4;
    margin: 10mm 14mm;
  }

  html, body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 9.5pt !important;
    line-height: 1.4 !important;
  }

  #particles-canvas,
  .nav,
  .scroll-progress,
  .hero-scroll,
  .hero-buttons,
  .download-links,
  .back-to-top,
  .terminal-trigger,
  .terminal-overlay,
  .modal-overlay,
  .theme-switch,
  .accent-dots,
  .lang-switch,
  .hamburger,
  .contact-copy-btn,
  .mobile-cta-bar,
  .hero-avatar-glow {
    display: none !important;
  }

  section {
    background: transparent !important;
    padding: 0 0 1.25rem 0 !important;
    min-height: auto !important;
    page-break-inside: auto;
  }

  .section-container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .section-header {
    margin-bottom: 0.75rem !important;
  }

  .section-label {
    display: none !important;
  }

  .section-title {
    font-size: 1.15rem !important;
    color: #111827 !important;
    border-bottom: 1.5px solid #e5e7eb !important;
    padding-bottom: 0.25rem !important;
    margin-bottom: 0.5rem !important;
    text-transform: uppercase !important;
  }

  .section-desc {
    display: none !important;
  }

  /* Hero */
  .hero {
    min-height: auto !important;
    padding: 0 0 1rem 0 !important;
  }

  .hero-inner {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .hero-text-col h1 {
    font-size: 1.75rem !important;
    color: #111827 !important;
  }

  .hero-subtitle {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #4b5563 !important;
  }

  .typing-wrapper {
    display: none !important;
  }

  .hero-summary {
    font-size: 9pt !important;
    color: #374151 !important;
    max-width: 100% !important;
  }

  .hero-avatar {
    width: 80px !important;
    height: 80px !important;
  }

  /* Timeline */
  .timeline::before {
    display: none !important;
  }

  .timeline-item {
    padding-left: 0 !important;
    margin-bottom: 1rem !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .timeline-dot {
    display: none !important;
  }

  .timeline-card {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }

  .timeline-role {
    font-size: 1rem !important;
    color: #111827 !important;
  }

  .timeline-company {
    font-size: 8.5pt !important;
    color: #4b5563 !important;
  }

  .timeline-desc li {
    font-size: 9pt !important;
    color: #1f2937 !important;
    margin-bottom: 0.25rem !important;
  }

  .timeline-tags {
    display: none !important;
  }

  /* Skills */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .skill-category {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    padding: 0.75rem 1rem !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .skill-category-title {
    font-size: 0.9rem !important;
    color: #111827 !important;
  }

  .stack-tag {
    background: transparent !important;
    border: 1px solid #d1d5db !important;
    color: #111827 !important;
    font-size: 7.5pt !important;
    padding: 1px 5px !important;
  }

  .skill-badge {
    border: 1px solid #9ca3af !important;
    color: #374151 !important;
    background: transparent !important;
  }

  .skill-bar {
    display: none !important;
  }

  /* Projects & Education */
  .projects-grid, .education-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .project-card, .edu-card {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    padding: 0.75rem 1rem !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .project-image, .project-links {
    display: none !important;
  }

  .project-title {
    font-size: 1rem !important;
    color: #111827 !important;
  }

  .project-desc {
    font-size: 9pt !important;
    color: #374151 !important;
  }

  /* Contact & Footer */
  .contact-links {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
  }

  .contact-card {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    padding: 0.5rem 0.75rem !important;
    text-decoration: none !important;
  }

  .footer {
    display: none !important;
  }
}
