/* styles.css — vicbas.com (main), "papel continuo" design system.
   Tokens, rationale and wireframe: .odd/design-direction.md
   One sheet of continuous-form paper on a desk. Rules have weight,
   lists print on navy bars, one accent (navy), one load-time print
   moment. No uppercase transforms, no gradients, no card shadows. */

:root {
  --ink: #1b2432;
  --paper: #ffffff;
  --bar: #e9eef6;
  --ledger: #1a3a5c;
  --rule: #ccd7e4;
  --desk: #dfe5ed;
  --ink-70: rgba(27, 36, 50, 0.72);
  --sheet-pad: clamp(1.25rem, 4.5vw, 4rem);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 420;
  font-size: 100%;
  line-height: 1.6;
}

/* --- Sheet ------------------------------------------------------------------ */

.sheet {
  position: relative;
  max-width: 1120px;
  margin: clamp(1rem, 3vw, 2.5rem) auto;
  background: var(--paper);
  box-shadow:
    0 2px 0 rgba(27, 36, 50, 0.08),
    0 24px 60px -22px rgba(27, 36, 50, 0.3);
}

/* Tractor-feed punch holes on both sheet edges (wide screens only). */
@media (min-width: 960px) {
  .sheet::before,
  .sheet::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 26px;
    background-image: radial-gradient(
      circle at 50% 11px,
      var(--desk) 3px,
      transparent 3.8px
    );
    background-size: 26px 22px;
    background-repeat: repeat-y;
  }
  .sheet::before {
    left: 0;
  }
  .sheet::after {
    right: 0;
  }
}

.sheet-inner {
  padding-inline: var(--sheet-pad);
}

/* Perforation between sections: a row of tear holes. */
.tear {
  height: 16px;
  margin-inline: var(--sheet-pad);
  background-image: radial-gradient(circle at 50% 50%, var(--desk) 2.2px, transparent 2.8px);
  background-size: 14px 16px;
  background-repeat: repeat-x;
  background-position: 0 center;
}

/* --- Top bar ---------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem var(--sheet-pad);
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.topbar-brand {
  font-weight: 700;
  font-stretch: 118%;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.topbar-nav ul {
  display: flex;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.topbar-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

.lang-toggle {
  display: flex;
  gap: 0.4rem;
}

.lang-btn {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 640;
  min-width: 2.7rem;
  padding: 0.3rem 0.55rem;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.lang-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* --- Shared elements --------------------------------------------------------- */

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

a:hover {
  color: var(--ledger);
}

:focus-visible {
  outline: 3px solid var(--ledger);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--bar);
}

.skip {
  position: absolute;
  left: -10000px;
}

.skip:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  text-decoration: none;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  font-weight: 640;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.section {
  padding-block: clamp(2.5rem, 6vw, 3.75rem) clamp(2rem, 5vw, 3rem);
  scroll-margin-top: 5rem;
}

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-bottom: 0.65rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
  border-bottom: 2px solid var(--ink);
}

.sec-head h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-stretch: 112%;
}

.sec-intro {
  max-width: 46ch;
  color: var(--ink-70);
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 640;
  font-stretch: 105%;
  font-size: 0.98rem;
  padding: 0.72rem 1.25rem;
  border-radius: 4px;
  border: 2px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--ledger);
  border-color: var(--ledger);
  color: #fff;
}

.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

/* --- Hero -------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(2.75rem, 7vw, 4.5rem) clamp(2.25rem, 5vw, 3.25rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.72fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.hero-role {
  color: var(--ledger);
  font-weight: 620;
  font-size: 1.02rem;
  margin-bottom: 1.1rem;
}

.hero-statement {
  font-size: clamp(2.05rem, 5.4vw, 3.55rem);
  font-stretch: 118%;
  max-width: 15ch;
  text-wrap: balance;
}

.hero-sub {
  margin-top: 1.4rem;
  max-width: 56ch;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.6rem;
  color: var(--ledger);
  font-weight: 620;
  font-size: 0.98rem;
}

.status-line::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ledger);
  flex: none;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-top: clamp(2rem, 5vw, 2.75rem);
}

.field {
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  padding: 0.55rem 0.8rem;
}

.field-label {
  display: block;
  color: var(--ledger);
  font-size: 0.8rem;
  font-weight: 620;
}

.field-value {
  display: block;
  font-weight: 640;
  font-stretch: 108%;
  font-size: 1.05rem;
  margin-top: 0.1rem;
}

/* Photo with print crop marks, like a proof sheet. */
.photo-frame {
  position: relative;
  padding: 14px;
  max-width: 285px;
}

