/* ===================================================================
   ALEXIS ROMÁN MARTÍNEZ — PORTFOLIO & LINKTREE
   Minimalist, Tactile & Emotionally Resonant Design System
   =================================================================== */

:root {
  /* Typography */
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Caveat", cursive, sans-serif;

  /* Base Spacing & Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shell-width: 680px;

  /* Day / Lamp ON Color Palette (Default) */
  --bg-page: #f9f8f4;
  --bg-surface: rgba(255, 255, 255, 0.88);
  --bg-surface-elevated: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(243, 241, 234, 0.96);
  --bg-grid-dot: rgba(120, 113, 108, 0.05);
  --border-subtle: #e7e5dc;
  --border-strong: #d4d0c2;
  --text-main: #1c1917;
  --text-muted: #57534e;
  --text-faint: #78716c;
  
  /* Brand Accents */
  --accent-purple: #8b5cf6;
  --accent-blue: #2563eb;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --accent-emerald: #059669;

  /* Lamp & Ambiance */
  --wire-color: #78716c;
  --bulb-glow: rgba(245, 158, 11, 0.35);
  --bulb-color: #fbbf24;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 10px 25px -4px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);

  /* Transition timings */
  --transition-theme: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease, border-color 0.3s ease;
}

/* Night / Lamp OFF Theme */
html[data-lamp="off"] {
  --bg-page: #0d0f14;
  --bg-surface: rgba(20, 23, 33, 0.85);
  --bg-surface-elevated: rgba(26, 30, 43, 0.92);
  --bg-card-hover: rgba(31, 36, 52, 0.95);
  --bg-grid-dot: rgba(148, 163, 184, 0.06);
  --border-subtle: #242a3b;
  --border-strong: #333c54;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --accent-purple: #a78bfa;
  --accent-blue: #60a5fa;
  --accent-amber: #fbbf24;
  --accent-rose: #f43f5e;
  --accent-emerald: #34d399;

  --wire-color: #475569;
  --bulb-glow: rgba(148, 163, 184, 0.08);
  --bulb-color: #64748b;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 12px 30px -4px rgba(0, 0, 0, 0.4);
}

/* ===================================================================
   Global Resets & Foundation
   =================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  background-image: radial-gradient(var(--bg-grid-dot) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  transition: var(--transition-theme);
}

/* Background Canvas */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
}

html[data-lamp="off"] #ambient-canvas {
  opacity: 1;
}

/* ===================================================================
   Tactile Wall Switch Fixture (Desktop Light Control)
   =================================================================== */
