/* PROYECTOS: una imagen WebP por proyecto (notebook + celular) y carrusel manual en pantallas chicas. */
.proj-bleed { position: relative; width: 100%; overflow-x: clip; background: #080c11; }
.proj-deco { position: absolute; inset: 0; pointer-events: none; user-select: none; opacity: .68; background: url('../img/proyectos-fondo-rocas.webp') center / 100% 100% no-repeat; }
#proyectos { position: relative; z-index: 1; max-width: 1400px; }
#proyectos .projects-header { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(32px, 5vw, 72px); margin-bottom: clamp(28px, 3.5vw, 48px); }
#proyectos .projects-header-text { min-width: 0; }
#proyectos h2 { max-width: 18ch; font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 1.08; letter-spacing: -.04em; }
#proyectos h2 .text-accent { color: #ff2b68; }
#proyectos .projects-intro { margin: 24px 0 0; color: #bcc5d2; font-size: 1rem; line-height: 1.7; max-width: 49ch; }
#proyectos .projects-track { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.2vw, 32px); }
#proyectos .project-showcase { min-width: 0; position: relative; }

/* Imagen única del proyecto */
#proyectos .project-visual { position: relative; isolation: isolate; width: 100%; aspect-ratio: 1000 / 720; }
#proyectos .project-visual::before { content: ''; position: absolute; left: 2%; right: 0; bottom: 4%; height: 18%; z-index: -1; background: radial-gradient(ellipse, #ff245436, #ff245412 36%, #0008 58%, transparent 74%); filter: blur(9px); pointer-events: none; }
#proyectos .project-image { display: block; width: 100%; height: 100%; object-fit: contain; }

#proyectos .project-summary { position: relative; padding-top: 18px; border-top: 1px solid #ffffff12; }
#proyectos .project-summary h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: clamp(1.3rem, 1.8vw, 1.65rem); line-height: 1.2; color: #f3f5f8; letter-spacing: -.03em; }
#proyectos .project-title-dash { width: 24px; height: 3px; flex-shrink: 0; background: #ff2b68; border-radius: 2px; }
#proyectos .project-summary > p { margin: 0; min-height: 4.8em; color: #bcc5d2; font-size: .98rem; line-height: 1.6; }
#proyectos .project-status { display: inline-flex; min-height: 44px; box-sizing: border-box; align-items: center; gap: 8px; margin-top: 16px; padding: 7px 14px; border: 1px solid #ff2b684d; border-radius: 30px; color: #d7dbe3; font-size: .75rem; line-height: 1.5; }
#proyectos .project-status > span { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: #ff2b68; }
#proyectos .project-visit { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; margin-top: 16px; padding: 9px 16px; border: 1px solid #ff4d6d45; border-radius: 24px; background: #ff4d6d0a; color: #ffb0c5; font-size: .85rem; font-weight: 600; transition: background-color .18s ease, border-color .18s ease; }
#proyectos .project-visit:focus-visible { outline: 2px solid #ff8fb0; outline-offset: 4px; border-radius: 4px; }
#proyectos .projects-carousel-controls { display: none; }
#proyectos .projects-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (hover: hover) and (pointer: fine) {
    #proyectos .project-visit:hover { color: #ffd3df; border-color: #ff4d6d80; background: #ff4d6d1c; }
}

