@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&family=IBM+Plex+Mono:wght@200;300;400;500&display=swap');

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

:root {
  --bg: #f6f5f2;
  --bg-card: #edecea;
  --text-dark: #2a2a2a;
  --text-mid: #5a5a5a;
  --text-light: #8a8a8a;
  --accent: #b8a089;
  --border: #ddd9d3;
  --margin-left: 120px;
  --color-spotify: #1DB954;
  --color-1906: #8B3A3A;
  --color-milanuncios: #2EBB6E;
  --color-adidas: #0066CC;
  --color-philips: #0047BB;
}

html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--border) transparent; cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 16 16" shape-rendering="crispEdges"><rect x="0" y="0" width="2" height="2" fill="%230033ff"/><rect x="0" y="2" width="2" height="2" fill="%230033ff"/><rect x="0" y="4" width="2" height="2" fill="%230033ff"/><rect x="0" y="6" width="2" height="2" fill="%230033ff"/><rect x="0" y="8" width="2" height="2" fill="%230033ff"/><rect x="0" y="10" width="2" height="2" fill="%230033ff"/><rect x="0" y="12" width="2" height="2" fill="%230033ff"/><rect x="2" y="2" width="2" height="2" fill="%230033ff"/><rect x="2" y="4" width="2" height="2" fill="%230033ff"/><rect x="2" y="6" width="2" height="2" fill="%230033ff"/><rect x="2" y="8" width="2" height="2" fill="%230033ff"/><rect x="2" y="10" width="2" height="2" fill="%230033ff"/><rect x="4" y="4" width="2" height="2" fill="%230033ff"/><rect x="4" y="6" width="2" height="2" fill="%230033ff"/><rect x="4" y="8" width="2" height="2" fill="%230033ff"/><rect x="6" y="6" width="2" height="2" fill="%230033ff"/><rect x="6" y="8" width="2" height="2" fill="%230033ff"/><rect x="8" y="8" width="2" height="2" fill="%230033ff"/><rect x="4" y="10" width="2" height="2" fill="%230033ff"/><rect x="6" y="10" width="2" height="2" fill="%230033ff"/><rect x="6" y="12" width="2" height="2" fill="%230033ff"/><rect x="8" y="12" width="2" height="2" fill="%230033ff"/><rect x="8" y="14" width="2" height="2" fill="%230033ff"/><rect x="10" y="14" width="2" height="2" fill="%230033ff"/><rect x="1" y="1" width="1" height="12" fill="white" opacity="0.3"/></svg>') 0 0, none; }

* { cursor: inherit; }

@keyframes cursorColorShift {
  0% { filter: hue-rotate(0deg); }
  25% { filter: hue-rotate(90deg); }
  50% { filter: hue-rotate(180deg); }
  75% { filter: hue-rotate(270deg); }
  100% { filter: hue-rotate(360deg); }
}

a:hover, button:hover, .scroll-card.image-card:hover, .scroll-card.wide-image-card:hover, .scroll-card.video-card:hover, .modal-close:hover, .modal-nav:hover, [data-media-type]:not(.text-card):hover {
  animation: cursorColorShift 4s linear infinite;
}

/* Cursor mano amarilla 8-bit para elementos clickables */
a, button, .scroll-card.image-card, .scroll-card.wide-image-card, .scroll-card.video-card, .modal-close, .modal-nav, [data-media-type]:not(.text-card) {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 16 16" shape-rendering="crispEdges"><rect x="4" y="0" width="2" height="2" fill="%23ffdd00"/><rect x="4" y="2" width="2" height="2" fill="%23ffdd00"/><rect x="4" y="4" width="2" height="2" fill="%23ffdd00"/><rect x="4" y="6" width="2" height="2" fill="%23ffdd00"/><rect x="7" y="2" width="2" height="2" fill="%23ffdd00"/><rect x="7" y="4" width="2" height="2" fill="%23ffdd00"/><rect x="7" y="6" width="2" height="2" fill="%23ffdd00"/><rect x="10" y="4" width="2" height="2" fill="%23ffdd00"/><rect x="10" y="6" width="2" height="2" fill="%23ffdd00"/><rect x="13" y="6" width="2" height="2" fill="%23ffdd00"/><rect x="2" y="8" width="12" height="2" fill="%23ffdd00"/><rect x="2" y="10" width="12" height="2" fill="%23ffdd00"/><rect x="2" y="12" width="12" height="2" fill="%23ffdd00"/><rect x="2" y="14" width="12" height="2" fill="%23ffdd00"/><rect x="0" y="8" width="2" height="8" fill="%23ffdd00"/><rect x="14" y="8" width="2" height="6" fill="%23ffdd00"/></svg>') 6 0, none !important;
  position: relative;
}

