/* ============================================================
   Willians Joch — Creatividad · Tecnología · IA
   Estética: periódico / editorial · papel y tinta
   ============================================================ */

:root {
  --paper: #f5f1e8;
  --paper-2: #efeadf;
  --paper-3: #e9e3d6;
  --ink: #1a1815;
  --ink-soft: #4a463f;
  --dim: #6f6a60;
  --line: rgba(26, 24, 21, 0.16);
  --line-strong: rgba(26, 24, 21, 0.4);
  --red: #b3261e;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Newsreader", Georgia, serif;
  --font-mono: "Courier Prime", ui-monospace, monospace;
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.68;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.01em; font-weight: 600; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); margin: 1.1rem 0 1.2rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--ink); color: var(--paper); }

.accent { color: var(--red); font-style: italic; }
em { font-style: italic; color: var(--red); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-word { font-size: 1rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--ink-soft); }
.preloader-bar { width: 180px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.preloader-bar span { display: block; height: 100%; width: 0%; background: var(--ink); transition: width 0.3s ease; }

/* ---------- Cursor personalizado ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 999; pointer-events: none;
  border-radius: 50%; transform: translate(-50%, -50%);
}
.cursor-dot { width: 7px; height: 7px; background: var(--ink); }
.cursor-ring {
  width: 36px; height: 36px; border: 1.5px solid rgba(26, 24, 21, 0.45);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.cursor-ring.grow { width: 64px; height: 64px; border-color: var(--red); background: rgba(179, 38, 30, 0.06); }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Barra de progreso de lectura ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--red); z-index: 300;
}

/* ---------- Manchas de papel + grano ---------- */
.blobs { position: fixed; inset: 0; z-index: -2; overflow: hidden; filter: blur(80px); }
.blob { position: absolute; border-radius: 50%; }
.blob-a { width: 42vw; height: 42vw; background: #d8cdb4; opacity: 0.5; top: -10%; left: -10%; }
.blob-b { width: 36vw; height: 36vw; background: #cfc4ae; opacity: 0.4; bottom: -12%; right: -8%; }

.noise {
  position: fixed; inset: 0; z-index: 990; pointer-events: none; opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- Tira superior tipo cabecera de diario ---------- */
.masthead-strip {
  position: relative; z-index: 140;
  display: flex; justify-content: space-between; gap: 1rem;
  max-width: var(--maxw); margin: 0 auto; padding: 0.55rem 1.5rem;
  font-size: 0.68rem; letter-spacing: 0.16em; color: var(--dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.strip-center { color: var(--red); }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 150;
  background: rgba(245, 241, 232, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
  transition: box-shadow 0.3s ease;
}
.nav.scrolled { box-shadow: 0 8px 24px rgba(26, 24, 21, 0.08); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0.85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-logo { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.nav-logo em { color: var(--red); }
.logo-mark { color: var(--red); margin-right: 2px; display: inline-block; }
.nav-links { display: flex; gap: 1.7rem; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.nav-links a { position: relative; transition: color 0.2s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 2px; width: 0;
  background: var(--red); transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 0.8rem; }

/* ---------- Selector de idioma ---------- */
.lang { position: relative; }
.lang-btn {
  background: none; border: 1px solid var(--line-strong); border-radius: 3px;
  padding: 0.42rem 0.7rem; font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--ink); cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.lang-btn:hover { border-color: var(--red); color: var(--red); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 200;
  background: var(--paper); border: 1px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(26, 24, 21, 0.15);
  display: none; flex-direction: column; min-width: 175px;
}
.lang-menu.open { display: flex; }
.lang-menu button {
  background: none; border: none; text-align: left; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em;
  padding: 0.6rem 0.9rem; color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s, color 0.2s;
}
.lang-menu button:last-child { border-bottom: none; }
.lang-menu button:hover, .lang-menu button.active { background: var(--ink); color: var(--paper); }

/* ---------- Botones ---------- */
.btn-magnetic {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.85rem 1.7rem; border-radius: 3px; position: relative;
  transition: box-shadow 0.3s ease, color 0.3s ease, background 0.3s ease, transform 0.18s ease;
  will-change: transform;
}
.btn-magnetic span { display: inline-block; will-change: transform; }
.btn-solid { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-solid:hover { box-shadow: 5px 5px 0 rgba(179, 38, 30, 0.85); }
.btn-line { border: 1px solid var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); box-shadow: 5px 5px 0 rgba(26, 24, 21, 0.22); }
.nav-cta { padding: 0.5rem 1.1rem; font-size: 0.74rem; border: 1px solid var(--ink); border-radius: 3px; }
.nav-cta:hover { background: var(--red); border-color: var(--red); color: var(--paper); }
.btn-xl { padding: 1.1rem 2.2rem; font-size: clamp(0.85rem, 2.2vw, 1.05rem); }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - 110px); position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 5.5rem 1.5rem 4rem;
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { max-width: var(--maxw); margin: 0 auto; width: 100%; position: relative; z-index: 2; }
.hero-hello { color: var(--red); font-size: 0.82rem; letter-spacing: 0.18em; margin-bottom: 1.6rem; }
.hero-title {
  font-size: clamp(2.3rem, 7vw, 5.6rem); font-weight: 800; letter-spacing: -0.02em;
  display: flex; flex-direction: column; margin-bottom: 1.8rem;
  overflow-wrap: break-word;
}
.hero-title .line { overflow: hidden; display: block; }
.hero-title .word {
  display: inline-block; transform: translateY(110%);
  animation: riseUp 0.9s var(--ease) forwards;
}
.hero-title .line:nth-child(1) .word { animation-delay: 0.15s; }
.hero-title .line:nth-child(2) .word { animation-delay: 0.3s; }
.hero-title .line:nth-child(3) .word { animation-delay: 0.45s; }
@keyframes riseUp { to { transform: translateY(0); } }
.hero-sub { color: var(--ink-soft); font-size: clamp(1.05rem, 1.9vw, 1.3rem); max-width: 640px; margin-bottom: 2.4rem; }
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-sub-static { font-family: var(--font-display); font-style: italic; color: var(--ink); }
.swap-wrap { display: inline-block; }
.swap {
  display: inline-block; color: var(--red); font-style: italic; position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.swap.out { opacity: 0; transform: translateY(-10px); }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  color: var(--dim); font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem; z-index: 2;
}
.scroll-line { width: 1px; height: 40px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-line::after {
  content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: var(--red); animation: scrollDrop 1.8s ease-in-out infinite;
}
@keyframes scrollDrop { to { top: 110%; } }

/* ---------- Teletipo ---------- */
.marquee {
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  overflow: hidden; padding: 0.9rem 0; background: var(--paper-2);
  position: relative; z-index: 2;
}
.marquee-track {
  display: flex; white-space: nowrap; width: max-content;
  animation: marquee 30s linear infinite;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.22em; color: var(--ink-soft);
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding: 7rem 1.5rem; position: relative; }
.section-inner { max-width: var(--maxw); margin: 0 auto; position: relative; }
.sec-head {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 0.6rem;
  padding-bottom: 0.8rem; border-bottom: 2px solid var(--ink);
  position: relative;
}
.sec-head::after {
  content: ""; position: absolute; bottom: -5px; left: 0; right: 0;
  height: 1px; background: var(--ink);
}
.sec-num {
  font-size: 0.78rem; color: var(--paper); background: var(--ink);
  border-radius: 2px; padding: 0.2rem 0.5rem; font-weight: 700;
}
.sec-tag { font-size: 0.76rem; letter-spacing: 0.3em; color: var(--ink-soft); text-transform: uppercase; }

/* ---------- Historia ---------- */
.historia-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; margin-top: 2rem; }
.tilt-card { will-change: transform; transform-style: preserve-3d; }
.tilt-inner { transform-style: preserve-3d; position: relative; }
.photo-card {
  border: 1px solid var(--ink); background: #fff; padding: 10px 10px 0;
  box-shadow: 8px 8px 0 rgba(26, 24, 21, 0.12);
}
.photo-card img { filter: grayscale(1) contrast(1.08); transition: filter 0.5s ease; }
.photo-card:hover img { filter: grayscale(0.35) contrast(1.04); }
.photo-caption {
  font-size: 0.68rem; letter-spacing: 0.14em; color: var(--ink-soft);
  padding: 0.75rem 0.2rem; text-transform: uppercase;
}
.spin-badge {
  width: 108px; height: 108px; margin: 1.7rem auto 0; position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.35s var(--ease);
}
.spin-badge:hover { transform: scale(1.08) rotate(-4deg); }
.spin-badge-svg { width: 100%; height: 100%; animation: spinBadge 16s linear infinite; transform-origin: 50% 50%; }
.spin-badge:hover .spin-badge-svg { animation-play-state: paused; }
@keyframes spinBadge { to { transform: rotate(360deg); } }
.spin-badge-bg { fill: transparent; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 3 3; }
.spin-badge-text { font-family: var(--font-mono); font-size: 7.4px; letter-spacing: 1.5px; fill: var(--ink-soft); }
.spin-badge-core { position: absolute; color: var(--red); font-size: 1.1rem; animation: badgePulse 2.4s ease-in-out infinite; }
@keyframes badgePulse { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.15); } }

.prose p { color: var(--ink-soft); margin-bottom: 1.15rem; }
.drop-cap::first-letter {
  font-family: var(--font-display); font-weight: 800; font-size: 3.4em;
  float: left; line-height: 0.82; padding: 0.06em 0.12em 0 0; color: var(--ink);
}
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.4rem; }
.chips li {
  font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ink-soft); text-transform: uppercase;
  border: 1px solid var(--line-strong); border-radius: 2px; padding: 0.35rem 0.85rem;
  background: var(--paper-2);
}
.stats-row { display: flex; gap: 2.2rem; margin-top: 2.2rem; flex-wrap: wrap; }
.stat { flex: 1; min-width: 130px; border-top: 2px solid var(--ink); padding-top: 1rem; }
.stat-num { font-size: 2.2rem; font-weight: 700; color: var(--ink); }
.stat p { font-size: 0.82rem; color: var(--dim); margin-top: 0.2rem; font-family: var(--font-mono); }

/* ---------- Filosofía ---------- */
.section-filosofia { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filosofia-quote { font-size: clamp(1.9rem, 5vw, 3.3rem); margin-top: 1.6rem; font-weight: 700; }
.filosofia-sub { color: var(--dim); margin: 1rem 0 2.6rem; max-width: 560px; font-style: italic; }
.filo-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.spot-card {
  position: relative; overflow: hidden;
  background: var(--paper); border: 1px solid var(--ink);
  padding: 1.9rem 1.5rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
  will-change: transform;
}
.spot-card:hover { box-shadow: 6px 6px 0 rgba(26, 24, 21, 0.14); }
.spot-glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(179, 38, 30, 0.07), transparent 65%);
  transition: opacity 0.3s ease;
}
.spot-card:hover .spot-glow { opacity: 1; }
.filo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 1.1rem; border-radius: 50%;
  background: var(--paper-2); border: 1px solid var(--ink);
  color: var(--ink); transition: color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease);
}
.filo-icon svg { width: 22px; height: 22px; }
.spot-card:hover .filo-icon { transform: rotate(-6deg) scale(1.06); background: var(--ink); color: var(--paper); }
.spot-card h3 { font-size: 1.18rem; margin-bottom: 0.6rem; }
.spot-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- Universos ---------- */
.uni-list { margin-top: 2.4rem; border-top: 2px solid var(--ink); }
.uni-item { border-bottom: 1px solid var(--line-strong); padding: 0.4rem 0; position: relative; }
.uni-head { display: flex; align-items: center; gap: 1.6rem; padding: 1.5rem 0.4rem; cursor: pointer; }
.uni-idx { color: var(--red); font-size: 0.85rem; font-weight: 700; }
.uni-head h3 {
  font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 700; flex: 1;
  transition: transform 0.35s var(--ease), color 0.3s;
}
.uni-item:hover .uni-head h3 { transform: translateX(14px); font-style: italic; }
.uni-arrow { font-size: 1.5rem; color: var(--dim); transition: transform 0.35s var(--ease), color 0.3s; }
.uni-item.open .uni-arrow { transform: rotate(90deg); color: var(--red); }
.uni-body { max-height: 0; overflow: hidden; padding: 0 0.4rem; transition: max-height 0.55s var(--ease), padding 0.4s ease; }
.uni-item.open .uni-body { max-height: 360px; padding-bottom: 1.8rem; }
.uni-body p { color: var(--ink-soft); max-width: 680px; margin-bottom: 1rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-cloud span {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--ink-soft);
  border-radius: 2px; padding: 0.3rem 0.8rem; background: var(--paper);
  transition: color 0.25s, border-color 0.25s, transform 0.25s, background 0.25s;
}
.tag-cloud span:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }

