/**
 * KENNETH ALCALÁ · Portafolio
 * Estilos específicos del portafolio personal
 * Extiende axoloit.css (2026 Brand System)
 *
 * Visual: Glassmorphism + Glow (Apple / Vercel aesthetic)
 */

/* ── Keyframes ── */
@keyframes spin-glow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 196, 140, 0.5);
  }
  50% {
    box-shadow: 0 0 12px 4px rgba(0, 196, 140, 0.25);
  }
}

@keyframes tag-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 196, 140, 0.3);
  }
  50% {
    box-shadow: 0 0 16px 4px rgba(0, 196, 140, 0.12);
  }
}

@keyframes float-orb {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 15px) scale(0.95);
  }
}

/* ── Hero profile ── */
.profile-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 90px;
  position: relative;
  overflow: hidden;
}

/* Ambient glow orbs behind hero content */
.profile-hero::before,
.profile-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  animation: float-orb 20s ease-in-out infinite;
}

.profile-hero::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 196, 140, 0.4), transparent 70%);
  top: -10%;
  right: -5%;
}

.profile-hero::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
  bottom: -15%;
  left: -10%;
  animation-delay: -7s;
}

.profile-hero-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ── Avatar ── */
.avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.avatar-ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(
    from 0deg,
    var(--ax-accent),
    #8b5cf6,
    var(--ax-accent),
    var(--ax-white),
    var(--ax-accent)
  );
  box-shadow:
    0 0 40px rgba(0, 196, 140, 0.3),
    0 0 80px rgba(0, 196, 140, 0.1);
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--ax-950);
}

.avatar-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  background: var(--ax-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ax-black);
  font-size: 1rem;
  border: 3px solid var(--ax-950);
  box-shadow: 0 0 16px rgba(0, 196, 140, 0.4);
}

/* ── Hero text ── */
.profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(0, 196, 140, 0.08);
  border: 1px solid rgba(0, 196, 140, 0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ax-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: tag-pulse 3s ease-in-out infinite;
}

.profile-name {
  font-size: clamp(2.25rem, 5vw + 1rem, 4.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.04em;
  background: linear-gradient(
    135deg,
    var(--ax-white) 30%,
    var(--ax-accent) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-subtitle {
  font-size: var(--text-xl);
  color: var(--ax-400);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.profile-bio {
  font-size: var(--text-base);
  color: var(--ax-400);
  line-height: 1.8;
  max-width: 620px;
  margin-bottom: 2rem;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
  font-size: var(--text-sm);
  color: var(--ax-400);
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.profile-meta-item i {
  color: var(--ax-accent);
  font-size: 1rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Skills ── */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: rgba(28, 28, 28, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ax-200);
  transition: all 0.25s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.skill-pill:hover {
  border-color: rgba(0, 196, 140, 0.4);
  color: var(--ax-accent);
  background: rgba(0, 196, 140, 0.08);
  box-shadow: 0 0 16px rgba(0, 196, 140, 0.15);
}

.skill-pill i {
  font-size: 0.9rem;
}

/* ── Cards (portfolio context) — Glassmorphism ── */
.card {
  background: rgba(28, 28, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  transition: all var(--dur-base) var(--ease);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 24px rgba(0, 0, 0, 0.2);
}

.card:hover {
  border-color: rgba(0, 196, 140, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 30px rgba(0, 196, 140, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.35);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ax-accent);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-6);
  color: var(--ax-black);
  font-size: var(--text-2xl);
  box-shadow: 0 0 24px rgba(0, 196, 140, 0.25);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--sp-2);
  color: var(--ax-white);
}

.card-description {
  color: var(--ax-400);
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* Grids for portfolio */
.grid {
  display: grid;
  gap: var(--sp-6);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ── Feature list ── */
.feature-list {
  list-style: none;
  padding: 0;
  margin-top: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.feature-list-item {
  color: var(--ax-400);
  font-size: var(--text-sm);
}

.feature-list-icon {
  color: var(--ax-accent);
  margin-right: var(--sp-2);
}

/* ── Projects — Glassmorphism ── */
.project-card {
  background: rgba(28, 28, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 2px solid rgba(0, 196, 140, 0.3);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--dur-base) var(--ease);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

/* Subtle ambient top glow inside card */
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 196, 140, 0.5),
    transparent
  );
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 196, 140, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 40px rgba(0, 196, 140, 0.12),
    0 20px 50px rgba(0, 0, 0, 0.4);
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--ax-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ax-black);
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 0 24px rgba(0, 196, 140, 0.3);
}

.project-icon.purple {
  background: #8b5cf6;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.3);
}

.project-icon.green {
  background: #06ffa5;
  color: var(--ax-black);
  box-shadow: 0 0 24px rgba(6, 255, 165, 0.3);
}

.project-links {
  display: flex;
  gap: 0.5rem;
}

.project-link-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 45, 45, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--ax-400);
  font-size: 0.875rem;
  transition: all 0.25s ease;
  text-decoration: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.project-link-icon:hover {
  background: rgba(0, 196, 140, 0.1);
  border-color: rgba(0, 196, 140, 0.4);
  color: var(--ax-accent);
  box-shadow: 0 0 12px rgba(0, 196, 140, 0.15);
}

.project-name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ax-white);
  margin: 0;
}

.project-desc {
  font-size: var(--text-sm);
  color: var(--ax-400);
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.project-tag {
  padding: 0.2rem 0.6rem;
  background: var(--ax-accent-soft);
  border: 1px solid rgba(0, 196, 140, 0.15);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ax-accent);
  letter-spacing: 0.03em;
}

.project-tag.purple {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.project-tag.green {
  background: rgba(6, 255, 165, 0.08);
  border-color: rgba(6, 255, 165, 0.15);
  color: #06ffa5;
}

.project-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--text-xs);
  color: var(--ax-500);
}

.project-stats-row {
  display: flex;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--ax-accent),
    var(--ax-700),
    transparent
  );
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.35rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ax-accent);
  border: 2px solid var(--ax-950);
  box-shadow: 0 0 10px rgba(0, 196, 140, 0.4);
}

