/* =====================================================================
   Simón Morales Lozano — portfolio
   Bootstrap 5.3 + estilos propios
   ===================================================================== */

:root {
  --accent-1: #38bdf8;
  --accent-2: #8b5cf6;
  --accent-3: #f472b6;
  --gradient: linear-gradient(110deg, var(--accent-1), var(--accent-2) 55%, var(--accent-3));
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 1.1rem;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 72px;
}

[data-bs-theme="dark"] {
  --bg: #0b0d17;
  --bg-alt: #0f1220;
  --surface: rgba(255, 255, 255, .035);
  --surface-hover: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .08);
  --text: #e7e9f3;
  --muted: #9aa0b8;
  --accent: #38bdf8;
  --grid-line: rgba(255, 255, 255, .04);
  --nav-bg: rgba(11, 13, 23, .7);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--border);
}

[data-bs-theme="light"] {
  --bg: #f6f7fb;
  --bg-alt: #eef0f7;
  --surface: rgba(255, 255, 255, .75);
  --surface-hover: #ffffff;
  --border: rgba(15, 23, 42, .09);
  --text: #121527;
  --muted: #5b6178;
  --accent: #0284c7;
  --accent-1: #0ea5e9;
  --accent-2: #7c3aed;
  --accent-3: #db2777;
  --grid-line: rgba(15, 23, 42, .05);
  --nav-bg: rgba(246, 247, 251, .75);
  --shadow: 0 20px 45px -25px rgba(30, 41, 80, .35);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--border);
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
}

h1, h2, h3, h4, h5, .brand, .section-title { font-family: var(--font-display); letter-spacing: -.02em; }
.mono { font-family: var(--font-mono); }
.text-accent { color: var(--accent) !important; }
.text-gradient {
  background: var(--gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 6s linear infinite;
}
::selection { background: var(--accent-2); color: #fff; }

@keyframes gradient-shift { to { background-position: 200% center; } }

/* ---------- Scroll progress + cursor glow ---------- */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 2000;
  background: var(--gradient);
  transform-origin: 0 50%; transform: scaleX(0);
}
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 520px; height: 520px; z-index: 0;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 65%);
  transform: translate(-50%, -50%); opacity: 0; transition: opacity .4s;
}
body.has-pointer .cursor-glow { opacity: 1; }

/* ---------- Buttons (estilo bootstrap, con brillo) ---------- */
.btn { border-radius: .8rem; font-weight: 500; }
.btn-primary {
  --bs-btn-bg: var(--accent-2); --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: var(--accent-2); --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: var(--accent-2);
  background-image: var(--gradient); background-size: 200% auto; border: 0;
  transition: background-position .5s var(--ease-out), transform .2s, box-shadow .3s;
}
.btn-primary:hover { background-position: right center; }
.btn-glow { box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent-2) 70%, transparent); }
.btn-glow:hover { box-shadow: 0 14px 40px -8px color-mix(in srgb, var(--accent-2) 85%, transparent); }
[data-bs-theme="light"] .btn-outline-light { --bs-btn-color: var(--text); --bs-btn-border-color: var(--border); --bs-btn-hover-bg: var(--text); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--text); }
[data-bs-theme="dark"] .btn-outline-light { --bs-btn-border-color: rgba(255,255,255,.2); }
.btn-icon {
  width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: .7rem; font-family: var(--font-mono); font-size: .8rem; font-weight: 500;
  transition: border-color .2s, transform .2s, background .2s;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-hover); }
.btn-icon .bi { font-size: 1.05rem; }
.navbar-toggler.btn-icon { box-shadow: none !important; }
.magnetic { transition: transform .25s var(--ease-out); will-change: transform; }

/* ---------- Navbar ---------- */
.navbar {
  height: var(--nav-h); transition: background .3s, border-color .3s, height .3s;
  border-bottom: 1px solid transparent; z-index: 1030;
}
.navbar.scrolled {
  background: var(--nav-bg); backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border); height: 62px;
}
.brand { font-weight: 700; font-size: 1.35rem; color: var(--text) !important; }
.brand-mark { display: inline-block; transition: transform .4s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.08); }
.brand-dot { color: var(--accent-2); }
.navbar .nav-link {
  position: relative; color: var(--muted); font-size: .92rem; font-weight: 500; padding: .5rem .9rem !important;
  transition: color .2s;
}
.navbar .nav-link::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .2rem; height: 2px; border-radius: 2px;
  background: var(--gradient); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--text); }
