/* =========================================================
   Portafolio · Junior Matías Bardales
   HTML + CSS puro.
   Base del frontend del proyecto (shadcn neutral, Geist,
   barra lateral, tarjetas, tablas) + formas geométricas
   negras en lugar de iconos.
   ========================================================= */

:root {
  --canvas: #f6f6f5;
  --sidebar: #fbfbfa;
  --card: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #262626;
  --text: #404040;
  --muted: #737373;
  --subtle: #a3a3a3;
  --border: #e7e5e4;
  --border-soft: #f0efee;
  --hover: #f4f4f3;
  --ok: #16a34a;
  --ok-bg: #ecfdf3;
  --ok-fg: #166534;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-md: 0 1px 2px rgb(0 0 0 / 0.04), 0 12px 32px -16px rgb(0 0 0 / 0.18);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Instrument Serif", Georgia, serif;

  --side-w: 248px;
  --top-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.right { text-align: right; }

/* ---------- Marcas geométricas (reemplazan a los iconos) ---------- */
.m { display: inline-block; flex: none; width: 10px; height: 10px; background: currentColor; }
.m-circle { border-radius: 50%; }
.m-triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.m-half { height: 6px; width: 12px; border-radius: 12px 12px 0 0; }
.m-quarter { border-top-left-radius: 100%; }
.m-ring { background: transparent; border: 2px solid currentColor; border-radius: 50%; }
.m-diamond { transform: rotate(45deg) scale(.82); }

.live { position: relative; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: none; }
.live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid #22c55e; animation: pulse 2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 500 14px/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-ink { background: var(--ink); color: #fafafa; }
.btn-ink:hover { background: #2a2a2a; }
.btn-line { background: var(--card); border-color: var(--border); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-line:hover { background: var(--hover); }
.btn-white { background: #fafafa; color: var(--ink); }
.btn-white:hover { background: #e7e5e4; }
.btn-ghost-white { border-color: rgb(255 255 255 / 0.18); color: #fafafa; }
.btn-ghost-white:hover { background: rgb(255 255 255 / 0.08); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px 16px;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
}

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; }
.brand-mark { display: inline-flex; gap: 2px; }
.brand-mark i { width: 14px; height: 14px; background: var(--ink); }
.brand-mark i:first-child { border-radius: 50%; }
.brand-mark i:last-child { border-top-left-radius: 100%; transition: transform .5s var(--ease); }
.brand:hover .brand-mark i:last-child, .topbar-brand:hover .brand-mark i:last-child { transform: rotate(90deg); }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.brand-name span { color: var(--subtle); font-weight: 500; }

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.profile img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; object-position: center 28%; filter: grayscale(1); }
.profile div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.profile strong { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.profile span { color: var(--muted); font-size: 12.5px; }

.side-nav { display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; }
.side-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 10px 6px;
  color: var(--subtle);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.side-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.side-label:first-child { margin-top: 4px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background-color .15s, color .15s;
}
.side-nav a .m { color: var(--subtle); transition: color .15s, transform .3s var(--ease); }
.side-nav a:hover { background: var(--hover); color: var(--ink); }
.side-nav a:hover .m { color: var(--ink); }
.side-nav a:hover .m-square, .side-nav a:hover .m-quarter { transform: rotate(90deg); }
.side-nav b {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--hover);
  color: var(--muted);
  font: 500 11px/18px var(--font-mono);
}

.side-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fafafa;
}
.side-card-shape { position: absolute; top: -26px; right: -26px; width: 72px; height: 72px; border-radius: 50%; background: #fafafa; }
.side-card-status { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; }
.side-card-text { max-width: 22ch; color: #a3a3a3; font-size: 12.5px; line-height: 1.45; margin-bottom: 4px; }

/* ---------- Topbar ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--top-h);
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--canvas) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.topbar > .btn { margin-left: auto; }
.topbar-brand { display: none; }
.top-nav { display: none; }

/* Paleta de navegación (solo CSS) */
.cmd { position: relative; width: min(380px, 100%); }
.cmd-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.cmd-field:hover { border-color: #d6d3d1; }
.cmd:has(input:focus) .cmd-field { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(10 10 10 / 0.06); }
.cmd-glyph { width: 12px; height: 12px; border: 2px solid var(--subtle); border-radius: 50%; flex: none; }
.cmd-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 400 14px var(--font-sans);
  cursor: pointer;
}
.cmd-field input::placeholder { color: var(--muted); }
.cmd-field kbd { padding: 3px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--hover); color: var(--muted); font: 500 11px var(--font-mono); }

.cmd-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 300px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 24px 48px -20px rgb(0 0 0 / 0.28), 0 2px 6px rgb(0 0 0 / 0.05);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-4px) scale(.99);
  transform-origin: top left;
  /* al cerrar espera un momento para que el clic en un enlace alcance a registrarse */
  transition: opacity .15s .3s, transform .15s var(--ease) .3s, visibility 0s .45s;
}
.cmd:has(input:focus) .cmd-menu,
.cmd-menu:has(a:focus-visible) {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}
.cmd-group { padding: 8px 10px 4px; color: var(--subtle); font: 500 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.cmd-menu a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.cmd-menu a .m { color: var(--ink); }
.cmd-menu a span { margin-left: auto; color: var(--subtle); font: 400 12px var(--font-mono); }
.cmd-menu a:hover { background: var(--hover); }

/* ---------- Contenido ---------- */
.content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 22px 32px 0; }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 13.5px; }
.crumbs .sep { color: var(--subtle); }
.crumbs strong { color: var(--ink); font-weight: 500; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: center;
  margin-top: 14px;
  padding: 48px 48px 40px;
  border-radius: var(--radius-lg);
  background-color: var(--ink);
  background-image: radial-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1.3px);
  background-size: 22px 22px;
  color: #fafafa;
}

