/* ============================
   VARIABLES GLOBALES
   ============================ */
:root {
  --bg: #f8fafc;
  --bg-2: #f1f5f9;
  --card: #ffffff;

  --text: #0f172a;
  --muted: #64748b;

  --accent: #4f46e5;
  --accent-contrast: #ffffff;

  --glass: rgba(255, 255, 255, 0.7);
  --radius: 14px;
  --maxw: 1100px;
  --gap: 24px;

  --shadow-1: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --border: rgba(15, 23, 42, 0.08);

  --project-media-h: 500px;
  --header-h: 72px; /* altura estimada del header (ajusta si tu header real varía) */
}

/* Dark overrides */
html[data-theme="dark"] {
  --bg: #0b0f19;
  --bg-2: #0f172a;

  --card: #121826;

  --text: #f8fafc;
  --muted: #94a3b8;

  --accent: #818cf8;
  --accent-contrast: #ffffff;

  --glass: rgba(18, 24, 38, 0.8);

  --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 20px 50px rgba(0, 0, 0, 0.6);

  --border: rgba(255, 255, 255, 0.08);
}

/* ========= RESET / BASE ========= */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  padding-bottom: 60px;
  transition: background-color 0.3s ease;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 40px 20px; }

/* ========= HEADER / NAVBAR =========
   Header fijo, fondo sólido, enlaces siempre visibles.
   Evita que se oculten en ciertas resoluciones.
   ========= */
/* ========= HEADER / NAVBAR =========
   Header fijo, fondo sólido, enlaces siempre visibles.
   Evita que se oculten en ciertas resoluciones.
   ========= */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 140;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  padding: 8px 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease;
}

.header.hide {
  transform: translateY(-100%);
}

.wrap.header { position: relative; padding-top: 0; padding-bottom: 0; }

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 12px;
  justify-content: flex-start;
  flex-wrap: wrap; /* importante: permite que links salten de línea si falta espacio */
}

.brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin-right: 8px;
}

/* Forzar enlaces siempre visibles y legibles */
.nav-links {
  display: flex !important;
  position: static !important;
  flex-direction: row !important;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap; /* si no caben, saltan a nueva línea */
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Tamaño/estilo de los enlaces del menú */
.nav-links a {
  font-size: 16px !important;      /* aumentado para mejor legibilidad */
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  padding: 8px 10px !important;
  color: var(--muted) !important;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a:focus {
  color: var(--accent) !important;
  background: transparent;
  outline: none;
}

/* CTA (Contactar) siempre visible */
.cta { margin-left: auto; display: block !important; }

/* Ocultar el toggle hamburguesa por defecto (solo móvil) */
.nav-toggle { display: none !important; pointer-events: none; }
.side-menu { display: none; }
.overlay { display: none; }

/* ========= MENÚ HAMBURGUESA (MÓVIL) ========= */
@media (max-width: 768px) {
  /* Mostrar hamburguesa en móvil */
  .nav-toggle {
    display: flex !important;
    position: relative;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    pointer-events: all;
    gap: 6px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
  }

  /* Animación hamburguesa → X */
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  /* Ocultar nav-links en móvil */
  .nav-links {
    display: none !important;
  }

  /* Ocultar CTA en móvil */
  .cta {
    display: none !important;
  }

  /* Overlay */
  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    animation: fadeIn 0.3s ease;
  }

  .overlay.active {
    display: block;
  }

  /* Side Menu */
  .side-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--card);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
    padding: 20px;
    gap: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: right 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
  }

  .side-menu.active {
    right: 0;
  }

  .side-menu a {
    display: block;
    padding: 14px 16px;
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 16px;
  }

  .side-menu a:hover {
    background: var(--bg-2);
    color: var(--accent);
  }

  .close-menu {
    align-self: flex-start;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-bottom: 12px;
  }

  .close-menu:hover {
    transform: scale(1.15);
  }

  /* Prevenir scroll cuando el menú está abierto */
  body.no-scroll {
    overflow: hidden;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

/* Evita que el nav se oculte por media queries: forzamos visibilidad */
@media (min-width: 769px) {
  .nav-toggle { display: none !important; }
  .side-menu { display: none !important; }
  .overlay { display: none !important; }
}

/* Ajuste para que main no se solape con el header */
main.wrap { padding-top: calc(var(--header-h,72px) + 12px) !important; }

/* ========= BOTONES ========= */
.btn {
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-1);
}
.btn-outline {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.btn-ghost {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
html[data-theme="dark"] .btn-ghost { color: var(--muted); border-color: rgba(255,255,255,0.12); }

/* ========= HERO ========= */
.hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--gap);
  align-items: center;
  padding: 48px 0;
}
.hero-left h1 { font-size: 40px; margin: 0 0 10px; }
.accent { color: var(--accent); }
.lead { color: var(--muted); margin: 0 0 18px; max-width: 60ch; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Card foto por defecto (se mejora más abajo) */
.card-photo {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}
.avatar {
  width: 240px;
  height: 280px;
  object-fit: cover;
  border-radius: 22px;
  border: none;
  box-shadow: 0 20px 50px rgba(15,23,36,0.15);
  display: block;
}

/* ========= SECCIONES ========= */
.section { padding: 48px 0; }
h2 { margin: 0 0 18px; font-size: 22px; }
.muted { color: var(--muted); font-size: 15px; }

/* ========= EXPERIENCIA (timeline) ========= */
.experience-timeline { padding-top: 40px; }
.timeline {
  position: relative;
  margin-top: 30px;
  padding-left: 40px; /* Aumentado para dar aire */
}

/* Línea vertical con gradiente para que no parezca cortada bruscamente */
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--border), var(--border) 90%, transparent);
}