/* ---------- Trayectoria ---------- */
.section-tray { background: var(--paper-2); border-top: 1px solid var(--line); }
.timeline { position: relative; margin-top: 3rem; padding-left: 2.4rem; }
.timeline-line { position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--line); overflow: hidden; }
.timeline-line span { display: block; width: 100%; height: 0%; background: var(--ink); }
.tl-item { position: relative; margin-bottom: 2rem; }
.tl-dot {
  position: absolute; left: -2.4rem; top: 2rem; width: 13px; height: 13px;
  margin-left: 2.5px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--ink);
}
.tl-card {
  background: var(--paper); border: 1px solid var(--ink);
  padding: 1.7rem 1.8rem;
  transition: box-shadow 0.3s ease;
  will-change: transform;
}
.tl-card:hover { box-shadow: 7px 7px 0 rgba(26, 24, 21, 0.13); }
.tl-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.tl-date { color: var(--red); font-size: 0.78rem; letter-spacing: 0.12em; font-weight: 700; }
.tl-place { color: var(--dim); font-size: 0.72rem; letter-spacing: 0.18em; }
.tl-card h3 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.tl-role { color: var(--ink-soft); font-size: 0.78rem; margin-bottom: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
.tl-card > p:last-child { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Formación ---------- */
.edu-strip { margin-top: 4.5rem; }
.edu-title {
  font-size: 0.78rem; letter-spacing: 0.3em; color: var(--ink-soft); margin-bottom: 1.4rem;
  text-transform: uppercase; padding-bottom: 0.7rem; border-bottom: 2px solid var(--ink);
}
.edu-featured {
  position: relative; overflow: hidden; margin-bottom: 1.3rem;
  border: 1px solid var(--ink); outline: 1px solid var(--ink); outline-offset: 3px;
  padding: 1.9rem 2rem; background: var(--paper);
  transition: box-shadow 0.3s ease;
}
.edu-featured:hover { box-shadow: 7px 7px 0 rgba(179, 38, 30, 0.18); }
.edu-featured-badge {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.2em;
  color: var(--paper); background: var(--red);
  border-radius: 2px; padding: 0.32rem 0.85rem; margin-bottom: 0.9rem; font-weight: 700;
}
.edu-featured-body h4 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.3rem; }
.edu-featured-meta { color: var(--red); font-size: 0.78rem; margin-bottom: 0.8rem; letter-spacing: 0.08em; }
.edu-featured-body p:not(.edu-featured-meta) { color: var(--ink-soft); max-width: 640px; font-size: 0.97rem; }
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.edu-chip {
  border: 1px solid var(--line-strong); padding: 1.1rem 1.2rem; background: var(--paper);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s ease;
}
.edu-chip:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: 5px 5px 0 rgba(26, 24, 21, 0.1); }
.edu-chip span { color: var(--red); font-size: 0.7rem; letter-spacing: 0.14em; font-weight: 700; }
.edu-chip p { font-size: 0.92rem; margin-top: 0.35rem; }