body {
  font-family: 'IBM Plex Mono', monospace;
  background-color: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: white; }

nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 28px var(--margin-left);
  display: flex; justify-content: space-between; align-items: center;
  mix-blend-mode: difference;
}
nav .logo { font-size: 13px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: white; }
nav .nav-links { display: flex; gap: 32px; list-style: none; }
nav .nav-links a { font-size: 11px; font-weight: 300; letter-spacing: 0.12em; text-transform: uppercase; color: white; text-decoration: none; transition: opacity 0.3s; }
nav .nav-links a:hover { opacity: 0.5; }

.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--margin-left); position: relative;
}
.hero-greeting {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(80px, 15vw, 240px); font-weight: 300; color: var(--text-dark);
  line-height: 0.9; letter-spacing: -0.04em; margin-bottom: clamp(36px, 8vw, 120px);
  opacity: 0; transform: translateY(40px);
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}
.hero-description {
  max-width: 500px; font-size: 14px; font-weight: 300; color: var(--text-mid); line-height: 1.8;
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}
.hero-description strong { font-weight: 300; color: var(--text-mid); }
.hero-meta {
  position: absolute; bottom: 48px; right: 60px; text-align: right;
  opacity: 0; animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}
.hero-meta span { display: block; font-size: 10px; font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-light); line-height: 2.2; }
.scroll-hint {
  position: absolute; bottom: 48px; left: var(--margin-left);
  display: flex; align-items: center; gap: 12px;
  opacity: 0; animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}
.scroll-hint span { font-size: 10px; font-weight: 300; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-light); }
.scroll-line { width: 48px; height: 1px; background: var(--border); position: relative; overflow: hidden; }
.scroll-line::after { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: var(--text-light); animation: scrollAnim 2.5s ease-in-out infinite; }
@keyframes scrollAnim { 0% { transform: translateX(-100%); } 50% { transform: translateX(0); } 100% { transform: translateX(100%); } }

.projects-section { padding: 0 0 120px; }

.project {
  margin-bottom: 180px; opacity: 0; transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.project.visible { opacity: 1; transform: translateY(0); }

.project-header {
  padding: 0 60px 0 var(--margin-left); margin-bottom: 40px;
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px;
}
.project-number { font-size: 10px; font-weight: 300; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-light); margin-bottom: 10px; }
.project-title {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(36px, 6vw, 72px); font-weight: 300; color: var(--text-dark);
  line-height: 1.05; letter-spacing: -0.03em;
}
.project-client {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-light);
  letter-spacing: 0.04em;
  margin-top: 4px;
  text-transform: uppercase;
}
.project-client::before {
  content: 'para ';
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text-dark);
  margin-right: 2px;
}
.project-client.spotify { color: var(--color-spotify); }
.project-client.color-1906 { color: var(--color-1906); }
.project-client.milanuncios { color: var(--color-milanuncios); }
.project-client.adidas-spotify { color: var(--text-light); }
.project-client.philips { color: var(--color-philips); }
.project-client.adidas-spotify .adidas { color: var(--color-adidas); }
.project-client.adidas-spotify .spotify { color: var(--color-spotify); }

.project-meta-info { display: flex; gap: 36px; align-items: flex-end; padding-bottom: 8px; }
.project-meta-item { text-align: right; }
.project-meta-item .label { font-size: 9px; font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-light); margin-bottom: 2px; }
.project-meta-item .value { font-size: 13px; font-weight: 300; color: var(--text-mid); }