.timeline-item { position: relative; margin-bottom: 32px; }

.timeline-item .dot {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  left: -47px; /* Centrado exacto: -40px (padding) - 7px (mitad del dot) */
  top: 6px;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item:hover .dot {
  transform: scale(1.3);
  box-shadow: 0 0 15px var(--accent);
}

.timeline-item .card {
  background: var(--card);
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item .card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-2);
}

.timeline-item h3 { margin-bottom: 6px; font-size: 20px; }
.timeline-item p { margin: 4px 0; }
.timeline-item .small { font-size: 14px; }

@media (max-width: 700px) {
  .timeline { padding-left: 30px; }
  .timeline-item .dot { left: -36px; }
  .timeline::before { left: 0; }
}

/* ========= BREADCRUMB ========= */
.breadcrumb {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  margin-top: 10px;
}
.breadcrumb a {
  transition: color 0.2s ease;
}
.breadcrumb a:hover {
  color: var(--accent) !important;
}

/* ========= PROYECTOS LIST ========= */
.projects-section h2 { font-size: 40px; }
.projects-list { display: flex; flex-direction: column; gap: 28px; }

.project-card {
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 28px;
  padding: 20px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
              box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.4s ease;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.005);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}
.project-media {
  height: var(--project-media-h);
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  transition: transform .35s ease, filter .25s ease;
}
.project-media img:hover { transform: scale(1.02); }

.project-body { display: flex; flex-direction: column; gap: 14px; padding-right: 10px; }
.project-header { display: flex; flex-direction: column; gap: 6px; }
.project-header h3 { margin: 0; font-size: 22px; }
.project-desc { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }

/* tags */
.tags-inline { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.tech-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  filter: grayscale(0.1);
}

