@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

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

:root {
  --black: #0a0a0a;
  --white: #f5f5f0;
  --gray: #999;
  --font: 'Space Mono', monospace;
  --size-sm: 11px;
  --size-base: 13px;
  --size-title: clamp(2.5rem, 8vw, 5rem);
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  font-size: var(--size-base);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── HEADER ─── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px 10px;
  background: var(--white);
}

.site-title {
  font-family: var(--font);
  font-size: var(--size-base);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--black);
}

.header-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.header-nav a {
  font-family: var(--font);
  font-size: var(--size-sm);
  color: var(--black);
  text-decoration: underline;
  cursor: pointer;
}

/* ─── INDEX MAIN ─── */
.index-main {
  padding-top: 52px;
}

.hero-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #e0e0da;
}

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

.project-list-header {
  font-size: var(--size-base);
  font-weight: 700;
  padding: 20px 16px 4px;
}

.project-list {
  list-style: none;
  padding: 0 16px;
}

.project-list li {
  border: none;
}

.project-list li a {
  display: block;
  font-family: var(--font);
  font-size: var(--size-sm);
  color: var(--black);
  text-decoration: none;
  padding: 5px 0 5px 8px;
  letter-spacing: 0.01em;
}

.project-list li a::before {
  content: '_';
  margin-right: 2px;
  opacity: 0.4;
}

.project-list li a:hover {
  text-decoration: underline;
}

.en-proceso {
  padding: 24px 16px 40px;
}

.en-proceso-label {
  font-weight: 700;
  font-size: var(--size-sm);
  text-decoration: underline;
  margin-bottom: 4px;
}

.en-proceso a {
  font-size: var(--size-sm);
  color: var(--black);
  text-decoration: none;
}

.en-proceso a:hover {
  text-decoration: underline;
}

/* ─── PROJECT PAGE ─── */
.project-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  padding: 14px 16px 0;
}

.project-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  padding: 6px 0 8px;
}

.project-nav a {
  font-family: var(--font);
  font-size: var(--size-sm);
  color: var(--black);
  text-decoration: none;
}

.project-nav a:hover {
  text-decoration: underline;
}

.project-main {
  padding-top: 72px;
}

/* ─── SLIDER ─── */
.slider-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #e0e0da;
  aspect-ratio: 4/3;
}

.slider-track {
  display: flex;
  transition: transform 0.6s ease;
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
}

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

/* click zones */
.slider-zone {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  cursor: pointer;
  z-index: 10;
}

.slider-zone-left { left: 0; }
.slider-zone-right { right: 0; }

/* ─── PROJECT TITLE MARQUEE ─── */
.project-title-bar {
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 0;
  border-bottom: none;
}

.project-title-inner {
  display: inline-block;
  animation: marquee 12s linear infinite;
  font-size: var(--size-title);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── PROJECT CONTENT ─── */
.project-content {
  padding: 20px 16px 60px;
  max-width: 700px;
}

.project-content h2 {
  font-size: var(--size-base);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.project-content h3 {
  font-size: var(--size-base);
  font-weight: 700;
  margin: 16px 0 4px;
}

.project-content p {
  font-size: var(--size-base);
  line-height: 1.65;
  margin-bottom: 12px;
}

.project-content .meta {
  font-size: var(--size-sm);
  color: var(--gray);
  margin-bottom: 4px;
}

/* YouTube embed */
.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 16px 0;
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ─── MODAL ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 380px;
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-title {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: #e0e0da;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
}

.modal hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 10px 0;
}

.modal-input,
.modal-textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: var(--size-sm);
  color: var(--black);
  outline: none;
  resize: none;
}

.modal-input {
  padding: 4px 0;
}

.modal-textarea {
  min-height: 120px;
  padding: 4px 0;
}

.modal-input::placeholder,
.modal-textarea::placeholder {
  color: #bbb;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn-cancel, .btn-send {
  flex: 1;
  padding: 12px;
  border-radius: 30px;
  border: none;
  font-family: var(--font);
  font-size: var(--size-sm);
  cursor: pointer;
  font-weight: 700;
}

.btn-cancel {
  background: #e0e0da;
  color: var(--black);
}

.btn-send {
  background: var(--black);
  color: var(--white);
}

/* ─── LIGHTBOX ─── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 300;
  align-items: center;
  justify-content: center;
}

#lightbox.active {
  display: flex;
}

#lightbox-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

#lightbox-img {
  max-width: 100%;
  max-height: 100vh;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

#lightbox-zone-left,
#lightbox-zone-right {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  cursor: pointer;
  z-index: 10;
}

#lightbox-zone-left  { left: 0; cursor: w-resize; }
#lightbox-zone-right { right: 0; cursor: e-resize; }

/* ─── CV PAGE ─── */
.cv-main {
  padding: 72px 16px 60px;
  max-width: 700px;
}

.cv-main h2 {
  font-size: var(--size-base);
  font-weight: 700;
  margin: 24px 0 8px;
  letter-spacing: 0.05em;
}

.cv-main p, .cv-main li {
  font-size: var(--size-base);
  line-height: 1.65;
}

.cv-main ul {
  list-style: none;
  padding: 0;
}

.cv-main ul li {
  padding: 2px 0;
}

.cv-main ul li::before {
  content: '— ';
  opacity: 0.4;
}
