/* =============================================================
   RAÚL RUIZ MORATALLA — Portfolio
   styles.css v20260601
   Archetype: Technical Editorial / Cyber-Minimalism
   ============================================================= */

/* =============================================================
   1. TOKENS (Custom Properties)
   ============================================================= */
:root {
  /* Palette */
  --bg:           #0D0F12;
  --bg-2:         #111418;
  --bg-3:         #1E222B;
  --bg-4:         #252A34;
  --accent:       #00FF66;
  --accent-dim:   rgba(0, 255, 102, 0.12);
  --accent-glow:  rgba(0, 255, 102, 0.4);
  --cyan:         #00E5FF;
  --cyan-dim:     rgba(0, 229, 255, 0.1);
  --text:         #F0F2F5;
  --text-soft:    #A8B0BC;
  --text-muted:   #5A6270;
  --line:         rgba(240, 242, 245, 0.08);
  --line-accent:  rgba(0, 255, 102, 0.25);

  /* Typography */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'Manrope', system-ui, sans-serif;
  --font-mono:    'Space Mono', 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --gutter:       clamp(1.25rem, 4vw, 2.5rem);
  --container:    min(1200px, 100% - var(--gutter) * 2);

  /* Nav height */
  --nav-h:        68px;

  /* Easings */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:    cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Transitions */
  --t-fast:       0.18s;
  --t-base:       0.35s;
  --t-slow:       0.65s;
}

/* =============================================================
   2. RESET & BASE
   ============================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  background: var(--bg);
  overscroll-behavior-y: none;
  cursor: none; /* replaced by custom cursor on hover:hover */
}

@media (hover: none) {
  body { cursor: auto; }
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-wrap: balance;
  line-height: 1.0;
  letter-spacing: -0.02em;
}

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

:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* =============================================================
   3. UTILITIES
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .5rem 1rem; background: var(--accent); color: var(--bg);
  z-index: 9999; border-radius: 4px; font-weight: 600; font-size: .85rem;
  font-family: var(--font-mono);
  transition: top var(--t-fast);
}
.skip-link:focus { top: 1rem; }

.container {
  width: var(--container);
  margin-inline: auto;
}

.br-desktop { display: none; }
.br-mobile  { display: block; }
@media (min-width: 960px) {
  .br-desktop { display: block; }
  .br-mobile  { display: none; }
}

/* Accent text (green) */
.accent-text {
  color: var(--accent);
  font-style: italic;
}

/* =============================================================
   4. CUSTOM CURSOR (hover:hover devices only)
   ============================================================= */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0;
  transition: opacity var(--t-fast);
  mix-blend-mode: normal;
}
.cursor.is-ready { opacity: 1; }

.cursor-ring {
  position: absolute;
  top: -18px; left: -18px;
  width: 36px; height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  transition: transform var(--t-base) var(--ease-out),
              width var(--t-base) var(--ease-out),
              height var(--t-base) var(--ease-out),
              top var(--t-base) var(--ease-out),
              left var(--t-base) var(--ease-out),
              border-color var(--t-fast);
}

.cursor-dot {
  position: absolute;
  top: -3px; left: -3px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.cursor-label {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--t-fast);
}

.cursor.has-label .cursor-label { opacity: 1; }
.cursor.is-hovering .cursor-ring {
  width: 56px; height: 56px;
  top: -28px; left: -28px;
  border-color: var(--cyan);
}

@media (hover: none) {
  .cursor { display: none; }
}

/* =============================================================
   5. SPLASH — BOOTING SEQUENCE
   ============================================================= */
.splash {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;

  /* CSS safety: hide automatically at 4.5s even if JS fails */
  animation: splashSafety 0.01s 4.5s forwards;
}

@keyframes splashSafety {
  to {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
}

.splash.is-out {
  animation: splashFadeOut 0.6s var(--ease-out) forwards;
}

@keyframes splashFadeOut {
  to { opacity: 0; pointer-events: none; visibility: hidden; }
}

.splash-inner {
  position: relative;
  z-index: 2;
  width: clamp(320px, 80vw, 640px);
  padding: 2rem;
}

.splash-pre {
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.2vw, 11px);
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.splash-line {
  opacity: 0;
  transform: translateX(-8px);
  animation: splashLineIn 0.35s var(--ease-out) forwards;
}
.splash-line[data-delay="0"] { animation-delay: 0.2s; }
.splash-line[data-delay="1"] { animation-delay: 0.6s; }
.splash-line[data-delay="2"] { animation-delay: 1.0s; }
.splash-line[data-delay="3"] { animation-delay: 1.5s; }

.splash-line.accent { color: var(--accent); }

@keyframes splashLineIn {
  to { opacity: 1; transform: translateX(0); }
}

.splash-id {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.splash-name {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: splashNameIn 0.5s var(--ease-out) 1.8s forwards;
}

@keyframes splashNameIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.splash-ver {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  opacity: 0;
  animation: splashNameIn 0.4s var(--ease-out) 2.0s forwards;
}

.splash-bar-wrap {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin-bottom: 0.75rem;
  overflow: hidden;
  opacity: 0;
  animation: splashBarWrapIn 0.3s ease 2.1s forwards;
}

@keyframes splashBarWrapIn {
  to { opacity: 1; }
}

.splash-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: splashBarFill 1.4s var(--ease-soft) 2.2s forwards;
}

@keyframes splashBarFill {
  to { width: 100%; }
}

.splash-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  opacity: 0;
  animation: splashNameIn 0.3s ease 2.1s forwards;
}

