:root {
  --ink: #111;
  --muted: #8a8a8a;
  --paper: #fff;
  --font: "Gotham", "Gotham SSm", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --step: 46px;      /* vertical distance between steps */
  --gait: 11px;      /* half the distance between left and right foot */
  --amp: 38px;       /* how far the path wanders sideways */
  --path: 50%;       /* where the path runs horizontally */
  --foot-w: 15px;
  --gap: 64px;       /* distance from path to text */
}
@media (max-width: 640px) {
  :root { --amp: 12px; --path: 52px; --foot-w: 13px; --step: 40px; --gap: 44px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
body.is-intro { overflow: hidden; }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 10;
  display: grid; place-items: center;
  background: var(--paper);
  transition: opacity .8s ease;
}
.intro.is-gone { opacity: 0; pointer-events: none; }

.enter {
  font: inherit; color: var(--ink); background: none; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 500; letter-spacing: .5em; text-indent: .5em;
  padding: 18px 26px; position: relative;
}
.enter::after {
  content: ""; position: absolute; left: 50%; bottom: 8px; height: 1px; width: 0;
  background: var(--ink); transition: width .35s ease, left .35s ease;
}
.enter:hover::after, .enter:focus-visible::after { width: calc(100% - 52px); left: 26px; }
.enter:focus { outline: none; }
.enter span { display: inline-block; transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1), filter .5s ease; }
.intro.is-leaving .enter span { opacity: 0; filter: blur(4px); }
.intro.is-leaving .enter span:nth-child(1) { transform: translate(-28px, -6px); transition-delay: 0s; }
.intro.is-leaving .enter span:nth-child(2) { transform: translate(-12px, 8px);  transition-delay: .05s; }
.intro.is-leaving .enter span:nth-child(3) { transform: translate(0, -12px);    transition-delay: .1s; }
.intro.is-leaving .enter span:nth-child(4) { transform: translate(12px, 8px);   transition-delay: .15s; }
.intro.is-leaving .enter span:nth-child(5) { transform: translate(28px, -6px);  transition-delay: .2s; }
.intro.is-leaving .enter::after { opacity: 0; }

.intro-feet {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
}
.intro-feet .foot { position: absolute; top: -30px; opacity: 0; transform: translateY(-8px); transition: opacity .45s ease, transform .45s ease; }
.intro-feet .r { left: calc(-1 * var(--gait) - var(--foot-w) / 2); }
.intro-feet .l { left: calc(var(--gait) - var(--foot-w) / 2); }
.intro.is-standing .intro-feet .r { opacity: 1; transform: none; transition-delay: .05s; }
.intro.is-standing .intro-feet .l { opacity: 1; transform: scaleX(-1); transition-delay: .25s; }

/* ---------- Footprints ---------- */
.foot {
  width: var(--foot-w); height: calc(var(--foot-w) * 82 / 40);
  fill: var(--ink); display: block; overflow: visible;
}

/* ---------- Main ---------- */
.main { opacity: 0; transition: opacity .9s ease; padding: 0 16px; }
body.is-in .main { opacity: 1; }

.hero {
  min-height: 46vh; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  text-align: center; padding-bottom: 40px;
}
.name {
  font-size: 15px; font-weight: 500; letter-spacing: .42em; text-indent: .42em; text-transform: uppercase;
}
.label {
  margin-top: 14px; font-size: 11px; font-weight: 400; color: var(--muted);
  letter-spacing: .32em; text-indent: .32em; text-transform: uppercase;
}
@media (max-width: 640px) {
  .hero { align-items: flex-start; text-align: left; padding-left: calc(var(--path) - 16px - 8px); }
  .name, .label { text-indent: 0; }
}

.trail { list-style: none; position: relative; max-width: 1100px; margin: 0 auto; }

.walk { position: relative; }
.walk .foot, .stop .foot {
  position: absolute;
  left: calc(var(--path) + var(--s, 0) * var(--amp) + var(--dx) - var(--foot-w) / 2);
  top: var(--y);
  opacity: 0;
  transform: rotate(var(--rot)) scaleX(var(--flip, 1)) scale(.85);
  transition: opacity .5s ease, transform .5s ease;
}
.walk.is-on .foot, .stop.is-on .foot {
  opacity: 1;
  transform: rotate(var(--rot)) scaleX(var(--flip, 1));
}

.stop { position: relative; height: 150px; }
.stop-text {
  position: absolute; top: 50%; transform: translateY(-50%);
  opacity: 0; transition: opacity .7s ease .35s, transform .7s ease .35s;
  white-space: nowrap;
}
.stop.is-on .stop-text { opacity: 1; }
.stop.right .stop-text { left: calc(var(--path) + var(--s) * var(--amp) + var(--gap)); text-align: left; }
.stop.left  .stop-text { right: calc(100% - var(--path) - var(--s) * var(--amp) + var(--gap)); text-align: right; }
.stop.right:not(.is-on) .stop-text { transform: translate(-10px, -50%); }
.stop.left:not(.is-on)  .stop-text { transform: translate(10px, -50%); }
.stop.is-on .stop-text { transform: translateY(-50%); }

