/* ================================================================
   Portfolio Public Site CSS
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --hero-bg-start: #0d1117;
  --hero-bg-end: #161b22;
  --brand-color: #0d6efd;
  --text-gradient-start: #0d6efd;
  --text-gradient-end: #6ea8fe;
}

/* ── Typography helpers ────────────────────────────────────────── */
.letter-spacing {
  letter-spacing: 0.1em;
}

.brand-highlight {
  color: var(--brand-color);
}

.text-gradient {
  background: linear-gradient(90deg, var(--text-gradient-start), var(--text-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero section ──────────────────────────────────────────────── */
.hero {
  min-height: 90vh;
  background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 70% 50%, rgba(13, 110, 253, 0.08), transparent);
  pointer-events: none;
}

.hero-icon-wrapper {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(13, 110, 253, 0.08);
  border: 2px solid rgba(13, 110, 253, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  animation: float 6s ease-in-out infinite;
}

.hero-icon {
  font-size: 6rem;
  color: rgba(13, 110, 253, 0.7);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-16px); }
}

/* ── Hero contact links ────────────────────────────────────────── */
.hero-contact-link {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.15s;
}
.hero-contact-link:hover { color: rgba(255,255,255,0.9); }

/* ── Hero tech badges ──────────────────────────────────────────── */
.hero-tech-badge {
  display: inline-block;
  padding: .3em .75em;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  background: rgba(13,110,253,0.15);
  color: #6ea8fe;
  border: 1px solid rgba(13,110,253,0.3);
}

/* ── About / stat cards ────────────────────────────────────────── */
.about-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d6efd22, #6ea8fe33);
  border: 3px solid #0d6efd44;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #0d6efd;
}

.stat-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #0d6efd;
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6c757d;
  font-weight: 600;
}

/* ── Stack section ─────────────────────────────────────────────── */
.stack-section { background: #f8f9fa; }

.stack-card {
  background: #fff;
  border: 1px solid #e9ecef;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}
.stack-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(13,110,253,.1);
  border-color: #0d6efd44;
}
.stack-icon {
  font-size: 1.6rem;
  color: #0d6efd;
}

/* ── Contact card ──────────────────────────────────────────────── */
.contact-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}

/* ── Navbar adjustments ────────────────────────────────────────── */
.navbar-brand {
  font-size: 1.1rem;
}

/* Footer menu items */
.footer ul .nav-item .nav-link {
  color: rgba(255,255,255,0.55) !important;
  font-size: 0.875rem;
  padding: 0.15rem 0;
  text-decoration: none;
  transition: color 0.15s;
}

.footer ul .nav-item .nav-link:hover {
  color: rgba(255,255,255,0.9) !important;
}

/* Footer plain list items */
.footer li a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.footer li a:hover {
  color: rgba(255,255,255,0.9);
}

/* ── Project cards ─────────────────────────────────────────────── */
.project-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
}

.project-cover {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #e9ecef;
}

.project-cover--placeholder {
  background: linear-gradient(135deg, #dee2e6, #adb5bd);
}

.proyecto-card {
  transition: opacity 0.25s ease;
}

/* ── Carousel thumbnails ───────────────────────────────────────── */
.thumb-btn {
  width: 56px;
  height: 40px;
  border-radius: 4px;
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.15s, border-color 0.15s;
  margin: 0 3px;
}

.thumb-btn.active,
.thumb-btn:hover {
  opacity: 1;
  border-color: var(--bs-primary);
}

.carousel-indicators {
  position: relative !important;
  bottom: auto !important;
  margin: 8px 0 0 !important;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px;
}

/* ── Project detail ────────────────────────────────────────────── */
/* Carousel */
.carousel-img-wrapper {
  background: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  max-height: 500px;
  overflow: hidden;
}
.carousel-img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.carousel-ctrl-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  color: #212529;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.carousel-control-prev, .carousel-control-next {
  width: 52px;
  opacity: 1;
}
.carousel-thumbs {
  overflow-x: auto;
}

/* ── Lightbox ──────────────────────────────────────────────────── */
.carousel-img-wrapper { cursor: zoom-in; }

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.active { display: flex; }

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  user-select: none;
}
.lightbox-close {
  position: fixed;
  top: 1rem; right: 1.25rem;
  background: rgba(255,255,255,.15);
  border: none; color: #fff;
  font-size: 1.4rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s; z-index: 10000;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  border: none; color: #fff; font-size: 1.5rem;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s; z-index: 10000;
}
.lightbox-nav:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-counter {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: .85rem;
  background: rgba(0,0,0,.4); padding: .25rem .75rem; border-radius: 20px;
}

.detail-row {
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-of-type {
  border-bottom: none;
}

.detail-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 2px;
}

.detail-value {
  font-weight: 500;
  color: #212529;
}

.project-description p {
  margin-bottom: 0.75rem;
}

/* ── Bootstrap badge soft variants (BS 5.3+) ──────────────────── */
.bg-primary-subtle { background-color: #cfe2ff !important; }
.bg-secondary-subtle { background-color: #e2e3e5 !important; }

/* ── Smooth scroll ─────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
  .hero {
    min-height: 70vh;
    padding-bottom: 2rem;
  }

  .detail-row {
    font-size: 0.9rem;
  }
}