.project-scroll {
  display: flex; gap: 20px; overflow-x: auto; overflow-y: hidden;
  padding: 0 60px 28px 0;
  scroll-padding-left: var(--margin-left);
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; cursor: grab;
}
/* Primer elemento con margen izquierdo */
.project-scroll > *:first-child {
  margin-left: var(--margin-left);
}
.project-scroll:active { cursor: grabbing; }
.project-scroll::-webkit-scrollbar { height: 1px; }
.project-scroll::-webkit-scrollbar-track { background: transparent; }
.project-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.scroll-card { flex-shrink: 0; scroll-snap-align: start; overflow: hidden; position: relative; user-select: none; }

.scroll-card.image-card, .scroll-card.wide-image-card { cursor: pointer; }
.scroll-card.text-card { cursor: default !important; }

.scroll-card.image-card { width: clamp(360px, 40vw, 540px); height: clamp(360px, 40vw, 540px); background: var(--bg-card); }
.scroll-card.image-card .placeholder-img {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 300; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-light);
  position: relative; overflow: hidden;
}
.placeholder-img .img-pattern { position: absolute; inset: 0; opacity: 0.05; }

.scroll-card.image-card img,
.scroll-card.wide-image-card img,
.scroll-card.wide-image-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scroll-card.wide-image-card video { pointer-events: none; }

.scroll-card.text-card {
  width: clamp(280px, 26vw, 360px); height: clamp(360px, 40vw, 540px);
  background: var(--bg-card); padding: 48px 36px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.text-card-content h3 { font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dark); line-height: 1.65; margin-bottom: 18px; }
.text-card-content p { font-size: 12px; font-weight: 200; color: var(--text-mid); line-height: 1.8; }
.text-card-footer { display: none; flex-wrap: wrap; }
.tag { font-size: 9px; font-weight: 300; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-light); padding: 6px 14px; border: 1px solid var(--border); border-radius: 100px; }

.scroll-card.wide-image-card { width: clamp(540px, 60vw, 860px); height: clamp(360px, 40vw, 540px); background: var(--bg-card); }

.scroll-card.video-card { width: clamp(640px, 71.1vw, 960px); height: clamp(360px, 40vw, 540px); background: #000; cursor: pointer; }
.scroll-card.video-card video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

.scroll-card.portrait-image-card { width: clamp(260px, 28vw, 390px); height: clamp(360px, 40vw, 540px); background: var(--bg-card); cursor: pointer; }
.scroll-card.portrait-image-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scroll-card.wide-image-card .placeholder-img {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 300; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-light);
}

.scroll-controls {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 16px 60px 0 0;
}
.scroll-btn {
  width: 32px; height: 32px; border: 1px solid var(--border); background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, opacity 0.2s;
  padding: 0; flex-shrink: 0;
}
.scroll-btn:hover { border-color: var(--text-dark); }
.scroll-btn:disabled { opacity: 0.2; }
.scroll-btn svg { width: 12px; height: 12px; }

.project-divider { width: calc(100% - var(--margin-left) - 60px); margin: 0 60px 180px var(--margin-left); height: 1px; background: var(--border); }