.tech-pill:hover {
  filter: grayscale(0) brightness(1.1);
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* acciones */
.project-actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.btn-primary {
  padding: 10px 18px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(90deg, var(--accent), #7c6bff);
  color: white;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 26px rgba(79,70,229,0.12);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transform: skewX(-25deg);
  transition: none;
}

.btn-primary:hover::after {
  left: 150%;
  transition: left 0.6s ease;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.3);
  filter: brightness(1.05);
}

/* botones diferenciados */
.btn-repo {
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  background: #1f2937;
  border: 1px solid #374151;
  color: #d1d5db;
  font-weight: 600;
  transition: .25s ease;
}
.btn-repo:hover { background: #374151; transform: translateY(-2px); }

.btn-web {
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  background: #10b981;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(16,185,129,0.25);
  transition: .25s ease;
}
.btn-web:hover { filter: brightness(1.05); transform: translateY(-2px); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.gallery img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; display: block; transition: transform .25s ease; }
.gallery img:hover { transform: scale(1.03); }

/* ========= TECH PILL COLORS ========= */
/* Web */
.tech-html { background: #e34f26; color: #fff; border-color: rgba(227,79,38,0.18); }
.tech-css { background: #264de4; color: #fff; border-color: rgba(38,77,228,0.18); }
.tech-js  { background: #f7df1e; color: #111; border-color: rgba(247,223,30,0.18); }

/* Backend / API */
.tech-java   { background: #f89820; color: #111; border-color: rgba(248,152,32,0.18); }
.tech-spring { background: #6db33f; color: #fff; border-color: rgba(109,179,63,0.18); }
.tech-mysql  { background: #00618a; color: #fff; border-color: rgba(0,97,138,0.18); }
.tech-jwt    { background: #000000; color: #fff; border-color: rgba(0,0,0,0.18); }
.tech-rest   { background: #6366f1; color: #fff; border-color: rgba(99,102,241,0.18); }

/* Flutter stack */
.tech-flutter { background: #02569b; color: #fff; border-color: rgba(2,86,155,0.18); }
.tech-dart    { background: #00B4AB; color: #fff; border-color: rgba(0,180,171,0.18); }
.tech-sqlite  { background: #003b57; color: #fff; border-color: rgba(0,59,87,0.18); }

/* Otros lenguajes */
.tech-python  { background: #3776ab; color: #fff; border-color: rgba(55,118,171,0.18); }
.tech-android { background: #3ddc84; color: #111; border-color: rgba(61,220,132,0.18); }
.tech-angular { background: #dd0031; color: #fff; border-color: rgba(221,0,49,0.18); }
.tech-mongodb { background: #47a248; color: #fff; border-color: rgba(71,162,72,0.18); }

/* servicios */
.tech-provider { background: #00a98f; color: #fff; border-color: rgba(0,169,143,0.18); }
.tech-bcrypt   { background: #4b5563; color: #fff; border-color: rgba(75,85,99,0.18); }
.tech-emailjs  { background: #8940fa; color: #fff; border-color: rgba(137,64,250,0.18); }

.tech-pill:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }

/* ========= CONTACTO (tarjetas) ========= */
.contact-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; margin-top: 6px; }
.card { padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-1); }

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
#contact-form label { font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; font-size: 15px; }
#contact-form input, #contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,36,0.06);
  background: transparent;
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: box-shadow .18s ease, border-color .18s ease, transform .08s ease;
}
#contact-form input::placeholder, #contact-form textarea::placeholder { color: var(--muted); opacity: .9; }
#contact-form input:focus, #contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(79,70,229,0.06);
  transform: translateY(-1px);
}
#contact-form .btn {
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), #7c6bff);
  color: var(--accent-contrast);
  border: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(79,70,229,0.12);
}
#contact-form .btn:hover { transform: translateY(-3px); filter: brightness(.98); }

.contact-info.card {
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--card), rgba(0,0,0,0.02));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
.contact-info.card a { color: var(--accent); text-decoration: none; display: inline-block; margin: 6px 0; }
.contact-info.card a:hover { text-decoration: underline; opacity: .95; }

#cf-status { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ========= FOCUS / ACCESSIBILITY ========= */
.btn:focus, .btn-ghost:focus, .btn-repo:focus, .btn-web:focus, .btn-primary:focus, .tech-pill:focus {
  outline: 3px solid rgba(99,102,241,0.18);
  outline-offset: 3px;
  box-shadow: 0 8px 20px rgba(99,102,241,0.06);
}
#contact-form input:focus, #contact-form textarea:focus {
  outline: 3px solid rgba(99,102,241,0.12);
  outline-offset: 2px;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 1100px) {
  .project-card { grid-template-columns: 1fr; padding: 18px; }
  :root { --project-media-h: 220px; }
  .project-media { height: var(--project-media-h); }
  .projects-section h2 { font-size: 34px; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .contact-grid { grid-template-columns: 1fr; }
  .card-photo { margin: 18px auto 0; max-width: 320px; padding: 16px; }
  .avatar { width: 160px; height: 160px; border-radius: 14px; }
}

@media (max-width: 560px) {
  .avatar { width: 140px; height: 140px; }
  .hero-left h1 { font-size: 28px; }
  .projects-section h2 { font-size: 28px; }
}

/* Reduce-motion */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s cubic-bezier(.2,.9,.3,1), transform .6s cubic-bezier(.2,.9,.3,1); will-change: opacity, transform; }
.reveal.active { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.active { opacity: 1; transform: none; transition: none; }
  .project-media img, .tech-pill, .btn, .gallery img { transition: none !important; }
}

/* Dark mode tweak for some controls */
html[data-theme="dark"] .btn-repo { background: #0f1724; border-color: rgba(255,255,255,0.06); color: #e6eef8; box-shadow: 0 6px 20px rgba(0,0,0,0.6); }
html[data-theme="dark"] .btn-web { background: #059669; color: #fff; box-shadow: 0 6px 18px rgba(5,150,105,0.12); }
html[data-theme="dark"] .btn-primary { box-shadow: 0 8px 26px rgba(99,102,241,0.12); }
html[data-theme="dark"] .gallery img:hover { transform: scale(1.03); box-shadow: 0 12px 30px rgba(0,0,0,0.5); }


body {
  background-attachment: fixed;
  background-image:
    radial-gradient(
      circle at 20% -10%,
      rgba(99, 102, 241, 0.08),
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(16, 185, 129, 0.05),
      transparent 40%
    );
  background-color: var(--bg);
}

html[data-theme="dark"] body {
  background-image:
    radial-gradient(
      circle at 20% -10%,
      rgba(99, 102, 241, 0.15),
      transparent 45%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(16, 185, 129, 0.1),
      transparent 45%
    );
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg ... %3E");
  opacity: 0.03;
}

/* ============================
   COLLAPSIBLE SECTIONS (Galleries & Lists)
============================ */

.collapse-wrapper {
  position: relative;
  max-height: 520px;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 20px;
  padding: 0 10px; /* Evita que sombras o bordes se corten en los laterales */
}

.collapse-wrapper.expanded {
  max-height: 5000px !important;
}

/* Altura inicial específica para la sección de experiencia */
#wrapper-experiencia {
  max-height: 850px;
}

.collapse-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(transparent, var(--bg)); /* Usamos bg por defecto */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  transition: opacity 0.4s ease;
  z-index: 10;
}

/* En las páginas de proyecto, las tarjetas usan --card */
.project-detail-page .collapse-overlay {
  background: linear-gradient(transparent, var(--card));
}

.collapse-wrapper.expanded .collapse-overlay {
  opacity: 0;
  pointer-events: none;
}

.btn-show-more {
  background: var(--bg-2);
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-1);
}

.btn-show-more:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.btn-show-more .icon {
  transition: transform 0.3s ease;
}

.collapse-wrapper.expanded + .btn-show-more-container .icon {
  transform: rotate(180deg);
}

.btn-show-more-container {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

@media (max-width: 600px) {
  .collapse-wrapper {
    max-height: 400px;
  }
}