/* ===========================================================
   Gonzalo Hal — Portfolio 2026
   =========================================================== */

:root {
  --bg: #f5f3ee;
  --bg-alt: #ece8df;
  --card: #ffffff;
  --ink: #16161a;
  --ink-soft: #5c5c64;
  --ink-faint: #8a8a90;
  --line: #ddd8cc;
  --accent: #ff5a33;
  --accent-ink: #ffffff;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --ff-head: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --ff-body: "Inter", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--ff-head);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* ---------- nav ---------- */
.nav-wrap {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 0 var(--pad);
  pointer-events: none;
}
.nav {
  pointer-events: all;
  width: 100%;
  max-width: 980px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(245, 243, 238, 0.72);
  border: 1px solid rgba(22,22,26,0.08);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  box-shadow: 0 8px 30px rgba(22,22,26,0.06);
  transition: box-shadow .3s var(--ease);
}
.nav.is-scrolled { box-shadow: 0 10px 34px rgba(22,22,26,0.12); }

.nav-logo {
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav-links a { transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--ink); }

.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  align-items: center;
  justify-content: center;
  flex: none;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { display: none; }
.nav-toggle svg { width: 16px; height: 16px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: var(--pad);
  padding-top: 84px;
  transform: translateY(-100%);
  transition: transform .4s var(--ease);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu ul { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.mobile-menu a { font-family: var(--ff-head); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.mobile-menu-close {
  position: fixed;
  top: 26px;
  right: var(--pad);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 170px var(--pad) 90px;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: start;
}
.hero-copy { min-width: 0; }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 84px);
  max-width: 15ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  margin-top: 26px;
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--ink-soft);
  max-width: 46ch;
  line-height: 1.55;
}
.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 64px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero-meta div { display: flex; flex-direction: column; gap: 4px; }
.hero-meta strong { font-family: var(--ff-head); font-size: 26px; font-weight: 800; }
.hero-meta span { font-size: 13px; color: var(--ink-faint); }

/* ---------- hero interactive visual ---------- */
.hero-visual {
  position: relative;
  height: 420px;
  justify-self: center;
  width: 100%;
  max-width: 420px;
}
.hero-visual .hv-ring {
  position: absolute;
  inset: 8% 8% auto auto;
  top: 6%;
  right: 4%;
  width: 78%;
  height: 78%;
  border: 1.5px dashed var(--line);
  border-radius: 50%;
  animation: hv-spin 40s linear infinite;
  transform: translate(calc(var(--px, 0) * -6px), calc(var(--py, 0) * -6px));
  transition: transform 0.3s var(--ease);
}
.hero-visual .hv-shape {
  position: absolute;
  border-radius: 50%;
  transition: transform 0.35s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hv-mono {
  font-family: var(--ff-head);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.hv-icon { width: 52%; height: 52%; }
.hv-1 {
  width: 190px; height: 190px;
  right: 6%; top: 10%;
  border-radius: 42px;
  background: linear-gradient(150deg, #2b0400 0%, #d1360a 55%, #ff9a00 100%);
  box-shadow: 0 30px 60px -20px rgba(255, 90, 51, 0.5);
  animation: hv-float 7s ease-in-out infinite;
  transform: translate(calc(var(--px, 0) * 18px), calc(var(--py, 0) * 18px));
}
.hv-1 .hv-mono { font-size: 56px; }
.hv-2 {
  width: 96px; height: 96px;
  left: 4%; top: 6%;
  border-radius: 24px;
  background: linear-gradient(150deg, #00005b 0%, #4b3bb0 60%, #9999ff 100%);
  animation: hv-float 6s ease-in-out infinite 0.4s;
  transform: translate(calc(var(--px, 0) * -26px), calc(var(--py, 0) * -14px));
}
.hv-2 .hv-mono { font-size: 30px; }
.hv-3 {
  width: 72px; height: 72px;
  left: 10%; bottom: 16%;
  border-radius: 20px;
  background: linear-gradient(150deg, #1b0a3a 0%, #6a2fc0 60%, #ea77ff 100%);
  box-shadow: 0 20px 40px -18px rgba(106, 47, 192, 0.55);
  animation: hv-float 5.5s ease-in-out infinite 0.8s;
  transform: translate(calc(var(--px, 0) * 30px), calc(var(--py, 0) * -20px));
}
.hv-3 .hv-mono { font-size: 26px; }
.hv-4 {
  width: 128px; height: 128px;
  right: 12%; bottom: 8%;
  border-radius: 30px;
  background: linear-gradient(150deg, #001e36 0%, #0a5f9e 60%, #31a8ff 100%);
  box-shadow: 0 24px 48px -24px rgba(22, 22, 26, 0.28);
  animation: hv-float 8s ease-in-out infinite 0.2s;
  transform: translate(calc(var(--px, 0) * -14px), calc(var(--py, 0) * 22px));
}
.hv-4 .hv-mono { font-size: 38px; }
.hv-5 {
  width: 46px; height: 46px;
  left: 38%; top: 40%;
  background: #2C2C2C url("../images/site/hv-figma.jpg") center / cover no-repeat;
  animation: hv-float 6.5s ease-in-out infinite 1.1s;
  transform: translate(calc(var(--px, 0) * 34px), calc(var(--py, 0) * 10px));
}
.hero-visual .hv-dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.35s var(--ease);
}
.hv-d1 { left: 22%; top: 22%; transform: translate(calc(var(--px, 0) * 40px), calc(var(--py, 0) * 24px)); }
.hv-d2 { right: 26%; top: 48%; background: var(--accent); transform: translate(calc(var(--px, 0) * -30px), calc(var(--py, 0) * 30px)); }
.hv-d3 { left: 48%; bottom: 10%; transform: translate(calc(var(--px, 0) * 22px), calc(var(--py, 0) * -30px)); }

@keyframes hv-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}
@keyframes hv-spin {
  from { transform: translate(calc(var(--px, 0) * -6px), calc(var(--py, 0) * -6px)) rotate(0deg); }
  to { transform: translate(calc(var(--px, 0) * -6px), calc(var(--py, 0) * -6px)) rotate(360deg); }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual .hv-shape, .hero-visual .hv-ring { animation: none; }
}

/* ticker */
.ticker {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  gap: 40px;
  animation: ticker 26s linear infinite;
}
.ticker-track span {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 40px;
}
.ticker-track span::after { content: "\2726"; color: var(--accent); font-size: 11px; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- clients strip ---------- */
.clients {
  padding: 52px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.clients-inner {
  display: flex;
  align-items: center;
  gap: 60px;
  width: max-content;
  animation: clients-marquee 38s linear infinite;
}
.clients:hover .clients-inner { animation-play-state: paused; }
.clients img {
  height: 54px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  flex: none;
  filter: grayscale(1);
  opacity: 0.68;
  transition: opacity .25s var(--ease), filter .25s var(--ease);
}
.clients img:hover { opacity: 1; filter: grayscale(0); }
@keyframes clients-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .clients-inner { animation: none; }
}

/* ---------- section shell ---------- */
section { padding: 100px var(--pad); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 52px);
  max-width: 16ch;
  margin-top: 14px;
}
.section-head p {
  color: var(--ink-soft);
  max-width: 40ch;
  font-size: 16px;
}
.inner { max-width: var(--maxw); margin: 0 auto; }

/* ---------- about ---------- */
.about { background: var(--card); border-radius: var(--radius-lg); margin: 0 var(--pad); padding: 90px clamp(24px,5vw,72px); }
.about .inner { padding: 0; max-width: none; }
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
}
.about-photo {
  width: 100%;
  aspect-ratio: 3/3.6;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-alt);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text p {
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.6;
  color: var(--ink);
  max-width: 62ch;
}
.about-text p + p { margin-top: 18px; color: var(--ink-soft); font-size: 17px; }

.skill-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.skill-pills span {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.about-facts {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
}
.about-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 4px; }
.about-facts dd { margin: 0; font-weight: 600; font-size: 15px; }

/* ---------- services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 34px 28px;
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.service-card:hover { transform: translateY(-6px); border-color: var(--ink); }
.service-num {
  font-family: var(--ff-head);
  font-weight: 800;
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 22px;
}
.service-card h3 { font-size: 21px; margin-bottom: 10px; }
.service-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }

/* ---------- work ---------- */
.work-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.work-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.work-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(22,22,26,0.12); }
.work-card.is-hidden { display: none; }
.work-card.is-locked { cursor: default; }
.work-card.is-locked:hover { transform: none; box-shadow: none; }
.work-card-inner { filter: blur(16px) saturate(1.1); pointer-events: none; user-select: none; }
.work-thumb {
  position: relative;
  aspect-ratio: 4/3.1;
  overflow: hidden;
  background: var(--bg-alt);
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.work-card:hover .work-thumb img { transform: scale(1.06); }

/* ---------- blurred-image "unlock" badge ---------- */
.blur-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.blur-badge .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(22,22,26,0.42);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.blur-badge svg { width: 14px; height: 14px; flex: none; }
.work-card.is-textonly .work-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.work-card.is-textonly .work-thumb .mono {
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-faint);
}
.work-body { padding: 20px 22px 24px; }
.work-body .tag { font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.work-body h3 { font-size: 20px; margin-top: 8px; }
.work-body p { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }

.work-more { margin-top: 44px; text-align: center; }

/* ---------- experience ---------- */
.exp-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; }
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
}
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-date { font-size: 13px; color: var(--ink-faint); font-weight: 600; padding-top: 3px; }
.timeline-role h3 { font-size: 19px; font-weight: 700; font-family: var(--ff-body); letter-spacing: 0; }
.timeline-role .company { color: var(--accent); font-weight: 600; }
.timeline-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 7px 14px 7px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--bg); transition: border-color .2s, color .2s; }
.timeline-link svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.timeline-link:hover { border-color: var(--accent); color: var(--accent); }
.timeline-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.timeline-role p { margin-top: 8px; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

.edu-list { display: flex; flex-direction: column; gap: 22px; }
.edu-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
}
.edu-item .yr { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.edu-item h4 { font-family: var(--ff-body); font-weight: 700; font-size: 15.5px; margin-top: 6px; }
.edu-item p { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- contact ---------- */
.contact {
  background: var(--ink);
  color: #f5f3ee;
  border-radius: var(--radius-lg);
  margin: 0 var(--pad);
  padding: 90px clamp(24px,6vw,90px);
  text-align: center;
}
.contact h2 { color: #fff; font-size: clamp(32px, 5.4vw, 62px); max-width: 18ch; margin: 0 auto; }
.contact p { color: #b7b6c0; margin-top: 20px; font-size: 17px; max-width: 44ch; margin-left: auto; margin-right: auto; }
.contact-cta { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact .btn-ghost { border-color: rgba(255,255,255,0.24); color: #fff; }
.contact .btn-ghost:hover { border-color: #fff; }
.contact-links {
  margin-top: 56px;
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 34px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 14px;
  color: #cfced8;
}
.contact-links a:hover { color: var(--accent); }

/* ---------- footer ---------- */
footer {
  padding: 40px var(--pad) 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
}
.footer-credit { font-size: 12px; letter-spacing: .02em; opacity: .85; }
.footer-credit:empty { display: none; }
/* ---------- floating scroll-to-top button ---------- */
.scroll-top-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(22,22,26,0.22);
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.scroll-top-btn.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top-btn:hover { background: var(--accent); transform: translateY(-3px); }
@media (max-width: 640px) {
  .scroll-top-btn { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* ---------- modal / lightbox ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15,15,17,0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.modal-overlay.is-open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  max-width: 980px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px) scale(.98);
  transition: transform .35s var(--ease);
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: sticky;
  top: 18px;
  margin-left: auto;
  margin-right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.modal-hero {
  position: relative;
  margin-top: -42px;
  aspect-ratio: 16/8.5;
  overflow: hidden;
  background: var(--bg-alt);
}
.modal-hero img { width: 100%; height: 100%; object-fit: cover; }
.modal-hero iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-body { padding: 8px clamp(24px,5vw,56px) 56px; }
.modal-body .tag { color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.modal-body h3 { font-size: clamp(26px,4vw,38px); margin-top: 10px; }
.modal-body p.desc { color: var(--ink-soft); margin-top: 16px; font-size: 16px; line-height: 1.6; max-width: 62ch; }
.modal-strip {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.modal-strip img, .modal-strip .pdf-tile {
  border-radius: var(--radius-sm);
  width: 100%;
  aspect-ratio: 1/0.85;
  object-fit: cover;
  background: var(--bg-alt);
}
.pdf-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
  padding: 10px;
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-ghost { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 220px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .exp-grid { grid-template-columns: 1fr; gap: 40px; }
  .modal-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  section { padding: 70px var(--pad); }
  .about { padding: 56px 22px; border-radius: 22px; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 26px; }
  .about-facts { grid-template-columns: 1fr; }
  .contact { padding: 64px 22px; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .nav { padding: 8px 8px 8px 18px; }

  .work-filters { gap: 8px; }
  .filter-btn { padding: 8px 14px; font-size: 12px; }
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .work-thumb { aspect-ratio: 1/1; }
  .work-body { padding: 12px 12px 14px; }
  .work-body .tag { font-size: 10px; }
  .work-body h3 { font-size: 14px; margin-top: 4px; }
  .work-body p { font-size: 11px; margin-top: 3px; }
  .blur-badge .pill { padding: 7px 12px; font-size: 10px; gap: 5px; }
  .blur-badge svg { width: 11px; height: 11px; }
}

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

/* ---------- project modal extras: video + Instagram posts ---------- */
.mx-block { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.mx-title { font-family: var(--ff-head); font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -0.01em; }
.mx-videos { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.mx-videos figure { margin: 0; max-width: 100%; }
.mx-videos video { height: min(58vh, 440px); width: auto; max-width: 100%; border-radius: var(--radius-sm); background: #000; display: block; }
.mx-videos figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-faint); }
.mx-sec { margin-top: 30px; }
.mx-sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.mx-sec-head h5 { font-family: var(--ff-head); font-size: 16px; font-weight: 700; }
.mx-sec-head span { font-size: 12.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.ig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ig-grid .is-extra { display: none; }
.ig-grid.is-open .is-extra { display: block; }
.ig-card {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.ig-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.ig-card:hover img { transform: scale(1.06); }
.ig-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(22, 22, 26, .72));
  pointer-events: none;
}
.ig-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ig-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ig-card.is-ia .ig-badge { background: var(--accent); color: #fff; }
.ig-meta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
  text-transform: capitalize;
}
.ig-meta em { font-style: normal; text-transform: none; font-size: 11px; opacity: .9; }
.mx-more { margin-top: 14px; }
@media (max-width: 640px) {
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- on-site post viewer + embedded 3D models ---------- */
button.ig-card { border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.ig-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: rgba(22, 22, 26, .55);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.ig-play::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}
.mx-models { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.mx-models iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); background: var(--bg-alt); display: block; }
.mx-models figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-faint); }

.ig-viewer {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 56px 72px 24px;
  background: rgba(14, 14, 17, .94);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}
.ig-viewer.is-open { opacity: 1; pointer-events: all; }
.ig-viewer-stage { display: flex; align-items: center; justify-content: center; max-width: 100%; min-height: 0; }
.ig-viewer-stage img, .ig-viewer-stage video {
  max-width: min(92vw, 880px);
  max-height: 72vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  background: #000;
  display: block;
}
.ig-viewer-close, .ig-viewer-nav {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.ig-viewer-close:hover, .ig-viewer-nav:hover { background: rgba(255, 255, 255, .22); }
.ig-viewer-close { top: 16px; right: 16px; }
.ig-viewer-nav { top: 50%; margin-top: -22px; }
.ig-viewer-nav.is-prev { left: 16px; }
.ig-viewer-nav.is-next { right: 16px; }
.ig-viewer.is-single .ig-viewer-nav { display: none; }
.ig-viewer-info { max-width: min(92vw, 880px); width: 100%; color: #fff; text-align: left; }
.ig-viewer-count { font-size: 12.5px; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }
.ig-viewer-caption {
  margin-top: 6px;
  max-height: 16vh;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .86);
  white-space: pre-wrap;
}
@media (max-width: 640px) {
  .ig-viewer { padding: 60px 12px 16px; }
  .ig-viewer-nav.is-prev { left: 6px; }
  .ig-viewer-nav.is-next { right: 6px; }
}

/* ---------- Audiovisual filter: all videos ---------- */
.video-gallery[hidden] { display: none; }
.video-gallery .vg-sub { color: var(--ink-soft); font-size: 15px; margin-bottom: 4px; }
.video-gallery .mx-sec { margin-top: 34px; }
.video-gallery .mx-sec-head h5 { font-size: 19px; }

/* project images open enlarged on click */
.modal-hero img, .modal-strip img { cursor: zoom-in; }
.ig-viewer-stage img { max-width: min(94vw, 1200px); max-height: 78vh; }

/* ---------- clients label + printers ---------- */
.clients-label {
  text-align: center;
  margin: 0 var(--pad) 26px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.clients-label:empty { display: none; }
.printers-grid .work-card { cursor: default; }
.printers-grid .work-card:hover { transform: none; box-shadow: none; }
.printers-grid .work-card.is-textonly .work-thumb .mono { font-size: 22px; }

/* ---------- websites section ---------- */
.site-slider { position: relative; }
.sites-track {
  --gap: 22px;
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* room for the cards' hover lift / shadow, which overflow-x would otherwise clip */
  padding: 10px 2px 30px;
  margin: -10px -2px -30px;
}
.sites-track::-webkit-scrollbar { display: none; }
.sites-track > .reveal { opacity: 1; }
.sites-track > .reveal:not(:hover) { transform: none; }
.sites-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius-md); }
.sites-track > .work-card { flex: 0 0 calc((100% - 2 * var(--gap)) / 3); scroll-snap-align: start; }
.slider-arrow {
  position: absolute;
  top: 36%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(22, 22, 26, .16);
  cursor: pointer;
  transition: background .2s, color .2s, opacity .2s, transform .2s var(--ease);
}
.slider-arrow svg { width: 20px; height: 20px; }
.slider-prev { left: -23px; }
.slider-next { right: -23px; }
.slider-arrow:hover:not(:disabled) { background: var(--ink); color: #fff; transform: scale(1.06); }
.slider-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.slider-arrow:disabled { opacity: .35; cursor: default; box-shadow: none; }
.site-slider.no-scroll .slider-arrow { display: none; }
@media (max-width: 980px) {
  .sites-track > .work-card { flex-basis: calc((100% - var(--gap)) / 2); }
}
@media (max-width: 640px) {
  .sites-track { --gap: 14px; }
  .sites-track > .work-card { flex-basis: 84%; }
  .slider-prev { left: 6px; }
  .slider-next { right: 6px; }
  .slider-arrow { width: 40px; height: 40px; top: 28%; }
}
@media (prefers-reduced-motion: reduce) { .slider-arrow { transition: none; } }

a.site-card { display: block; color: inherit; text-decoration: none; }
.site-host { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--accent); }

/* ---------- highlighted Adobe skills (kept quiet) ---------- */
.adobe-block { margin-top: 30px; }
.adobe-block[hidden] { display: none; }
.adobe-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.adobe-level + .adobe-title::before { content: "·"; margin: 0 8px; }
.adobe-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.adobe-tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.adobe-ico {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-family: var(--ff-head);
  font-size: 10px;
  font-weight: 800;
  background: var(--bg-alt);
  color: var(--ink-soft);
}
.adobe-block + .skill-pills { margin-top: 10px; }

/* ---------- brand manuals section (embedded flipbook + picker) ---------- */
.manuals-embed { max-width: 1000px; margin: 0 auto; }
.manual-active-title {
  text-align: center;
  font-family: var(--ff-head);
  font-size: clamp(18px, 2.4vw, 24px);
  margin-bottom: 18px;
}
.manual-active-title:empty { display: none; }
.manual-stage { transition: opacity .25s ease; }
.manual-stage.is-fading { opacity: 0; }
.manual-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.manual-picker[hidden] { display: none; }
.manual-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 250px;
  padding: 6px 16px 6px 6px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.manual-pick:hover { transform: translateY(-2px); }
.manual-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.manual-pick img { width: 64px; height: 46px; flex: none; object-fit: cover; object-position: top center; border-radius: 6px; background: var(--bg-alt); }
.manual-pick span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manual-pick.is-active { border-color: var(--accent); box-shadow: 0 8px 20px -10px rgba(255, 90, 51, .55); }
@media (max-width: 640px) {
  .manual-picker { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; }
  .manual-pick { flex: none; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  .manual-stage, .manual-pick { transition: none; }
}


/* ---------- locked brand manual: blurred cover + "can't preview" dialog ---------- */
.manual-locked { position: relative; display: block; width: fit-content; max-width: 100%; margin: 8px auto 0; cursor: pointer; border-radius: 8px; }
.manual-locked img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(620px, 72vh);
  border-radius: 8px;
  box-shadow: 0 26px 50px -22px rgba(22, 22, 26, .32), 0 8px 18px -10px rgba(22, 22, 26, .18);
}
.manual-locked:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.manual-locked .blur-badge .pill { background: rgba(22, 22, 26, .8); }
.manual-locked:hover .blur-badge .pill { background: rgba(22, 22, 26, .92); }

.mlock-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14, 14, 17, .6);
  backdrop-filter: blur(4px);
}
.mlock-card {
  width: 100%;
  max-width: 380px;
  padding: 32px 30px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .3);
  animation: mlock-in .25s var(--ease);
}
.mlock-ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 14px; border-radius: 50%; background: var(--ink); color: #fff; }
.mlock-ico svg { width: 20px; height: 20px; }
.mlock-card h3 { margin: 0 0 8px; font-family: var(--ff-head); font-size: 22px; }
.mlock-card p { margin: 0 0 22px; font-size: 15px; color: var(--ink-soft); }
@keyframes mlock-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mlock-card { animation: none; } }

/* ---------- YouTube videos in the project modal (thumbnail first, iframe on click) ---------- */
.mx-yt { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.mx-yt figure { margin: 0; }
.mx-yt iframe, .yt-lite { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); background: #000; }
.yt-lite { position: relative; padding: 0; overflow: hidden; cursor: pointer; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease), opacity .2s; opacity: .92; }
.yt-lite:hover img { transform: scale(1.04); opacity: 1; }
.yt-lite:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(22, 22, 26, .78); }
.yt-play::after { content: ""; position: absolute; left: 23px; top: 18px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.yt-lite:hover .yt-play { background: var(--accent); }
.mx-yt figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-faint); }
.mx-yt .yt-open { color: var(--accent); font-weight: 600; white-space: nowrap; }
.mx-yt .yt-open:hover { text-decoration: underline; }

/* locked manual: the name is replaced by a blurred stand-in */
.blur-name { filter: blur(6px); user-select: none; pointer-events: none; }
.manual-pick.is-locked span { filter: blur(5px); user-select: none; }

/* Nothing may stick out sideways: on phones that widens the layout viewport (the fixed menu stretches and its buttons jump).
   Page flips in the manuals viewer overshoot the screen edges while animating. */
html, body { overflow-x: clip; }
#manuales { overflow-x: clip; }