.navbar .nav-link:hover::after, .navbar .nav-link.active::after { transform: scaleX(1); }

@media (max-width: 991.98px) {
  .navbar-collapse {
    position: absolute; top: calc(100% + 8px); left: 12px; right: 12px;
    background: var(--nav-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem; box-shadow: var(--shadow);
  }
  .navbar .nav-link::after { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 3rem) 0 6rem; overflow: hidden; isolation: isolate;
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-grid {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; z-index: -2; pointer-events: none;
  animation: blob-move 16s ease-in-out infinite alternate;
}
.blob-1 { width: 460px; height: 460px; background: var(--accent-2); top: -120px; right: -80px; }
.blob-2 { width: 380px; height: 380px; background: var(--accent-1); bottom: -140px; left: -120px; animation-delay: -6s; opacity: .3; }
[data-bs-theme="light"] .blob { opacity: .22; }
@keyframes blob-move {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.1); }
  100% { transform: translate(30px, -20px) scale(.95); }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-mono); font-size: .85rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem;
}
.status-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #22c55e; position: relative;
}
.status-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e;
  animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.hero-title { font-size: clamp(3rem, 7.5vw, 7.5rem); font-weight: 700; line-height: .98; margin-bottom: 1.25rem; }
.hero-role { font-family: var(--font-mono); font-size: clamp(1rem, 2.2vw, 1.35rem); min-height: 1.6em; color: var(--text); margin-bottom: 1rem; }
.caret {
  display: inline-block; width: .55em; height: 1.1em; margin-left: 3px; vertical-align: -.15em;
  background: var(--accent); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-lead { font-size: clamp(1.15rem, 1.7vw, 1.45rem); color: var(--muted); max-width: 36rem; }

.hero-in { opacity: 0; transform: translateY(28px); animation: hero-in .9s var(--ease-out) forwards; animation-delay: calc(var(--d) * 120ms + 150ms); }
@keyframes hero-in { to { opacity: 1; transform: none; } }

.hero-social { display: flex; gap: .6rem; }
.hero-social a {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: .8rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.15rem;
  text-decoration: none; transition: transform .25s var(--ease-out), border-color .2s, color .2s;
}
.hero-social a:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--accent); }

/* Portrait */
.portrait-wrap { position: relative; max-width: 440px; margin-inline: auto; padding: 1.5rem; }
.portrait { position: relative; aspect-ratio: 468 / 506; border-radius: 2rem; transform-style: preserve-3d; transition: transform .3s var(--ease-out); }
.portrait img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 1.7rem;
  box-shadow: var(--shadow);
}
.portrait-ring {
  position: absolute; inset: -6px; border-radius: 2.1rem; z-index: 0;
  background: conic-gradient(from var(--angle, 0deg), var(--accent-1), var(--accent-2), var(--accent-3), var(--accent-1));
  animation: spin 6s linear infinite; filter: saturate(1.2);
}
.portrait-ring::after {
  content: ""; position: absolute; inset: -10px; border-radius: inherit; background: inherit; filter: blur(28px); opacity: .5;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --angle: 360deg; } }