/* ---------- Portfolio ---------- */
.port-sub { color: var(--dim); font-style: italic; margin-bottom: 2.4rem; max-width: 560px; }
.port-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
.port-feature {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  border: 1px solid var(--ink); background: var(--paper-2);
  padding: 2.4rem 2.4rem;
  transition: box-shadow 0.3s ease, background 0.3s ease;
  will-change: transform;
}
.port-feature:hover { box-shadow: 9px 9px 0 rgba(26, 24, 21, 0.14); background: var(--paper); }
.port-kicker { font-size: 0.68rem; letter-spacing: 0.22em; color: var(--red); font-weight: 700; }
.port-feature h3 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin: 0.7rem 0 0.6rem; }
.port-feature p { color: var(--ink-soft); max-width: 560px; margin-bottom: 1.1rem; }
.port-cta {
  font-size: 0.8rem; letter-spacing: 0.1em; font-weight: 700;
  border-bottom: 2px solid var(--red); padding-bottom: 2px; color: var(--ink);
}
.port-feature:hover .port-cta { color: var(--red); }
.port-ig-icon {
  flex-shrink: 0; width: 110px; height: 110px; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line-strong); border-radius: 50%;
  transition: transform 0.4s var(--ease), color 0.3s, border-color 0.3s;
}
.port-ig-icon svg { width: 48px; height: 48px; }
.port-feature:hover .port-ig-icon { transform: rotate(8deg) scale(1.06); color: var(--red); border-color: var(--red); }
.port-item {
  border: 1px solid var(--line-strong); background: var(--paper); padding: 1.7rem 1.8rem;
  transition: box-shadow 0.3s ease, border-color 0.3s;
}
.port-item:hover { border-color: var(--ink); box-shadow: 6px 6px 0 rgba(26, 24, 21, 0.12); }
.port-item-kicker { font-size: 0.66rem; letter-spacing: 0.2em; color: var(--red); font-weight: 700; }
.port-item h3 { font-size: 1.3rem; margin: 0.5rem 0 0.4rem; }
.port-item p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0.9rem; }

