/* ==========================================================================
   PROGRAM / PROFILE SECTION & INTERACTIVE ORBITAL SYSTEM
   Adapts to Light & Dark Theme with Emerald Green & Cyan Accents
   ========================================================================== */

.profile-section {
  position: relative;
  padding: 7rem 0;
  /* Dynamic theme backgrounds with subtle emerald/cyan lighting */
  background: radial-gradient(circle at 10% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 90% 70%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
              var(--bg-secondary);
  color: var(--text-primary);
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="dark"] .profile-section {
  background: radial-gradient(circle at 10% 30%, rgba(16, 185, 129, 0.09) 0%, transparent 50%),
              radial-gradient(circle at 90% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
              #070a12;
}

/* Background Subtle Grid Pattern */
.profile-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

[data-theme="dark"] .profile-section::before {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 4.5rem;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   COLUMNA IZQUIERDA: NARRATIVA Y FORMACIÓN
   ========================================================================== */

.profile-narrative {
  display: flex;
  flex-direction: column;
}

/* Terminal / Code Eyebrow Badge */
.terminal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.12);
}

[data-theme="dark"] .terminal-badge {
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.terminal-badge .prompt-symbol {
  color: #0891b2;
  animation: blink-cursor 1.2s infinite;
}

[data-theme="dark"] .terminal-badge .prompt-symbol {
  color: #06b6d4;
}

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

/* Section Title */
.profile-title {
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.highlight-emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .highlight-emerald {
  background: linear-gradient(135deg, #10b981, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.highlight-cyan {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .highlight-cyan {
  background: linear-gradient(135deg, #06b6d4, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Description */
.profile-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 620px;
}

/* 4 Compact Strength Cards */
.strength-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.strength-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.25rem;
  transition: all var(--transition-normal);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.strength-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-md);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(16, 185, 129, 0.3), rgba(6, 182, 212, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.4;
  transition: opacity var(--transition-normal);
}

.strength-card:hover {
  transform: translateY(-4px);
  background: var(--bg-surface-elevated);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: var(--shadow-md), 0 0 25px rgba(16, 185, 129, 0.12);
}

.strength-card:hover::before {
  opacity: 1;
}

.card-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  transition: all var(--transition-fast);
}

[data-theme="dark"] .card-icon-wrap {
  color: #10b981;
}

.strength-card:hover .card-icon-wrap {
  background: rgba(6, 182, 212, 0.15);
  color: #0891b2;
  border-color: rgba(6, 182, 212, 0.4);
  transform: scale(1.05);
}

[data-theme="dark"] .strength-card:hover .card-icon-wrap {
  color: #06b6d4;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-text {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   COLUMNA DERECHA: SISTEMA ORBITAL INTERACTIVO
   ========================================================================== */

.orbital-column {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 560px;
}

.orbital-system {
  position: relative;
  width: 520px;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Background Ambient Glow Behind Orbits */
.orbital-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, rgba(6, 182, 212, 0.12) 40%, transparent 70%);
  filter: blur(45px);
  pointer-events: none;
  z-index: 1;
}

/* Central Core */
.orbital-core {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2px solid rgba(16, 185, 129, 0.45);
  box-shadow: var(--shadow-md), 0 0 35px rgba(16, 185, 129, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10;
  backdrop-filter: blur(12px);
  cursor: default;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal);
}

[data-theme="dark"] .orbital-core {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(7, 10, 18, 0.95));
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.35), inset 0 0 25px rgba(6, 182, 212, 0.2);
}

.orbital-core:hover {
  transform: scale(1.06);
  box-shadow: var(--shadow-lg), 0 0 50px rgba(16, 185, 129, 0.4);
}

.core-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(6, 182, 212, 0.4);
  animation: core-wave 3s infinite ease-out;
  pointer-events: none;
}

@keyframes core-wave {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.core-icon {
  color: #059669;
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .core-icon {
  color: #10b981;
}

.core-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  line-height: 1.1;
}

.core-subtitle {
  font-size: 0.625rem;
  color: #0891b2;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

[data-theme="dark"] .core-subtitle {
  color: #06b6d4;
}

/* Concentric Orbital Rings */
.orbit-track {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Inner Orbit (Radius 165px -> 330px diameter) */
.orbit-track.inner-orbit {
  width: 330px;
  height: 330px;
  border: 1.5px dashed rgba(16, 185, 129, 0.35);
  z-index: 5;
  animation: spin-clockwise 32s linear infinite;
}

/* Outer Orbit (Radius 245px -> 490px diameter) */
.orbit-track.outer-orbit {
  width: 490px;
  height: 490px;
  border: 1.5px dashed rgba(6, 182, 212, 0.3);
  z-index: 6;
  animation: spin-counter-clockwise 44s linear infinite;
}

/* Orbital Rotations */
@keyframes spin-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-counter-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* PAUSE INTERACTION */
.orbital-system.is-paused .orbit-track,
.orbital-system.is-paused .orbit-item-content {
  animation-play-state: paused !important;
}

/* Orbit Node Placement */
.orbit-item {
  position: absolute;
  pointer-events: auto;
  transform-origin: center center;
}

/* Keep-Upright Counter-Rotation */
.inner-orbit .orbit-item-content {
  animation: counter-spin-clockwise 32s linear infinite;
}

.outer-orbit .orbit-item-content {
  animation: counter-spin-counter-clockwise 44s linear infinite;
}

@keyframes counter-spin-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes counter-spin-counter-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Orbit Item Badge Appearance */
.orbit-item-content {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
}

[data-theme="dark"] .orbit-item-content {
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.orbit-item-content img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: transform var(--transition-fast);
}

.orbit-item-content:hover {
  transform: scale(1.22);
  border-color: #10b981;
  background: var(--bg-surface-elevated);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.45), var(--shadow-md);
  z-index: 50;
}

.orbit-item-content:hover img {
  transform: scale(1.1);
}

/* Custom Tooltip Panel for Hovered Tool */
.orbital-tooltip {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
  z-index: 100;
  white-space: nowrap;
}

[data-theme="dark"] .orbital-tooltip {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.2);
}

.orbital-tooltip.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tooltip-tool-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tooltip-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #0891b2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(6, 182, 212, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

[data-theme="dark"] .tooltip-tag {
  color: #06b6d4;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .profile-narrative {
    text-align: center;
    align-items: center;
  }

  .profile-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .orbital-column {
    min-height: 480px;
  }

  .orbital-system {
    width: 440px;
    height: 440px;
    transform: scale(0.88);
  }
}

@media (max-width: 640px) {
  .profile-section {
    padding: 4.5rem 0;
  }

  .strength-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }

  .orbital-system {
    width: 360px;
    height: 360px;
    transform: scale(0.72);
  }

  .orbital-column {
    min-height: 380px;
  }
}