.code-card {
  position: absolute; left: -2.5rem; bottom: -.5rem; z-index: 3; width: 270px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 1rem; box-shadow: var(--shadow); overflow: hidden;
}
.code-card-head { display: flex; align-items: center; gap: 6px; padding: .55rem .8rem; border-bottom: 1px solid var(--border); }
.code-card-head span { width: 9px; height: 9px; border-radius: 50%; background: #f87171; }
.code-card-head span:nth-child(2) { background: #fbbf24; }
.code-card-head span:nth-child(3) { background: #34d399; }
.code-card-head em { font-style: normal; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); margin-left: .4rem; }
.code-card pre { margin: 0; padding: .8rem 1rem; font-size: .72rem; line-height: 1.55; color: var(--text); }
.code-card .k { color: #c084fc; } .code-card .t { color: #38bdf8; } .code-card .s { color: #4ade80; } .code-card .f { color: #fbbf24; }
[data-bs-theme="light"] .code-card .k { color: #7c3aed; } [data-bs-theme="light"] .code-card .t { color: #0369a1; }
[data-bs-theme="light"] .code-card .s { color: #15803d; } [data-bs-theme="light"] .code-card .f { color: #b45309; }

.chip-float {
  position: absolute; top: 2.5rem; right: -1rem; z-index: 3;
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); font-size: .85rem; font-weight: 500; box-shadow: var(--shadow);
}
.chip-float .bi { color: var(--accent); }
.chip-2 { top: auto; bottom: 42%; right: -2rem; }
.chip-2 .bi { color: var(--accent-3); }

.float-a { animation: floaty 7s ease-in-out infinite; }
.float-b { animation: floaty 6s ease-in-out infinite -2s; }
.float-c { animation: floaty 8s ease-in-out infinite -4s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

@media (max-width: 575.98px) {
  .code-card { left: -.25rem; width: 230px; bottom: -1.5rem; }
  .code-card pre { font-size: .64rem; }
  .chip-float { right: -.25rem; }
  .chip-2 { right: -.25rem; }
}

.scroll-cue { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); }
.mouse { display: block; width: 24px; height: 38px; border: 2px solid var(--muted); border-radius: 14px; position: relative; opacity: .7; }
.wheel { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--muted); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (max-height: 700px), (max-width: 991.98px) { .scroll-cue { display: none; } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--border); background: var(--bg-alt); padding: 1rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; white-space: nowrap; color: var(--muted); display: inline-flex; align-items: center; gap: 3rem; }
.marquee-item::after { content: "✦"; font-size: .9rem; color: var(--accent-2); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Layout ancho ---------- */
.container { max-width: 1600px; padding-inline: clamp(1rem, 4vw, 3.5rem); }

/* ---------- Sections ---------- */
.section { position: relative; padding: 8rem 0; z-index: 1; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-meta {
  display: flex; align-items: center; gap: 1rem; margin-bottom: .75rem;
  font-family: var(--font-mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .14em;
}
.section-num { color: var(--accent); }
.section-kicker { color: var(--muted); }
.section-meta::after {
  content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-out) .3s;
}
.section-head.is-visible .section-meta::after { transform: scaleX(1); }

/* Títulos gigantes que "suben" al entrar en pantalla */
.section-title {
  font-size: clamp(3rem, 10.5vw, 10rem); font-weight: 700; line-height: .9; letter-spacing: -.045em;
  text-transform: uppercase; margin: 0; overflow: hidden; padding-bottom: .04em;
}
.st-inner { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); }
.section-head.is-visible .st-inner { transform: none; }
.section-head.reveal { opacity: 1; transform: none; }
@media (max-width: 767.98px) { .section { padding: 5rem 0; } }

/* ---------- Cards ---------- */
.card.glass, .glass {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .3s, background .3s, transform .3s var(--ease-out), box-shadow .3s;
}
.card.glass:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--surface-hover); box-shadow: var(--shadow); }
.spotlight { position: relative; overflow: hidden; }
.spotlight::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 45%);
}
.spotlight:hover::before { opacity: 1; }

/* ---------- Sobre mí ---------- */
.statement {
  font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 3.6rem); font-weight: 600;
  line-height: 1.08; letter-spacing: -.03em; margin: 0;
}
.about-summary { font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: var(--muted); line-height: 1.65; margin: 0; }

.info-item { display: flex; flex-direction: row; gap: .75rem; align-items: center; text-align: left; padding: 1rem; height: 100%; }
.info-icon {
  flex: none; width: 36px; height: 36px; border-radius: .65rem; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 1rem;
}
.info-label { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.info-value { font-weight: 500; word-break: break-word; }
.info-value a { color: inherit; text-decoration: none; }
.info-value a:hover { color: var(--accent); }

.highlights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 992px) { .highlights-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.highlight-card { height: 100%; padding: 1.75rem; display: flex; flex-direction: column; justify-content: space-between; min-height: 190px; }
.highlight-card .bi { font-size: 1.6rem; color: var(--accent); }
.highlight-value { font-family: var(--font-display); font-size: clamp(2.6rem, 4.5vw, 4rem); font-weight: 700; line-height: 1; letter-spacing: -.04em; margin-top: 1rem; }
.highlight-label { color: var(--muted); font-size: .95rem; margin-top: .4rem; }

/* ---------- Experiencia ---------- */
.xp-list { display: grid; gap: 1.25rem; }
.xp-item { padding: clamp(1.5rem, 3vw, 2.5rem); }
.xp-item.is-current { border-color: color-mix(in srgb, var(--accent-2) 45%, var(--border)); }
.tl-period { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); letter-spacing: .05em; text-transform: uppercase; }
.tl-company { color: var(--text); font-weight: 600; font-size: 1.1rem; margin-top: .6rem; }
.xp-title {
  font-size: clamp(2rem, 4.8vw, 4.4rem); font-weight: 700; line-height: .98; letter-spacing: -.04em; margin: 0;
  transition: color .3s;
}
.xp-item:hover .xp-title { color: var(--accent); }
.tl-list { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: 60rem; }
.tl-list li { position: relative; padding-left: 1.4rem; margin-bottom: .6rem; color: var(--muted); font-size: 1.02rem; }
.tl-list li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }
.tl-list strong { color: var(--text); font-weight: 600; }

