/* justinmartz.dev — 2026 rebuild */

:root {
  --ink: #232b2b;
  --paper: #f9f9f9;
  --rule: #f89e9d;
  --chip-bg: rgba(35, 43, 43, .88);
  --card-scrim: rgba(1, 1, 1, .55);
  --gutter: clamp(22px, 6vw, 72px);
  --stack: clamp(18px, 2.6vw, 26px);
  --link-git: #b0cfff;
  --link-linkedin: #b9b0ff;
  --link-email: #ffe0b0;
  --tag-a: #ffd6e8;
  --tag-b: #add8e6;
  --tag-c: #e0b0ff;
  --tag-d: #b9b0ff;
  --tag-e: #ffe0b0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
  background: #f9f9f9;              /* JS overwrites this per scroll position */
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: #a61f82; }

/* ---------- sky ---------- */

/* Fixed so it fills the viewport while the document scrolls past it. */
#sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#sky svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: top left;        /* JS sets scaleY to fit the viewport */
}

/* ---------- page ---------- */

main {
  position: relative;
  z-index: 1;
}

.section {
  display: flex;
  flex-direction: column;
  gap: var(--stack);
  padding: var(--gutter);
}

.section--bio {
  max-width: 800px;
  gap: var(--gutter);                /* bio group ↔ links group */
}

/* Sized so the scroll ends with the projects header near the top of the
   viewport, i.e. the darkest sky is fully visible at rest. */
.section--projects {
  min-height: calc(100svh - var(--gutter));
  padding-top: 0;
  color: var(--paper);
}

.group {
  display: flex;
  flex-direction: column;
  gap: var(--stack);
}

.marker {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--chip-bg);
  color: var(--paper);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- bio ---------- */

.name {
  margin: 0;
  font-size: clamp(30px, 8.2vw, 58px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.045em;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 18px);
  padding-left: clamp(12px, 2vw, 20px);
  border-left: 3px solid var(--rule);
}

.intro p {
  margin: 0;
  max-width: 34em;
  font-size: clamp(14px, 2.1vw, 17px);
  line-height: 1.7;
  text-wrap: pretty;
}

.intro a {
  text-decoration: underline;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: clamp(12px, 1.8vw, 15px);
  font-weight: 500;
}

/* ---------- links ---------- */

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}

.link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(35, 43, 43, .85);
  transition: transform .12s ease, box-shadow .12s ease;
}

.link:hover,
.link:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(35, 43, 43, .85);
}

.link__kind {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .65;
}

.link__value { font-size: 13px; font-weight: 700; }

.link--git { background: var(--link-git); }
.link--linkedin { background: var(--link-linkedin); }
.link--email { background: var(--link-email); }

/* ---------- projects ---------- */

.project {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 3vw, 36px);
  padding: clamp(14px, 2.2vw, 22px);
  border: 2px solid rgba(249, 249, 249, .6);
  border-radius: 6px;
  background: var(--card-scrim);     /* keeps light text legible over the peaks */
}

.project__shot {
  display: block;
  align-self: flex-start;            /* size to the image, don't stretch to the row */
  flex: 1 1 320px;
  min-width: 170px;
  max-width: 560px;
  border: 1px solid rgba(249, 249, 249, .5);
  border-radius: 3px;
  /* placeholder stripes, visible until the image loads */
  background-image: repeating-linear-gradient(90deg,
    rgba(249, 249, 249, .2) 0 8px,
    rgba(249, 249, 249, .05) 8px 16px);
}

.project__shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3024 / 1720;          /* reserves space before the image loads */
  max-height: 420px;
  object-fit: contain;               /* only kicks in once max-height caps it */
}

.project__body {
  flex: 1 1 300px;
  max-width: 56ch;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8vw, 16px);
}

.project__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.project__head h2 {
  margin: 0;
  font-size: clamp(24px, 5vw, 38px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.04em;
}

.status {
  padding: 3px 9px;
  border: 1px solid var(--tag-a);
  border-radius: 3px;
  color: var(--tag-a);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.project p {
  margin: 0;
  font-size: clamp(13px, 2vw, 16px);
  line-height: 1.7;
  text-wrap: pretty;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.stack span:nth-child(1) { color: var(--tag-a); }
.stack span:nth-child(2) { color: var(--tag-b); }
.stack span:nth-child(3) { color: var(--tag-c); }
.stack span:nth-child(4) { color: var(--tag-d); }
.stack span:nth-child(5) { color: var(--tag-e); }

.project__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: clamp(6px, 1vw, 10px);
  border-top: 1px dashed rgba(249, 249, 249, .4);
}

.btn {
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 3px 3px 0 rgba(35, 43, 43, .85);
  transition: transform .12s ease;
}

.btn:hover,
.btn:focus-visible { transform: translate(-1px, -1px); color: var(--ink); }

.btn--live { background: var(--tag-b); }
.btn--source { background: var(--tag-c); }

/* ---------- mobile ---------- */

@media (max-width: 680px) {
  .project__shot {
    max-width: 240px;
    margin: 0 auto;
  }

  .project__shot img {
    aspect-ratio: 786 / 1318;          /* mobile crop's own real ratio */
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .link, .btn { transition: none; }
}
