/* ═══════════════════════════════════════════════════════
   project.css — estilos compartidos para todas las
   páginas de proyecto de rudipm.com
   ═══════════════════════════════════════════════════════ */

/* ─── SCROLL PROGRESS ────────────────────────────────── */
@keyframes scroll-progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--black);
  transform-origin: left;
  animation: scroll-progress linear both;
  animation-timeline: scroll();
  z-index: 300;
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fff;
  color: #0d0d0d;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; object-fit: cover; }

/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --black:  #0d0d0d;
  --gray-d: #444;
  --gray:   #888;
  --gray-l: #bbb;
  --border: #e8e8e8;
  --nav-h:  62px;
}

/* ─── ANIMACIÓN ──────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.project-intro { animation: fadeUp 0.5s ease both; }
.project-hero  { animation: fadeUp 0.5s 0.1s ease both; }

/* ─── NAV ────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(255,255,255,0.58);
  backdrop-filter: blur(36px) saturate(220%) brightness(104%);
  -webkit-backdrop-filter: blur(36px) saturate(220%) brightness(104%);
  transition: box-shadow 0.3s, background 0.3s;
}
.nav.scrolled {
  background: rgba(255,255,255,0.72);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.55) inset,
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 1px 0 rgba(0,0,0,0.06),
    0 4px 24px rgba(0,0,0,0.05);
}
.nav-name, .nav-right { position: relative; z-index: 1; }
@keyframes glass-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.nav::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255,255,255,0.10) 42%,
    rgba(200,225,255,0.07) 50%,
    rgba(255,210,230,0.05) 58%,
    transparent 68%
  );
  background-size: 200% 100%;
  animation: glass-shimmer 16s ease-in-out infinite;
  pointer-events: none;
}

.nav-name {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-size: 13.5px;
  color: var(--gray);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--black); }

.btn-contact {
  font-size: 13px;
  border: 1px solid rgba(13,13,13,0.72);
  padding: 7px 20px;
  border-radius: 100px;
  background: rgba(255,255,255,0.42);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.55) inset,
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 2px 8px rgba(0,0,0,0.04);
  transition: background 0.22s, color 0.22s, box-shadow 0.22s, border-color 0.22s;
}
.btn-contact:hover {
  background: rgba(13,13,13,0.9);
  color: #fff;
  border-color: rgba(255,255,255,0.1);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.1) inset,
    0 4px 20px rgba(0,0,0,0.18);
}

/* ─── INTRO ──────────────────────────────────────────── */
.project-intro {
  padding: calc(var(--nav-h) + 64px) 40px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 1200px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--gray-d);
  margin-bottom: 24px;
  letter-spacing: 0.01em;
  padding: 5px 13px;
  border-radius: 100px;
  background: rgba(255,255,255,0.52);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.68);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.6) inset,
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 2px 8px rgba(0,0,0,0.05);
  transition: color 0.2s, gap 0.2s, background 0.2s, box-shadow 0.2s;
}
.back-link:hover {
  color: var(--black);
  gap: 9px;
  background: rgba(255,255,255,0.78);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.75) inset,
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 4px 16px rgba(0,0,0,0.07);
}

.project-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.intro-right { padding-top: 8px; }

.project-desc {
  font-size: 15px;
  color: var(--gray-d);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 36px;
}

.project-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.meta-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-l);
  display: block;
  margin-bottom: 4px;
}
.meta-value {
  font-size: 13px;
  color: var(--black);
}

/* ─── SECCIONES DE IMAGEN ────────────────────────────── */
.img-full { width: 100%; }