.xp-toggle {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem; padding: 0; border: 0; background: none;
  font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  transition: color .2s;
}
.xp-toggle:hover { color: var(--accent); }
.xp-toggle .bi { transition: transform .35s var(--ease-out); }
.xp-toggle:not(.collapsed) .bi { transform: rotate(45deg); }
.xp-toggle .when-open { display: none; }
.xp-toggle:not(.collapsed) .when-open { display: inline; }
.xp-toggle:not(.collapsed) .when-closed { display: none; }

.tag {
  display: inline-block; font-family: var(--font-mono); font-size: .75rem; padding: .3rem .65rem; border-radius: .5rem;
  background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.1rem; }
.badge-current {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 500; padding: .25rem .55rem; border-radius: 999px;
  background: color-mix(in srgb, #22c55e 15%, transparent); color: #22c55e; white-space: nowrap; display: inline-block; margin-top: .5rem;
}

/* ---------- Educación ---------- */
.edu-card { padding: 2rem; height: 100%; display: flex; flex-direction: column; }
.edu-card .badge-current { margin-left: .5rem; margin-top: 0; vertical-align: middle; }
.edu-icon {
  width: 52px; height: 52px; border-radius: 1rem; display: grid; place-items: center; font-size: 1.5rem; color: #fff;
  background: var(--gradient); box-shadow: 0 10px 25px -10px var(--accent-2); margin-bottom: 1.5rem;
  transition: transform .5s var(--ease-out);
}
.edu-card:hover .edu-icon { transform: rotate(-8deg) scale(1.08); }
.edu-title { font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; margin: .6rem 0 .5rem; }
.edu-school { color: var(--muted); font-size: .95rem; font-weight: 500; margin-top: auto; }

/* ---------- Skills: filas ---------- */
.skill-rows { border-top: 1px solid var(--border); }
.skill-row { padding: 1.6rem 0; border-bottom: 1px solid var(--border); transition: background .3s; }
.skill-cat {
  display: flex; align-items: baseline; gap: 1rem; margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem); font-weight: 700; letter-spacing: -.03em; transition: color .3s, transform .4s var(--ease-out);
}
.skill-row:hover .skill-cat { color: var(--accent); transform: translateX(6px); }
.skill-idx { font-family: var(--font-mono); font-size: .8rem; font-weight: 400; color: var(--muted); letter-spacing: .05em; }
.skill-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.skill-pill {
  display: inline-block; padding: .5rem .9rem; border-radius: .65rem; font-size: .95rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease-out), border-color .2s, color .2s;
}
.skill-pill:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }

/* ---------- Projects ---------- */
.project-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.project-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--gradient); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.project-card:hover .project-media img { transform: scale(1.06); }
.project-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.project-type { font-family: var(--font-mono); font-size: .75rem; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.project-links { margin-top: auto; padding-top: 1.2rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact-card {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(2.5rem, 6vw, 5.5rem); border-radius: 2rem; border: 1px solid var(--border); background: var(--surface);
}
.blob-3 { width: 520px; height: 520px; background: var(--accent-2); top: -260px; right: -120px; opacity: .3; }
.contact-title {
  font-size: clamp(2.8rem, 8.5vw, 8.5rem); font-weight: 700; line-height: .92; letter-spacing: -.045em;
  text-transform: uppercase; margin-bottom: 2.5rem; max-width: 14ch;
}
.contact-sub { max-width: 30rem; font-size: 1.15rem; }

/* ---------- Footer ---------- */
.footer { padding: 2rem 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; position: relative; z-index: 1; }

/* ---------- Toast ---------- */
.toast { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border) !important; border-radius: .9rem; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--delay, 0ms); }
.reveal.from-left { transform: translateX(-40px); }
.reveal.zoom { transform: scale(.92); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Tilt ---------- */
.tilt { transform-style: preserve-3d; will-change: transform; }

/* ---------- Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .hero-in { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