.chip-dark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.06);
  font-size: 13px;
  font-weight: 500;
}

.hero h1 { margin-top: 26px; font-size: clamp(2.5rem, 4.6vw, 4.3rem); letter-spacing: -0.045em; line-height: 0.98; }
.hero-role { margin-top: 16px; color: #d4d4d4; font-size: clamp(1.3rem, 2vw, 1.65rem); letter-spacing: -0.02em; }
.hero-role em { color: #fff; font-size: 1.2em; }
.hero-lede { max-width: 56ch; margin-top: 18px; color: #a3a3a3; font-size: 16px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 34px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 0.12); }
.hero-facts span { display: inline-flex; align-items: center; gap: 18px; color: #8a8a8a; font: 400 12px var(--font-mono); letter-spacing: 0.02em; }
.hero-facts span + span::before { content: ""; width: 5px; height: 5px; background: #525252; }

/* Composición geométrica */
.hero-art { position: relative; display: grid; place-items: center; min-height: 400px; margin: 0; }
.ha { position: absolute; pointer-events: none; }
.ha-ring { left: 50%; top: 50%; width: 400px; height: 400px; margin: -200px 0 0 -200px; border: 1px solid rgb(255 255 255 / 0.14); border-radius: 50%; }
.ha-square { top: 4%; right: 4%; width: 104px; height: 104px; background: #fafafa; transition: transform .8s var(--ease); }
.ha-half { bottom: 9%; left: 2%; width: 180px; height: 90px; border-radius: 180px 180px 0 0; background: #fafafa; transition: transform .8s var(--ease); }
.ha-tri { bottom: 22%; right: 4%; width: 44px; height: 40px; background: #fafafa; clip-path: polygon(50% 0, 100% 100%, 0 100%); transition: transform .8s var(--ease); }
.ha-dots { top: 6%; left: 4%; width: 110px; height: 110px; background-image: radial-gradient(#fafafa 1.5px, transparent 1.8px); background-size: 14px 14px; opacity: .55; }

.hero-photo {
  position: relative;
  z-index: 1;
  width: min(290px, 74%);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--ink), 0 0 0 9px rgb(255 255 255 / 0.22);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: grayscale(1) contrast(1.08); transform: scale(1.04); transition: filter .7s var(--ease), transform .9s var(--ease); }
.hero-art:hover .hero-photo img { filter: grayscale(0) contrast(1); transform: scale(1.1); }
.hero-art:hover .ha-square { transform: rotate(90deg) scale(.9); }
.hero-art:hover .ha-half { transform: translateX(14px); }
.hero-art:hover .ha-tri { transform: rotate(180deg); }

.hero-badge {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 2%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--radius);
  background: #fafafa;
  color: var(--ink);
  box-shadow: 0 16px 32px -12px rgb(0 0 0 / 0.6);
}
.hero-badge-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); position: relative; overflow: hidden; flex: none; }
.hero-badge-mark::after { content: ""; position: absolute; right: -10px; bottom: -10px; width: 26px; height: 26px; border-radius: 50%; background: #fafafa; }
.hero-badge span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.hero-badge strong { font-size: 13.5px; font-weight: 600; }
.hero-badge small { color: var(--muted); font-size: 11.5px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.kpi { padding: 18px 20px 20px; }
.kpi header { display: flex; align-items: center; justify-content: space-between; color: var(--text); font-size: 13.5px; font-weight: 500; }
.kpi header .m { width: 12px; height: 12px; color: var(--ink); }
.kpi header .m-half { width: 14px; height: 7px; }
.kpi strong { display: block; margin-top: 12px; font-size: 34px; font-weight: 600; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi strong small { color: var(--muted); font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.kpi p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* ---------- Secciones ---------- */
.section { padding-top: 76px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.kicker .m { color: var(--ink); }
.sec-head h2 { margin-top: 12px; font-size: clamp(1.75rem, 3vw, 2.35rem); letter-spacing: -0.04em; }
.sec-sub { max-width: 62ch; margin-top: 8px; color: var(--muted); font-size: 15px; }
.count-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); font: 500 12px var(--font-mono); white-space: nowrap; }
.count-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ---------- Tabla de proyectos ---------- */
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { padding: 11px 16px; border-bottom: 1px solid var(--border); background: #fafaf9; color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: left; white-space: nowrap; }
.ptable td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable tbody tr { transition: background-color .15s; }
.ptable tbody tr:hover { background: #fafaf9; }
.pt-name { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; }
.pt-name img { width: 48px; height: 30px; object-fit: cover; object-position: top left; border: 1px solid var(--border); border-radius: 6px; }
.status { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-fg); font-size: 12.5px; font-weight: 500; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.row-link { color: var(--text); font-size: 13.5px; font-weight: 500; }
.row-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tarjetas de proyecto ---------- */
.project { display: flex; flex-direction: column; overflow: hidden; scroll-margin-top: calc(var(--top-h) + 16px); transition: box-shadow .25s, border-color .25s, transform .25s var(--ease); }
.project:hover { border-color: #d6d3d1; box-shadow: var(--shadow-md); }

.project-media {
  padding: 20px 20px 0;
  border-bottom: 1px solid var(--border);
  background-color: #f4f4f3;
  background-image: radial-gradient(rgb(10 10 10 / 0.07) 1px, transparent 1.3px);
  background-size: 16px 16px;
}
.frame { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--card); box-shadow: 0 16px 36px -22px rgb(0 0 0 / 0.4); }
.frame-bar { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--border); }
.dots { display: flex; align-items: center; gap: 6px; }
.dots i { display: block; width: 9px; height: 9px; background: #d6d3d1; }
.dots i:nth-child(1) { border-radius: 50%; }
.dots i:nth-child(3) { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.frame-url { min-width: 0; max-width: 340px; height: 20px; padding: 0 10px; border-radius: 6px; background: var(--hover); color: var(--muted); font: 400 11.5px/20px var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame-shot { display: block; overflow: hidden; cursor: zoom-in; }
.frame-shot img { width: 100%; aspect-ratio: 16 / 9.6; object-fit: cover; object-position: top left; transition: transform .6s var(--ease); }
.project:hover .frame-shot img { transform: scale(1.02); }

.thumbs { display: flex; gap: 8px; padding: 12px 0 14px; overflow-x: auto; }
.thumbs a { flex: none; width: 70px; overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: var(--card); opacity: .85; transition: opacity .15s, border-color .15s, transform .15s; }
.thumbs a:hover { opacity: 1; border-color: var(--ink); transform: translateY(-1px); }
.thumbs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }

.project-body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; flex: 1; padding: 22px 24px 24px; }
.project-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pnum { padding: 3px 7px; border-radius: 6px; background: var(--ink); color: #fafafa; font: 500 11.5px/1.2 var(--font-mono); }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--hover); color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge-ink { border-color: var(--ink); background: var(--ink); color: #fafafa; }
.project-body h3 { font-size: 21px; letter-spacing: -0.03em; }
.project-client { margin-top: -6px; color: var(--muted); font-size: 14px; }
.project-desc { color: var(--text); font-size: 14.5px; line-height: 1.6; }
.project-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); color: var(--text); font: 500 12px/1 var(--font-mono); }
.chips-strong span { border-color: var(--ink); background: var(--ink); color: #fafafa; }

/* Destacado */
.project-featured { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); margin-top: 16px; }
.project-featured .project-media { display: flex; flex-direction: column; padding: 24px 24px 0; border-bottom: 0; border-right: 1px solid var(--border); }
.project-featured .project-body { padding: 28px; gap: 14px; }
.project-featured .project-body h3 { font-size: 28px; letter-spacing: -0.035em; }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin-top: 2px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.mini-stats div { padding: 10px 14px; }
.mini-stats div + div { border-left: 1px solid var(--border); }
.mini-stats dt { color: var(--muted); font-size: 12px; }
.mini-stats dd { margin-top: 2px; font-size: 22px; font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }

.checks { display: flex; flex-direction: column; gap: 8px; }
.checks li { position: relative; padding-left: 20px; color: var(--text); font-size: 14px; line-height: 1.5; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; background: var(--ink); }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }

/* ---------- Lo que aporto ---------- */
.values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.value { padding: 24px 22px 26px; transition: border-color .2s, box-shadow .2s; }
.value:hover { border-color: #d6d3d1; box-shadow: var(--shadow-md); }
.value-shape { display: block; width: 44px; height: 44px; background: var(--ink); transition: transform .6s var(--ease); }
.v-circle { border-radius: 50%; }
.v-quarter { border-top-left-radius: 100%; }
.v-triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.v-half { width: 56px; height: 28px; margin-top: 16px; border-radius: 56px 56px 0 0; }
.value:hover .v-circle { transform: scale(.82); }
.value:hover .v-quarter { transform: rotate(90deg); }
.value:hover .v-triangle { transform: rotate(180deg); }
.value:hover .v-half { transform: rotate(180deg); }
.value h3 { margin-top: 24px; font-size: 17px; letter-spacing: -0.025em; }
.value p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ---------- Trayectoria (Gantt) ---------- */
.gantt { padding: 20px 24px 10px; }
.gantt-axis {
  display: grid;
  grid-template-columns: repeat(28, minmax(0, 1fr));
  margin-left: calc(220px + 20px);
  padding-bottom: 10px;
  color: var(--muted);
  font: 500 11.5px var(--font-mono);
}
.gantt-axis span { grid-row: 1; grid-column: var(--c) / span 4; }
.gantt-axis .gantt-today { grid-column: 26 / span 3; text-align: right; color: var(--ink); }

.gantt-rows li { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.gantt-label { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.gantt-label strong { font-size: 14px; font-weight: 600; }
.gantt-label span { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gantt-track {
  display: grid;
  grid-template-columns: repeat(28, minmax(0, 1fr));
  height: 36px;
  border-radius: 8px;
  background-color: #fafaf9;
  background-image:
    linear-gradient(to right, transparent calc(14.2857% - 0.5px), var(--border) calc(14.2857% - 0.5px), var(--border) calc(14.2857% + 0.5px), transparent calc(14.2857% + 0.5px)),
    linear-gradient(to right, transparent calc(57.1429% - 0.5px), var(--border) calc(57.1429% - 0.5px), var(--border) calc(57.1429% + 0.5px), transparent calc(57.1429% + 0.5px));
}
.bar {
  grid-row: 1;
  grid-column: var(--s) / var(--e);
  align-self: center;
  display: flex;
  align-items: center;
  height: 26px;
  margin: 0 2px;
  padding: 0 10px;
  overflow: hidden;
  border-radius: 6px;
  background: #e7e5e4;
  color: var(--text);
  font: 500 11.5px/1 var(--font-mono);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bar-now { background: var(--ink); color: #fafafa; }
.bar-now::after { content: ""; width: 6px; height: 6px; margin-left: auto; padding-left: 0; border-radius: 50%; background: #22c55e; flex: none; }

.jobs { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.job { overflow: hidden; transition: border-color .2s; }
.job:hover { border-color: #d6d3d1; }
.job summary {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto 18px;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}
.job summary::-webkit-details-marker { display: none; }
.job-mark { display: block; width: 12px; height: 12px; background: var(--ink); }
.job-mark.m-half { width: 12px; height: 6px; }
.job-head { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.job-head strong { font-size: 15.5px; font-weight: 600; letter-spacing: -0.015em; }
.job-head span { color: var(--muted); font-size: 13.5px; }
.job-date { color: var(--muted); font: 500 12.5px var(--font-mono); white-space: nowrap; }
.job-toggle { position: relative; width: 18px; height: 18px; }
.job-toggle::before, .job-toggle::after { content: ""; position: absolute; left: 3px; right: 3px; top: 8px; height: 2px; background: var(--ink); transition: transform .25s var(--ease); }
.job-toggle::after { transform: rotate(90deg); }
.job[open] .job-toggle::after { transform: rotate(0deg); }
.job-list { display: flex; flex-direction: column; gap: 8px; padding: 2px 20px 20px 48px; }
.job-list li { position: relative; padding-left: 16px; color: var(--text); font-size: 14.5px; line-height: 1.6; }
.job-list li::before { content: ""; position: absolute; left: 0; top: 0.66em; width: 5px; height: 5px; background: var(--ink); }

/* ---------- Stack ---------- */
.stack { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.skill { padding: 20px; }
.skill-wide { grid-column: span 2; }
.skill header { display: flex; align-items: center; gap: 10px; }
.skill header .m { width: 12px; height: 12px; color: var(--ink); }
.skill header .m-half { width: 14px; height: 7px; }
.skill h3 { font-size: 15px; letter-spacing: -0.015em; }
.skill .chips { margin-top: 14px; }

/* ---------- Formación ---------- */
.formation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.edu { position: relative; overflow: hidden; padding: 26px; }
.edu h3 { max-width: 22ch; margin-top: 16px; font-size: 22px; letter-spacing: -0.03em; }
.edu > p:last-child { max-width: 32ch; margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.edu-shape { position: absolute; right: 0; bottom: 0; width: 104px; height: 104px; border-top-left-radius: 100%; background: var(--ink); }
.soft { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.soft li { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 500; }
.soft li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  padding: 52px 48px 44px;
  border-radius: var(--radius-lg);
  background-color: var(--ink);
  background-image: radial-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1.3px);
  background-size: 22px 22px;
  color: #fafafa;
}
.cs { position: absolute; pointer-events: none; }
.cs-circle { top: -70px; right: 12%; width: 160px; height: 160px; border-radius: 50%; background: #fafafa; }
.cs-quarter { top: 0; right: 0; width: 76px; height: 76px; border-bottom-left-radius: 100%; background: #3f3f3f; }
.cs-ring { right: -120px; bottom: -160px; width: 340px; height: 340px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.14); }

.contact-copy, .contact-list { position: relative; z-index: 1; }
.contact-copy h2 { margin-top: 22px; font-size: clamp(2rem, 4.2vw, 3.3rem); letter-spacing: -0.045em; line-height: 1; }
.contact-copy > p:not(.chip-dark) { max-width: 44ch; margin-top: 16px; color: #a3a3a3; font-size: 15.5px; }

.contact-list { border-top: 1px solid rgb(255 255 255 / 0.12); }
.contact-list li { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid rgb(255 255 255 / 0.12); }
.contact-list li > span:first-child { color: #8a8a8a; font: 500 11px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.contact-list a, .contact-list li > span:last-child { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Footer ---------- */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px 32px 36px; color: var(--muted); font-size: 13px; }

/* ---------- Visor (lightbox :target) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 72px 96px; }
.lightbox:target { display: flex; animation: lb-in .2s ease-out; }
.lb-backdrop { position: absolute; inset: 0; background: rgb(10 10 10 / 0.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: zoom-out; }
.lightbox figure { position: relative; display: flex; flex-direction: column; gap: 14px; max-width: min(1400px, 100%); margin: 0; animation: lb-zoom .3s var(--ease); }
.lightbox figure img { width: auto; max-height: calc(100vh - 170px); margin: 0 auto; border: 1px solid rgb(255 255 255 / 0.14); border-radius: 10px; box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.7); }
.lightbox figcaption { display: flex; justify-content: space-between; gap: 16px; color: #e5e5e5; font-size: 14px; }
.lightbox figcaption span:last-child { color: var(--subtle); font: 500 13px var(--font-mono); }
.lb-nav, .lb-close { position: absolute; z-index: 1; display: grid; place-items: center; background: #fafafa; color: var(--ink); transition: transform .2s var(--ease); }
.lb-nav { top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; font-size: 20px; }
.lb-nav:hover { transform: scale(1.08); }
.lb-prev { left: 24px; }
.lb-next { right: 24px; border-radius: 10px; }
.lb-close { top: 18px; right: 24px; height: 36px; padding: 0 14px; border-radius: 9px; font: 500 12px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.lb-close:hover { transform: translateY(-1px); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lb-zoom { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Entrada ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-text > * { animation: rise .7s var(--ease) both; }
  .hero-text > :nth-child(2) { animation-delay: .05s; }
  .hero-text > :nth-child(3) { animation-delay: .1s; }
  .hero-text > :nth-child(4) { animation-delay: .15s; }
  .hero-text > :nth-child(5) { animation-delay: .2s; }
  .hero-text > :nth-child(6) { animation-delay: .25s; }
  .hero-photo { animation: pop .9s var(--ease) .1s both; }
  .ha-square, .ha-half, .ha-tri, .ha-dots, .hero-badge { animation: pop .8s var(--ease) both; }
  .ha-square { animation-delay: .25s; }
  .ha-half { animation-delay: .35s; }
  .ha-tri { animation-delay: .45s; }
  .ha-dots { animation-delay: .3s; }
  .hero-badge { animation-delay: .55s; }
  .kpi { animation: rise .7s var(--ease) both; }
  .kpi:nth-child(1) { animation-delay: .3s; }
  .kpi:nth-child(2) { animation-delay: .36s; }
  .kpi:nth-child(3) { animation-delay: .42s; }
  .kpi:nth-child(4) { animation-delay: .48s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1240px) {
  .project-featured { grid-template-columns: minmax(0, 1fr); }
  .project-featured .project-media { border-right: 0; border-bottom: 1px solid var(--border); }
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .topbar { padding: 0 20px; }
  .topbar-brand { display: inline-flex; }
  .cmd { display: none; }
  .top-nav { display: flex; gap: 18px; margin-left: 8px; }
  .top-nav a { color: var(--text); font-size: 14px; font-weight: 500; }
  .top-nav a:hover { color: var(--ink); }
  .content { padding: 18px 20px 0; }
  .footer { padding: 28px 20px 36px; }

  .hero { grid-template-columns: minmax(0, 1fr); padding: 40px 32px 32px; }
  .hero-art { min-height: 360px; max-width: 460px; width: 100%; justify-self: center; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 44px 32px 36px; }
}

@media (max-width: 760px) {
  .crumbs { display: none; }
  .content { padding-top: 14px; }
  .hero { margin-top: 0; padding: 28px 20px 24px; border-radius: 16px; }
  .hero h1 { margin-top: 20px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-art { min-height: 300px; }
  .ha-ring { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
  .ha-square { width: 72px; height: 72px; }
  .ha-half { width: 120px; height: 60px; }
  .ha-dots { width: 80px; height: 80px; }
  .hero-photo { width: min(220px, 64%); }
  .hero-badge { left: 50%; right: auto; translate: -50% 0; bottom: 0; white-space: nowrap; }
  .hero-facts { flex-direction: column; gap: 6px; }
  .hero-facts span + span::before { display: none; }

  .kpis { gap: 10px; }
  .kpi { padding: 14px 14px 16px; }
  .kpi strong { font-size: 28px; }

  .section { padding-top: 60px; }
  .sec-head { flex-direction: column; align-items: flex-start; }

  .ptable th:nth-child(3), .ptable td:nth-child(3),
  .ptable th:nth-child(4), .ptable td:nth-child(4),
  .ptable th:nth-child(5), .ptable td:nth-child(5) { display: none; }
  .ptable td, .ptable th { padding: 11px 12px; }
  .ptable th:nth-child(1), .ptable td:nth-child(1) { display: none; }
  .ptable td:nth-child(2) { white-space: normal; }
  .pt-name { line-height: 1.35; }

  .project-media, .project-featured .project-media { padding: 14px 14px 0; }
  .project-body, .project-featured .project-body { padding: 18px; }
  .project-featured .project-body h3 { font-size: 23px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .mini-stats div { padding: 8px 10px; }
  .mini-stats dd { font-size: 18px; }

  .values, .stack, .formation { grid-template-columns: minmax(0, 1fr); }
  .skill-wide { grid-column: auto; }

  .gantt { padding: 16px 16px 6px; }
  .gantt-axis { margin-left: 0; }
  .gantt-rows li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gantt-track { height: 24px; }
  .bar { height: 16px; padding: 0 5px; font-size: 0; }
  .bar-now::after { width: 5px; height: 5px; }
  .job summary { grid-template-columns: 12px minmax(0, 1fr) 18px; gap: 12px; padding: 14px 16px; }
  .job-date { grid-column: 2; grid-row: 2; }
  .job-toggle { grid-column: 3; grid-row: 1; }
  .job-list { padding: 0 16px 16px 40px; }

  .contact { padding: 36px 20px 28px; border-radius: 16px; }
  .cs-circle { width: 110px; height: 110px; top: -50px; }
  .contact-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }

  .lightbox { padding: 64px 10px 88px; }
  .lb-nav { top: auto; bottom: 18px; margin-top: 0; }
  .lb-prev { left: calc(50% - 54px); }
  .lb-next { right: calc(50% - 54px); }
  .lightbox figure img { max-height: calc(100vh - 200px); }
}

@media (max-width: 480px) {
  .top-nav { display: none; }
  .hero h1 { font-size: 2.35rem; }
  .kpi p { font-size: 12.5px; }
  .footer { flex-direction: column; }
}
