/* ============================================================================
   Portafolio — Demian Denegri
   1. Tokens y base
   2. Pantallas y efectos CRT
   3. Pantalla de arranque
   4. Fondos animados
   5. Cabecera, navegación y tarjetas
   6. Panel de detalle
   7. Componentes de contenido
   8. Responsive
   ========================================================================== */

/* ── 1. Tokens y base ────────────────────────────────────────────────────── */

:root {
  --c-deep: #00050f;
  --c-blue: #0066cc;
  --c-cyan: #00aaff;
  --c-white: #e8f2ff;
  --c-grey: #8aa4c8;
  --c-gold: #ffcc00;
  --c-red: #cc2244;
  --c-purple: #9966ff;

  --font-display: "ubuntu", sans-serif;
  --font-mono: "Share Tech Mono",cursive, monospace;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-card: 10px;
  --radius-panel: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--c-deep);
  color: var(--c-white);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 2. Pantallas y efectos CRT ─────────────────────────────────────────── */

.screen {
  position: absolute;
  inset: 0;
  display: none;
}

.screen.active {
  display: flex;
}

#crt {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

#crt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
}

#crt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 52%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

#crt-f {
  position: absolute;
  inset: 0;
  animation: flicker 12s infinite;
}

@keyframes flicker {
  0%,
  97%,
  100% {
    opacity: 1;
  }
  98% {
    opacity: 0.93;
  }
  99% {
    opacity: 1;
  }
}

/* ── 3. Pantalla de arranque ────────────────────────────────────────────── */

#screen-boot {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 22px;
  background: #000;
  transition: opacity 0.75s ease;
}

#boot-logo {
  color: transparent;
  font-size: clamp(52px, 13vw, 128px);
  font-weight: 700;
  letter-spacing: 0.15em;
  opacity: 0;
  -webkit-text-stroke: 2px var(--c-blue);
  animation: bootGlow 1.6s ease forwards 0.4s;
}

@keyframes bootGlow {
  0% {
    opacity: 0;
    filter: none;
    -webkit-text-stroke-color: #000a1a;
  }
  50% {
    color: var(--c-cyan);
    opacity: 1;
    filter: drop-shadow(0 0 40px var(--c-cyan));
    -webkit-text-stroke-color: var(--c-blue);
  }
  100% {
    color: var(--c-white);
    opacity: 1;
    filter: drop-shadow(0 0 12px var(--c-cyan));
    -webkit-text-stroke-color: var(--c-blue);
  }
}

#boot-sub {
  color: var(--c-grey);
  font-size: clamp(10px, 2.2vw, 14px);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 2.1s;
}

#boot-ver {
  color: #334466;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 2.6s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#boot-loading {
  display: flex;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 2.9s;
}

.boot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.boot-dot:nth-child(1) {
  background: var(--c-blue);
}

.boot-dot:nth-child(2) {
  background: var(--c-cyan);
  animation-delay: 0.2s;
}

.boot-dot:nth-child(3) {
  background: var(--c-gold);
  animation-delay: 0.4s;
}

.boot-dot:nth-child(4) {
  background: var(--c-red);
  animation-delay: 0.6s;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.6);
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
  }
}

/* ── 4. Fondos animados ─────────────────────────────────────────────────── */

#starfield {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#wave-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  z-index: 1;
  opacity: 0.5;
}

/* ── 5. Cabecera, navegación y tarjetas ─────────────────────────────────── */

#screen-main {
  flex-direction: column;
  background: var(--c-deep);
  overflow: hidden;
}

#main-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 32px 0;
}

#header-time {
  color: var(--c-white);
  font-family: var(--font-mono);
  font-size: clamp(18px, 3.5vw, 28px);
  letter-spacing: 0.05em;
  line-height: 1;
  text-shadow: 0 0 12px var(--c-cyan);
}

#header-date {
  margin-top: 5px;
  color: var(--c-grey);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

#header-right {
  text-align: right;
}

#header-name {
  color: var(--c-white);
  font-size: clamp(14px, 2.2vw, 19px);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
}

#header-role {
  margin-top: 5px;
  color: var(--c-cyan);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

#cat-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  margin-top: 26px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

#cat-nav::-webkit-scrollbar {
  display: none;
}