.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(10%) contrast(1.02);
}

.photo-frame::before,
.photo-frame::after,
.photo-inner::before,
.photo-inner::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border: 0 solid var(--ledger);
}

.photo-frame::before {
  top: 0;
  left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
}

.photo-frame::after {
  top: 0;
  right: 0;
  border-top-width: 2px;
  border-right-width: 2px;
}

.photo-inner::before {
  bottom: 0;
  left: 0;
  border-bottom-width: 2px;
  border-left-width: 2px;
}

.photo-inner::after {
  bottom: 0;
  right: 0;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.photo-inner {
  position: relative;
}

.photo-caption {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.3rem 0.65rem;
  background: var(--bar);
  font-size: 0.88rem;
  font-weight: 620;
  color: var(--ink);
}

/* --- Landing imagery: hero band + exhibit images ---------------------------- */

/* Full-bleed hero band inside the sheet — the page's one big visual moment. */
.hero-band {
  position: relative;
  margin: clamp(2.25rem, 5vw, 3.5rem) calc(-1 * var(--sheet-pad)) 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.hero-band img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.05);
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ledger) 22%, transparent);
  pointer-events: none;
}

@media (max-width: 700px) {
  .hero-band img {
    aspect-ratio: 16 / 10;
  }
}

/* Service proposal exhibits. */
.proposal-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1.5px solid var(--rule);
  margin-bottom: 1rem;
  filter: saturate(0.8) contrast(1.03);
}

/* Work record thumbnails — printed exhibits on the continuous sheet. */
.record-img {
  display: block;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1.5px solid var(--rule);
  margin-bottom: 0.9rem;
  filter: saturate(0.85);
}

/* --- The print moment (the one orchestrated animation) ------------------------ */

.hero .pr {
  animation: print-line 0.5s ease-out both;
  animation-delay: var(--d, 0s);
}

.carriage {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: var(--ledger);
  animation: print-carriage 1.25s cubic-bezier(0.25, 0.6, 0.3, 1) forwards;
  pointer-events: none;
}

.carriage::after {
  content: "";
  position: absolute;
  right: 10%;
  top: -5px;
  width: 26px;
  height: 13px;
  background: var(--ledger);
  border-radius: 2px 2px 0 0;
}