.port-sec-title {
  font-size: 0.78rem; letter-spacing: 0.3em; color: var(--ink-soft); text-transform: uppercase;
  margin: 3.4rem 0 1.4rem; padding-bottom: 0.7rem; border-bottom: 2px solid var(--ink);
}
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.video-card { margin: 0; cursor: pointer; }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--ink); background: var(--ink);
  box-shadow: 6px 6px 0 rgba(26, 24, 21, 0.12);
  transition: box-shadow 0.3s ease;
}
.video-card:hover .video-frame { box-shadow: 8px 8px 0 rgba(179, 38, 30, 0.35); }
.video-frame img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.85) contrast(1.05);
  transition: filter 0.4s ease, transform 0.6s var(--ease);
}
.video-card:hover .video-frame img { filter: grayscale(0) contrast(1); transform: scale(1.04); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 62px; height: 62px; border-radius: 50%; z-index: 2;
  background: rgba(26, 24, 21, 0.82); border: 1.5px solid var(--paper);
  display: flex; align-items: center; justify-content: center;
  color: var(--paper); font-size: 1rem; pointer-events: none;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.video-card:hover .video-play { transform: translate(-50%, -50%) scale(1.12); background: var(--red); }
.video-card figcaption {
  font-size: 0.68rem; letter-spacing: 0.12em; color: var(--ink-soft);
  text-transform: uppercase; padding-top: 0.65rem;
}
.web-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.brand-strip { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.brand-chip {
  font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-soft);
  border: 1px solid var(--line-strong); border-radius: 2px; padding: 0.5rem 1rem;
  background: var(--paper); text-transform: uppercase;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
a.brand-chip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-3px); }
span.brand-chip { border-style: dashed; }
.port-yt {
  margin-top: 3.2rem; display: flex; align-items: center; gap: 1.8rem;
  border: 1px solid var(--ink); background: var(--paper-2); padding: 1.8rem 2rem;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.port-yt:hover { box-shadow: 8px 8px 0 rgba(26, 24, 21, 0.13); background: var(--paper); }
.port-yt-icon {
  flex-shrink: 0; width: 84px; height: 84px; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line-strong); border-radius: 50%;
  transition: transform 0.4s var(--ease), color 0.3s, border-color 0.3s;
}
.port-yt-icon svg { width: 38px; height: 38px; }
.port-yt:hover .port-yt-icon { transform: rotate(-6deg) scale(1.06); color: var(--red); border-color: var(--red); }
.port-yt h3 { font-size: 1.4rem; margin: 0.5rem 0 0.35rem; }
.port-yt p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0.8rem; }