.cat-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  padding: 8px 20px;
  color: var(--accent, var(--c-cyan));
  cursor: pointer;
  opacity: 0.4;
  transition: opacity var(--transition);
}

.cat-item::after {
  content: "";
  position: absolute;
  right: 20%;
  bottom: 0;
  left: 20%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--transition);
}

.cat-item.active {
  opacity: 1;
}

.cat-item.active::after {
  opacity: 0.75;
}

.cat-svg {
  width: clamp(20px, 3.5vw, 28px);
  height: clamp(20px, 3.5vw, 28px);
  transition:
    transform var(--transition),
    filter var(--transition);
}

.cat-item.active .cat-svg {
  filter: drop-shadow(0 0 10px currentColor);
  transform: scale(1.25);
}

.cat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  white-space: nowrap;
}

#card-row {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 20px);
  flex: 1;
  padding: 16px 24px;
  overflow: visible;
}

.mem-card {
  --accent: var(--c-cyan);

  position: relative;
  display: flex;
  flex-direction: column;
  width: clamp(82px, 11vw, 132px);
  aspect-ratio: 0.72;
  overflow: hidden;
  color: var(--accent);
  background: linear-gradient(160deg, #0a1628 0%, #060d1c 60%, #0b1830 100%);
  border: 1px solid rgba(0, 110, 200, 0.28);
  border-radius: var(--radius-card) var(--radius-card) 7px 7px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.mem-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 42%;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.065) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.card-notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: 28%;
  height: 7px;
  border: 1px solid rgba(0, 90, 180, 0.2);
  border-top: none;
  border-radius: 0 0 5px 5px;
  background: #04091a;
  transform: translateX(-50%);
}

.card-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: clamp(36px, 5.5vw, 52px);
  margin-top: 26px;
}

.card-icon-svg {
  width: clamp(28px, 4.5vw, 42px);
  height: clamp(28px, 4.5vw, 42px);
  filter: drop-shadow(0 0 6px currentColor);
  transition: filter 0.3s;
}

.card-label {
  flex-shrink: 0;
  margin-top: 8px;
  padding: 0 6px;
  color: var(--c-grey);
  font-size: clamp(7px, 0.95vw, 9.5px);
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

.card-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 7px 7px;
  background: currentColor;
  opacity: 0.85;
}

.card-dots {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.card-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-grey);
  opacity: 0.25;
  transition:
    opacity var(--transition),
    background var(--transition);
}

.mem-card.active {
  border-color: rgba(0, 175, 255, 0.7);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.72),
    0 0 32px rgba(0, 140, 255, 0.28);
  transform: translateY(-18px) scale(1.1);
}

.mem-card.active .card-dot {
  opacity: 0.6;
}

.mem-card.active .card-dot:nth-child(2) {
  background: var(--c-cyan);
  opacity: 1;
}

.mem-card.active .card-icon-svg {
  filter: drop-shadow(0 0 14px currentColor);
}

#selected-title {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 20px 5px;
  text-align: center;
}

#sel-name-text {
  color: var(--c-white);
  font-size: clamp(14px, 2.2vw, 19px);
  font-weight: 700;
  letter-spacing: 0.32em;
  text-shadow: 0 0 10px var(--c-cyan);
  text-transform: uppercase;
}

#sel-hint {
  margin-top: 3px;
  color: var(--c-grey);
  font-size: 10px;
  letter-spacing: 0.18em;
}

#controls-hint {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 7px 20px 13px;
}

.ctrl {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--c-grey);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ctrl-arrows {
  display: flex;
  gap: 5px;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.btn-x {
  border-color: #4488ff;
  color: #4488ff;
}

.btn-o {
  border-color: #ff4444;
  color: #ff4444;
}

.btn-arr {
  border-color: var(--c-grey);
  color: var(--c-grey);
  font-size: 11px;
}

/* ── 6. Panel de detalle ────────────────────────────────────────────────── */

#screen-detail {
  z-index: 100;
  flex-direction: column;
  background: transparent;
}

#detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 4, 14, 0.9);
  backdrop-filter: blur(6px);
}

