:root {
  --bg: #0b0d1a;
  --bg-2: #11142a;
  --surface: #161a33;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef0ff;
  --muted: #a3a8c7;
  --violet: #8b90ff;
  --pink: #ff6b86;
  --cyan: #52dbe8;
  --gold: #ffd36b;
  --grad: linear-gradient(100deg, var(--cyan), var(--violet) 45%, var(--pink));
  --radius: 22px;
  --wrap: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -0.03em; margin: 0; }
p { margin: 0 0 1em; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* padding keeps the last letter inside the gradient clip area */
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; padding-right: .12em; margin-right: -.12em; }
.accent { color: var(--pink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 "Inter", sans-serif; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--violet); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { border-color: var(--text); }
.btn-link { background: none; color: var(--muted); padding-left: 8px; padding-right: 8px; }
.btn-link:hover { color: var(--text); }
.btn-small { padding: 10px 18px; font-size: 14px; }
.btn-big { font-size: clamp(15px, 2.4vw, 20px); padding: 18px 30px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
  transition: background .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(11, 13, 26, .82); backdrop-filter: blur(14px); padding-top: 12px; padding-bottom: 12px; border-color: var(--line); }
.brand { font-weight: 900; letter-spacing: .02em; text-decoration: none; font-size: 18px; }
.brand span { color: var(--violet); margin-left: 4px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links .btn { color: var(--bg); background: var(--text); }
.nav-links a, .hero-cta a { display: inline-flex; align-items: center; gap: 8px; }
.nav-links a svg { width: 16px; height: 16px; flex: none; }
.hero-cta a svg { width: 18px; height: 18px; flex: none; }
.nav-links a { white-space: nowrap; }
/* Medium widths: six items with icons don't fit beside the logo */
@media (min-width: 761px) and (max-width: 1100px) {
  .nav-links { gap: 18px; }
  .nav-links a:not(.btn) svg { display: none; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .nav-links { gap: 12px; }
  .nav-links a:not(.btn) { font-size: 14px; }
}
@media (max-width: 760px) { .nav-links a svg { width: 26px; height: 26px; } .nav-links a.btn svg { width: 18px; height: 18px; } }
/* The section currently on screen */
.nav-links a[aria-current]:not(.btn) { color: var(--text); font-weight: 700; text-decoration: underline; text-decoration-color: #8b90ff; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.nav-links a.btn[aria-current] { box-shadow: 0 0 0 3px rgba(139,144,255,.7); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 10px 8px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--text); margin: 6px 0; transition: transform .3s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 48px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 85% 20%, rgba(139,144,255,.28), transparent 70%),
    radial-gradient(500px 300px at 10% 55%, rgba(255,107,134,.16), transparent 70%),
    radial-gradient(400px 260px at 60% 60%, rgba(82,219,232,.12), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.eyebrow span { color: var(--cyan); }
.hero-title { font-size: clamp(64px, 11vw, 150px); font-weight: 900; text-transform: uppercase; letter-spacing: -0.05em; line-height: .88; }
.hero-role { font-size: clamp(22px, 3vw, 34px); font-weight: 800; text-transform: uppercase; margin: 22px 0 18px; letter-spacing: -0.01em; }
.hero-lead { max-width: 520px; color: var(--muted); font-size: 18px; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-media { position: relative; border-radius: 32px; overflow: hidden; aspect-ratio: 1019 / 953; box-shadow: 0 40px 100px -30px rgba(139,144,255,.55); }
.hero-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(255,255,255,.12); pointer-events: none; }
.hero-media img, .hero-media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.hero-media.is-video { aspect-ratio: 16 / 9; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.stats strong { display: block; font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -0.03em; }
.stats span { color: var(--muted); font-size: 15px; }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section-tight { padding-top: clamp(56px, 7vw, 90px); }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); margin-bottom: 16px; }
.section h2 { font-size: clamp(36px, 5.4vw, 64px); font-weight: 900; margin-bottom: 20px; }
.section-sub { color: var(--muted); font-size: 18px; max-width: 640px; }

/* ---------- "Qué hago" bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(250px, auto); gap: 16px; }
.tile {
  --c: var(--violet);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 28px; border-radius: 26px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .4s var(--ease), border-color .3s;
}
.tile:hover { transform: translateY(-5px); border-color: var(--c); }
.tile-xl { grid-column: span 2; grid-row: span 2; }
.tile-tall { grid-row: span 2; }
.tile-wide { grid-column: span 4; min-height: 260px; }
.tile-audiovisual { --c: var(--pink); }
.tile-ia { --c: var(--cyan); }
.ia-streak { position: absolute; z-index: -1; left: -14%; width: 28%; height: 6%; opacity: 0; pointer-events: none; will-change: transform, opacity; background: radial-gradient(closest-side, rgba(139,144,255,.6), transparent); }
.ia-streak.is-cyan { background: radial-gradient(closest-side, rgba(82,219,232,.55), transparent); }
/* Blurred lights behind the AI tile; main.js moves them on hover */
.ia-orb { position: absolute; z-index: -1; pointer-events: none; will-change: transform; }
.ia-orb-cyan { left: 35%; top: -50%; width: 130%; height: 100%; background: radial-gradient(closest-side, rgba(82,219,232,.34), transparent 65%); }
.ia-orb-violet { left: -60%; top: 50%; width: 120%; height: 100%; background: radial-gradient(closest-side, rgba(139,144,255,.32), transparent 65%); }
.tile-steps { list-style: none; counter-reset: step; display: grid; gap: 8px; margin: 0 0 20px; padding: 0; }
.tile-steps li { counter-increment: step; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.06); }
.tile-steps li::before { content: counter(step); font-size: 12px; font-weight: 800; color: var(--c); min-width: 12px; }
.tile-steps strong { font-size: 15px; }
.tile-steps span { font-size: 13px; color: var(--muted); }
.tile-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s var(--ease); }
.tile.has-img::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,13,26,.15) 0%, rgba(11,13,26,.55) 45%, rgba(11,13,26,.96) 100%); }
.tile-wide.has-img::before { background: linear-gradient(90deg, rgba(11,13,26,.97) 0%, rgba(11,13,26,.8) 45%, rgba(11,13,26,.1) 100%); }
.tile-xl .tile-bg { object-position: 60% 25%; }
.tile:hover .tile-bg { transform: scale(1.05); }
.tile-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); backdrop-filter: blur(8px); }
.tile-icon svg { width: 26px; height: 26px; }
.tile-body { max-width: 520px; }
.tile-kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c); margin-bottom: 10px; }
.tile h3 { font-size: clamp(26px, 3vw, 34px); font-weight: 900; margin-bottom: 12px; }
.tile-xl h3 { font-size: clamp(34px, 4.4vw, 54px); }
.tile-text { color: #c9cce3; font-size: 16px; margin-bottom: 16px; }
.tile-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tile-tools span { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text); }
.tile-cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--c); }
.tile-cta svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.tile:hover .tile-cta svg, .card-link:hover .tile-cta svg { transform: translateX(4px); }