.img-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.img-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.img-grid-asym {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

/* Placeholder */
.placeholder {
  background: #f4f4f4;
  line-height: 0;
  overflow: hidden;
  border-radius: 12px;
}
.placeholder img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: initial;
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.placeholder:hover img { transform: scale(1.02); }

/* Separadores */
.gap    { height: 12px; background: #fff; }
.gap-lg { height: 64px; }

/* ─── CAPTION ────────────────────────────────────────── */
.caption-section {
  padding: 56px 40px;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 56px;
  border-top: 1px solid var(--border);
}
.caption-section h2 {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.caption-section p {
  font-size: 14.5px;
  color: var(--gray-d);
  line-height: 1.8;
}

/* ─── NAV PREV/NEXT ──────────────────────────────────── */
.project-nav {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.project-nav a {
  flex: 1;
  padding: 32px 40px;
  font-size: 13px;
  color: var(--gray);
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-nav a:hover { color: var(--black); background: #fafafa; }
.nav-prev { border-right: 1px solid var(--border); }
.nav-next { justify-content: flex-end; }
.nav-prev::before { content: '←'; font-size: 15px; }
.nav-next::after  { content: '→'; font-size: 15px; }

/* ─── FOOTER ─────────────────────────────────────────── */
footer {
  margin-top: 48px;
  padding: 0 34px;
  overflow: hidden;
}
.footer-year { user-select: none; }
.footer-year {
  font-size: clamp(100px, 21vw, 280px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.82;
  color: var(--black);
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 0 24px; }
  .project-intro { padding-left: 24px; padding-right: 24px; grid-template-columns: 1fr; gap: 28px; }
  .caption-section { padding: 40px 24px; grid-template-columns: 1fr; gap: 20px; }
  .project-nav a { padding: 28px 24px; }
  footer { padding: 0 24px; }
  .img-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 580px) {
  .nav { padding: 0 16px; }
  .project-intro { padding-left: 16px; padding-right: 16px; padding-top: calc(var(--nav-h) + 40px); }
  .caption-section { padding: 32px 16px; }
  .project-nav a { padding: 24px 16px; gap: 6px; }
  .img-grid-2  { grid-template-columns: 1fr; }
  .img-grid-3  { grid-template-columns: 1fr; }
  .img-grid-asym { grid-template-columns: 1fr; }
  footer { padding: 0 16px; }
}

/* ─── THEME TOGGLE ────────────────────────────────────── */
.theme-toggle {
  width: 30px; height: 30px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.42);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--gray);
  box-shadow: 0 0 0 0.5px rgba(255,255,255,0.55) inset, 0 1px 0 rgba(255,255,255,0.7) inset;
  transition: background 0.22s, color 0.22s, box-shadow 0.22s;
  font-family: inherit;
  flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,0.72); color: var(--black); }

/* ─── DARK MODE ───────────────────────────────────────── */
html[data-theme="dark"] {
  --black:     #eeeeee;
  --gray-d:    #c0c0c0;
  --gray-l:    #5c5c5c;
  --border:    #272727;
  --bg-subtle: #1c1c1c;
}
html[data-theme="dark"] body { background: #121212; color: #eeeeee; }
html[data-theme="dark"] body::before { background: #eeeeee; }
html[data-theme="dark"] .gap { background: #121212; }
html[data-theme="dark"] .placeholder { background: #1c1c1c; }

html[data-theme="dark"] .nav {
  background: rgba(18,18,18,0.70);
  backdrop-filter: blur(36px) saturate(160%) brightness(90%);
  -webkit-backdrop-filter: blur(36px) saturate(160%) brightness(90%);
}
html[data-theme="dark"] .nav.scrolled {
  background: rgba(18,18,18,0.86);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.07) inset,
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 1px 0 rgba(0,0,0,0.55),
    0 4px 24px rgba(0,0,0,0.4);
}
html[data-theme="dark"] .nav::after {
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.04) 42%, rgba(150,195,255,0.03) 50%, transparent 68%);
}
html[data-theme="dark"] .btn-contact {
  border-color: rgba(238,238,238,0.4);
  color: #eeeeee;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 0.5px rgba(255,255,255,0.07) inset;
}
html[data-theme="dark"] .btn-contact:hover {
  background: rgba(238,238,238,0.9);
  color: #121212;
  border-color: rgba(238,238,238,0.9);
}
html[data-theme="dark"] .back-link {
  color: #c0c0c0;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 0 0 0.5px rgba(255,255,255,0.05) inset;
}
html[data-theme="dark"] .back-link:hover { color: #eeeeee; background: rgba(255,255,255,0.10); }
html[data-theme="dark"] .project-nav a:hover { background: #1a1a1a; }
html[data-theme="dark"] .theme-toggle {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.11);
  color: rgba(238,238,238,0.55);
  box-shadow: 0 0 0 0.5px rgba(255,255,255,0.06) inset;
}
html[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,0.11); color: #eeeeee; }