#detail-panel {
  --accent: var(--c-cyan);

  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: min(94vw, 720px);
  max-height: 86vh;
  margin: auto;
  overflow: hidden;
  background: linear-gradient(160deg, #050e22 0%, #020912 100%);
  border: 1px solid rgba(0, 140, 255, 0.32);
  border-radius: var(--radius-panel);
  box-shadow:
    0 0 80px rgba(0, 100, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: panelSlide 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes panelSlide {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#detail-header {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 14px;
  padding: 18px 24px 15px;
  border-bottom: 1px solid rgba(0, 120, 255, 0.18);
}

#detail-icon {
  flex-shrink: 0;
  color: var(--accent);
  line-height: 0;
}

#detail-icon svg {
  width: 34px;
  height: 34px;
}

#detail-title {
  color: var(--accent);
  font-size: clamp(16px, 2.8vw, 23px);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

#detail-body {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  scrollbar-color: var(--c-blue) rgba(0, 0, 0, 0.2);
  scrollbar-width: thin;
}

#detail-body::-webkit-scrollbar {
  width: 4px;
}

#detail-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

#detail-body::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background: var(--c-blue);
}

#detail-close-hint {
  flex-shrink: 0;
  padding: 11px 24px;
  border-top: 1px solid rgba(0, 120, 255, 0.12);
  color: var(--c-grey);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-align: right;
}

/* ── 7. Componentes de contenido ────────────────────────────────────────── */

.d-section {
  margin-bottom: 24px;
}

.d-section:last-child {
  margin-bottom: 0;
}

.d-heading {
  margin-bottom: 13px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(0, 170, 255, 0.18);
  color: var(--c-cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}

.d-text {
  color: #b8ccec;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
}

.d-item {
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.d-item:last-child {
  border-bottom: none;
}

.d-item-title {
  margin-bottom: 5px;
  color: var(--c-white);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.d-item-sub {
  color: #9ab0ce;
  font-size: 13.5px;
  line-height: 1.7;
}

.d-quote {
  margin-top: 10px;
  padding: 11px 16px;
  border-left: 3px solid var(--c-blue);
  border-radius: 0 6px 6px 0;
  background: rgba(0, 60, 120, 0.12);
}

.d-quote p {
  color: var(--c-cyan);
  font-size: 14.5px;
  font-style: italic;
  line-height: 1.75;
}

/* Chips */

.d-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.d-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--c-white);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: rgba(0, 70, 140, 0.22);
  border: 1px solid rgba(0, 110, 210, 0.3);
  border-radius: 5px;
}

.chip-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-cyan);
}

.chip-dot--purple {
  background: var(--c-purple);
}

/* Etiquetas */

.d-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.d-tag {
  display: inline-block;
  padding: 3px 9px;
  color: #00dd77;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  background: rgba(0, 200, 100, 0.12);
  border: 1px solid rgba(0, 200, 100, 0.28);
  border-radius: 3px;
}

/* Enlaces de proyectos */

.d-project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.d-project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  color: #aabbdd;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 1px solid currentColor;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.d-project-link--primary {
  color: var(--accent, #ff6644);
}

.d-project-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.d-project-link svg {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}

/* Tecnologías */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.tech-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  background: rgba(0, 70, 150, 0.16);
  border: 1px solid rgba(0, 160, 255, 0.22);
  border-radius: 8px;
  transition:
    border-color var(--transition),
    background var(--transition);
}

.tech-card:hover {
  background: rgba(0, 80, 160, 0.24);
  border-color: rgba(0, 200, 255, 0.4);
}