.company {
  font-size: clamp(20px, 3vw, 28px); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; line-height: 1.15;
}
.title {
  margin-top: 8px; font-size: 13px; font-weight: 300; color: var(--muted); letter-spacing: .06em;
}
@media (max-width: 640px) {
  .stop.left .stop-text { right: auto; left: calc(var(--path) + var(--s) * var(--amp) + var(--gap)); text-align: left; }
  .stop.left:not(.is-on) .stop-text { transform: translate(-10px, -50%); }
  .stop-text { white-space: normal; max-width: calc(100vw - var(--path) - var(--gap) - 32px); }
}

.footer {
  display: flex; justify-content: center; gap: 36px;
  padding: 120px 0 calc(64px + env(safe-area-inset-bottom, 0px));
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
}
.footer a { color: var(--muted); text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* ---------- "More about me" stop ---------- */
body.no-fade .main { transition: none; }
body.is-leaving .main { opacity: 0; transition: opacity .45s ease; }
.more-link {
  color: var(--ink); text-decoration: none; position: relative; display: inline-block;
  font-size: 12px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; padding: 8px 0;
}
.more-link::after {
  content: ""; position: absolute; left: 0; bottom: 2px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(.25); transform-origin: right; transition: transform .35s ease;
}
.stop.left .more-link::after { transform-origin: right; }
.stop.right .more-link::after { transform-origin: left; }
.more-link:hover::after, .more-link:focus-visible::after { transform: scaleX(1); }
.more-link:focus { outline: none; }

/* ---------- About / photographs page ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; padding: 22px 0;
  background: linear-gradient(var(--paper) 60%, rgba(255,255,255,0));
}
.back {
  color: var(--ink); text-decoration: none; font-size: 11px; font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase;
}
.back:hover { color: var(--muted); }
.page-about .main { opacity: 1; animation: fadein .9s ease both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.about-hero { padding: 10vh 0 64px; text-align: center; }
.about-hero .name { font-size: 15px; }
.stand { position: relative; height: 40px; width: 0; margin: 0 auto 36px; }
.stand .foot { position: absolute; top: 0; }
.stand .r { left: calc(-1 * var(--gait) - var(--foot-w) / 2); transform: rotate(7deg); }
.stand .l { left: calc(var(--gait) - var(--foot-w) / 2); transform: rotate(-7deg) scaleX(-1); }

.gallery { display: flex; gap: 18px; max-width: 1240px; margin: 0 auto; align-items: flex-start; }
.gallery[data-cols="1"] { max-width: 760px; }
.gallery[data-cols="2"] { max-width: 1000px; }
.gallery .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.tile { display: block; width: 100%; padding: 0; border: 0; background: #f4f4f2; cursor: zoom-in; }
.tile img { display: block; width: 100%; height: auto; opacity: 0; transition: opacity .6s ease; }
.tile img.is-loaded { opacity: 1; }
.tile:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.empty {
  text-align: center; color: var(--muted); font-size: 11px; letter-spacing: .32em; text-transform: uppercase; padding: 40px 0;
}

.lightbox {
  position: fixed; inset: 0; z-index: 20; background: rgba(255,255,255,.98);
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-rows: 100%; align-items: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 0 calc(16px + env(safe-area-inset-bottom, 0px));
}
.lightbox .lb-prev { grid-column: 1; grid-row: 1; }
.lightbox .lb-next { grid-column: 3; grid-row: 1; }
.lightbox figure { grid-column: 2; grid-row: 1; margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); object-fit: contain; display: block; }
.lightbox figcaption {
  margin-top: 18px; min-height: 1em; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); text-align: center;
}
.lightbox button {
  font: inherit; background: none; border: 0; color: var(--ink); cursor: pointer;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; height: 100%;
}
.lightbox .lb-prev, .lightbox .lb-next { font-size: 28px; font-weight: 300; letter-spacing: 0; }
.lightbox .lb-close { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); right: 20px; height: auto; padding: 8px; }
.lightbox button:hover { color: var(--muted); }
body.is-locked { overflow: hidden; }
@media (max-width: 640px) {
  .gallery, .gallery .col { gap: 10px; }
  .lightbox { grid-template-columns: 12px minmax(0, 1fr) 12px; }
  .lightbox img { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
  .lightbox figcaption { padding: 0 8px; line-height: 1.8; }
  .lightbox .lb-prev, .lightbox .lb-next { display: none; }
}
