/* ==========================================================================
   javierlugo.co — design system
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --step--1: clamp(0.833rem, 0.81rem + 0.11vw, 0.889rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.424rem);
  --step-2: clamp(1.44rem, 1.32rem + 0.58vw, 1.802rem);
  --step-3: clamp(1.728rem, 1.54rem + 0.94vw, 2.281rem);
  --step-4: clamp(2.074rem, 1.78rem + 1.46vw, 2.887rem);
  --step-5: clamp(2.488rem, 2.04rem + 2.24vw, 3.653rem);

  /* Color */
  --ink: #10141c;
  --ink-2: #2c3444;
  --muted: #5b667a;
  --line: #e4e8ef;
  --line-strong: #cfd6e2;
  --bg: #ffffff;
  --bg-soft: #f7f8fb;
  --bg-tint: #f0f4fb;

  --accent: #1d4ed8;
  --accent-ink: #1739a8;
  --accent-soft: #eaf0ff;

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3.5rem, 9vw, 6.5rem);
  --wrap: 1140px;
  --wrap-narrow: 760px;

  /* Effects */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 28, 0.05),
    0 1px 3px rgba(16, 20, 28, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 20, 28, 0.06),
    0 12px 28px rgba(16, 20, 28, 0.07);
  --shadow-lg: 0 8px 24px rgba(16, 20, 28, 0.08),
    0 24px 56px rgba(16, 20, 28, 0.1);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

h1 {
  font-size: var(--step-5);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-1);
  letter-spacing: 0;
}
h4 {
  font-size: var(--step-0);
  letter-spacing: 0;
}

p {
  margin: 0 0 1.15em;
  text-wrap: pretty;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s var(--ease);
  overflow-wrap: anywhere;
}

a:hover {
  color: var(--accent-ink);
}

img,
svg,
picture {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  padding-left: 1.15em;
}

li + li {
  margin-top: 0.35em;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--section-y) 0;
}

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

::selection {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: var(--section-y);
}

.section--soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__head p {
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.55;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 999;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.78rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), box-shadow 0.18s var(--ease),
    color 0.18s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.25),
    0 6px 18px rgba(29, 78, 216, 0.22);
}

.btn--primary:hover {
  background: var(--accent-ink);
  color: #fff;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.28),
    0 10px 24px rgba(29, 78, 216, 0.26);
}