.timeline-item:first-child .timeline-dot {
  animation: pulse-dot 2.5s ease-in-out infinite;
}

.timeline-date {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ax-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.timeline-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ax-white);
  margin-bottom: 0.2rem;
}

.timeline-org {
  font-size: var(--text-sm);
  color: var(--ax-400);
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--ax-500);
  line-height: 1.7;
  margin: 0;
}

/* ── Stat mini cards — Glass ── */
.stat-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-mini {
  background: rgba(28, 28, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  transition: all 0.25s ease;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-mini:hover {
  border-color: rgba(0, 196, 140, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 20px rgba(0, 196, 140, 0.1),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

.stat-mini-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--ax-accent);
  line-height: 1;
  margin-bottom: 0.35rem;
  text-shadow: 0 0 24px rgba(0, 196, 140, 0.35);
}

.stat-mini-label {
  font-size: var(--text-xs);
  color: var(--ax-400);
}

/* ── Contact strip — Glass + gradient border ── */
.contact-strip {
  background: rgba(28, 28, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 32px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

/* Animated gradient accent line at top of contact strip */
.contact-strip::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--ax-accent),
    #8b5cf6,
    var(--ax-accent)
  );
  background-size: 200% 100%;
  animation: shimmer-border 4s linear infinite;
}

@keyframes shimmer-border {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.contact-strip-text h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--ax-white);
}

.contact-strip-text p {
  color: var(--ax-400);
  margin: 0;
  font-size: 0.95rem;
}

/* ── Back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ax-400);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
  margin-bottom: 0.5rem;
}

.back-link:hover {
  color: var(--ax-accent);
}

/* ── Feature showcase (experience section) ── */
.feature-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-showcase {
    grid-template-columns: 1fr;
  }

  .profile-hero::before {
    width: 400px;
    height: 400px;
    opacity: 0.25;
  }

  .profile-hero::after {
    width: 350px;
    height: 350px;
    opacity: 0.2;
  }

  .glow-orb {
    opacity: 0.5;
    width: 250px !important;
    height: 250px !important;
  }
}

@media (max-width: 768px) {
  .profile-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .avatar-wrapper {
    margin: 0 auto;
  }

  .avatar-ring {
    width: 160px;
    height: 160px;
  }

  .profile-meta {
    justify-content: center;
  }

  .profile-actions {
    justify-content: center;
  }

  .profile-actions .btn {
    min-height: 44px;
  }

  .profile-bio {
    margin-left: auto;
    margin-right: auto;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .stat-mini-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .stat-mini {
    padding: 1rem 0.5rem;
  }

  .stat-mini-value {
    font-size: var(--text-2xl);
  }

  .contact-strip {
    flex-direction: column;
    text-align: center;
  }

  /* Hide/minimize glow on mobile to prevent overflow */
  .profile-hero::before,
  .profile-hero::after {
    width: 300px;
    height: 300px;
    opacity: 0.2;
    filter: blur(80px);
  }

  .glow-orb {
    display: none;
  }
}

/* ── Utility classes ── */
.card--accent-soft {
  background: rgba(0, 196, 140, 0.06);
  border-color: rgba(0, 196, 140, 0.15);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.card--accent-soft:hover {
  background: rgba(0, 196, 140, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 24px rgba(0, 196, 140, 0.1),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-icon--sm {
  margin-bottom: 0;
  width: 36px;
  height: 36px;
  font-size: 1rem;
}

.card-title--sm {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.card-header-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.lang-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.lang-name {
  color: var(--ax-white);
}

.lang-level {
  color: var(--ax-accent);
  font-weight: 600;
}

.lang-level--secondary {
  color: var(--ax-400);
  font-weight: 400;
}

.section-title--md {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 0.75rem;
}

.text-muted-bio {
  color: var(--ax-400);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 0;
}

.card-icon--purple {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.3);
}

.card-icon--accent {
  background: var(--ax-accent);
  box-shadow: 0 0 24px rgba(0, 196, 140, 0.25);
}

.contact-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-whatsapp {
  border-color: #25d366;
  color: #25d366;
}

.btn-whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.footer-back-link {
  color: var(--ax-400);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-back-link:hover {
  color: var(--ax-accent);
}

/* ── Additional utility classes ── */
.section--no-top-pad {
  padding-top: 0;
}

.projects-cta {
  text-align: center;
  margin-top: 2.5rem;
}

.timeline-header {
  margin-bottom: 2.5rem;
}

.about-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-list--compact {
  margin-top: 0.5rem;
}

.card-title--inline {
  margin: 0;
}

.timeline-link {
  color: var(--ax-accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s;
}

.timeline-link:hover {
  opacity: 0.8;
}

/* ── Glow orbs (decorative) ── */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  animation: float-orb 25s ease-in-out infinite;
}

.glow-orb--teal {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 196, 140, 0.25), transparent 70%);
}

.glow-orb--purple {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
  animation-delay: -10s;
}

/* Glow orb position variants */
.glow-orb--pos-top-right {
  top: -100px;
  right: -150px;
}

.glow-orb--pos-bottom-left {
  bottom: 0;
  left: -180px;
}

/* Container with relative positioning for glow orbs */
.container--glow {
  position: relative;
}

/* ── Section dividers (glow line) ── */
.section--glow-divider {
  position: relative;
}

.section--glow-divider::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 196, 140, 0.3),
    transparent
  );
}
