﻿:root {
  --bg: #030712;
  --bg-alt: #0d1220;
  --text: #edf2ff;
  --muted: rgba(237, 242, 255, 0.6);
  --primary: #7f5dff;
  --primary-strong: #7ef0ff;
  --accent: #14f195;
  --border: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.06);
  --card-glow: 0 20px 40px rgba(127, 93, 255, 0.25);
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, rgba(127, 93, 255, 0.4), transparent 45%),
    #030712;
  color: var(--text);
  min-height: 100vh;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

.theme-light {
  --bg: #f4f5ff;
  --bg-alt: #ffffff;
  --text: #030712;
  --muted: rgba(3, 7, 18, 0.6);
  background: #f4f5ff;
}

.theme-light .section-glass,
.theme-light .section-split,
.theme-light .projects-grid .project-card,
.theme-light .contact-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(3, 7, 18, 0.1);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  transition: transform 0.15s ease, background 0.15s ease;
  z-index: 50;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transform: translate(-50%, -50%);
}

.cursor-ring {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.12s ease;
}

button,
.btn {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: var(--card-glow);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
}

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

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5vw;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.theme-controls button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid transparent;
  font-size: 1rem;
  line-height: 1;
  transition: border 0.2s ease;
}

.theme-controls button:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.btn:focus-visible,
.theme-controls button:focus-visible,
.main-nav a:focus-visible,
.nav-cta:focus-visible,
.drag-handle:focus-visible,
.cli-input:focus-visible {
  outline: 2px solid rgba(97, 218, 251, 0.7);
  outline-offset: 3px;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  inset: auto 0 -4px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  min-height: 90vh;
  padding: 6rem 5vw;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Va detrás del texto */
  pointer-events: none; /* Permite hacer clic en los botones a través del canvas */
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.intro-label {
  text-transform: uppercase;
  letter-spacing: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.1vw, 3.9rem);
  margin: 0;
  line-height: 1.02;
}

.dynamic-title::before {
  content: '• Innovación en vivo';
  display: inline-block;
  margin-left: 1rem;
  color: var(--primary-strong);
  animation: pulseTitle 6s infinite;
}

.hero-description {
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-actions .btn {
  min-width: 180px;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  display: block;
}

.stat-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-resume-note {
  margin: -0.75rem 0 1.35rem;
  color: var(--muted);
  font-size: 0.84rem;
  max-width: 440px;
}

.section-header {
  max-width: 900px;
  margin-bottom: 2rem;
}

.eyebrow {
  letter-spacing: 0.6rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
}

.section-glass,
.section-split {
  margin: 0 auto;
  padding: 3rem 5vw;
  max-width: 1200px;
  border-radius: 32px;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--card-glow);
}

section {
  padding: 100px 5vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.section-subtitle {
  color: var(--muted);
  max-width: 600px;
}

.nav-cta-group {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.nav-cta {
  border-radius: 999px;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
}

.nav-cta:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.status-panel {
  margin-top: 2rem;
  padding-top: 2rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.status-card {
  padding: 1.25rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 12, 24, 0.8);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, border 0.3s ease;
}

.status-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
}

.status-card .status-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-card .led-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  box-shadow: 0 0 12px currentColor;
}