/* Grid background on splash */
.splash-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  z-index: 1;
}

/* =============================================================
   6. NAV
   ============================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--t-slow), border-color var(--t-slow);
}

.nav.is-scrolled {
  background: rgba(13, 15, 18, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--line);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text);
}

.nav-logo-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 6px var(--accent-glow); }
  50% { box-shadow: 0 0 14px var(--accent), 0 0 28px var(--accent-glow); }
}

.nav-links {
  display: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--t-fast);
}

.nav-link::before {
  content: attr(data-section) " //";
  font-size: 9px;
  color: var(--accent);
  margin-right: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--t-base) var(--ease-out);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line-accent);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.nav-cta:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.nav-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--t-base), opacity var(--t-fast), background var(--t-fast);
}

.nav-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--accent); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--accent); }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-burger { display: none; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(13, 15, 18, 0.98);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}

.mobile-link {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 4vw, 1.4rem);
  color: var(--text-soft);
  letter-spacing: 0.1em;
  transition: color var(--t-fast);
  padding: 0.5rem 2rem;
}

.mobile-link:hover { color: var(--accent); }

/* =============================================================
   7. REVEALS (CSS-first, JS enhances)
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* MANDATORY defensive rule: data-split elements never go invisible */
.reveal[data-split] {
  opacity: 1;
  transform: none;
}

/* Staggered delays for sibling reveals */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

/* =============================================================
   8. HERO
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

/* Gridlines background */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,102,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,102,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: 0;
}

/* Mouse-reactive gradient */
.hero-gradient {
  position: absolute;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(circle 700px at var(--mx, 30%) var(--my, 60%),
      rgba(0, 255, 102, 0.08) 0%, transparent 60%),
    radial-gradient(circle 500px at calc(var(--mx, 30%) + 20%) calc(var(--my, 60%) - 20%),
      rgba(0, 229, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

/* Scanlines */
.hero-scanline {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(4rem, 10vh, 8rem);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.1vw, 11px);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: heroFadeIn 0.6s var(--ease-out) 0.4s forwards;
}

.hero-meta-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: dotPulse 2s ease-in-out infinite;
}

.hero-meta-sep { color: var(--line); }

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.3vw, 12px);
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0;
  animation: heroFadeIn 0.6s var(--ease-out) 0.6s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--text);
  max-width: 12ch;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: heroFadeIn 0.8s var(--ease-out) 0.8s forwards;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 300;
  color: var(--text-soft);
  max-width: 52ch;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: heroFadeIn 0.7s var(--ease-out) 1.0s forwards;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  opacity: 0;
  animation: heroFadeIn 0.6s var(--ease-out) 1.15s forwards;
}