.secondary { margin-top: 40px; }
.secondary-label { font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.secondary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.mini { display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .25s, background .25s; }
.mini:hover { border-color: rgba(255,255,255,.3); background: #1b2040; }
.mini img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.mini-body { flex: 1; min-width: 0; }
.mini strong { display: block; font-size: 17px; }
.mini small { color: var(--muted); font-size: 13px; }
.mini-arrow svg { width: 18px; height: 18px; color: var(--muted); }

/* ---------- filters & grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filters:empty { display: none; }
.filter { background: rgba(255,255,255,.1); color: var(--text); border: 1px solid rgba(255,255,255,.28); padding: 10px 18px; border-radius: 999px; font: 600 14px/1 "Inter", sans-serif; cursor: pointer; transition: all .2s; }
.filter:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.55); }
/* "Todo" always stands out from the categories, selected or not */
.filter[data-f="all"] { background: rgba(139,144,255,.3); border-color: #8b90ff; padding: 12px 24px; font-size: 15px; font-weight: 800; }
.filter[data-f="all"]:hover { background: rgba(139,144,255,.45); }
.filter[aria-selected="true"], .filter[data-f="all"][aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter[data-f="all"][aria-selected="true"] { box-shadow: 0 0 0 3px rgba(139,144,255,.55); }
.filters { align-items: center; }
.filter sup { font-size: 11px; opacity: .75; margin-left: 3px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; gap: 20px; }
.card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; padding: 0; color: inherit; font: inherit; display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-6px); border-color: rgba(139,144,255,.5); }
.card.featured { grid-column: span 2; }
.card.vertical .card-media { aspect-ratio: 9 / 14; }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; width: 100%; }
.card.featured .card-media { aspect-ratio: 16 / 8.2; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media.pixel img { image-rendering: pixelated; }
.card-media.sprites { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); background: #232850; }
.card-media.sprites span { display: grid; place-items: center; padding: 8%; min-height: 0; }
.card-media.sprites span:nth-child(3n+2) { background: #2b2147; }
.card-media.sprites span:nth-child(4n) { background: #1d3040; }
.card-media.sprites img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.card:hover .card-media.sprites img { transform: scale(1.12); }
.card-play { position: absolute; right: 16px; bottom: 16px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--bg); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.card-play svg { width: 18px; height: 18px; margin-left: 3px; }
.card-body { padding: 20px 24px 26px; }
.card-body h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.card.featured .card-body h3 { font-size: 28px; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.card-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--cat)); background: rgba(var(--cat), .16); padding: 4px 9px; border-radius: 6px; }
/* Each category tints its card (background, border, tag) with one colour of the site palette */
.card { --cat: 139, 144, 255; background: linear-gradient(160deg, rgba(var(--cat), .24), rgba(var(--cat), .07) 60%), var(--surface); border-color: rgba(var(--cat), .42); }
.card:hover { border-color: rgba(var(--cat), .7); }
.card[data-cat="social"], .card[data-cat="pixel"] { --cat: 255, 107, 134; }
.card[data-cat="ia"], .card[data-cat="games"] { --cat: 82, 219, 232; }
.card[data-cat="motion"] { --cat: 255, 211, 107; }
.card-body p { color: var(--muted); font-size: 15px; margin: 0; }
.card-results { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.card-results span { font-size: 13px; font-weight: 800; color: #3ee08f; background: rgba(62,224,143,.1); padding: 5px 10px; border-radius: 8px; }
.card.hide { display: none; }

.current-job { margin-top: 32px; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 28px 32px; border-radius: var(--radius); border: 1px dashed rgba(139,144,255,.45); background: rgba(139,144,255,.06); }
.current-job h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.current-job p:last-child { color: var(--muted); margin: 0; max-width: 680px; }
.current-job .kicker { margin-bottom: 8px; }

/* profile link ?perfil=marketing */
.only-audiovisual [data-track-section="tech"], .only-audiovisual [data-track="tech"] { display: none !important; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.about-photo { border-radius: 32px; overflow: hidden; aspect-ratio: 4 / 5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }
.about-copy > p { color: var(--muted); font-size: 18px; }
.about-copy strong { color: var(--text); }
.callout { border-left: 3px solid var(--pink); background: rgba(255,107,134,.07); padding: 20px 24px; border-radius: 0 16px 16px 0; margin: 26px 0; }
.callout p { color: var(--muted); margin: 0; }
.callout .callout-q { color: var(--text); font-weight: 800; font-size: 19px; margin-bottom: 8px; }
.about-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- timeline ---------- */
.cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; }
.col-title { font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 24px; }
.col-title:not(:first-child) { margin-top: 48px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 40px; margin-bottom: 34px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-2); border: 3px solid var(--violet); }
.timeline-edu li::before { border-color: var(--pink); }
.timeline li.current::before { background: var(--violet); box-shadow: 0 0 0 6px rgba(139,144,255,.2); }
.tl-period { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.timeline h4 { margin: 4px 0 2px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.tl-company { color: var(--violet); font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.timeline-edu .tl-company { color: var(--pink); }
.timeline li p { color: var(--muted); font-size: 15px; margin: 0; }
.badge-now { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: var(--violet); color: #fff; padding: 3px 8px; border-radius: 6px; margin-left: 8px; vertical-align: 2px; }

.tools { display: grid; gap: 18px; }
.tool-group h5 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }

/* ---------- awards ---------- */
.awards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.award { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-align: left; font: inherit; color: inherit; }
.award.card-link { cursor: pointer; transition: border-color .3s, transform .3s var(--ease); --c: var(--gold); }
.award.card-link:hover { border-color: var(--gold); transform: translateY(-4px); }
.award-icon { font-size: 28px; margin-bottom: 18px; color: var(--gold); }
.award h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.award .event { color: var(--violet); font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.award p:not(.event) { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.award .tile-cta { font-size: 14px; }

/* ---------- contact ---------- */
.contact { position: relative; overflow: hidden; text-align: center; }
.contact::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 400px at 50% 100%, rgba(139,144,255,.22), transparent 70%); z-index: -1; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact-title { font-size: clamp(52px, 9vw, 120px) !important; text-transform: uppercase; letter-spacing: -0.05em; }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 24px 0 40px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 36px; display: flex; gap: 48px; flex-wrap: wrap; justify-content: center; }
.contact-list span { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 4px; font-weight: 700; }
.contact-list a, .contact-list p { font-size: 18px; font-weight: 600; text-decoration: none; margin: 0; }
.socials { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.social { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 15px; transition: all .2s; background: rgba(255,255,255,.03); }
.social:hover { border-color: var(--violet); background: rgba(139,144,255,.12); }
.social svg { width: 18px; height: 18px; }

.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; }
.footer p { margin: 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,6,14,.82); backdrop-filter: blur(8px); animation: fade .3s; }
.modal-panel { position: relative; width: min(1240px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 28px; animation: rise .4s var(--ease); overscroll-behavior: contain; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.98); } }
.modal-close { position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; backdrop-filter: blur(8px); }
.modal-close:hover { background: rgba(0,0,0,.7); }
.modal-body { padding: 0 0 36px; }
.modal-hero { aspect-ratio: 16 / 9; background: #000; }
.modal-hero.vertical { aspect-ratio: auto; display: flex; justify-content: center; }
.modal-hero.vertical iframe, .modal-hero.vertical video { aspect-ratio: 9 / 16; height: min(80vh, 720px); width: auto; }
.modal-hero iframe, .modal-hero img, .modal-hero video { width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.modal-hero video { object-fit: contain; background: #000; }
.modal-content { padding: 32px 40px 0; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.modal-content.no-hero { padding-top: 44px; }
.modal-cat { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); margin-bottom: 10px; }
.modal-content h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; margin-bottom: 8px; }
.modal-sub { color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.modal-content p.desc { color: #c9cce3; font-size: 17px; }
.modal-side h5 { margin: 0 0 10px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.modal-side .chips { margin-bottom: 22px; }
.modal-links { display: flex; flex-wrap: wrap; gap: 8px; }
/* Mosaic gallery: big tiles 2×2, wide 2×1, full 4×2 (sizes come from mosaicSize in main.js) */
.modal-gallery { padding: 32px 40px 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(110px, 13vw, 180px); grid-auto-flow: dense; gap: 12px; }
.modal-gallery button { padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: #000; }
.modal-gallery .big { grid-column: span 2; grid-row: span 2; border-radius: 20px; }
.modal-gallery .wide { grid-column: span 2; }
.modal-gallery .full { grid-column: 1 / -1; grid-row: span 3; border-radius: 20px; }
.modal-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.modal-gallery button:hover img { transform: scale(1.05); }

/* pixel art wall: every sprite on its own tile, scaled up crisp */
.sprite-wall { padding: 32px 40px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 150px; grid-auto-flow: dense; gap: 10px; }
.sprite-wall button { padding: 14px; border: 0; border-radius: 16px; cursor: zoom-in; background: #232850; display: grid; place-items: center; overflow: hidden; transition: background .25s; }
.sprite-wall button:nth-child(3n+2) { background: #2b2147; }
.sprite-wall button:nth-child(3n) { background: #1d3040; }
.sprite-wall button:hover { background: #343b78; }
.sprite-wall button.wide { grid-column: span 3; grid-row: span 2; padding: 10px; }
.sprite-wall img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; transition: transform .4s var(--ease); }
.sprite-wall button.wide:hover img { transform: scale(1.03); }
.sprite-wall button:hover img { transform: scale(1.1); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(3,4,10,.95); display: grid; place-items: center; padding: 60px 16px; animation: fade .25s; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 10px; }
.lightbox img.pixel { image-rendering: pixelated; width: min(80vw, 900px); height: min(80vh, 900px); background: #232850; padding: 24px; }
.lb-btn { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 32px; line-height: 1; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 18px; right: 18px; }
.lb-stage { display: flex; align-items: center; justify-content: center; gap: 18px; max-width: 100%; }
.lb-stage > :not(.lb-btn) { min-width: 0; max-width: calc(100vw - 180px); }
.lb-stage .lb-btn { position: static; flex: none; background: rgba(255,255,255,.16); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .awards { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-xl, .tile-wide { grid-column: span 2; }
  .tile-xl { grid-row: span 1; min-height: 420px; }
  .tile-tall { grid-row: span 1; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { max-width: 520px; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { max-width: 460px; aspect-ratio: 1 / 1; }
  .cols { grid-template-columns: 1fr; gap: 16px; }
  .modal-content { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { padding: 14px 16px; }
  .nav.scrolled { padding: 10px 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center; gap: 28px;
    opacity: 0; pointer-events: none; transition: opacity .3s; z-index: -1;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a:not(.btn) { font-size: 28px; font-weight: 800; color: var(--text); }
  .hero { padding-top: 104px; min-height: auto; }
  .stats { grid-template-columns: 1fr; gap: 18px; margin-top: 44px; }
  .stats div { display: flex; align-items: baseline; gap: 14px; }
  .bento, .grid, .awards, .secondary-grid { grid-template-columns: 1fr; }
  .tile-xl, .tile-wide, .card.featured { grid-column: auto; }
  .tile { padding: 22px; }
  .tile-xl { min-height: 460px; }
  .tile-wide.has-img::before { background: linear-gradient(180deg, rgba(11,13,26,.2) 0%, rgba(11,13,26,.96) 70%); }
  .tile-wide { min-height: 420px; }
  .card.featured .card-media { aspect-ratio: 16 / 10; }
  .card.featured .card-body h3 { font-size: 22px; }
  .card-media.sprites { grid-template-columns: repeat(3, 1fr); }
  .current-job { flex-direction: column; align-items: flex-start; padding: 22px; }
  .modal { padding: 0; }
  .modal-panel { max-height: 100vh; height: 100%; border-radius: 0; }
  .modal-content, .modal-gallery, .sprite-wall { padding-left: 16px; padding-right: 16px; }
  .modal-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 26vw; gap: 8px; }
  .modal-gallery .full { grid-row: span 2; }
  .sprite-wall { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; gap: 8px; }
  .sprite-wall button { padding: 8px; }
  .lightbox { padding: 60px 8px; }
  /* Phone: the arrows sit right under the content, side by side */
  .lb-stage { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 14px 16px; }
  .lb-stage > :not(.lb-btn) { grid-column: 1 / -1; grid-row: 1; justify-self: center; max-width: 100%; }
  .lb-stage .lb-prev { justify-self: end; }
  .lb-stage .lb-next { justify-self: start; }
  .lightbox .lb-stage > img, .lightbox .lb-stage > video { max-height: calc(100vh - 200px); }
  .lb-stage .lb-ig { --w: min(92vw, calc((100vh - 250px) / 1.25), 520px); }
  .lb-stage .lb-short, .lb-stage video.reel { height: min(calc(100vh - 200px), 760px); }
  .contact-list { gap: 24px; }
  .footer-inner { flex-direction: column; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- looping clips (mp4 used like GIFs) ---------- */
.card-media video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.card:hover .card-media video { transform: scale(1.05); }
.modal-gallery button { position: relative; }
.modal-gallery video { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-badge { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.clip-badge svg { width: 11px; height: 11px; margin-left: 2px; }
.lightbox video { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 10px; background: #000; }
.lightbox [hidden] { display: none; }

/* ---------- Sketchfab 3D viewer ---------- */
.viewer3d { padding: 32px 40px 0; }
.viewer3d-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 14px; padding-right: 56px; }
.viewer3d-head h5 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.viewer3d-head h5 svg { width: 18px; height: 18px; }
.viewer3d-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.viewer3d-tabs .filter { padding: 8px 14px; font-size: 13px; }
.viewer3d-frame { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.viewer3d-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.viewer3d-hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.card-3d { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 6px 10px; border-radius: 999px; background: rgba(11,13,26,.75); backdrop-filter: blur(6px); color: var(--cyan); }
.card-3d svg { width: 14px; height: 14px; }
@media (max-width: 760px) {
  .viewer3d { padding-left: 16px; padding-right: 16px; }
  .viewer3d-frame { aspect-ratio: 4 / 3; }
}

/* ---------- published pieces: reels, carousels and posts ---------- */
.card-media.feed { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; background: var(--bg); }
.card-media.feed img { min-width: 0; object-position: 50% 10%; }
.pieces, .devlog { padding: 32px 40px 0; }
.gallery-head { padding: 32px 40px 0; margin-bottom: -14px; align-items: center; gap: 10px 20px; }
.gallery-sort { display: flex; gap: 8px; }
.gallery-sort .filter { padding: 8px 14px; font-size: 13px; }
.gallery-sort .filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.devlog video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: #000; }
.pieces-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.pieces-head h5 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--pink); }
.pieces-head h5 svg { width: 14px; height: 14px; }
.pieces-head p { margin: 0; font-size: 13px; color: var(--muted); }
.pieces-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pieces-grid button { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; aspect-ratio: 4 / 5; background: #000; }
.pieces-grid img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; display: block; transition: transform .6s var(--ease); }
.pieces-grid button:hover img { transform: scale(1.05); }
.piece-type { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 999px; background: rgba(11,13,26,.75); backdrop-filter: blur(6px); color: #fff; }
.piece-type svg { width: 11px; height: 11px; }
.piece-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: 12px; font-weight: 700; text-align: left; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.pieces-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
.lightbox .lb-short { border: 0; border-radius: 14px; background: #000; aspect-ratio: 9 / 16; height: min(calc(100vh - 120px), 760px); width: auto; max-width: 92vw; }
/* Instagram player: header + 4:5 video; the footer below is clipped off */
.lightbox .lb-ig { --w: min(92vw, calc((100vh - 174px) / 1.25), 520px); border: 0; border-radius: 14px; background: #fff; width: var(--w); height: calc(54px + var(--w) * 1.25); }
.lightbox video.reel { aspect-ratio: 9 / 16; height: min(calc(100vh - 120px), 820px); width: auto; max-width: 92vw; object-fit: contain; }
.lb-cap { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #fff; background: rgba(255,255,255,.1); padding: 6px 12px; border-radius: 999px; }
@media (max-width: 760px) {
  .pieces, .devlog, .gallery-head { padding-left: 16px; padding-right: 16px; }
  .gallery-head { flex-direction: column; align-items: flex-start; }
  .pieces-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* Link buttons in the colours of their site */
.btn-brand { --b: #fff; display: inline-flex; align-items: center; gap: 8px; color: #fff; background: color-mix(in srgb, var(--b) 16%, transparent); border-color: color-mix(in srgb, var(--b) 55%, transparent); }
.btn-brand:hover { background: color-mix(in srgb, var(--b) 30%, transparent); border-color: var(--b); }
.btn-brand svg { width: 17px; height: 17px; color: var(--b); flex: none; }
.btn-brand:not([class*="brand-"]) { --b: #9aa0c8; }
.brand-youtube { --b: #ff3d3d; }
.brand-behance { --b: #3d7bff; }
.brand-artstation { --b: #18b4f2; }
.brand-instagram { --b: #e8457e; }
.brand-sketchfab { --b: #1caad9; }

/* Big, obvious play button for games that can be played */
.btn-play { display: inline-flex; align-items: center; gap: 16px; margin-top: 22px; padding: 14px 28px 14px 14px; border-radius: 20px; text-decoration: none; color: #fff; background: linear-gradient(135deg, #fa5c5c, #ff2e63); box-shadow: 0 12px 34px -10px rgba(255,46,99,.7); transition: transform .25s var(--ease), box-shadow .25s; }
.btn-play:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 18px 40px -10px rgba(255,46,99,.85); }
.btn-play-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #ff2e63; flex: none; }
.btn-play-icon svg { width: 22px; height: 22px; margin-left: 4px; }
.btn-play strong { display: block; font-size: 26px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; line-height: 1.05; }
.btn-play small { font-size: 14px; font-weight: 600; opacity: .9; }
.card-playable { color: #fff; background: linear-gradient(135deg, #fa5c5c, #ff2e63); }

/* Highlighted pieces: a lead row of big tiles above the regular grid */
.pieces-grid.lead { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); max-width: calc(var(--n) * 336px); gap: 16px; margin-bottom: 16px; }
.pieces-grid button { min-width: 0; }
.pieces-grid.lead button { border-radius: 20px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.8); }
.pieces-grid.lead .piece-label { font-size: 14px; }
.pieces-grid:not(.lead) { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 760px) {
  .pieces-grid.lead { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; gap: 8px; margin-bottom: 8px; }
  .pieces-grid:not(.lead) { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- visual polish ---------- */
/* Secondary areas: image cards with a clear work count, in their category colour */
.secondary-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mini {
  --cat: 139, 144, 255;
  position: relative; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; border-radius: 20px;
  background: linear-gradient(160deg, rgba(var(--cat), .22), rgba(var(--cat), .06) 65%), var(--surface);
  border-color: rgba(var(--cat), .4);
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s;
}
.mini[data-cat="games"] { --cat: 82, 219, 232; }
.mini[data-cat="motion"] { --cat: 255, 211, 107; }
.mini[data-cat="pixel"] { --cat: 255, 107, 134; }
.mini:hover { transform: translateY(-5px); background: linear-gradient(160deg, rgba(var(--cat), .3), rgba(var(--cat), .08) 65%), var(--surface); border-color: rgba(var(--cat), .8); box-shadow: 0 24px 50px -24px rgba(var(--cat), .7); }
.mini-thumb { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.mini-thumb img { width: 100%; height: 100%; border-radius: 0; transition: transform .8s var(--ease); }
.mini:hover .mini-thumb img { transform: scale(1.06); }
.mini-count { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 12px; border-radius: 999px; background: rgb(var(--cat)); color: var(--bg); font-size: 13px; font-weight: 700; line-height: 1.2; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.mini-count b { font-size: 18px; font-weight: 900; }
.mini-body { padding: 16px 44px 18px 18px; }
.mini strong { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 2px; }
.mini small { display: block; font-size: 14px; line-height: 1.4; }
.mini-arrow { position: absolute; right: 16px; bottom: 18px; line-height: 0; }
.mini-arrow svg { color: rgb(var(--cat)); transition: transform .3s var(--ease); }
.mini:hover .mini-arrow svg { transform: translateX(4px); }

/* Depth: section backgrounds pick up soft glows, alternate bands get a colour hairline */
#servicios { background-image: radial-gradient(640px 300px at 95% 42%, rgba(82,219,232,.09), transparent 70%), radial-gradient(640px 420px at 0% 85%, rgba(255,107,134,.08), transparent 70%); }
#audiovisual { background-image: radial-gradient(760px 480px at 100% 0%, rgba(255,107,134,.12), transparent 70%), radial-gradient(700px 480px at 0% 40%, rgba(139,144,255,.1), transparent 70%); }
#sobre-mi { background-image: radial-gradient(640px 480px at 12% 50%, rgba(139,144,255,.14), transparent 70%); }
#experiencia { background-image: radial-gradient(700px 480px at 100% 100%, rgba(255,107,134,.09), transparent 70%); }
#tech { background-image: radial-gradient(760px 480px at 100% 0%, rgba(82,219,232,.11), transparent 70%), radial-gradient(700px 480px at 0% 45%, rgba(139,144,255,.1), transparent 70%); }
#premios { background-image: radial-gradient(760px 420px at 50% 0%, rgba(255,211,107,.1), transparent 70%); }
.section-alt { position: relative; }
.section-alt::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(82,219,232,.5), rgba(139,144,255,.6), rgba(255,107,134,.5), transparent); }

/* Section labels */
.kicker { display: inline-flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--grad); flex: none; }

/* Hero figures */
.stats { border-top: 0; padding-top: 0; gap: 16px; }
.stats > div { padding: 22px 26px; border-radius: 20px; background: linear-gradient(160deg, rgba(139,144,255,.16), rgba(139,144,255,.04)), rgba(22,26,51,.7); border: 1px solid rgba(139,144,255,.24); }
.stats strong { width: fit-content; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }

/* Glow on what can be clicked */
.btn-primary { box-shadow: 0 12px 34px -12px rgba(139,144,255,.85); }
.btn-ghost { background: rgba(255,255,255,.05); }
.card { transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; }
.card:hover { box-shadow: 0 28px 60px -28px rgba(var(--cat), .75); }
.tile { transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; }
.tile:hover { box-shadow: 0 28px 70px -30px var(--c); }
.about-photo { position: relative; box-shadow: 0 40px 100px -30px rgba(139,144,255,.55); }
.about-photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(255,255,255,.12); pointer-events: none; }

/* Trajectory */
.timeline::before { background: linear-gradient(180deg, var(--violet), rgba(139,144,255,.1)); }
.timeline-edu::before { background: linear-gradient(180deg, var(--pink), rgba(255,107,134,.1)); }
.chip { color: var(--text); background: rgba(139,144,255,.13); border-color: rgba(139,144,255,.28); }

/* Awards */
.award { background: linear-gradient(160deg, rgba(255,211,107,.15), rgba(255,211,107,.03) 65%), var(--surface); border-color: rgba(255,211,107,.3); }
.award.card-link:hover { box-shadow: 0 26px 56px -28px rgba(255,211,107,.7); }
.award-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; font-size: 24px; line-height: 1; background: rgba(255,211,107,.16); box-shadow: inset 0 0 0 1px rgba(255,211,107,.4); }

/* Contact */
.contact::before { background: radial-gradient(800px 460px at 50% 100%, rgba(139,144,255,.32), transparent 70%), radial-gradient(500px 320px at 15% 90%, rgba(255,107,134,.16), transparent 70%), radial-gradient(500px 320px at 85% 90%, rgba(82,219,232,.14), transparent 70%); }
.contact-title { width: fit-content; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }

@media (max-width: 1000px) { .secondary-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .secondary-grid { gap: 12px; }
  .mini-body { padding: 12px 14px 16px; }
  .mini strong { font-size: 17px; }
  .mini small { font-size: 13px; }
  .mini-arrow { display: none; }
  .mini-count { left: 8px; bottom: 8px; padding: 4px 10px; font-size: 12px; }
  .mini-count b { font-size: 16px; }
  .stats { grid-template-columns: 1fr; gap: 10px; }
  .stats > div { padding: 16px 20px; }
}