.status-card .status-value {
  margin: 1rem 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.status-card .status-detail {
  color: var(--muted);
  font-size: 0.85rem;
}

.status-card .status-progress {
  margin-top: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.status-card .status-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1s ease;
}

.case-study {
  margin-top: 2rem;
  text-align: center;
}

.case-card {
  position: relative;
  margin-top: 2rem;
  border-radius: 28px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  min-height: 260px;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.case-card:hover {
  transform: translateY(-4px);
}

.case-face {
  position: absolute;
  inset: 0;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.face-problem {
  opacity: 1;
}

.face-solution {
  opacity: 0;
  background: rgba(3, 12, 48, 0.8);
}

.case-card:hover .face-problem {
  opacity: 0;
}

.case-card:hover .face-solution {
  opacity: 1;
}

.case-face h3 {
  margin: 0 0 0.75rem;
  letter-spacing: 0.2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--muted);
}

.case-face p {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.6;
}

.case-impact {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--primary-strong);
}

.lobby-showcase {
  margin-top: 2rem;
}

.lobby-card {
  border-radius: 30px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 12, 24, 0.8);
  box-shadow: var(--card-glow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lobby-meta h3 {
  margin: 0;
  font-size: 2rem;
}

.lobby-meta p {
  color: var(--muted);
  margin: 0.4rem 0;
}

.avatar-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  color: #0ecb81;
  text-transform: uppercase;
}

.lobby-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.lobby-status {
  font-size: 0.85rem;
  color: var(--muted);
}

.budget-calculator {
  border-radius: 30px;
  background: rgba(7, 12, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  box-shadow: var(--card-glow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.budget-calculator label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
}

.budget-total {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-strong);
}

.budget-description {
  color: var(--muted);
  font-size: 0.8rem;
}

.form-feedback {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: rgba(14, 203, 129, 0.12);
  color: var(--primary-strong);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.about-text p {
  margin: 0 0 1rem;
  line-height: 1.7;
}

.tech-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.icon-pill {
  padding: 0.85rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
}

.skills-grid,
.projects-grid,
.timeline-grid {
  display: grid;
  gap: 1.2rem;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.skill-card {
  background: rgba(7, 12, 24, 0.8);
  border-radius: 22px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(127, 93, 255, 0.6);
}

.skill-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
}

.progress-track {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1.2s ease;
}

.projects {
  padding: 4rem 0;
}

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 2rem;
}

.project-card {
  position: relative;
  padding: 2rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(127, 93, 255, 0.3), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover::before,
.project-card.expanded::before {
  opacity: 1;
}

.project-card h3 {
  margin: 0;
  font-size: 1.4rem;
}

.project-card .project-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin: 1rem 0;
}

.project-card .project-meta span {
  padding: 0.3rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.project-summary {
  font-size: 0.8rem;
  color: var(--muted);
}

.project-details {
  margin-top: 1rem;
  color: var(--muted);
  line-height: 1.6;
  display: none;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.project-card p {
  color: var(--muted);
  margin: 0;
}

.project-card.expanded {
  grid-column: span 2;
  transform: translateY(-5px) scale(1.02);
  background: rgba(22, 38, 61, 0.85);
}

.timeline-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.timeline-entry {
  padding: 1.5rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.3s ease;
}

.timeline-entry:hover {
  transform: translateY(-4px);
}

.timeline-entry h3 {
  margin: 0;
}

.timeline-entry span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(3, 7, 18, 0.6);
  padding: 2rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.contact-foot {
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  color: var(--muted);
}

.site-footer {
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.activity-log {
  width: min(760px, 100%);
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.83rem;
  max-height: 180px;
  overflow: auto;
}

.activity-line {
  color: var(--muted);
}

@keyframes pulseTitle {
  0% {
    opacity: 0.2;
    transform: translateY(4px);
  }
  50% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0.5;
    transform: translateY(2px);
  }
}

@media (max-width: 768px) {
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .site-header {
    flex-direction: column;
    gap: 1rem;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Dashboard refinement layer */
:root {
  --bg: #071018;
  --bg-alt: #0d1721;
  --text: #eef6ff;
  --muted: rgba(238, 246, 255, 0.68);
  --primary: #56e39f;
  --primary-strong: #61dafb;
  --accent: #ffd166;
  --border: rgba(255, 255, 255, 0.12);
  --glass: rgba(12, 22, 31, 0.72);
  --card-glow: 0 24px 64px rgba(0, 0, 0, 0.32);
  --header-height: 84px;
}

body {
  background:
    radial-gradient(circle at 20% 20%, rgba(86, 227, 159, 0.14), transparent 22%),
    radial-gradient(circle at 80% 0%, rgba(97, 218, 251, 0.14), transparent 22%),
    linear-gradient(135deg, #050c12 0%, #08121b 46%, #0d1620 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 32%, transparent 92%);
  pointer-events: none;
  opacity: 0.45;
  z-index: -1;
}

body.theme-light {
  --bg: #edf6f9;
  --bg-alt: #dbe7ec;
  --text: #11202c;
  --muted: rgba(17, 32, 44, 0.68);
  --border: rgba(17, 32, 44, 0.12);
  --glass: rgba(255, 255, 255, 0.74);
  --card-glow: 0 24px 60px rgba(17, 32, 44, 0.12);
  background:
    radial-gradient(circle at 20% 20%, rgba(86, 227, 159, 0.12), transparent 22%),
    radial-gradient(circle at 80% 0%, rgba(97, 218, 251, 0.14), transparent 22%),
    linear-gradient(135deg, #edf6f9 0%, #ddeaf0 46%, #d4e1e7 100%);
}

body.theme-light .site-header {
  background: rgba(237, 246, 249, 0.78);
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  min-height: var(--header-height);
  background: rgba(8, 16, 24, 0.78);
}

.main-nav {
  justify-content: center;
  flex-wrap: wrap;
}

.main-nav a,
.nav-cta {
  color: var(--muted);
}

.nav-cta {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.main-nav a:hover,
.main-nav a:focus-visible,
.nav-cta:hover,
.nav-cta:focus-visible {
  color: var(--text);
}

#dashboard-main.dashboard-main {
  width: min(1440px, calc(100% - 2rem));
  margin: 1.5rem auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  align-items: start;
}

.page-main {
  width: min(1200px, calc(100% - 2rem));
  margin: 1.5rem auto 0;
  display: grid;
  gap: 1.5rem;
}

.page-main > .section-glass {
  margin: 0;
  max-width: none;
}

.page-main > section {
  padding: clamp(1.25rem, 2vw, 2rem);
}

.page-main .status-panel {
  margin-top: 0;
  padding-top: clamp(1.25rem, 2vw, 2rem);
}

.module-bridge {
  display: grid;
  gap: 1rem;
  text-align: left;
}

.module-bridge p {
  margin: 0;
}

.module-bridge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

#sortable-sections.content-stack {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

#sortable-sections > section,
.system-health,
.status-card,
.skill-card,
.project-card,
.timeline-entry,
.contact-form,
.contact-card,
.lobby-card,
.budget-calculator {
  --glow-x: 50%;
  --glow-y: 50%;
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--card-glow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#sortable-sections > section,
.system-health {
  border-radius: 28px;
  overflow: hidden;
}

#sortable-sections > section::after,
.system-health::after,
.status-card::after,
.skill-card::after,
.project-card::after,
.timeline-entry::after,
.contact-form::after,
.contact-card::after,
.lobby-card::after,
.budget-calculator::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(97, 218, 251, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  opacity: 0.78;
}

#sortable-sections > section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(1.25rem, 2vw, 2rem);
  border-bottom: none;
}

#live-status.status-panel,
#case-study.case-study {
  margin-top: 0;
  padding-top: clamp(1.25rem, 2vw, 2rem);
}

.dashboard-section.dragging {
  opacity: 0.72;
  cursor: grabbing;
}

.drag-handle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle, currentColor 1.6px, transparent 1.7px) 4px 4px / 8px 8px,
    rgba(255, 255, 255, 0.05);
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease;
  z-index: 5;
}

#sortable-sections > section:hover .drag-handle,
#sortable-sections > section:focus-within .drag-handle {
  opacity: 1;
  pointer-events: auto;
}

.drag-handle:hover {
  color: var(--primary-strong);
  transform: scale(1.04);
}

.hero {
  min-height: min(78vh, 760px);
}

.hero-canvas {
  width: 100%;
  height: 100%;
}

.hero-content {
  max-width: 620px;
}

.hero-title {
  max-width: 11ch;
}

.dynamic-title {
  display: block;
  margin-top: 0.8rem;
  font-size: clamp(0.96rem, 1.9vw, 1.2rem);
  color: var(--primary-strong);
}

.dynamic-title::before {
  content: none;
}

.btn.primary {
  background: linear-gradient(135deg, rgba(86, 227, 159, 0.95), rgba(97, 218, 251, 0.95));
  color: #041016;
  box-shadow: 0 10px 30px rgba(86, 227, 159, 0.22);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}

.resume-btn {
  border-color: rgba(86, 227, 159, 0.35);
}

.status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skills-grid,
.projects-grid,
.timeline-grid,
.about-grid,
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-card,
.skill-card,
.project-card,
.timeline-entry,
.contact-form,
.contact-card,
.lobby-card,
.budget-calculator {
  padding: 1.35rem;
  border-radius: 24px;
  overflow: hidden;
}

#budget-options {
  display: grid;
  gap: 0.8rem;
}

.budget-calculator {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 280px;
  align-items: start;
  gap: 1rem;
}

.budget-builder,
.budget-summary {
  min-width: 0;
}

.budget-summary-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.budget-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.budget-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.budget-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.budget-item:hover {
  transform: translateY(-2px);
  border-color: rgba(97, 218, 251, 0.35);
}

.budget-item input {
  margin-top: 0.2rem;
  accent-color: var(--primary);
}

.option-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  color: var(--text);
}

.price-tag {
  color: var(--primary-strong);
  white-space: nowrap;
}

.lobby-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  align-items: start;
}

.lobby-side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.lobby-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.lobby-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.lobby-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.8rem;
}

