:root {
  color-scheme: dark;
  --ink: #0b0c0e;
  --panel: #15171a;
  --panel-2: #1b1d21;
  --paper: #f0f1f2;
  --text: #f2f3f4;
  --muted: #9a9da3;
  --dim: #666a71;
  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.065);
  --max: 960px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 481px), rgba(255,255,255,.025) calc(50% - 480px), transparent calc(50% - 479px)),
    linear-gradient(90deg, transparent calc(50% + 479px), rgba(255,255,255,.025) calc(50% + 480px), transparent calc(50% + 481px)),
    var(--ink);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 28% 10%, rgba(255,255,255,.045), transparent 28rem);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), var(--max));
  height: 82px;
  transform: translateX(-50%);
  pointer-events: none;
}

.site-mark {
  display: inline-flex;
  align-items: baseline;
  color: var(--paper);
  font-size: 1.28rem;
  font-weight: 850;
  letter-spacing: -.08em;
  pointer-events: auto;
}

.site-mark span { color: #777b82; }

.nav-pill {
  display: flex;
  align-items: center;
  gap: 26px;
  pointer-events: auto;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  color: #777b82;
  font-size: .78rem;
  font-weight: 650;
  white-space: nowrap;
  transition: color 160ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-link:hover, .nav-link.is-active { color: var(--paper); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); transform-origin: left; }

.language-wheel {
  position: fixed;
  z-index: 30;
  bottom: 20px;
  left: 50%;
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13,14,16,.92);
  box-shadow: 0 16px 48px rgba(0,0,0,.42);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
  touch-action: pan-x;
  user-select: none;
}

.language-option {
  height: 31px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6f737a;
  font-size: .68rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 200ms ease;
}