/* ---------- Visión (banda de tinta invertida) ---------- */
.section-vision { background: var(--ink); color: var(--paper); }
.sec-head-invert { border-bottom-color: var(--paper); }
.sec-head-invert::after { background: var(--paper); }
.sec-head-invert .sec-num { background: var(--paper); color: var(--ink); }
.sec-head-invert .sec-tag { color: rgba(245, 241, 232, 0.7); }
.vision-title { font-size: clamp(1.9rem, 4.6vw, 3.3rem); margin-top: 1.6rem; font-weight: 700; }
.vision-title em { color: #e8b7b3; }
.vision-text { color: rgba(245, 241, 232, 0.75); max-width: 640px; margin-top: 1.4rem; font-size: 1.05rem; }
.vision-orbits { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.8rem; }
.orbit-word {
  font-size: 0.74rem; letter-spacing: 0.24em; color: var(--paper);
  border: 1px solid rgba(245, 241, 232, 0.4); border-radius: 2px; padding: 0.55rem 1.2rem;
  animation: floatWord 5s ease-in-out infinite;
}
.orbit-word:nth-child(2n) { animation-delay: 1.2s; }
.orbit-word:nth-child(3n) { animation-delay: 2.1s; border-color: rgba(232, 183, 179, 0.55); }
@keyframes floatWord { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- Contacto ---------- */
.section-contact { text-align: center; padding-top: 8.5rem; padding-bottom: 8rem; }
.contact-eyebrow { color: var(--red); font-size: 0.78rem; letter-spacing: 0.3em; }
.contact-title { font-size: clamp(2rem, 5.4vw, 3.6rem); margin-top: 1.2rem; }
.contact-sub { color: var(--dim); max-width: 520px; margin: 0 auto 2.6rem; font-style: italic; }
.contact-actions { display: flex; justify-content: center; margin-bottom: 2.2rem; }
.contact-links {
  display: flex; justify-content: center; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  color: var(--ink-soft); font-size: 0.95rem;
}
.contact-links a { transition: color 0.25s; }
.contact-links a:hover { color: var(--red); }
.contact-links span[aria-hidden] { color: var(--red); }
.social-sep { width: 1px; height: 18px; background: var(--line-strong); }
.social-row { display: flex; align-items: center; gap: 0.6rem; }
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--ink-soft);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}
.social-icon svg { width: 17px; height: 17px; }
.social-icon:hover { transform: translateY(-3px); background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Footer ---------- */
.footer { border-top: 2px solid var(--ink); padding: 2.4rem 1.5rem; position: relative; }
.footer::before {
  content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 1px; background: var(--ink);
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.footer .mono { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--ink-soft); }
.footer-note { font-size: 0.88rem; color: var(--dim); font-style: italic; }

/* ---------- Animaciones de scroll ---------- */
.reveal, .reveal-left {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.reveal-left { transform: translateX(-36px); }
.reveal.visible, .reveal-left.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal-left { opacity: 1; transform: none; }
  .hero-title .word { transform: none; }
  .preloader { display: none; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .historia-grid { grid-template-columns: 1fr; gap: 2.6rem; }
  .historia-media { max-width: 430px; }
  .filo-cards { grid-template-columns: 1fr 1fr; }
  .edu-grid { grid-template-columns: 1fr 1fr; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .web-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .masthead-strip .strip-center { display: none; }
}
@media (max-width: 640px) {
  .filo-cards { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .web-grid { grid-template-columns: 1fr; }
  .section { padding: 4.8rem 1.25rem; }
  .timeline { padding-left: 1.8rem; }
  .tl-dot { left: -1.8rem; }
  .uni-head { gap: 0.9rem; }
  .hero-cta .btn-magnetic { width: 100%; }
  .btn-xl span { font-size: 0.78rem; }
  .port-feature { flex-direction: column; align-items: flex-start; padding: 1.8rem 1.5rem; }
  .port-ig-icon { width: 80px; height: 80px; }
  .port-ig-icon svg { width: 34px; height: 34px; }
  .port-yt { flex-direction: column; align-items: flex-start; padding: 1.6rem 1.4rem; }
  .masthead-strip { justify-content: center; }
  .masthead-strip span:first-child { display: none; }
}
