/* ----------------------------------------
   Vincent Hulme — portfolio stylesheet
   Hand-edit freely. No framework, no build.
   ---------------------------------------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.6;
  color: #111;
  background: #fff;
  padding: 20px 20px 40px;
  max-width: 1500px;
  margin: 0 auto;
}

a {
  color: #111;
}

/* --- header (used on work pages) --- */

header {
  margin-bottom: 40px;
}

h1 {
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 0.01em;
}

h1 a {
  text-decoration: none;
}

/* ==========================================
   Landing page — horizontal top nav,
   each work as a row: photo left, title right
   ========================================== */

.top-nav {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.top-nav h1 {
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 0.01em;
}

.top-nav a {
  font-size: 12px;
  text-decoration: none;
}

.top-nav a:hover {
  text-decoration: underline;
}

.nav-sep {
  color: #999;
  font-size: 12px;
}

.works-rows {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1300px;
}

.work-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  text-decoration: none;
  color: #111;
}

.work-row:hover .work-row-photo img {
  opacity: 0.85;
}

.work-row-photo {
  flex: 0 0 820px;
}

.work-row-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.work-row-title {
  padding-top: 4px;
}

.work-row-title p {
  font-size: 12px;
  margin-bottom: 2px;
}

.work-row-title p.sub {
  color: #666;
  font-size: 10px;
}

.infinity {
  display: inline-block;
  font-size: 18px;
  vertical-align: middle;
  line-height: 1;
}

/* ==========================================
   Work pages — two columns + bottom list
   Left: stacked photos
   Right: descriptive text
   Bottom: numbered caption list, one line per photo
   ========================================== */

.work-page {
  margin-top: 16px;
}

.back {
  margin-bottom: 32px;
  font-size: 11px;
}

.work-columns {
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 48px;
}

.work-photos {
  flex: 2.2;
  max-width: 1080px;
  min-width: 0;
}

.work-photos figure {
  margin-bottom: 24px;
}

.work-photos img {
  width: 100%;
  height: auto;
  display: block;
}

.work-photos figcaption {
  font-size: 10px;
  color: #555;
  margin-top: 4px;
  line-height: 1.5;
}

/* --- photo rows: group 2 or 3 images side by side, e.g. a wide shot
   next to its details, matching how the portfolio PDF paired images --- */

.photo-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.photo-row figure {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.photo-row img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.photo-grid figure {
  margin-bottom: 0;
}

.photo-grid img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-grid-caption {
  text-align: center;
  margin-bottom: 24px;
}

.photo-pair {
  margin-bottom: 24px;
}

.photo-pair-images {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.photo-pair-images figure {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.photo-pair-images img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 500px) {
  .photo-row {
    flex-direction: column;
  }
}

.work-columns-cgs {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  grid-template-rows: min-content 1fr;
  grid-template-areas:
    "photos heading"
    "photos text";
  align-items: start;
  max-width: 1450px;
  margin: 0 auto 48px;
}

.work-columns-cgs .work-photos {
  grid-area: photos;
}

.work-heading-standalone {
  grid-area: heading;
  padding-top: 4px;
}

.work-heading-standalone p {
  font-size: 12px;
  margin: 0 0 2px 0;
  color: #222;
}

.work-columns-cgs .work-text {
  grid-area: text;
}

.work-text {
  flex: 1;
  min-width: 0;
  max-width: 340px;
  padding-top: 4px;
}

.work-heading {
  margin-bottom: 16px;
}

.work-text .work-heading p {
  font-size: 12px;
  margin: 0 0 2px 0;
  color: #222;
}

.work-text u {
  text-decoration: underline;
}

.work-text p:has(> u:only-child) {
  margin-bottom: 4px;
}

.work-text p {
  font-size: 12px;
  margin-bottom: 16px;
  color: #222;
}

.work-text p em {
  font-style: italic;
}

/* --- bottom caption list --- */

.work-info {
  border-top: 0.5px solid #ccc;
  padding-top: 24px;
}

.work-info .work-title {
  font-size: 12px;
  font-weight: normal;
  margin-bottom: 16px;
}

.caption-list {
  list-style: none;
  counter-reset: caption;
}

.caption-list li {
  font-size: 10px;
  color: #444;
  padding: 4px 0;
  display: flex;
  gap: 8px;
}

.caption-list li::before {
  counter-increment: caption;
  content: counter(caption) ".";
  flex: 0 0 auto;
  color: #888;
}

/* --- footer --- */

footer {
  margin-top: 80px;
  font-size: 11px;
  color: #444;
}

/* ==========================================
   Mobile — stack everything
   ========================================== */

@media (max-width: 760px) {
  body {
    padding: 16px 16px 40px;
    font-size: 11px;
  }

  .work-columns {
    flex-direction: column;
    gap: 0;
  }

  .work-columns-cgs {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "photos"
      "text";
    gap: 0;
    max-width: none;
    margin: 0 0 48px;
  }

  .work-heading-standalone {
    margin-bottom: 24px;
  }

  .reorder-first {
    order: -1;
    margin-bottom: 24px;
  }

  .work-text {
    max-width: none;
    margin-top: 24px;
  }

  .work-row {
    flex-direction: column;
    gap: 8px;
  }

  .work-row-photo {
    flex: none;
    width: 100%;
  }

  h1, .work-info .work-title {
    font-size: 12px;
  }

  .work-text p,
  footer {
    font-size: 11px;
  }
}