@media (max-width: 1024px) {
    #proyectos { --project-gutter: clamp(24px, 6vw, 48px); padding-inline: var(--project-gutter); padding-block: clamp(64px, 10vw, 88px); }
    #proyectos .projects-header { grid-template-columns: 1fr; gap: 22px; margin-bottom: 32px; }
    #proyectos h2 { max-width: 17ch; font-size: clamp(2.6rem, 6.8vw, 3.4rem); }
    #proyectos .projects-intro { margin-top: 0; max-width: 56ch; }
    #proyectos .projects-track { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(440px, calc(100% - 32px)); gap: 20px; margin-inline: calc(-1 * var(--project-gutter)); padding: 6px var(--project-gutter) 16px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; overscroll-behavior-y: auto; touch-action: pan-x pan-y; scroll-snap-type: x mandatory; scroll-padding-inline: var(--project-gutter); scrollbar-width: none; }
    #proyectos .projects-track::-webkit-scrollbar { display: none; }
    #proyectos .projects-track:focus-visible { outline: 2px solid #ff8fb0; outline-offset: -4px; border-radius: 12px; }
    #proyectos .project-showcase { scroll-snap-align: start; touch-action: pan-x pan-y; padding: 0 0 8px; }
    #proyectos .project-summary h3 { font-size: clamp(1.4rem, 3.5vw, 1.85rem); margin-bottom: 12px; }
    #proyectos .project-summary > p { min-height: 0; font-size: .96rem; line-height: 1.6; }
    #proyectos .project-visit { margin-top: 16px; }
    #proyectos .project-visual::before { filter: none; }
    #proyectos .projects-carousel-controls { display: flex; flex-direction: column; align-items: center; margin-top: 10px; }
    #proyectos .projects-dots { display: flex; gap: 0; }
    #proyectos .projects-dot { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    #proyectos .projects-dot > span { width: 9px; height: 9px; border-radius: 50%; background: #596573; transition: background-color .18s ease, transform .18s ease; }
    #proyectos .projects-dot.is-active > span { background: #ff2b68; transform: scale(1.2); }
    #proyectos .projects-dot:focus-visible { outline: 2px solid #ff8fb0; outline-offset: -4px; border-radius: 10px; }
    #proyectos .projects-swipe-hint { display: flex; align-items: center; gap: 12px; margin: 2px 0 0; color: #a6b0bd; font-size: .85rem; }
}
@media (max-width: 599px) {
    #proyectos .projects-header .overline { gap: 12px; font-size: .66rem; letter-spacing: .15em; margin-bottom: 18px; }
    #proyectos .projects-header .overline .line { width: 28px; height: 3px; }
    #proyectos h2 { max-width: 13ch; font-size: clamp(2.05rem, 10vw, 3.5rem); line-height: 1.08; }
    #proyectos h2 .text-accent { display: block; }
    #proyectos .projects-intro { font-size: .95rem; line-height: 1.6; }
    #proyectos .project-summary { padding-top: 8px; }
    #proyectos .project-summary h3 { gap: 10px; font-size: clamp(1.25rem, 5.4vw, 1.7rem); }
    #proyectos .project-title-dash { width: 20px; }
    #proyectos .project-summary > p { font-size: .9rem; line-height: 1.65; }
    .proj-deco { background-image: none; }
    .proj-deco::before, .proj-deco::after { content: ''; position: absolute; left: 0; right: 0; height: min(680px, 65%); background: url('../img/proyectos-fondo-rocas.webp') no-repeat; background-size: auto 680px; }
    .proj-deco::before { top: 0; background-position: left top; -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
    .proj-deco::after { bottom: 0; background-position: right bottom; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%); mask-image: linear-gradient(to bottom, transparent, #000 40%); }
}
@media (prefers-reduced-motion: reduce) {
    #proyectos .projects-dot > span, #proyectos .project-visit { transition: none; }
}

/* Entrada breve: trazo de marcador e imagen con profundidad (solo escritorio). */
#proyectos .projects-emphasis { position: relative; display: inline-block; width: fit-content; max-width: 100%; isolation: isolate; text-shadow: 0 2px 0 #781027; }
#proyectos .project-visual { transform-origin: 50% 82%; --project-entry-yaw: 0deg; }
#proyectos #project-codearg .project-visual { --project-entry-yaw: -5deg; }
#proyectos #project-donde-imprimo .project-visual { --project-entry-yaw: 5deg; }
#proyectos .project-visual.is-arriving { animation: project-device-arrive 420ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes project-device-arrive {
    from { opacity: .65; transform: perspective(1000px) translateY(22px) rotateX(7deg) rotateY(var(--project-entry-yaw)); }
    to { opacity: 1; transform: perspective(1000px) translateY(0) rotateX(0) rotateY(0); }
}
@media (min-width: 1025px) {
    #proyectos #project-ruana .project-visual.is-arriving { animation-delay: 45ms; }
    #proyectos #project-donde-imprimo .project-visual.is-arriving { animation-delay: 90ms; }
}
@media (max-width: 1024px) {
    #proyectos .project-visual.is-arriving { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
    #proyectos .project-visual.is-arriving { animation: none; }
}

/* Subrayado a mano: el trazo lo anima proyectos.js */
#proyectos .projects-underline { position: absolute; left: -2%; bottom: -.3em; width: 104%; height: .34em; overflow: visible; pointer-events: none; filter: drop-shadow(0 2px 0 #78102766) drop-shadow(0 0 8px #ff245f55); }
#proyectos .projects-underline path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
#proyectos .underline-main { stroke: url(#project-underline-grad); stroke-width: 7; }
#proyectos .underline-second { stroke: #ff5682; stroke-width: 3; opacity: .85; }
#proyectos .projects-emphasis::after { content: none !important; }
