:root {
  --section-max: 1360px;
  --dark: #e9ecf5;
  --light: #0b1020;
  --muted: #9aa3b8;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2.5rem;
  --radius-full: 9999px;
}

* {
  scroll-behavior: smooth;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: transparent;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.6)),
    radial-gradient(circle at 20% 30%, rgba(31, 111, 235, 0.25), transparent 45%);
  opacity: 0.92;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.06) 0%, transparent 20%),
    radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 22%),
    radial-gradient(circle at 25% 80%, rgba(255, 255, 255, 0.04) 0%, transparent 18%),
    radial-gradient(circle at 90% 60%, rgba(255, 255, 255, 0.03) 0%, transparent 15%);
  z-index: 1;
  pointer-events: none;
}

.hero > .container {
  position: relative;
  z-index: 2;
}

body {
  background: url('/public/img/jose1.jpeg') center/cover fixed,
    linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.6)),
    radial-gradient(circle at 20% 30%, rgba(31, 111, 235, 0.2), transparent 45%),
    #050912;
  color: #f4f6ff;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

.section-light {
  background: #eef3fb;
  position: relative;
}

.section-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/public/img/jose1.jpeg') center/cover fixed;
  opacity: 0.05;
  pointer-events: none;
}

.section-light .section-card,
.section-light .cert-card {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.section-light h2,
.section-light h3,
.section-light h5,
.section-light .text-dark {
  color: #000000 !important;
}

.section-light .section-card {
  backdrop-filter: none !important;
  background: #ffffff !important;
}

.section-light .glow {
  display: none !important;
}

.section-light p,
.section-light .text-muted,
.section-light .cert-card p,
.section-light .cert-card .text-muted {
  color: #1e293b !important;
}

.section-light .section-title {
  color: #1e3a8a !important;
}

.section-light .badge {
  font-size: 0.7rem;
  background: rgba(59, 130, 246, 0.1) !important;
  color: #2563eb !important;
}

.text-dark {
  color: #ffffff !important;
}

.text-muted {
  color: rgba(233, 236, 245, 0.72) !important;
}

.section-title {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-left: 3px solid #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

.navbar {
  backdrop-filter: blur(12px);
  background-color: rgba(7, 12, 24, 0.95);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 0.75rem 0;
  background-color: rgba(7, 12, 24, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.navbar-brand {
  font-size: 1.5rem;
  color: #ffffff !important;
  letter-spacing: -0.02em;
}

.navbar-brand span {
  color: #3b82f6;
}

.nav-link {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #3b82f6 !important;
}

.hero-title {
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

/* Readability panel: lifts hero copy above the background photo */
.hero-copy {
  background: rgba(5, 9, 18, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.photo-wrapper {
  position: relative;
  width: 430px;
  max-width: 90vw;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 10px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), transparent);
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.15);
  margin: 0 auto;
  overflow: hidden;
}

.photo-wrapper::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
  box-shadow: 0 0 15px #3b82f6;
  animation: scan 3s linear infinite;
  z-index: 2;
}

@keyframes scan {
  0% { top: -10%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}

.photo-alias {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  background: radial-gradient(circle at 30% 25%, rgba(59, 130, 246, 0.25), transparent 60%), #070c18;
  text-shadow: 0 0 24px rgba(59, 130, 246, 0.45);
  user-select: none;
}

.photo-alias span {
  color: #3b82f6;
}

.section-card {
  background-color: rgba(17, 24, 40, 0.94);
  border: 1px solid rgba(59, 130, 246, 0.12);
  backdrop-filter: blur(12px);
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

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

.skill-box {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(59, 130, 246, 0.08);
  transition: all 0.3s ease;
}

.skill-box:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
}

.badge-tech {
  background-color: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.project-card {
  background: rgba(14, 20, 32, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.15);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  box-shadow: 0 25px 55px rgba(59, 130, 246, 0.25), 0 0 30px rgba(59, 130, 246, 0.15);
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.4);
}

.project-card img {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  height: 200px;
  width: 100%;
  object-fit: cover;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.04);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-body .project-tech {
  margin-top: auto;
}

.project-card .btn {
  margin-top: 0.5rem;
}

.btn-primary {
  background-color: #2563eb;
  border-color: #2563eb;
}

.btn-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-outline-primary {
  color: #2563eb;
  border-color: #2563eb;
}

.btn-outline-primary:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

.tech-badge {
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  color: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.section-light .tech-badge {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
  backdrop-filter: none !important;
}

.tech-badge:hover {
  background: rgba(37, 99, 235, 0.35);
  border-color: rgba(37, 99, 235, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

.tool-card {
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
  transition: all 0.3s ease;
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 120px;
}

.tool-card:hover {
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
}

.tool-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: #3b82f6;
  display: block;
  transition: all 0.3s ease;
}

.tool-card h6 {
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #f7f9ff;
  font-size: 0.9rem;
}

.tool-card p {
  font-size: 0.75rem;
  color: rgba(233, 236, 245, 0.75);
  margin-bottom: 0;
  line-height: 1.4;
}

/* Tools tabs: organized by category, uniform responsive grid */
.tools-tabs .nav-link {
  color: rgba(244, 246, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  transition: all 0.25s ease;
}

.tools-tabs .nav-link:hover {
  border-color: rgba(59, 130, 246, 0.5);
  color: #ffffff;
}

.tools-tabs .nav-link.active {
  background: rgba(59, 130, 246, 0.16);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.5), 0 8px 22px rgba(59, 130, 246, 0.25);
}

.tools-count {
  display: inline-block;
  min-width: 1.5em;
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.72rem;
  font-weight: 700;
}

.tools-tabs .nav-link.active .tools-count {
  background: rgba(96, 165, 250, 0.3);
  color: #ffffff;
}

.tools-pane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.tools-pane-grid .tool-card {
  min-height: 152px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
}

@media (max-width: 576px) {
  .tools-pane-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cert-card {
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 1rem;
  padding: 1.25rem;
  background: rgba(14, 20, 32, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.cert-thumb {
  border-radius: 0.85rem;
  aspect-ratio: 16 / 11;
  background: #f8fafc;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

footer {
  background: #060a14;
  color: #f4f6ff;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.footer-links .btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  transition: all 0.3s ease;
}

.footer-links .btn-icon:hover {
  transform: translateY(-2px);
  border-color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.footer-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1), transparent 70%);
  pointer-events: none;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 991px) {
  .hero { 
    text-align: center; 
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: auto;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .photo-wrapper { 
    width: 280px; 
    margin-top: 2rem;
  }
  .navbar-collapse {
    background: rgba(7, 12, 24, 0.98);
    margin: 0 -1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .lead {
    font-size: 1rem;
  }
  .section-card {
    padding: 1.5rem;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .tool-card {
    flex: 1 1 100%;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .photo-wrapper { 
    width: 220px; 
  }
  .tech-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.8rem;
  }
  .section-title {
    font-size: 0.65rem;
  }
}

/* Certifications carousel: single row with manual + auto scroll */
.cert-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.5rem 0.25rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.cert-carousel .cert-card {
  flex: 0 0 min(360px, 85vw);
  scroll-snap-align: start;
}

.cert-carousel::-webkit-scrollbar {
  height: 8px;
}

.cert-carousel::-webkit-scrollbar-track {
  background: rgba(37, 99, 235, 0.08);
  border-radius: 999px;
}

.cert-carousel::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.45);
  border-radius: 999px;
}

.cert-carousel-controls .btn {
  min-width: 42px;
}

@media (prefers-reduced-motion: reduce) {
  .cert-carousel {
    scroll-behavior: auto;
  }
}