.wall-switch-fixture {
  position: fixed;
  top: 36px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

/* Wall Faceplate */
.wall-switch-plate {
  width: 54px;
  height: 90px;
  background: #f4f2eb;
  border-radius: 9px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 6px 18px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -1px 1px rgba(0, 0, 0, 0.08);
  transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-lamp="off"] .wall-switch-plate {
  background: #171b26;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 8px 22px rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4);
}

/* Authentic Metal Screws */
.switch-screw {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e2dfd5 0%, #a8a499 100%);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.switch-screw--top {
  top: 7px;
}

.switch-screw--bottom {
  bottom: 7px;
}

.screw-slot {
  width: 4px;
  height: 1px;
  background: #57534e;
  transform: rotate(18deg);
  opacity: 0.75;
}

html[data-lamp="off"] .switch-screw {
  background: radial-gradient(circle at 35% 35%, #475569 0%, #1e293b 100%);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-lamp="off"] .screw-slot {
  background: #0f172a;
}

/* Rocker Button Trigger */
.switch-rocker-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.switch-rocker-btn:focus-visible .switch-well {
  outline: 2px solid var(--accent-amber);
  outline-offset: 2px;
}

/* Recessed Well / Cavity */
.switch-well {
  width: 26px;
  height: 48px;
  background: #dedad0;
  border-radius: 4px;
  padding: 2px;
  box-sizing: border-box;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.28),
    inset 0 -1px 2px rgba(255, 255, 255, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.6);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

html[data-lamp="off"] .switch-well {
  background: #0f121a;
  box-shadow: 
    inset 0 2px 5px rgba(0, 0, 0, 0.7),
    inset 0 -1px 1px rgba(255, 255, 255, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 3D Rocker Switch Paddle */
.switch-rocker {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1.2), box-shadow 0.18s ease;
  transform-origin: center center;
}

.rocker-top,
.rocker-bottom {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.rocker-text {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1;
  user-select: none;
  opacity: 0.55;
  transition: opacity 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

/* Warm Glow LED Indicator Dot */
.rocker-dot {
  position: absolute;
  top: 4px;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* -------------------------------------------------------------
   STATE: ON (Luz Encendida / Modo Día)
   Puerto Rico / US standard: UP is ON.
   Top half pressed inward (tilted back), bottom half protrudes.
   ------------------------------------------------------------- */
html[data-lamp="on"] .switch-rocker {
  transform: perspective(140px) rotateX(15deg);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.22);
}

html[data-lamp="on"] .rocker-top {
  background: linear-gradient(to bottom, #cfcbc0 0%, #e6e3d9 100%);
  box-shadow: inset 0 3px 4px rgba(0, 0, 0, 0.22);
  color: #78716c;
}

html[data-lamp="on"] .rocker-bottom {
  background: linear-gradient(to bottom, #ffffff 0%, #ebe7dd 100%);
  box-shadow: 
    0 3px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #a8a29e;
}

html[data-lamp="on"] .rocker-top .rocker-text {
  opacity: 0.85;
  color: #b45309;
}

html[data-lamp="on"] .rocker-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px 1px #f59e0b, 0 0 10px rgba(245, 158, 11, 0.6);
}

/* -------------------------------------------------------------
   STATE: OFF (Luz Apagada / Modo Noche)
   Top half protrudes forward, bottom half pressed inward.
   ------------------------------------------------------------- */
html[data-lamp="off"] .switch-rocker {
  transform: perspective(140px) rotateX(-15deg);
  box-shadow: 0 -3px 6px -1px rgba(0, 0, 0, 0.45);
}

html[data-lamp="off"] .rocker-top {
  background: linear-gradient(to bottom, #2d3345 0%, #1c202d 100%);
  box-shadow: 
    0 -2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #94a3b8;
}

html[data-lamp="off"] .rocker-bottom {
  background: linear-gradient(to bottom, #11141c 0%, #181d28 100%);
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.5);
  color: #475569;
}

html[data-lamp="off"] .rocker-bottom .rocker-text {
  opacity: 0.9;
  color: #38bdf8;
}

html[data-lamp="off"] .rocker-dot {
  background: #334155;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6);
}

/* Interactive Hover & Active feedback */
.switch-rocker-btn:hover .wall-switch-plate {
  box-shadow: 
    0 8px 22px rgba(0, 0, 0, 0.12),
    0 3px 6px rgba(0, 0, 0, 0.06),
    inset 0 1px 1px rgba(255, 255, 255, 0.95);
}

html[data-lamp="off"] .switch-rocker-btn:hover .wall-switch-plate {
  box-shadow: 
    0 10px 28px rgba(0, 0, 0, 0.7),
    0 3px 8px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.switch-rocker-btn:active .switch-rocker {
  transform: scale(0.96) !important;
}

/* Handwritten label underneath the switch */
.wall-switch-hint {
  font-family: var(--font-hand);
  font-size: 0.92rem;
  color: var(--text-faint);
  margin-top: 6px;
  letter-spacing: 0.5px;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.wall-switch-fixture:hover .wall-switch-hint {
  opacity: 1;
  color: var(--text-main);
}

/* ===================================================================
   Top Navigation & Header
   =================================================================== */
.top-nav {
  position: relative;
  z-index: 10;
  max-width: var(--shell-width);
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  box-shadow: var(--shadow-card);
  max-width: 75%;
  min-width: 0;
  flex-shrink: 1;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  flex-shrink: 0;
  animation: pulse-dot 2.5s infinite;
}

.status-text {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Top Nav Controls (Lang & Theme) */
.top-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Tactile Theme Nav Button (Day / Night switch) */
.theme-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  font-size: 1.05rem;
  padding: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.theme-nav-btn:hover {
  transform: scale(1.08);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
}

.theme-nav-btn:active,
.theme-btn-clicked {
  transform: scale(0.9) rotate(12deg);
}

html[data-lamp="on"] .theme-nav-icon--moon {
  display: none;
}
html[data-lamp="on"] .theme-nav-icon--sun {
  display: inline-block;
}

html[data-lamp="off"] .theme-nav-icon--sun {
  display: none;
}
html[data-lamp="off"] .theme-nav-icon--moon {
  display: inline-block;
}

/* Language Switcher */
.lang-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  box-shadow: var(--shadow-card);
  height: 38px;
}

.lang-btn {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-faint);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.lang-btn.active {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

.lang-divider {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ===================================================================
   Main Shell Container
   =================================================================== */
.page-shell {
  position: relative;
  z-index: 10;
  max-width: var(--shell-width);
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 80px 20px;
  box-sizing: border-box;
  overflow-x: clip;
}

/* ===================================================================
   Hero Section
   =================================================================== */
.hero-section {
  position: relative;
  padding: 24px 0 16px 0;
}

/* Subtle calm-zone vignette behind hero content */
.hero-section::before {
  content: "";
  position: absolute;
  inset: -16px -28px;
  background: radial-gradient(
    ellipse at center,
    var(--bg-page) 30%,
    transparent 80%
  );
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.avatar-container {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.avatar-ring {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-amber));
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.avatar-ring:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0,0,0,0.16);
}

.avatar-inner {
  width: 100%;
  height: 100%;
  background: var(--bg-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  display: block;
  transition: transform 0.35s ease;
}

.avatar-ring:hover .avatar-img {
  transform: scale(1.08);
}

.avatar-initials {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.avatar-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sparkle-icon {
  color: var(--accent-amber);
}

/* Wordmark Title */
.wordmark {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 4.2vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.wm-color-1 { color: var(--accent-purple); }
.wm-color-2 { color: var(--accent-blue); }
.wm-color-3 { color: var(--accent-amber); }

.wm-greeting {
  white-space: nowrap;
  display: inline-block;
}

.wm-name {
  white-space: nowrap;
  display: inline-block;
}

.terminal-cursor {
  display: inline-block;
  color: var(--accent-rose);
  animation: blink-caret 1s steps(2, start) infinite;
  margin-left: 2px;
}

.subtitle-badge {
  margin-top: 6px;
  margin-bottom: 18px;
}

.badge-role {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.2px;
}

/* Time Greeting */
.greeting-box {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

#time-greeting {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.handwritten-annotation {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--accent-rose);
}

/* Narrative Prose */
.narrative-prose {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.narrative-prose strong {
  color: var(--text-main);
  font-weight: 600;
}

/* ===================================================================
   Quick Links / Linktree Bar
   =================================================================== */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

@media (max-width: 540px) {
  .quick-links-grid {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphism Frosted Backdrop for Surfaces */
.status-indicator,
.theme-nav-btn,
.lang-switch-wrapper,
.link-card,
.project-card,
.timeline-content,
.comp-box,
.mindset-card,
.edu-card,
.connect-box {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
}

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

.link-card:active {
  transform: translateY(0);
}

.link-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.link-card:hover .link-card__icon {
  transform: scale(1.08);
}

.link-card--linkedin .link-card__icon {
  background: rgba(10, 102, 194, 0.12);
  color: #0a66c2;
}

.link-card--cabuya .link-card__icon {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-purple);
}

.link-card--contact .link-card__icon {
  background: rgba(217, 119, 6, 0.12);
  color: var(--accent-amber);
}

.link-card--whatsapp .link-card__icon,
.link-card--call .link-card__icon {
  background: rgba(37, 211, 102, 0.14);
  color: #25d366;
}

.link-card--whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.45);
}

.link-card--vcard {
  grid-column: 1 / -1;
  background: var(--bg-surface);
  border: 1.5px solid rgba(217, 119, 6, 0.4);
}

.link-card--vcard:hover {
  border-color: var(--accent-amber);
}

.link-card--vcard .link-card__icon {
  background: rgba(217, 119, 6, 0.15);
  color: var(--accent-amber);
}

.badge-os-support {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(217, 119, 6, 0.12);
  color: var(--accent-amber);
  margin-left: 6px;
  font-weight: 600;
  vertical-align: middle;
}

.link-card__text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.link-card__title {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card__arrow {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 1.1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-card:hover .link-card__arrow {
  transform: translateX(3px);
  color: var(--text-main);
}

/* ===================================================================
   Content Sections Styling
   =================================================================== */
.content-section {
  margin-top: 48px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.section-label__tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-faint);
  text-transform: uppercase;
}

.section-label__line {
  flex-grow: 1;
  height: 1px;
  background: var(--border-subtle);
}

.section-intro {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ===================================================================
   Projects Grid (Cabuya Creativa Solutions)
   =================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-strong);
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.project-tag--highlight {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
  border-color: rgba(139, 92, 246, 0.25);
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-faint);
}

.project-card__title {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-card__title a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.project-card__title a:hover {
  text-decoration: underline;
  color: var(--accent-blue);
}

.external-icon {
  font-size: 0.9rem;
  color: var(--text-faint);
}

.pill-live {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(5, 150, 105, 0.12);
  color: var(--accent-emerald);
  font-weight: 600;
  vertical-align: middle;
}

.project-card__summary {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.tech-stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  color: var(--text-faint);
}

/* ===================================================================
   Career Timeline
   =================================================================== */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  padding-left: 20px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 5px;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent-blue);
  box-shadow: 0 0 0 3px var(--bg-page);
}

.timeline-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.timeline-dates {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-faint);
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===================================================================
   Core Competencies (Rational Foundation)
   =================================================================== */
.competencies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

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

.comp-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.comp-box__num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-amber);
  margin-bottom: 8px;
}

.comp-box__title {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.comp-box__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===================================================================
   Mindset & Aspiration Interactive Spark
   =================================================================== */
.mindset-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-rose);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.mindset-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mindset-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.spark-btn {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.spark-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.spark-btn__icon {
  font-size: 0.85rem;
  transition: transform 0.3s ease;
}

.spark-btn:active .spark-btn__icon {
  transform: rotate(180deg);
}

.mindset-quote {
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-main);
  margin-bottom: 16px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mindset-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mindset-author {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mindset-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ===================================================================
   Education & Formation
   =================================================================== */
.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.edu-card__badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-blue);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-card__degree {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.edu-card__school {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.edu-card__lang {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  color: var(--text-faint);
}

/* ===================================================================
   Connect Box & Action Buttons
   =================================================================== */
.connect-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.connect-intro {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.connect-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
}

.action-btn:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.action-btn--primary {
  background: var(--text-main);
  color: var(--bg-page);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.action-btn--secondary {
  background: var(--bg-page);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

/* Tactile Copied Micro-State */
.btn-copied-active {
  transform: scale(0.97) !important;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

.action-btn--primary.btn-copied-active {
  background: #059669 !important;
  color: #ffffff !important;
}

html[data-lamp="off"] .action-btn--primary.btn-copied-active {
  background: #10b981 !important;
  color: #0d0f14 !important;
}

.link-card.btn-copied-active {
  border-color: #059669 !important;
  box-shadow: 0 0 0 1px #059669 !important;
}

html[data-lamp="off"] .link-card.btn-copied-active {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 1px #10b981 !important;
}

/* ===================================================================
   Page Footer
   =================================================================== */
.page-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-domain a {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 600;
}

.footer-domain a:hover {
  text-decoration: underline;
}

/* ===================================================================
   Pointer-Anchored Tactile Feedback (Floating Clipboard Bubble)
   =================================================================== */
.pointer-feedback {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  user-select: none;
  background: rgba(24, 24, 27, 0.94);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 
    0 10px 25px -4px rgba(0, 0, 0, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  will-change: transform, opacity;
}

.pointer-feedback.is-visible {
  animation: pointerFeedbackPop 1.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pointer-feedback.pointer-feedback--below.is-visible {
  animation: pointerFeedbackPopBelow 1.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Night / Lamp OFF mode */
html[data-lamp="off"] .pointer-feedback {
  background: rgba(20, 23, 33, 0.95);
  color: #f1f5f9;
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 
    0 10px 30px -4px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(167, 139, 250, 0.2);
}

.pointer-feedback__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.22);
  color: #10b981;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
}

html[data-lamp="off"] .pointer-feedback__icon {
  background: rgba(52, 211, 153, 0.25);
  color: #34d399;
}

.pointer-feedback__text {
  line-height: 1;
}

/* ===================================================================
   Toast Notification
   =================================================================== */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #18181b;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  max-width: calc(100% - 32px);
  box-sizing: border-box;
  text-align: center;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon {
  color: #10b981;
  font-weight: 800;
}

/* ===================================================================
   Responsive Mobile Navbar & Touch Optimization
   =================================================================== */

/* Desktop wall switch position */
@media (min-width: 769px) {
  .wall-switch-fixture,
  .lamp-fixture {
    right: max(24px, calc((100% - var(--shell-width)) / 2 - 95px));
  }
}

/* Smartphone & Tablet view (<= 768px) */
@media (max-width: 768px) {
  /* Hide the wall switch on mobile so mobile remains 100% identical */
  .wall-switch-fixture,
  .lamp-fixture {
    display: none !important;
  }

  .top-nav {
    padding: 16px 16px 0 16px;
    gap: 8px;
  }

  .status-indicator {
    max-width: 65%;
    padding: 5px 12px;
    gap: 6px;
  }

  .status-text {
    font-size: 0.72rem;
  }

  .top-nav-controls {
    gap: 6px;
  }

  .lang-switch-wrapper {
    padding: 3px 8px;
    height: 36px;
  }

  .lang-btn {
    font-size: 0.74rem;
    padding: 2px 3px;
  }

  .theme-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .page-shell {
    padding: 16px 16px 70px 16px;
  }

  .hero-section {
    padding: 14px 0 10px 0;
  }
}

/* Extra small smartphones (<= 380px, e.g. iPhone SE) */
@media (max-width: 380px) {
  .top-nav {
    padding: 12px 12px 0 12px;
  }

  .status-indicator {
    max-width: 60%;
    padding: 4px 8px;
  }

  .status-text {
    font-size: 0.68rem;
  }

  .lang-switch-wrapper {
    padding: 2px 6px;
    height: 34px;
  }

  .theme-nav-btn {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .wordmark {
    font-size: 1.25rem;
  }
}