/* Stats row */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  animation: heroFadeIn 0.6s var(--ease-out) 1.3s forwards;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat-val {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hero-stat-sep {
  font-family: var(--font-mono);
  color: var(--line);
  font-size: 1.2rem;
  align-self: center;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  opacity: 0;
  animation: heroFadeIn 0.6s ease 1.8s forwards;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLineDrop 1.5s ease-in-out infinite;
}

@keyframes scrollLineDrop {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.scroll-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* =============================================================
   9. BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  border-radius: 3px;
  border: 1px solid transparent;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 700;
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-icon {
  font-size: 14px;
}

.btn-arrow {
  transition: transform var(--t-base) var(--ease-out);
}

.btn-ghost:hover .btn-arrow {
  transform: translateY(3px);
}

/* =============================================================
   10. MARQUEE
   ============================================================= */
.marquee-section {
  position: relative;
  overflow: hidden;
  padding-block: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.marquee-track {
  display: flex;
  width: max-content;
}

.marquee-inner {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: marqueeScroll 30s linear infinite;
}

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

.marquee-item {
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.2vw, 12px);
  letter-spacing: 0.15em;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.marquee-item:hover { color: var(--accent); }

.marquee-sep {
  color: var(--accent);
  font-size: 8px;
  padding-inline: 0.25rem;
}

/* =============================================================
   11. SECTIONS (common)
   ============================================================= */
.section {
  padding-block: clamp(5rem, 12vh, 9rem);
  position: relative;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 700;
  color: var(--line);
  line-height: 0.8;
  user-select: none;
  transition: color var(--t-slow);
  display: block;
  position: relative;
  top: 0.15em;
}

.section:hover .section-num { color: var(--accent-dim); }

.section-label {
  font-family: var(--font-mono);
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* =============================================================
   12. ABOUT
   ============================================================= */
.about {
  background: var(--bg);
}

.about-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .about-grid {
    grid-template-columns: 1fr 320px;
    gap: 4rem;
    align-items: start;
  }
}

.about-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.about-p {
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  color: var(--text-soft);
  max-width: 60ch;
  margin-bottom: 1rem;
  line-height: 1.75;
}

.about-highlights {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-highlights li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.hi-icon {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Meta card */
.about-meta-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.meta-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.meta-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.meta-card-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.meta-card-dot.online {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: dotPulse 2.5s ease-in-out infinite;
}

.meta-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.meta-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.meta-row:last-child { border-bottom: none; }

.meta-key {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
  min-width: 100px;
}

.meta-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-soft);
  text-align: right;
}

.meta-val.accent {
  color: var(--accent);
}

.meta-card-footer {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.meta-contact-link {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  word-break: break-all;
  transition: color var(--t-fast);
}

.meta-contact-link:hover { color: var(--accent); }

/* =============================================================
   13. SKILLS
   ============================================================= */
.skills {
  background: var(--bg-2);
}

.skills-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 3rem;
}

.skills-grid {
  display: grid;
  gap: 1.5px;
  grid-template-columns: 1fr;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

@media (min-width: 540px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .skills-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

.skill-cluster {
  background: var(--bg-3);
  padding: clamp(1.5rem, 3vw, 2rem);
  transition: background var(--t-base);
  cursor: default;
}

.skill-cluster:hover {
  background: var(--bg-4);
}

.cluster-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.cluster-icon {
  width: 40px; height: 40px;
  color: var(--text-muted);
  transition: color var(--t-base);
  flex-shrink: 0;
}

.skill-cluster:hover .cluster-icon {
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.cluster-id {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.cluster-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.cluster-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cluster-items li {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.1vw, 12px);
  color: var(--text-soft);
  padding: 0.35rem 0.6rem;
  background: rgba(255,255,255,0.03);
  border-radius: 3px;
  border-left: 2px solid transparent;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

.skill-cluster:hover .cluster-items li {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-dim);
}

/* =============================================================
   14. EXPERIENCE / TIMELINE
   ============================================================= */
.experience {
  background: var(--bg);
}

.exp-main-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 3rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 0;
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 0.35rem;
}

.timeline-dot {
  width: 10px; height: 10px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  flex-shrink: 0;
  transition: box-shadow var(--t-base);
  position: relative;
  z-index: 1;
}

.timeline-item.is-visible .timeline-dot {
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-line {
  flex: 1;
  width: 1px;
  background: var(--line);
  margin-top: 6px;
}

.timeline-item:last-child .timeline-line {
  display: none;
}

.timeline-header {
  margin-bottom: 0.75rem;
}

.timeline-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.timeline-type {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.timeline-role {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.timeline-entity {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--cyan-dim);
  border-radius: 2px;
  background: var(--cyan-dim);
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 0;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-soft);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.6;
}

.timeline-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  top: 3px;
}

/* =============================================================
   15. EDUCATION
   ============================================================= */
.education {
  background: var(--bg-2);
}

.edu-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 3rem;
}

.edu-grid {
  display: grid;
  gap: 1.5px;
  grid-template-columns: 1fr;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

@media (min-width: 720px) {
  .edu-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1280px) {
  .edu-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.edu-card {
  background: var(--bg-3);
  padding: clamp(1.5rem, 3vw, 2rem);
  transition: background var(--t-base);
}

.edu-card:hover { background: var(--bg-4); }

.edu-card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.edu-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.edu-card-spec {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.edu-card-institution {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
}

.edu-card-period {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.edu-card-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

/* Languages */
.lang-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.lang-list li {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.25rem;
  row-gap: 0.5rem;
}

.lang-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.lang-level {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  text-align: right;
  align-self: center;
}

.lang-bar {
  grid-column: span 2;
  height: 2px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-fill {
  height: 100%;
  width: var(--pct, 0%);
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 999px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s var(--ease-out);
}

.edu-card.is-visible .lang-fill {
  transform: scaleX(1);
}

/* Achievements */
.achievement-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 0.75rem;
}

.achievement-icon {
  color: var(--accent);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.achievement-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.achievement-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
}

.achievement-desc strong {
  color: var(--accent);
  font-family: var(--font-mono);
}

/* =============================================================
   16. CONTACT
   ============================================================= */
.contact {
  background: var(--bg);
}

.contact-grid {
  display: grid;
  gap: 4rem;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: 1fr 360px;
    gap: 5rem;
    align-items: start;
  }
}

.contact-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 2rem;
}

/* Terminal form */
.terminal-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  cursor: pointer;
}

.form-num {
  color: var(--accent);
}

.form-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  transition: border-color var(--t-fast);
}

.form-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.form-prompt {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
  user-select: none;
}

.form-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-textarea-wrap {
  align-items: flex-start;
  padding: 0.8rem;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-submit {
  align-self: flex-start;
}

.form-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Contact links */
.contact-links-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.contact-cmd-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cmd-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left var(--t-base) var(--ease-out);
  cursor: pointer;
}

.cmd-link:hover {
  padding-left: 0.5rem;
}

.cmd-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  width: 1.5rem;
  flex-shrink: 0;
}

.cmd-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cmd-label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--t-fast);
}

.cmd-link:hover .cmd-label {
  color: var(--accent);
}

.cmd-action {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.cmd-arrow {
  font-size: 1rem;
  color: var(--text-muted);
  transition: color var(--t-fast), transform var(--t-base) var(--ease-out);
}

.cmd-link:hover .cmd-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* =============================================================
   17. FOOTER
   ============================================================= */
.footer {
  position: relative;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  overflow: hidden;
  padding-block: 3rem 2rem;
}

.footer-bg-text {
  position: absolute;
  bottom: -0.15em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 14rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.footer-inner {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.footer-nav a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.footer-social a:hover {
  color: var(--accent);
  border-color: var(--line-accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer-reboot {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.footer-reboot:hover {
  color: var(--accent);
  border-color: var(--line-accent);
  background: var(--accent-dim);
}

/* =============================================================
   18. EFFECTS — Scanline noise overlay global
   ============================================================= */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9100;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.04) 3px,
    rgba(0,0,0,0.04) 4px
  );
  mix-blend-mode: overlay;
}

/* =============================================================
   19. RESPONSIVE
   ============================================================= */
@media (min-width: 540px) {
  .about-meta-card { position: static; }
}

@media (min-width: 960px) {
  .about-meta-card { position: sticky; }
}

@media (max-width: 539px) {
  .hero-stats { gap: 1rem; }
  .hero-stat-sep { display: none; }
  .timeline-item { grid-template-columns: 1.5rem 1fr; }
  .timeline-meta { flex-direction: column; gap: 0.2rem; }
}

/* =============================================================
   20. REDUCED MOTION (only intrusive effects)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  /* Only gate auto-loops and large movement — NOT hover or subtle fades */
  .marquee-inner { animation: none; }
  .scroll-line { animation: none; }
  .splash-bar { animation: none; width: 100%; }
  .nav-logo-dot { animation: none; }
  .meta-card-dot { animation: none; }
  .hero-meta-dot { animation: none; }
  /* DO NOT disable: reveals, hover tilts, cursor, button transitions */
}

/* =============================================================
   21. DJ TIMELINE — fotos de fondo en movimiento
   ============================================================= */

/* La tarjeta DJ tiene posición relativa para contener el fondo */
.timeline-content--dj {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 0; /* el texto va dentro de .dj-text con su propio padding */
}

/* Strip de fotos absolutamente posicionado como fondo */
.dj-bg-strip {
  position: absolute;
  inset: 0;
  display: flex;
  width: max-content;
  pointer-events: none;
  z-index: 0;
}

.dj-bg-inner {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  animation: djBgScroll 22s linear infinite;
}

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

.dj-bg-inner img {
  height: 100%;
  width: auto;
  min-width: 260px;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: saturate(0.7) brightness(0.55);
}

/* Overlay oscuro + degradado izq para legibilidad del texto */
.dj-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to right,
      rgba(13, 15, 18, 0.88) 0%,
      rgba(13, 15, 18, 0.6) 50%,
      rgba(13, 15, 18, 0.75) 100%
    );
  pointer-events: none;
}

/* El texto flota encima del fondo */
.dj-text {
  position: relative;
  z-index: 2;
  padding: clamp(1.5rem, 3vw, 2rem);
}

/* Pausa la animación al hover para poder ver las fotos */
.timeline-content--dj:hover .dj-bg-inner {
  animation-play-state: paused;
}

.timeline-content--dj:hover .dj-bg-inner img {
  filter: saturate(0.9) brightness(0.65);
  transition: filter 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  .dj-bg-inner { animation: none; }
}

/* =============================================================
   22. PRINT
   ============================================================= */
@media print {
  .nav, .cursor, .splash, .hero-gradient, .hero-grid,
  .marquee-section, .mobile-menu, .footer-reboot {
    display: none !important;
  }
  body { background: white; color: black; }
  .reveal { opacity: 1; transform: none; }
  .section { break-inside: avoid; }
}