.lobby-status.is-searching {
  color: var(--primary-strong);
}

.lobby-status.is-ready {
  color: var(--accent);
}

.btn.is-busy,
.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

.status-card:hover,
.skill-card:hover,
.project-card:hover,
.timeline-entry:hover,
.lobby-card:hover {
  transform: translateY(-4px);
}

.project-card {
  display: grid;
  gap: 0.9rem;
}

.project-card.expanded {
  grid-column: span 2;
  border-color: rgba(97, 218, 251, 0.32);
}

.project-footer {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.lobby-showcase {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.avatar {
  color: #051018;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.system-health {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.widget-title {
  display: grid;
  gap: 0.35rem;
}

.widget-title h2 {
  margin: 0;
}

.health-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.health-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.24rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.health-value,
.health-inline-value {
  margin: 0;
  font-weight: 700;
}

.health-value {
  font-size: 1.28rem;
}

.health-inline-value,
.health-value.small {
  font-size: 1rem;
}

#cpu-chart {
  display: block;
  width: 100%;
  height: 140px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.16);
}

#geo-map {
  display: block;
  width: 100%;
  height: 120px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.16);
}

.service-status-list {
  display: grid;
  gap: 0.75rem;
}

.service-status-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
}

.service-status-item strong {
  font-size: 0.84rem;
  color: var(--muted);
}