@keyframes print-line {
  from {
    clip-path: inset(0 0 101% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes print-carriage {
  0% {
    top: 0;
    opacity: 1;
  }
  86% {
    opacity: 1;
  }
  100% {
    top: calc(100% - 3px);
    opacity: 0;
  }
}

/* --- Quién soy --------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.about-text p {
  max-width: 64ch;
  font-size: 1.07rem;
}

.about-text p + p {
  margin-top: 1.1rem;
}

.fact {
  padding-block: 0.7rem;
  border-top: 2px solid var(--rule);
}

.fact:first-child {
  border-top: 2px solid var(--ink);
}

/* --- Qué hago ----------------------------------------------------------------- */

.proposals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
}

.proposal {
  border-top: 2px solid var(--rule);
  padding-top: 1.1rem;
}

.proposal h3 {
  font-size: 1.18rem;
  font-stretch: 108%;
  margin-bottom: 0.55rem;
}

.proposal p {
  color: var(--ink-70);
  max-width: 46ch;
}

/* --- Trabajo ------------------------------------------------------------------ */

.record {
  padding-block: 1.35rem;
  border-top: 1.5px solid var(--rule);
}

.record:first-child {
  border-top: 2px solid var(--ink);
}

.record-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.1rem;
  background: var(--bar);
  padding: 0.4rem 0.9rem;
}

.record-platform {
  color: var(--ledger);
  font-size: 0.82rem;
  font-weight: 640;
}

.record-name {
  font-size: 1.28rem;
  font-stretch: 112%;
}

.record-desc {
  margin-top: 0.75rem;
  max-width: 72ch;
  color: var(--ink-70);
}

.record-link {
  display: inline-block;
  margin-top: 0.65rem;
  color: var(--ledger);
  font-weight: 620;
  text-decoration-thickness: 1.5px;
}

.work-others {
  margin-top: 2.25rem;
  padding: 1rem 1.25rem;
  background: var(--bar);
  border-left: 3px solid var(--ledger);
  max-width: 72ch;
}

.work-others .work-others-label {
  font-weight: 640;
}

.module-label {
  margin-top: 2.25rem;
  font-weight: 640;
  font-size: 0.95rem;
}

.module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.module {
  border: 1.5px solid var(--rule);
  border-radius: 2px;
  padding: 0.22rem 0.6rem;
  font-size: 0.88rem;
}

/* --- Trayectoria ---------------------------------------------------------------- */

.trow {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 0.4rem 1.5rem;
  padding-block: 1.15rem;
  border-top: 1.5px solid var(--rule);
}

.trow:first-child {
  border-top: 2px solid var(--ink);
}

.trow-period {
  font-variant-numeric: tabular-nums;
  font-weight: 640;
  font-stretch: 108%;
  text-align: right;
  padding-top: 0.1rem;
  white-space: nowrap;
}

.trow-role {
  font-size: 1.04rem;
  font-stretch: 106%;
}

.trow-org {
  margin-top: 0.15rem;
  color: var(--ledger);
  font-weight: 620;
  font-size: 0.93rem;
}

.trow-note {
  margin-top: 0.35rem;
  max-width: 66ch;
  color: var(--ink-70);
  font-size: 0.95rem;
}

.credentials {
  margin-top: 2.5rem;
  background: var(--bar);
  padding: 1.5rem 1.75rem;
}

.credentials-label {
  font-weight: 640;
  font-size: 1.02rem;
}

.credentials ul {
  columns: 2;
  column-gap: 2.5rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.credentials li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.15rem;
  break-inside: avoid;
  font-size: 0.95rem;
}

.credentials li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 6px;
  height: 6px;
  background: var(--ledger);
}

/* --- Contacto --------------------------------------------------------------------- */

.cta-panel {
  background: var(--bar);
  border-top: 3px solid var(--ledger);
  padding: clamp(2.25rem, 6vw, 3.5rem) clamp(1.5rem, 4vw, 3.25rem);
}

.cta-panel h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  font-stretch: 114%;
}

.cta-body {
  margin-top: 0.9rem;
  max-width: 52ch;
  font-size: 1.05rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.9rem;
}

.cta-email {
  font-weight: 640;
  color: var(--ledger);
}

.cta-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 1.6rem;
}

.cta-socials .social {
  font-size: 0.95rem;
  font-weight: 520;
}

/* --- Footer ------------------------------------------------------------------------ */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.9rem var(--sheet-pad) 2.3rem;
  border-top: 2px solid var(--ink);
  color: var(--ink-70);
  font-size: 0.9rem;
}

/* --- Responsive ---------------------------------------------------------------------- */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .photo-frame {
    max-width: 300px;
  }

  .field-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .proposals {
    grid-template-columns: 1fr;
  }

  .credentials ul {
    columns: 1;
  }
}

@media (max-width: 680px) {
  .topbar {
    flex-wrap: wrap;
    row-gap: 0.6rem;
  }

  .topbar-nav {
    order: 3;
    width: 100%;
  }

  .topbar-nav ul {
    gap: 1.1rem;
  }

  .trow {
    grid-template-columns: 1fr;
  }

  .trow-period {
    text-align: left;
    padding-top: 0;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .hero-statement {
    max-width: 12ch;
  }
}

/* --- Motion and print preferences --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  /* Paper is text-first: the landing imagery stays on screen only. */
  .hero-band,
  .proposal-img,
  .record-img {
    display: none;
  }

  .sheet {
    margin: 0;
    max-width: none;
    box-shadow: none;
  }

  .topbar,
  .lang-toggle,
  .carriage,
  .skip {
    display: none;
  }

  .record,
  .trow,
  .proposal {
    break-inside: avoid;
  }
}
