/* Luke Jackson — fossil prep & geology portfolio
   Warm limestone / museum-catalog design. No external fonts. */

:root {
  --paper: #f4efe5;
  --paper-2: #ece5d3;
  --card: #faf7ef;
  --ink: #27211a;
  --ink-soft: #6b6250;
  --line: #d9cfb8;
  --line-soft: #e5dcc8;
  --blue: #1c5fae;        /* Estwing grip blue */
  --blue-deep: #12406f;
  --rust: #a85b2a;
  --ochre: #c99a4b;
  --slate: #46525c;
  --shadow: 0 1px 2px rgba(39,33,26,.08), 0 8px 24px -12px rgba(39,33,26,.25);
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- strata motif ---------- */
.strata {
  height: 10px;
  background:
    linear-gradient(#c99a4b, #c99a4b) 0 0 / 100% 3px no-repeat,
    linear-gradient(#a85b2a, #a85b2a) 0 4px / 100% 2px no-repeat,
    linear-gradient(#46525c, #46525c) 0 7px / 100% 2px no-repeat,
    transparent;
  border: 0;
}
.strata.thin { transform: scaleY(.7); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, white);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: .7rem; padding-bottom: .7rem;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; flex: none;
  border: 2px solid var(--ink); border-radius: 6px;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
  background: linear-gradient(180deg, var(--card), var(--paper-2));
  box-shadow: inset 0 -6px 0 -3px var(--ochre);
}
.brand-name { line-height: 1.15; }
.brand-name strong { font-family: var(--serif); font-size: 1.06rem; letter-spacing: .01em; display: block; }
.brand-name span { font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-soft); }

.nav { display: flex; gap: .25rem; align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink-soft);
  font-size: .92rem; padding: .45rem .75rem; border-radius: 6px;
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a.active { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--rust); border-radius: 6px 6px 0 0; }
.menu-btn { display: none; }

@media (max-width: 780px) {
  .menu-btn {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; font-size: 1.2rem;
    background: var(--card); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  }
  .nav {
    display: none; position: absolute; right: 1rem; top: 62px;
    flex-direction: column; align-items: stretch; min-width: 210px;
    background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    padding: .5rem; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a.active { box-shadow: inset 3px 0 0 var(--rust); border-radius: 6px; }
}

/* ---------- type ---------- */
.kicker {
  font-family: var(--mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .18em; color: var(--rust); display: inline-block; margin-bottom: .55rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 58ch; }
.small { font-size: .86rem; color: var(--ink-soft); }
.mono { font-family: var(--mono); }
em.sp { font-style: italic; }   /* species names */

section { padding: 3.2rem 0; }
.section-head { max-width: 640px; margin-bottom: 1.8rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: .62rem 1.15rem; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 0 var(--blue-deep); }
.btn-primary:hover { background: #1d68be; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--ink-soft); }

/* ---------- cards & panels ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 1.2rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }

/* specimen catalog card */
.spec-card {
  overflow: hidden; display: flex; flex-direction: column;
  text-decoration: none; color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
a.spec-card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(39,33,26,.08), 0 18px 34px -14px rgba(39,33,26,.35); }
.spec-card .ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.spec-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.spec-card .ph img.over { position: absolute; inset: 0; opacity: 0; transition: opacity .3s ease; }
.spec-card:hover .ph img.over { opacity: 1; }
.spec-card .ph .hint {
  position: absolute; right: .6rem; bottom: .6rem;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(39,33,26,.72); color: #f4efe5; padding: .25rem .5rem; border-radius: 4px;
}
.spec-card .meta { padding: .9rem 1rem 1rem; border-top: 3px solid var(--ochre); }
.spec-card .meta .tag { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.spec-card .meta h3 { margin: .15rem 0 .25rem; }

/* photo figure w/ label chip */
.photo { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); cursor: zoom-in; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .chip {
  position: absolute; left: .6rem; top: .6rem;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .28rem .55rem; border-radius: 4px;
  background: rgba(39,33,26,.78); color: #f2ead8;
}
.photo .chip.after { background: var(--blue); color: #fff; }

/* ---------- hero ---------- */
.hero { padding: 4rem 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.badges { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.4rem; }
.badge {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  padding: .32rem .65rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink-soft);
}
.hero-frame { padding: .85rem; transform: rotate(1.2deg); }
.hero-frame .photo { cursor: default; }
.hero-frame figcaption {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .08em;
  color: var(--ink-soft); padding: .65rem .2rem .1rem; text-transform: uppercase;
}

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat { background: var(--card); padding: 1.1rem 1.2rem; }
.stat strong { font-family: var(--serif); font-size: 1.7rem; display: block; }
.stat span { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); }

/* technique list */
.tech { display: flex; gap: .6rem; flex-wrap: wrap; }
.tech li {
  list-style: none; font-size: .88rem; padding: .5rem .85rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
}
.tech li b { color: var(--rust); font-weight: 700; margin-right: .35rem; }

/* ---------- prep portfolio ---------- */
.spec-block { padding: 2.6rem 0; border-top: 1px dashed var(--line); }
.spec-block:first-of-type { border-top: 0; }
.spec-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.spec-head .num { font-family: var(--mono); color: var(--ochre); font-size: 1rem; }
.spec-context { color: var(--ink-soft); max-width: 62ch; margin-bottom: 1.3rem; }
.spec-context b { color: var(--rust); }
.photo-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.photo-row .photo { aspect-ratio: 4 / 3; }
.spec-note { margin-top: .8rem; font-size: .88rem; color: var(--ink-soft); font-style: italic; }

/* ---------- quarry ---------- */
.viewer-wrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #dcd5c4; }
model-viewer { width: 100%; height: min(72vh, 620px); background: linear-gradient(180deg, #e8e2d2, #cfc7b2); }
.viewer-hint {
  position: absolute; left: .9rem; bottom: .9rem; pointer-events: none;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(39,33,26,.72); color: #f2ead8; padding: .3rem .6rem; border-radius: 4px;
}

/* ---------- resume ---------- */
.timeline { border-left: 2px solid var(--line); padding-left: 1.4rem; display: grid; gap: 1.6rem; }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: calc(-1.4rem - 7px); top: .42rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ochre); border: 2px solid var(--paper);
}
.tl-item .when { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; }
.skills .panel { padding: .9rem 1rem; }
.skills h3 { font-size: .95rem; margin-bottom: .3rem; }
.todo-flag { font-family: var(--mono); font-size: .64rem; color: #fff; background: var(--rust); border-radius: 4px; padding: .12rem .4rem; letter-spacing: .08em; vertical-align: middle; }

/* ---------- contact ---------- */
.contact-card { padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: 1rem; }
.contact-card .ico {
  width: 44px; height: 44px; flex: none; border-radius: 10px;
  display: grid; place-items: center; font-size: 1.25rem;
  background: var(--paper-2); border: 1px solid var(--line);
}
.contact-card .mono { font-size: .85rem; }

/* ---------- footer ---------- */
.footer { margin-top: 3rem; border-top: 1px solid var(--line); background: var(--paper-2); }
.footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.6rem; padding-bottom: 2rem; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- before / after slider ---------- */
.compare {
  position: relative; overflow: hidden; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper-2);
  user-select: none; -webkit-user-select: none;
  touch-action: pan-y;               /* keep vertical scrolling on phones */
  --pos: 50%;
}
.compare > img { width: 100%; display: block; }
.compare .cmp-top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.compare .cmp-top img { width: 100%; height: 100%; object-fit: cover; display: block; }
.compare .cmp-line {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px;
  background: rgba(250,247,239,.92); box-shadow: 0 0 0 1px rgba(39,33,26,.3);
  pointer-events: none;
}
.compare .cmp-grip {
  position: absolute; top: 50%; left: var(--pos);
  transform: translate(-50%, -50%);
  width: 46px; height: 46px; padding: 0;
  border-radius: 50%; border: 2px solid #faf7ef;
  background: rgba(39,33,26,.74); color: #faf7ef;
  display: grid; place-items: center; cursor: ew-resize;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.compare .cmp-grip:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; }
.compare .cmp-grip svg { width: 22px; height: 22px; fill: currentColor; }
.compare .cmp-tag {
  position: absolute; bottom: .65rem; pointer-events: none;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .26rem .5rem; border-radius: 4px;
  background: rgba(39,33,26,.72); color: #f2ead8;
  transition: opacity .2s ease;
}
.compare .cmp-tag.a { left: .65rem; }
.compare .cmp-tag.b { right: .65rem; background: var(--blue); color: #fff; }
.compare[data-edge="left"] .cmp-tag.a,
.compare[data-edge="right"] .cmp-tag.b { opacity: 0; }
.compare-note {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: .6rem;
}

/* ---------- stage sequence ---------- */
/* min-width:0 matters: the rail is a horizontal scroller, and a grid or flex
   child defaults to min-width:auto, so the rail's min-content width (one step
   per stage) would otherwise push the whole column wider than the viewport. */
.seq { margin: 0; min-width: 0; }
.seq-view {
  position: relative; overflow: hidden; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper-2);
  aspect-ratio: 4 / 3; cursor: zoom-in;
}
.seq-view img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .3s ease;
}
.seq-view img.on { opacity: 1; }
.seq-count {
  position: absolute; right: .65rem; top: .65rem; pointer-events: none;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .12em;
  background: rgba(39,33,26,.72); color: #f2ead8; padding: .26rem .5rem; border-radius: 4px;
}
.seq-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; padding: 0;
  border: 1px solid rgba(250,247,239,.5); background: rgba(39,33,26,.6); color: #faf7ef;
  display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .18s ease;
}
.seq-view:hover .seq-arrow, .seq-arrow:focus-visible { opacity: 1; }
.seq-arrow[disabled] { opacity: 0 !important; pointer-events: none; }
.seq-arrow.prev { left: .6rem; }
.seq-arrow.next { right: .6rem; }
.seq-arrow svg { width: 18px; height: 18px; fill: currentColor; }
.seq-rail {
  display: flex; gap: .35rem; margin-top: .75rem; min-width: 0;
  overflow-x: auto; scrollbar-width: thin; padding-bottom: .2rem;
}
.seq-step {
  flex: 1 1 0; min-width: 92px; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--line-soft);
  border-radius: 0 0 7px 7px; padding: .45rem .55rem .5rem;
  font-family: inherit; color: var(--ink-soft); transition: border-color .18s, color .18s;
}
.seq-step:hover { border-top-color: var(--ochre); color: var(--ink); }
.seq-step[aria-current="true"] { border-top-color: var(--rust); color: var(--ink); background: var(--paper-2); }
.seq-step .n { font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; display: block; color: var(--ochre); }
.seq-step .t { font-size: .78rem; line-height: 1.25; display: block; }
.seq-cap { margin-top: .7rem; font-size: .88rem; color: var(--ink-soft); min-height: 2.6em; }
/* the sequence gets the room; the catalog label only needs a column */
.spec-split { display: grid; gap: 1.5rem; align-items: start;
  grid-template-columns: minmax(0, 1.7fr) minmax(225px, 1fr); }
@media (max-width: 880px) { .spec-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .seq-step { min-width: 84px; } }
/* portrait framing: keep faces out of the crop */
.photo.tall img { object-position: center 24%; }
.seq-cap .when { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre); margin-right: .5rem; }
.seq-fallback { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- specimen label card ---------- */
.label-card {
  font-family: var(--mono); font-size: .74rem; line-height: 1.5;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: .9rem 1rem; display: grid; gap: .18rem;
  grid-template-columns: max-content 1fr; column-gap: .9rem;
  align-content: start;
}
.label-card dt { color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; font-size: .62rem; padding-top: .18rem; }
.label-card dd { margin: 0; }
.label-card .full { grid-column: 1 / -1; color: var(--ink-soft); border-top: 1px dashed var(--line); margin-top: .4rem; padding-top: .4rem; font-size: .7rem; }

/* ---------- gallery with filters ---------- */
.filters { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.filter {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  padding: .38rem .8rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink-soft); cursor: pointer;
}
.filter:hover { border-color: var(--ink-soft); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.gallery figure { margin: 0; }
.gallery .photo { aspect-ratio: 4 / 3; }
.gallery figcaption { font-size: .84rem; color: var(--ink-soft); padding-top: .5rem; }
.gallery .hidden { display: none; }
.gallery-empty { color: var(--ink-soft); font-size: .9rem; }

/* portrait block */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2.2rem; align-items: center; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.portrait { padding: .7rem; }
.portrait .photo { aspect-ratio: 4 / 5; cursor: zoom-in; }
.portrait figcaption {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-soft); padding: .6rem .2rem .1rem;
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(24,20,14,.9); padding: 2.2rem;
}
.lightbox.open { display: grid; place-items: center; }
.lightbox .stage { position: relative; display: grid; place-items: center; }
.lightbox img { max-width: min(1200px, 92vw); max-height: 84vh; object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox .cap {
  position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  color: #e8dfca; background: rgba(0,0,0,.5); padding: .4rem .85rem; border-radius: 5px;
  max-width: min(90vw, 60ch); text-align: center; line-height: 1.45;
}
.lightbox .lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; padding: 0;
  border: 1px solid rgba(244,239,229,.4); background: rgba(30,25,18,.7); color: #f4efe5;
  display: grid; place-items: center; cursor: pointer;
}
.lightbox .lb-btn:hover { background: rgba(60,50,36,.9); }
.lightbox .lb-btn[disabled] { opacity: .25; pointer-events: none; }
.lightbox .lb-btn svg { width: 20px; height: 20px; fill: currentColor; }
.lightbox .lb-prev { left: .4rem; }
.lightbox .lb-next { right: .4rem; }
.lightbox .lb-close {
  position: fixed; top: 1rem; right: 1rem; transform: none;
  width: 42px; height: 42px;
}
.lightbox .lb-num {
  position: fixed; top: 1.35rem; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; color: #cfc3a6;
}
@media (max-width: 700px) {
  .lightbox { padding: 1rem; }
  .lightbox .lb-btn { width: 40px; height: 40px; }
  .lightbox .lb-prev { left: -.2rem; }
  .lightbox .lb-next { right: -.2rem; }
}

/* ---------- intro smash overlay ---------- */
html.intro-hold body > *:not(#smash) { visibility: hidden; }
#smash {
  position: fixed; inset: 0; z-index: 1000; overflow: hidden;
  background: var(--paper);
  visibility: visible;
}
#smash.gone { display: none; }
#smash canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#smash .hammer {
  /* sized so the striking face (at ~16% x, ~70% y of the image) lands on screen center */
  position: absolute; width: min(36vmin, 320px); height: auto;
  left: calc(50% - min(36vmin, 320px) * 0.16);
  top: calc(50% - min(36vmin, 320px) * 1.72 * 0.41);
  transform: translate(-75vw, 80vh) rotate(-30deg);
  transform-origin: 78% 95%;   /* pivot at the grip */
  filter: drop-shadow(0 18px 22px rgba(0,0,0,.4));
  will-change: transform;
  pointer-events: none;
}
#smash.shake { animation: smash-shake .38s linear; }
@keyframes smash-shake {
  0%,100% { transform: translate(0,0); }
  15% { transform: translate(-9px,7px); }
  30% { transform: translate(8px,-6px); }
  45% { transform: translate(-6px,-5px); }
  60% { transform: translate(5px,6px); }
  75% { transform: translate(-3px,2px); }
  90% { transform: translate(2px,-2px); }
}

/* ---------- skip link & focus ---------- */
/* Keyboard users land on the nav on every page otherwise; five links before the
   content adds up across five pages. Off-screen until focused. */
.skip-link {
  position: absolute; left: .75rem; top: -3rem; z-index: 100;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 0 0 8px 8px;
  padding: .55rem .9rem; text-decoration: none; font-size: .9rem;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; }
#main:focus { outline: none; }   /* tabindex=-1 is only there to receive the skip */

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer-links { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--blue); text-decoration: underline; }