.service-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0ecb81;
  box-shadow: 0 0 12px rgba(14, 203, 129, 0.9);
}

.service-led[data-state='restarting'] {
  background: #ff6b6b;
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.9);
}

.cli-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 54px;
  border-radius: 16px;
  box-shadow: var(--card-glow);
}

.cli-panel {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 55;
  width: min(980px, calc(100% - 2rem));
  transform: translate(-50%, calc(100% + 2rem));
  transition: transform 0.26s ease;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(3, 8, 12, 0.94);
  box-shadow: var(--card-glow);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

body.theme-light .cli-panel {
  background: rgba(255, 255, 255, 0.94);
}

.cli-panel.open {
  transform: translate(-50%, 0);
}

.cli-header,
.cli-form {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
}

.cli-header {
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.cli-output {
  max-height: 220px;
  overflow-y: auto;
  padding: 1rem;
  display: grid;
  gap: 0.55rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.94rem;
}

.cli-line.command {
  color: var(--primary);
}

.cli-line.error {
  color: #ff7b7b;
}

.cli-line.info {
  color: var(--primary-strong);
}

.cli-form {
  border-top: 1px solid var(--border);
}

.cli-prompt {
  white-space: nowrap;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.cli-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  color: var(--text);
  outline: none;
}

@media (max-width: 1180px) {
  #dashboard-main.dashboard-main {
    grid-template-columns: 1fr;
  }

  .system-health {
    position: static;
    order: -1;
  }
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    top: auto;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.9rem 1rem;
    justify-items: center;
    text-align: center;
  }

  .logo-block,
  .theme-controls,
  .nav-cta-group {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo-block {
    width: 100%;
    justify-content: center;
  }

  .main-nav {
    width: 100%;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    gap: 0.65rem;
    padding-bottom: 0;
  }

  .main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
  }

  .main-nav a::after {
    display: none;
  }

  .nav-cta-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.65rem;
  }

  .nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  .status-grid,
  .skills-grid,
  .projects-grid,
  .timeline-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .budget-calculator,
  .lobby-card {
    grid-template-columns: 1fr;
  }

  .project-card.expanded {
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 112px;
  }

  #dashboard-main.dashboard-main {
    width: calc(100% - 1rem);
    gap: 1rem;
  }

  .page-main {
    width: calc(100% - 1rem);
    gap: 1rem;
  }

  #sortable-sections > section,
  .system-health {
    border-radius: 22px;
  }

  #sortable-sections > section {
    padding: 1rem;
  }

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

  .section-header {
    margin-bottom: 1.25rem;
  }

  .section-header h2 {
    margin: 0;
    font-size: clamp(1.35rem, 6vw, 1.7rem);
    line-height: 1.15;
  }

  .section-subtitle,
  .hero-description,
  .budget-description,
  .lobby-description,
  .status-card .status-detail,
  .timeline-entry p,
  .skill-card p {
    font-size: 0.92rem;
  }

  .hero-actions,
  .hero-stats,
  .lobby-controls,
  .module-bridge-actions,
  .project-footer,
  .cli-form,
  .contact-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions .btn,
  .project-footer .btn,
  .lobby-controls .btn,
  .lobby-controls a,
  .budget-summary {
    width: 100%;
  }

  .theme-controls {
    width: 100%;
    justify-content: center;
  }

  .theme-controls button,
  .cli-toggle {
    min-width: 56px;
  }

  .drag-handle {
    opacity: 1;
    pointer-events: auto;
  }

  .cli-panel {
    width: calc(100% - 1rem);
    bottom: 0.5rem;
  }

  .cli-header {
    align-items: flex-start;
  }

  .service-status-item {
    grid-template-columns: 1fr;
  }

  .status-card,
  .skill-card,
  .project-card,
  .timeline-entry,
  .contact-form,
  .contact-card,
  .lobby-card,
  .budget-calculator,
  .health-card {
    padding: 1rem;
    border-radius: 18px;
  }

  .activity-log {
    padding: 0.85rem 0.9rem;
    font-size: 0.78rem;
  }

  .site-footer {
    padding: 1.25rem 0.75rem 5rem;
  }

  .cli-toggle {
    right: 0.5rem;
    bottom: 0.5rem;
  }
}

