/* Editorial system. 8px grid. One accent. Serif for voice, sans for chrome. */
:root {
  color-scheme: light;
  --bg: #fafafa;
  --bg-2: #f1f1f3;
  --ink: #2c2c2c;
  --mute: #6b6b6b;
  --line: rgba(44, 44, 44, 0.12);
  --accent: #3d35ff;
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: Geist, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(24px, 6vw, 88px);
  --measure: 42rem;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c0d;
  --bg-2: #141416;
  --ink: #ececec;
  --mute: #9a9a9e;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #7b75ff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 16px; top: 12px;
  padding: 8px 12px;
  background: var(--ink); color: var(--bg);
  font-family: var(--sans); font-size: 13px;
  text-decoration: none;
  transform: translateY(-140%);
  z-index: 80;
}
.skip:focus { transform: none; }

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 28px var(--pad) 36px;
  background: linear-gradient(to bottom, var(--bg) 55%, color-mix(in srgb, var(--bg) 70%, transparent) 80%, transparent);
  pointer-events: none;
}
.nav a, .nav button { pointer-events: auto; }
.nav-end {
  display: flex;
  align-items: center;
  gap: 18px;
}
.lang {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--mute);
}
.lang button {
  padding: 0;
  color: var(--mute);
  transition: color 0.3s var(--ease);
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-links a {
  text-decoration: none;
  color: var(--mute);
  transition: color 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--accent); }

.orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.orb:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 18%, transparent);
}

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 132px var(--pad) 56px;
}
.hero-inner { max-width: var(--measure); margin-top: auto; margin-bottom: auto; }
.hello {
  margin: 0 0 36px;
  font-size: clamp(28px, 3.1vw, 36px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
}
.hello em { font-style: italic; font-weight: 400; }
.lede {
  margin: 0 0 22px;
  font-size: clamp(20px, 2.05vw, 24px);
  line-height: 1.38;
}
.lede a {
  font-style: italic;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 92%;
  background-repeat: no-repeat;
  transition: color 0.3s var(--ease);
}
.lede a:hover { color: var(--accent); }
.mail {
  display: block;
  width: fit-content;
  margin: 16px 0 0;
  font-size: 18px;
  color: var(--mute);
  text-decoration: none;
}
.mail:hover { color: var(--ink); }
.to-work {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
  font-size: 20px;
  text-decoration: none;
}
.to-work i {
  display: inline-block;
  transition: transform 0.4s var(--ease);
}
.to-work:hover i { transform: translateY(4px); }

html.motion .hello span,
html.motion .lede,
html.motion .mail,
html.motion .to-work {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.9s var(--ease) forwards;
}
html.motion .lede { animation-delay: 0.12s; }
html.motion .mail { animation-delay: 0.24s; }
html.motion .to-work { animation-delay: 0.32s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.work { padding: 0 0 64px; }
#trabajo { scroll-margin-top: 72px; }
.project {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(160px, 12rem);
  gap: 12px 64px;
  align-items: start;
  padding: 80px var(--pad);
  border-top: 1px solid var(--line);
}
.project:last-of-type { border-bottom: 1px solid var(--line); }
.project-index {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.project-copy { min-width: 0; max-width: 36rem; }
.project-kicker {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.project h2 {
  margin: 0 0 28px;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.project-tag {
  margin: 0 0 22px;
  font-size: 22px;
  font-style: italic;
  line-height: 1.35;
  color: var(--mute);
}
.project-copy > p:not([class]) {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
}
.project a {
  font-style: italic;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 92%;
  background-repeat: no-repeat;
}
.project a:hover { color: var(--accent); }
.project-meta {
  margin: 40px 0 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.project-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.project-points li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  counter-increment: step;
}
.project-points li:last-child { border-bottom: 1px solid var(--line); }
.project-points li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.about {
  padding: 132px var(--pad) 80px;
  min-height: 100svh;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
  max-width: 1180px;
}
.about h1 {
  margin: 0 0 28px;
  font-size: 28px;
  font-weight: 400;
}
.about h2 {
  margin: 48px 0 16px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.about p {
  margin: 0 0 22px;
  font-size: 22px;
  line-height: 1.42;
  max-width: 36rem;
}
.about a {
  font-style: italic;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 92%;
  background-repeat: no-repeat;
}
.about a:hover { color: var(--accent); }
.edu {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  font-size: 18px;
  color: var(--mute);
}
.about h2 + .edu { margin-top: 0; }
.edu li { margin: 0 0 12px; }
.edu b { font-weight: 500; color: var(--ink); }
.edu-place { display: block; margin-top: 6px; }
.edu-note {
  margin: 14px 0 0;
  max-width: 36rem;
  font-size: 18px;
  line-height: 1.42;
  color: var(--ink);
}

.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-2);
  overflow: hidden;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}
.portrait-note {
  margin: 12px 0 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--mute);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px var(--pad) 40px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--mute);
}
footer nav { display: flex; gap: 20px; }
footer a { color: var(--mute); text-decoration: none; }
footer a:hover { color: var(--ink); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  translate: -50% 16px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, translate 0.3s var(--ease);
  z-index: 60;
}
.toast.is-on { opacity: 1; translate: -50% 0; }

@media (max-width: 900px) {
  .project {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 28px;
    padding: 64px var(--pad);
  }
  .project-points { grid-column: 2; max-width: 16rem; margin-top: 32px; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 360px; }
  footer nav { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  body { font-size: 18px; }
  .nav { padding: 20px 16px 28px; }
  .nav-links { gap: 12px; font-size: 12px; }
  .nav-end { gap: 12px; }
  .hero { padding: 96px 20px 40px; }
  .hello { font-size: 24px; }
  .lede { font-size: 18px; }
  .project { grid-template-columns: 1fr; padding: 56px 20px; }
  .project:first-child { padding-top: 88px; }
  .project-index { margin-bottom: 16px; }
  .project-points { grid-column: auto; max-width: none; margin-top: 28px; }
  .about { padding: 104px 20px 64px; }
  .about p { font-size: 19px; }
  .portrait { max-width: 280px; }
  footer { padding: 20px 20px 32px; }
  footer nav { gap: 14px; }
}
