/* 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; }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(24,20,14,.88); padding: 2.2rem; cursor: zoom-out;
}
.lightbox.open { display: grid; place-items: center; }
.lightbox img { max-width: min(1200px, 94vw); max-height: 86vh; object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox .cap {
  position: absolute; left: 50%; bottom: 1.2rem; transform: translateX(-50%);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: #e8dfca; background: rgba(0,0,0,.45); padding: .35rem .8rem; border-radius: 5px; white-space: nowrap;
}

/* ---------- 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); }
}