@media (max-width: 520px) {
  .main-nav,
  .nav-cta-group {
    grid-template-columns: 1fr;
  }

  .status-pill {
    width: 100%;
    justify-content: center;
  }

  .theme-controls {
    gap: 0.75rem;
  }

  .hero-title {
    font-size: clamp(1.85rem, 10.5vw, 2.35rem);
  }

  .hero-panel-head {
    flex-direction: column;
  }

  .hero-panel-head,
  .contact-info-row {
    gap: 0.75rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .custom-cursor {
    display: none;
  }
}

/* Dashboard polish layer */
.hero {
  --hero-shift-x: 0px;
  --hero-shift-y: 0px;
  min-height: min(76vh, 760px);
  padding: clamp(2rem, 4vw, 4rem);
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(1.25rem, 2vw, 1.75rem);
  align-items: center;
}

.hero-content,
.hero-panel {
  will-change: transform;
}

.hero-content {
  max-width: 100%;
  transform: translate3d(calc(var(--hero-shift-x) * 0.32), calc(var(--hero-shift-y) * 0.32), 0);
}

.hero-title {
  max-width: 10ch;
  font-size: clamp(2.35rem, 4.4vw, 3.45rem);
  line-height: 0.98;
}

#hero-name {
  display: block;
}

.dynamic-title {
  display: block;
  min-height: 1.5em;
  margin-top: 0.9rem;
  font-size: clamp(0.98rem, 1.35vw, 1.15rem);
  color: var(--primary-strong);
}

.hero-description {
  max-width: 60ch;
  margin: 1.15rem 0 0;
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 1.25rem;
}

.hero-meta-item,
.hero-quick-link,
.social-link,
.hero-fact-card,
.hero-signal-item {
  position: relative;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  font-size: 0.86rem;
}

.hero-meta-item span,
.hero-fact-label,
.hero-signal-label,
.highlight-kicker,
.contact-info-row .label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12rem;
  font-size: 0.72rem;
}

.hero-actions {
  margin-top: 0;
}

.hero-resume-note {
  max-width: 52ch;
  margin-top: 0.7rem;
  font-size: 0.88rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.hero-stat-card {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stat-card .stat-value {
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1;
}

.hero-stat-card .stat-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1.2rem;
  border-radius: 28px;
  background: rgba(8, 17, 24, 0.72);
  border: 1px solid var(--border);
  transform: translate3d(calc(var(--hero-shift-x) * -0.24), calc(var(--hero-shift-y) * -0.24), 0);
}

.hero-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.hero-panel-head h2 {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
}

.hero-panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.hero-fact-card {
  display: grid;
  gap: 0.35rem;
  min-height: 86px;
  padding: 0.9rem 1rem;
  border-radius: 18px;
}

.hero-fact-value,
.hero-signal-value {
  font-weight: 600;
  line-height: 1.35;
}

.hero-signal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-signal-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: 18px;
  flex: 1 1 180px;
}