.tech-logo-img {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.tech-info h4 {
  color: var(--c-white);
  font-size: 14px;
  font-weight: 700;
}

.tech-info p {
  margin-top: 3px;
  color: #8099bb;
  font-size: 12px;
  line-height: 1.4;
}

.level {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 3px;
}

.intermedio {
  color: #ffcc00;
  background: rgba(255, 200, 0, 0.14);
}

.basico {
  color: #88bbff;
  background: rgba(100, 160, 255, 0.14);
}

.aprendiendo {
  color: #cc88ff;
  background: rgba(160, 100, 255, 0.14);
}

/* Herramientas de IA */

.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.ai-card {
  padding: 14px;
  background: rgba(30, 0, 60, 0.3);
  border: 1px solid rgba(160, 100, 255, 0.25);
  border-radius: 8px;
  transition: border-color var(--transition);
}

.ai-card:hover {
  border-color: rgba(160, 100, 255, 0.5);
}

.ai-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.ai-card-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.ai-card-name {
  color: var(--c-white);
  font-size: 14px;
  font-weight: 700;
}

.ai-bar-track {
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.ai-bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #6633cc, #cc88ff);
  border-radius: 2px;
  animation: barGrow 1s ease forwards;
}

.ai-card-desc {
  margin-top: 7px;
  color: #8a9fbb;
  font-size: 12px;
  line-height: 1.5;
}

@keyframes barGrow {
  to {
    width: var(--pct, 0%);
  }
}

/* Certificaciones */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(0, 60, 120, 0.18);
  border: 1px solid rgba(0, 130, 220, 0.22);
  border-radius: 8px;
  transition: border-color var(--transition);
}

.cert-card:hover {
  border-color: rgba(0, 180, 255, 0.4);
}

.cert-info {
  min-width: 0;
}

.cert-logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.cert-name {
  color: var(--c-white);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}

.cert-issuer {
  margin-top: 2px;
  color: var(--c-grey);
  font-size: 11.5px;
}

/* Formación */

.timeline {
  position: relative;
  padding-left: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--c-blue), transparent);
}

.tl-item {
  position: relative;
  margin-bottom: 20px;
}

.tl-item::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -26px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-cyan);
  box-shadow: 0 0 8px var(--c-cyan);
}

.tl-year {
  margin-bottom: 3px;
  color: var(--c-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.tl-title {
  margin-bottom: 4px;
  color: var(--c-white);
  font-size: 15px;
  font-weight: 700;
}

.tl-sub {
  color: #8099bb;
  font-size: 13px;
  line-height: 1.6;
}

/* Foto de perfil */

.profile-photo {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 1;
  margin: 0 auto 20px;
  overflow: hidden;
  background: rgba(0, 30, 60, 0.3);
  border: 1px solid rgba(0, 170, 255, 0.4);
  border-radius: var(--radius-panel);
}

.profile-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Estadísticas */

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}

.stat-box {
  flex: 1;
  min-width: 100px;
  padding: 12px 14px;
  text-align: center;
  background: rgba(0, 60, 140, 0.2);
  border: 1px solid rgba(0, 140, 255, 0.22);
  border-radius: 8px;
}

.stat-val {
  color: var(--c-cyan);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

.stat-lbl {
  margin-top: 5px;
  color: var(--c-grey);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Contacto */

.contact-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-link:last-child {
  border-bottom: none;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: rgba(0, 60, 120, 0.3);
  border-radius: 9px;
}

.contact-icon svg {
  width: 19px;
  height: 19px;
}

.contact-icon--email {
  color: var(--accent);
}

.contact-icon--linkedin {
  color: #0077b5;
}

.contact-icon--github {
  color: #aabbdd;
}

.contact-icon--location {
  color: var(--c-cyan);
}

.contact-label {
  color: var(--c-white);
  font-size: 14px;
  font-weight: 700;
}

.contact-value {
  margin-top: 2px;
  color: var(--c-grey);
  font-size: 12.5px;
}

.contact-link a {
  color: var(--c-cyan);
  font-size: 12.5px;
  text-decoration: none;
}

.contact-link a:hover {
  text-decoration: underline;
}

/* Imágenes sin cargar */

.is-missing {
  opacity: 0.3;
}

/* ── 8. Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  #main-header {
    padding: 12px 16px 0;
  }

  #cat-nav {
    margin-top: 14px;
  }

  .cat-item {
    padding: 6px 13px;
  }

  #card-row {
    gap: 8px;
    padding: 10px 12px;
  }

  #controls-hint {
    gap: 12px;
  }

  #detail-panel {
    max-height: 90vh;
  }

  #detail-header {
    padding: 14px 16px 12px;
  }

  #detail-body {
    padding: 14px 16px;
  }

  .tech-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .card-icon-wrap {
    height: 30px;
    margin-top: 16px;
  }

  .card-icon-svg {
    width: 24px;
    height: 24px;
  }

  .card-label {
    margin-top: 4px;
    font-size: 6.5px;
    letter-spacing: 0.06em;
  }
}