/* ---------- print ---------- */
/* The resume is the page people save as a PDF to attach to an application, so it
   has to come off the printer looking like a resume and not a screenshot of a
   website. Chrome's "Save as PDF" uses these rules too. */
@media print {
  :root {
    --paper: #fff; --paper-2: #fff; --card: #fff;
    --ink: #000; --ink-soft: #333; --line: #bbb; --line-soft: #ddd;
    --shadow: none;
  }
  @page { margin: 14mm 13mm; }

  html { scroll-behavior: auto; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.42; }

  /* screen furniture that means nothing on paper */
  .topbar, .footer, .menu-btn, .skip-link, .hero-cta, .btn, .filters,
  .badges, .compare-note, .hint, .chip, .seq-rail, .seq-arrow, .seq-count,
  .lightbox, #smash, .gallery-empty { display: none !important; }

  /* the reveal animation never runs without JS painting it in */
  .reveal { opacity: 1 !important; transform: none !important; }

  a { color: #000; text-decoration: none; }
  .panel, .tl-item, .label-card { box-shadow: none; border: 1px solid var(--line); }
  section { padding: 0 0 .6rem !important; }
  .container { max-width: none; padding: 0; }
  hr.strata { background: none; border-top: 1.5pt solid #000; height: 0; margin: .5rem 0 .8rem; }

  h1 { font-size: 20pt; margin-bottom: .1rem; }
  h2 { font-size: 12.5pt; margin: .9rem 0 .35rem !important;
       border-bottom: .75pt solid var(--line); padding-bottom: .15rem; }
  h3 { font-size: 10.5pt; }

  /* nothing should be cut in half by a page break */
  .tl-item, .panel, .spec-block, figure { break-inside: avoid; page-break-inside: avoid; }
  h2, h3 { break-after: avoid; page-break-after: avoid; }

  /* a resume reads better as one column on paper than as two narrow ones */
  .grid-2, .grid-3, .skills { grid-template-columns: 1fr !important; }
  .skills { gap: .3rem; }
  .skills .panel { border: 0; border-left: 2pt solid var(--line); border-radius: 0;
                   padding: .1rem 0 .1rem .5rem; }
  .skills .panel h3 { display: inline; }
  .skills .panel h3::after { content: " — "; }
  .skills .panel p { display: inline; }

  .timeline .tl-item { border: 0; border-left: 1pt solid var(--line); border-radius: 0; }

  /* the printed page has no address bar, so say where it came from */
  main::after {
    content: "lukejpaleo.com  ·  ljackson7097@gmail.com  ·  Kennett Square, Pennsylvania";
    display: block; margin-top: 1rem; padding-top: .4rem;
    border-top: .75pt solid var(--line);
    font-family: var(--mono); font-size: 8pt; color: #333;
  }

  /* photographs are the point of these two pages; let them through, smaller */
  .photo img, .seq img { max-height: 62mm; width: auto; }
}