.btn--ghost {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  color: var(--ink);
  border-color: var(--ink-2);
  background: var(--bg-soft);
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

.btn-row--center {
  justify-content: center;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
}

.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand__name {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0;
  color: var(--ink);
}

.brand__role {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__list li + li {
  margin-top: 0;
}

.nav__link {
  display: block;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.nav__link:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.nav__link[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  background: var(--bg-tint);
}

.nav__cta {
  margin-left: 0.6rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s var(--ease), opacity 0.15s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
}

.nav-toggle__bars::before {
  transform: translateY(-6px);
}

.nav-toggle__bars::after {
  transform: translateY(6px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(3.5rem, 8vw, 6rem);
  background: linear-gradient(180deg, var(--bg-tint) 0%, var(--bg) 78%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% 40%;
  height: 420px;
  background: radial-gradient(
    ellipse at center,
    rgba(29, 78, 216, 0.09),
    transparent 68%
  );
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  margin-bottom: 0.4em;
}

.hero__lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
}

.hero__portrait {
  position: relative;
  justify-self: center;
  max-width: 360px;
  width: 100%;
}

.hero__portrait img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero__portrait::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  z-index: -1;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.hero__meta svg {
  width: 1em;
  height: 1em;
  color: var(--accent);
  flex: none;
}

/* ---------- Page header (interior) ---------- */
.page-head {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
  background: linear-gradient(180deg, var(--bg-tint), var(--bg));
  border-bottom: 1px solid var(--line);
}

.page-head p {
  max-width: 62ch;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Cards & grids ---------- */
.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.card {
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--muted);
  font-size: 0.96rem;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1.1rem;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.card__icon svg {
  width: 21px;
  height: 21px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

.stat {
  padding: 1.4rem 0;
  border-top: 2px solid var(--ink);
}

.stat__num {
  display: block;
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
}

.stat__label {
  display: block;
  margin-top: 0.55rem;
  font-size: var(--step--1);
  color: var(--muted);
}

/* Tags / pills */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  margin-top: 0;
}

.tag {
  display: inline-block;
  padding: 0.24rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ---------- Split (about) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.split--single {
  grid-template-columns: 1fr;
}

.split__aside {
  position: sticky;
  top: 100px;
}

.split--single .split__aside {
  position: static;
}

.split--single .fact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.fact-list li {
  margin: 0;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.fact-list dt,
.fact-list__label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.fact-list__value {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

.fact-list__value a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.fact-list--spaced {
  margin-top: 2rem;
}

/* ---------- Timeline ---------- */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--line);
}

.timeline > li {
  position: relative;
  margin: 0;
  padding: 0 0 2.4rem 1.9rem;
}

.timeline > li:last-child {
  padding-bottom: 0;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline__meta {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--accent);
}

.timeline h3 {
  margin-bottom: 0.15rem;
}

.timeline__org {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Portfolio ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 clamp(1.6rem, 3vw, 2.4rem);
  padding: 0;
  list-style: none;
}

.filters li {
  margin-top: 0;
}

.filter-btn {
  min-height: 44px;
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.filter-btn:hover {
  border-color: var(--ink-2);
  background: var(--bg-soft);
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: clamp(1.1rem, 2.4vw, 1.75rem);
}

.work-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease), opacity 0.25s var(--ease);
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.work-card[hidden] {
  display: none;
}

.work-card.is-hidden {
  display: none;
}

.work-card__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: zoom-in;
}

button.work-card__media {
  text-align: inherit;
}

.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.45s var(--ease);
}

.work-card:hover .work-card__media img {
  transform: scale(1.035);
}

.work-card__zoom {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(16, 20, 28, 0.72);
  color: #fff;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.work-card__zoom svg {
  width: 16px;
  height: 16px;
}

.work-card:hover .work-card__zoom,
.work-card__media:focus-visible .work-card__zoom {
  opacity: 1;
  transform: translateY(0);
}

.work-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem 1.45rem;
}

.work-card__cat {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.work-card p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
}

.work-card .tags {
  margin-top: auto;
  padding-top: 0.25rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(10, 13, 20, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox.is-open {
  display: flex;
  animation: fade 0.2s var(--ease);
}

.lightbox[aria-hidden="true"] {
  pointer-events: none;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox__figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.lightbox__figure img {
  max-height: 76vh;
  width: auto;
  margin-inline: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.lightbox__figure figcaption {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox__close {
  top: clamp(0.85rem, 2.5vw, 1.6rem);
  right: clamp(0.85rem, 2.5vw, 1.6rem);
}

.lightbox__nav svg,
.lightbox__close svg {
  width: 19px;
  height: 19px;
}

.lightbox__nav--prev {
  left: clamp(0.5rem, 2.5vw, 1.6rem);
}

.lightbox__nav--next {
  right: clamp(0.5rem, 2.5vw, 1.6rem);
}

/* ---------- Forms ---------- */
.form {
  display: grid;
  gap: 1.15rem;
}

.field {
  display: grid;
  gap: 0.42rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.field .req {
  color: var(--accent);
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa4b6;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field__hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.form__note {
  font-size: 0.85rem;
  color: var(--muted);
}

.not-found {
  text-align: center;
}

/* ---------- Contact methods ---------- */
.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.contact-list li {
  margin: 0;
}

.contact-link {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-width: 0;
  min-height: 70px;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.contact-link:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--bg-soft);
  transform: translateX(2px);
}

.contact-link svg {
  width: 19px;
  height: 19px;
  margin-top: 0.15rem;
  color: var(--accent);
  flex: none;
}

.contact-link__text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  line-height: 1.25;
}

.contact-link__value {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-link__type {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

/* ---------- CTA band ---------- */
.cta {
  padding: clamp(2.4rem, 5vw, 3.6rem);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.cta h2 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.cta p {
  max-width: 52ch;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.72);
}

.cta .btn-row {
  justify-content: center;
}

.cta .btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.cta .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

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

.footer-brand {
  margin: 0 0 0.35rem;
}

.footer-brand strong {
  color: var(--ink);
}

.footer-copy {
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav li {
  margin-top: 0;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

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

.socials li {
  margin-top: 0;
}

.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink-2);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
    background 0.18s var(--ease), transform 0.18s var(--ease);
}

.socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.socials svg {
  width: 17px;
  height: 17px;
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--muted);
}

.prose > * + h2 {
  margin-top: 2.4rem;
}

.prose > * + h3 {
  margin-top: 1.8rem;
}

/* Reveal on scroll — only hidden when JS is available to reveal it again */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid,
  .split {
    grid-template-columns: 1fr;
  }

  .hero__portrait {
    order: -1;
    max-width: 260px;
    justify-self: start;
  }

  .hero__portrait::before {
    display: none;
  }

  .split__aside {
    position: static;
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
    position: relative;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.85rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .nav[aria-hidden="true"] {
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
  }

  .nav__link {
    padding: 0.72rem 0.9rem;
    font-size: 1rem;
  }

  .nav__cta {
    margin: 0.5rem 0 0;
    justify-content: center;
    padding: 0.75rem 1.15rem;
  }

  .site-footer__grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

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

  .contact-list,
  .split--single .fact-list {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-row {
    flex-direction: column;
  }

  .hero {
    padding-block: 2.75rem 3.25rem;
  }

  .hero__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .lightbox {
    padding: 4.5rem 1rem 1rem;
  }

  .lightbox__figure img {
    max-height: 62vh;
  }

  .lightbox__nav {
    top: 50%;
  }

  .cta .btn-row {
    align-items: stretch;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta,
  .filters,
  .lightbox,
  .btn-row {
    display: none !important;
  }

  body {
    color: #000;
    font-size: 11pt;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .section,
  .page-head {
    padding-block: 1rem;
    background: none;
    border: 0;
  }
}