.language-option:hover { color: #d8dade; }
.language-option.is-active { background: var(--paper); color: #111214; }
.language-wheel.is-turning .language-option { transform: translateX(var(--wheel-direction, 0)); }

main, .footer {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.home-page { height: 100vh; overflow: hidden; }
.home-page main, .home-page .hero-section { height: 100vh; }

.section { padding: 118px 0 64px; }
.hero-section { padding-top: 102px; }

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 250px;
  padding: 34px 14px 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow, .card-kicker {
  margin: 0 0 10px;
  color: #7f838a;
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

.hero-card h1 {
  margin-bottom: 9px;
  font-size: clamp(3.5rem, 7vw, 5.3rem);
  line-height: .88;
  letter-spacing: -.075em;
}

.hero-copy {
  max-width: 610px;
  margin: 18px 0 25px;
  color: #b4b7bc;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 490;
}

.social-links { display: flex; flex-wrap: wrap; gap: 18px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  border-bottom: 1px solid #45484e;
  color: #c7c9cd;
  font-size: .78rem;
  font-weight: 650;
  transition: color 160ms ease, border-color 160ms ease;
}

.button:hover { color: white; border-color: white; }

.experience {
  display: flex;
  min-width: 170px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.experience strong {
  color: #777b82;
  font-size: clamp(3.6rem, 7vw, 5rem);
  line-height: .9;
  letter-spacing: -.07em;
}

.experience span { margin-top: 10px; color: #74777d; font-size: .76rem; font-weight: 650; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.dashboard-card {
  position: relative;
  min-width: 0;
  min-height: 164px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: var(--panel);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.dashboard-card:hover { border-color: #484c53; background: var(--panel-2); transform: translateY(-2px); }
.featured-dashboard-card { grid-column: 1 / -1; min-height: 142px; background: var(--paper); color: #111214; }
.featured-dashboard-card:hover { border-color: white; background: white; }
.featured-dashboard-card .card-kicker, .featured-dashboard-card p { color: #5c6066; }
.featured-dashboard-card .tag-row span { background: #d9dbde; color: #373a3f; }
.featured-dashboard-card .arrow { color: #6e7278; }
.featured-dashboard-card p { max-width: 700px; }

.dashboard-card h2 { margin: 16px 0 6px; font-size: 1.12rem; letter-spacing: -.025em; }
.dashboard-card p { max-width: 680px; margin-bottom: 12px; color: var(--muted); font-size: .83rem; }
.arrow { position: absolute; top: 19px; right: 21px; color: #676b72; font-size: 1rem; transition: transform 180ms ease, color 180ms ease; }
.dashboard-card:hover .arrow { color: currentColor; transform: translate(2px,-2px); }

.tag-row, .tech-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-row span, .tech-list span { padding: 4px 8px; border-radius: 4px; background: #23252a; color: #aeb1b6; font-size: .69rem; }
.stack-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 17px 0 6px; color: #b3b6bb; font-size: .8rem; }
.stack-preview b { display: inline-grid; width: 18px; height: 18px; margin-right: 5px; place-items: center; border-radius: 3px; background: #b6b8bd; color: #24262a; font-size: .55rem; }
.muted { color: var(--dim); font-size: .72rem; }
.flags { position: absolute; right: 21px; bottom: 20px; color: #a6a9ae; font-size: .72rem; letter-spacing: .24em; }

.page-main { min-height: calc(100vh - 100px); padding-top: 102px; }
.page-main .section { padding: 0 0 64px; }
.back-link { display: inline-block; margin-bottom: 34px; color: #70747b; font-size: .76rem; font-weight: 650; }
.back-link:hover { color: var(--paper); }

.section-heading {
  max-width: 760px;
  margin-bottom: 46px;
}

.section-heading h1, .section-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: .9;
  letter-spacing: -.075em;
}

.section-heading > p:last-child { max-width: 580px; color: var(--muted); font-size: 1rem; }

.stack-groups {
  display: grid;
  counter-reset: stack;
  border-bottom: 1px solid var(--line);
}

.content-card {
  display: grid;
  grid-template-columns: 46px 180px 1fr;
  align-items: start;
  gap: 12px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
  counter-increment: stack;
}

.content-card::before { content: "0" counter(stack); color: #555960; font-size: .7rem; font-variant-numeric: tabular-nums; }
.content-card h2, .content-card h3 { margin: -2px 0 0; font-size: .92rem; font-weight: 650; }
.content-card .tech-list { gap: 9px; }
.content-card .tech-list span { padding: 0; background: transparent; color: #a9acb1; font-size: .82rem; }
.content-card .tech-list span:not(:last-child)::after { content: ","; }

.project-list { display: grid; }

.project-feature {
  display: grid;
  grid-template-columns: minmax(0,.62fr) minmax(0,1.38fr);
  gap: 36px;
  align-items: center;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-copy { display: flex; flex-direction: column; align-items: flex-start; padding-left: 1px; }
.project-copy h2 { margin: 12px 0 10px; font-size: 1.7rem; letter-spacing: -.035em; }
.project-copy p { color: var(--muted); font-size: .85rem; }
.project-copy .tech-list { margin-top: 10px; }
.project-copy .text-link { margin-top: 24px; }
.text-link { padding-bottom: 3px; border-bottom: 1px solid #555960; color: var(--paper); font-size: .76rem; font-weight: 700; }
.text-link:hover { border-color: white; }

.project-preview {
  display: block;
  width: 100%;
  aspect-ratio: 2549 / 1301;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #08090a;
  transition: transform 220ms ease, border-color 180ms ease;
}

.project-preview:hover { border-color: #555960; transform: translateY(-3px); }
.project-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }

.photo-heading {
  display: grid;
  grid-template-columns: 1fr 310px;
  align-items: end;
  max-width: none;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.photo-heading > p { margin-bottom: 4px; }
.photo-archive { display: grid; }

.photo-collection { padding-top: 22px; }
.collection-header {
  display: grid;
  grid-template-columns: 46px 1fr auto auto;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 18px;
}

.collection-number, .collection-count { color: #5f636a; font-size: .68rem; font-variant-numeric: tabular-nums; }
.collection-header h2 { margin: 0; font-size: 1.12rem; letter-spacing: -.025em; }
.collection-header p { margin: 0; color: #7f8389; font-size: .76rem; }

.collection-empty {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  align-items: end;
  min-height: 390px;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background:
    linear-gradient(135deg, transparent 52%, rgba(255,255,255,.025)),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(255,255,255,.018) 48px),
    #121417;
}

.collection-empty::after { content: "01"; position: absolute; top: 24px; right: 28px; color: #3f4248; font-size: .7rem; }
.collection-empty strong { color: transparent; font-size: clamp(5rem, 18vw, 11rem); line-height: .7; letter-spacing: -.09em; -webkit-text-stroke: 1px rgba(255,255,255,.18); }
.collection-empty div { justify-self: end; max-width: 250px; padding-bottom: 4px; }
.collection-empty p { margin-bottom: 6px; color: #c2c4c8; font-size: .9rem; }
.collection-empty small { color: #6f737a; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}

.archive-photo {
  position: relative;
  grid-column: span 7;
  min-height: 380px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #15171a;
  color: white;
  cursor: zoom-in;
}

.archive-photo-2 { grid-column: span 5; }
.archive-photo-3 { grid-column: 3 / span 8; }
.archive-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms cubic-bezier(.2,.7,.2,1); }
.archive-photo:hover img { transform: scale(1.025); }
.archive-photo span { position: absolute; right: 15px; bottom: 13px; left: 15px; color: white; font-size: .72rem; text-align: left; text-shadow: 0 1px 12px black; }

.photo-lightbox {
  width: min(94vw, 1200px);
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
}

.photo-lightbox::backdrop { background: rgba(5,5,6,.93); backdrop-filter: blur(8px); }
.photo-lightbox img { display: block; max-width: 100%; max-height: 84vh; margin: auto; object-fit: contain; }
.lightbox-caption { margin-top: 12px; color: #a9acb1; font-size: .75rem; text-align: center; }
.lightbox-close { position: fixed; top: 20px; right: 22px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: #111214; color: white; font-size: .72rem; cursor: pointer; }

.footer {
  display: flex;
  justify-content: space-between;
  padding: 48px 0 34px;
  border-top: 1px solid var(--line-soft);
  color: #656970;
  font-size: .72rem;
}

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

@media (max-width: 720px) {
  body { background: var(--ink); }
  .site-header { width: calc(100% - 20px); height: 64px; }
  .site-mark { flex: 0 0 auto; margin-right: 20px; font-size: 1.05rem; }
  .nav-pill { min-width: 0; flex: 1; justify-content: flex-end; gap: 13px; overflow-x: auto; scrollbar-width: none; }
  .nav-pill::-webkit-scrollbar { display: none; }
  .nav-link { font-size: .67rem; }
  .language-wheel { bottom: 10px; }
  .language-option { height: 29px; padding-inline: 11px; font-size: .62rem; }
  main, .footer { width: calc(100% - 20px); }

  .hero-section { padding-top: 73px; }
  .hero-card { grid-template-columns: 1fr; min-height: 208px; padding: 21px 2px; }
  .hero-card h1 { font-size: 3.1rem; }
  .hero-copy { max-width: 96%; margin: 11px 0 15px; font-size: .87rem; line-height: 1.45; }
  .social-links { gap: 13px; }
  .button { font-size: .69rem; }
  .experience { display: none; }
  .dashboard-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
  .dashboard-card { min-height: 134px; padding: 14px; border-radius: 8px; }
  .featured-dashboard-card { min-height: 116px; }
  .dashboard-card h2 { margin-top: 11px; font-size: .95rem; }
  .dashboard-card p { margin-bottom: 7px; font-size: .67rem; line-height: 1.35; }
  .card-kicker { font-size: .54rem; }
  .arrow { top: 12px; right: 13px; }
  .tag-row { gap: 4px; }
  .tag-row span { padding: 3px 5px; font-size: .53rem; }
  .stack-preview { grid-template-columns: 1fr; gap: 5px; margin: 10px 0 3px; font-size: .63rem; }
  .stack-preview span:nth-child(n+3) { display: none; }
  .stack-preview b { width: 15px; height: 15px; font-size: .48rem; }
  .muted, .flags { font-size: .57rem; }
  .flags { right: 13px; bottom: 12px; }

  .page-main { padding-top: 78px; }
  .back-link { margin-bottom: 26px; }
  .section-heading { margin-bottom: 34px; }
  .section-heading h1, .section-heading h2 { font-size: 3.55rem; }
  .section-heading > p:last-child { font-size: .88rem; }

  .content-card { grid-template-columns: 35px 1fr; gap: 8px; }
  .content-card .tech-list { grid-column: 2; margin-top: 8px; }
  .content-card .tech-list span { font-size: .75rem; }

  .project-feature { grid-template-columns: 1fr; gap: 25px; padding: 24px 0; }
  .project-preview { order: -1; }
  .project-copy p { font-size: .82rem; }

  .photo-heading { grid-template-columns: 1fr; gap: 18px; }
  .collection-header { grid-template-columns: 34px 1fr auto; gap: 10px; }
  .collection-header p { display: none; }
  .collection-empty { grid-template-columns: 1fr; min-height: 330px; padding: 20px; }
  .collection-empty strong { align-self: center; font-size: 28vw; }
  .collection-empty div { justify-self: start; }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-photo, .archive-photo-2, .archive-photo-3 { grid-column: auto; min-height: 310px; }
  .footer { padding-bottom: 72px; }
}

@media (max-height: 760px) and (min-width: 721px) {
  .hero-section { padding-top: 82px; }
  .hero-card { min-height: 215px; padding-block: 25px; }
  .featured-dashboard-card { min-height: 120px; }
  .dashboard-card { min-height: 145px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Estructura original, con un acabado más sobrio y menos genérico. */
.site-header {
  justify-content: center;
  height: 88px;
}

.nav-pill {
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 20, 23, .88);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .24);
  backdrop-filter: blur(14px);
}

.nav-link {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: .72rem;
}

.nav-link::after { display: none; }
.nav-link.is-active { background: var(--paper); color: #111214; }
.nav-link:hover:not(.is-active) { background: rgba(255,255,255,.06); }

.hero-section { padding-top: 102px; }

.hero-card {
  min-height: 260px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(27,29,33,.95), rgba(18,20,23,.96));
}

.dashboard-grid { margin-top: 14px; }
.dashboard-card { border-radius: 16px; }

.page-main { padding-top: 112px; }
.section-heading { margin-bottom: 36px; }
.section-heading h1,
.section-heading h2 { font-size: clamp(3.2rem, 7vw, 5.4rem); }

.stack-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border: 0;
}

.content-card {
  display: block;
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--panel);
  counter-increment: none;
}

.content-card::before { display: none; }
.content-card h2,
.content-card h3 { margin: 0 0 24px; font-size: 1rem; }
.content-card .tech-list { gap: 7px; }
.content-card .tech-list span {
  padding: 5px 9px;
  border-radius: 5px;
  background: #23262b;
  color: #b9bcc1;
}
.content-card .tech-list span:not(:last-child)::after { content: none; }

.project-feature {
  gap: 30px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.photo-heading {
  display: block;
  max-width: 760px;
  padding-bottom: 0;
  border: 0;
}
.photo-heading > p { margin-bottom: 0; }

.photo-collection {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(21,23,26,.72);
}

.collection-empty {
  min-height: 350px;
  border-color: rgba(255,255,255,.08);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.018), transparent 55%),
    #101215;
}

@media (max-width: 720px) {
  .site-header { height: 66px; }
  .nav-pill { flex: none; max-width: calc(100vw - 20px); gap: 1px; }
  .nav-link { padding: 7px 10px; font-size: .64rem; }
  .hero-section { padding-top: 76px; }
  .hero-card { min-height: 218px; padding: 22px; border-radius: 17px; }
  .stack-groups { grid-template-columns: 1fr; gap: 10px; }
  .content-card { min-height: 0; }
  .project-feature { padding: 14px; border-radius: 16px; }
  .photo-collection { padding: 12px; border-radius: 16px; }
  .collection-empty { min-height: 315px; }
}