.hero-link-row,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-quick-link,
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-quick-link:hover,
.hero-quick-link:focus-visible,
.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(97, 218, 251, 0.35);
  color: var(--primary-strong);
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(86, 227, 159, 0.32);
  background: rgba(86, 227, 159, 0.14);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(97, 218, 251, 0.18);
  background: radial-gradient(circle, rgba(97, 218, 251, 0.18), transparent 64%);
  pointer-events: none;
  opacity: 0.75;
  animation: orbPulse 10s ease-in-out infinite;
}

.orbit-a {
  top: 8%;
  right: 8%;
  width: clamp(180px, 28vw, 300px);
  aspect-ratio: 1;
}

.orbit-b {
  bottom: -8%;
  left: -4%;
  width: clamp(140px, 22vw, 240px);
  aspect-ratio: 1;
  animation-delay: -4s;
}

@keyframes orbPulse {
  0%,
  100% {
    opacity: 0.42;
  }
  50% {
    opacity: 0.88;
  }
}

.section-subtitle {
  margin: 0.5rem 0 0;
  max-width: 70ch;
  color: var(--muted);
}

.about-text {
  display: grid;
  gap: 1rem;
}

.about-lead {
  font-size: 1.02rem;
}

.about-side,
.about-highlights {
  display: grid;
  gap: 1rem;
}

.highlight-card {
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.highlight-card p {
  margin: 0.35rem 0 0;
}

.project-card .project-details[hidden] {
  display: none !important;
}

.project-card.expanded .project-details {
  display: grid;
  gap: 0.75rem;
}

.timeline-entry {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.timeline-period {
  color: var(--primary-strong);
  font-size: 0.84rem;
  font-weight: 600;
}

.contact-info-stack {
  display: grid;
  gap: 0.8rem;
}

.section-tools {
  display: flex;
  justify-content: flex-start;
  margin-top: 1rem;
}

.list-toggle {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 500;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.list-toggle:hover,
.list-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(97, 218, 251, 0.35);
  color: var(--primary-strong);
}

.contact-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.contact-info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.contact-info-row a,
.contact-info-row strong {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.contact-card {
  align-content: start;
}

.contact-card .btn {
  width: fit-content;
}

.section-placeholder {
  min-height: 120px;
  border: 1px dashed rgba(97, 218, 251, 0.4);
  border-radius: 24px;
  background: rgba(97, 218, 251, 0.08);
}

body.layout-dragging {
  user-select: none;
}

.dashboard-section.dragging-pointer {
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.36);
}

.drag-handle {
  touch-action: none;
}

#sortable-sections > section::before,
.system-health::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(97, 218, 251, 0.08), transparent 35%, rgba(86, 227, 159, 0.06) 70%, transparent);
  opacity: 0.75;
}

.theme-light .hero-panel,
.theme-light .hero-fact-card,
.theme-light .hero-signal-item,
.theme-light .hero-meta-item,
.theme-light .hero-stat-card,
.theme-light .social-link,
.theme-light .hero-quick-link,
.theme-light .budget-item {
  background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 1180px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: none;
  }
}

@media (max-width: 900px) {
  .hero-stats,
  .hero-panel-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    max-width: 12ch;
  }
}

@media (max-width: 680px) {
  .hero {
    padding: 3.5rem 1rem 1rem;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .hero-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-meta-item,
  .hero-quick-link,
  .social-link,
  .hero-actions .btn,
  .contact-card .btn,
  .availability-pill {
    width: 100%;
    justify-content: center;
  }

  .hero-link-row,
  .social-links {
    width: 100%;
  }

  .option-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-panel,
  .hero-stat-card {
    border-radius: 20px;
  }

  .contact-info-row {
    flex-direction: column;
  }
}

@media (hover: none), (pointer: coarse) {
  .hero-content,
  .hero-panel {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-canvas,
  .hero-orbit,
  .custom-cursor {
    display: none !important;
  }
}