.footer {
  padding: 100px 60px 80px var(--margin-left); border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.footer-left h2 { font-family: 'Inter', -apple-system, sans-serif; font-size: clamp(36px, 6vw, 72px); font-weight: 300; color: var(--text-dark); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 24px; }
.footer-left p { max-width: 400px; font-size: 14px; font-weight: 200; color: var(--text-mid); line-height: 1.9; }
.footer-right { text-align: right; }
.footer-right span { display: block; font-size: 13px; font-weight: 300; color: var(--text-mid); margin-bottom: 12px; cursor: pointer; transition: color 0.3s; }
.footer-right span:hover { color: var(--text-dark); }
.footer-right a { text-decoration: none; color: inherit; }
.email-link { margin-bottom: 20px; }

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

@media (max-width: 768px) {
  .footer { flex-direction: column; gap: 60px; }
  .footer-right { text-align: left; }
}

@media (max-width: 600px) {
  :root { --margin-left: 28px; }
  body { overflow-x: hidden; }
  nav { padding: 20px 28px; flex-direction: column; gap: 16px; align-items: flex-start; }
  nav .nav-links { display: flex; gap: 20px; }
  nav .nav-links a { font-size: 10px; }
  .hero { padding: 0 28px; }
  .hero-greeting { font-size: clamp(48px, 15vw, 80px) !important; word-wrap: break-word; }
  .hero-description { font-size: 13px; max-width: 100%; }
  .hero-meta { display: none; }
  .scroll-hint { bottom: 28px; left: 28px; }
  .scroll-hint span { font-size: 9px; max-width: 200px; }
  .project-scroll { padding: 0 28px 16px 0; gap: 14px; }
  .project-header { padding: 0 28px; flex-direction: column; align-items: flex-start; margin-bottom: 32px; }
  .project-number { font-size: 9px; margin-bottom: 8px; }
  .project-title {
    font-size: clamp(32px, 9vw, 42px) !important;
    line-height: 1.1 !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
  }
  .project-client {
    font-size: 10px;
    margin-top: 8px;
    word-wrap: break-word;
    max-width: 100%;
  }
  .project-client.adidas-spotify {
    display: block;
  }
  .project-meta-info { margin-top: 16px; flex-direction: column; gap: 8px; align-items: flex-start; padding-bottom: 0; width: 100%; }
  .project-meta-item {
    text-align: left;
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
    max-width: 100%;
  }
  .project-meta-item .label { margin-bottom: 0; font-size: 8px; }
  .project-meta-item .value {
    font-size: 11px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .scroll-card.text-card {
    padding: 36px 28px;
    width: clamp(280px, 85vw, 340px) !important;
    height: clamp(280px, 85vw, 340px) !important;
  }
  .text-card-content h3 {
    font-size: 12px;
    margin-bottom: 14px;
    word-wrap: break-word;
  }
  .text-card-content p {
    font-size: 10px;
    line-height: 1.65;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
  }
  .scroll-card.image-card {
    width: clamp(280px, 85vw, 340px) !important;
    height: clamp(280px, 85vw, 340px) !important;
  }
  .scroll-card.wide-image-card {
    width: clamp(320px, 90vw, 480px) !important;
    height: clamp(240px, 67.5vw, 360px) !important;
  }
  .scroll-card.portrait-image-card {
    width: clamp(200px, 55vw, 260px) !important;
    height: clamp(280px, 85vw, 340px) !important;
  }
  .scroll-card.video-card {
    width: clamp(320px, 90vw, 480px) !important;
    height: clamp(180px, 50.6vw, 270px) !important;
  }
  .project-divider { width: calc(100% - 56px); margin-left: 28px; margin-right: 28px; }
  .footer { padding: 60px 28px; }
  .footer-left h2 { font-size: clamp(36px, 10vw, 52px) !important; word-wrap: break-word; }
  .footer-left p { font-size: 13px; }
  .project { margin-bottom: 120px; }
  .project-divider { margin-bottom: 120px; }
}

.media-modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.95); align-items: center; justify-content: center; animation: fadeIn 0.3s ease; }
.media-modal.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content { position: relative; max-width: 90vw; max-height: 90vh; animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-content img, .modal-content video { width: 100%; height: auto; max-height: 90vh; object-fit: contain; display: block; }
.modal-close { position: absolute; top: -50px; right: 0; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; user-select: none; transition: opacity 0.3s ease; }
.modal-close:hover { opacity: 0.7; }
.modal-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 40px; cursor: pointer; user-select: none; transition: opacity 0.3s ease; padding: 20px; }
.modal-nav:hover { opacity: 0.7; }
.modal-prev { left: 20px; }
.modal-next { right: 20px; }
.modal-caption { color: white; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 300; letter-spacing: 0.06em; margin-top: 16px; text-align: left; }

#cursor-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  background: white;
  color: black;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  transform: translate(20px, 20px);
}
#cursor-tooltip.visible { opacity: 1; }
