/* ==========================================================================
   hubertkurkiewicz.com
   One stylesheet, plain CSS, no build step.
   1 tokens   2 base   3 header/nav   4 home grid
   5 work + text pages   6 footer   7 motion
   ========================================================================== */

/* ---------- 1 tokens ---------------------------------------------------- */
:root {
  --paper: #ffffff;
  --ink: #131313;
  --ink-soft: #5c5c5c;
  --rule: #e6e6e6;
  --accent: #e10600;

  --font-display: "Bebas Neue", "Poppins", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* fluid type — a floor and a ceiling on everything, so nothing breaks
     on a phone or on an ultrawide monitor */
  --fs-wordmark: clamp(1.5rem, 3.2vw, 2.4rem);
  --fs-h1: clamp(1.75rem, 3.6vw, 3rem);
  --fs-h2: clamp(1.25rem, 2.2vw, 1.75rem);
  --fs-body: clamp(1rem, 0.95vw, 1.1rem);
  --fs-small: clamp(0.82rem, 0.85vw, 0.92rem);

  --gutter: clamp(1rem, 4vw, 4rem);
  --wrap: 1680px;
  --prose: 68ch;
  --gap: clamp(1rem, 2.2vw, 2.25rem);
  --header-h: 5.5rem;
}

/* ---------- 2 base ------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-small);
}

.skip-link:focus {
  top: 0.75rem;
}

/* ---------- 3 header / nav ---------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.9rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}

@supports not (backdrop-filter: blur(8px)) {
  .site-header {
    background: var(--paper);
  }
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--fs-wordmark);
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.9rem, 2vw, 2.25rem);
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
}

.nav-list a {
  position: relative;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  border-bottom-color: currentColor;
}

.nav-list a[aria-current="page"] {
  font-weight: 600;
}

.burger {
  display: none;
  appearance: none;
  border: 0;
  background: none;
  padding: 0.5rem;
  margin: -0.5rem;
  cursor: pointer;
  color: inherit;
}

.burger__bar,
.burger__bar::before,
.burger__bar::after {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger__bar::before,
.burger__bar::after {
  content: "";
  position: relative;
}

.burger__bar::before {
  top: -7px;
}

.burger__bar::after {
  top: 5.5px;
}

@media (max-width: 899px) {
  .burger {
    display: block;
  }

  .nav-list {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem var(--gutter) 2rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    font-size: 1.1rem;
    transform: translateY(-120%);
    transition: transform 0.3s ease, visibility 0.3s;
    visibility: hidden;
  }

  .nav-list li {
    border-top: 1px solid var(--rule);
  }

  .nav-list a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 0;
  }

  .nav-list.is-open {
    transform: none;
    visibility: visible;
  }

  .burger[aria-expanded="true"] .burger__bar {
    background: transparent;
  }

  .burger[aria-expanded="true"] .burger__bar::before {
    transform: translateY(7px) rotate(45deg);
    background: currentColor;
  }

  .burger[aria-expanded="true"] .burger__bar::after {
    transform: translateY(-5.5px) rotate(-45deg);
    background: currentColor;
  }
}

/* ---------- 4 home: intro + works grid ---------------------------------- */
/* The homepage sits in from the edges further than the rest of the site —
   the grid needs the white space around it more than a text page does. */
.intro,
.works {
  --gutter: clamp(1.25rem, 8vw, 11rem);
}

.intro {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) clamp(1.25rem, 3vw, 2.5rem);
}

.intro__line {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}

.works {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 7vw, 6rem);
}

/* Row gap is deliberately much larger than the column gap and than the
   image-to-caption gap, so each caption reads as belonging to the image
   above it rather than floating between two rows. */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: clamp(0.75rem, 1.4vw, 1.5rem);
  row-gap: clamp(3rem, 5vw, 4.5rem);
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.tile a {
  display: grid;
  gap: 0.5rem;
}

/* every tile is the same shape, whatever shape the photo was */
.tile__frame {
  display: block;
  overflow: hidden;
  background: #f2f2f2;
}

.tile__frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.5s ease;
}

.tile a:hover .tile__frame img {
  opacity: 0.82;
  transform: scale(1.02);
}

.tile__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
  line-height: 1.35;
}

.tile__title {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.tile__meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- 5 work pages and text pages --------------------------------- */
.work,
.page {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter) clamp(3rem, 7vw, 6rem);
}

.work__hero img,
.page__hero img {
  width: 100%;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .work__hero img,
  .page__hero img {
    max-width: 72%;
  }
}

.page__hero figcaption {
  margin-top: 0.5rem;
  font-size: var(--fs-small);
  color: var(--ink-soft);
  text-align: right;
}

@media (min-width: 900px) {
  .page__hero figcaption {
    max-width: 72%;
    margin-inline: auto;
  }
}

.prose {
  max-width: var(--prose);
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  display: grid;
  gap: 1rem;
}

.page--text .prose {
  margin-top: clamp(1rem, 3vw, 2rem);
}

.prose h1 {
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.prose h2 {
  margin-top: 1.5rem;
  font-size: var(--fs-h2);
  font-weight: 600;
}

.prose h2:first-of-type {
  margin-top: 0.5rem;
}

.prose p {
  text-wrap: pretty;
}

.prose__aside {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: var(--fs-small);
}

.work__specs {
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.work__venue {
  margin-bottom: 0.75rem;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
}

.todo-note {
  padding: 0.6rem 0.9rem;
  border-left: 2px solid var(--accent);
  background: #fff5f5;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.work__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 0.5rem;
  font-size: var(--fs-small);
}

.work__links a {
  border-bottom: 1px solid var(--ink-soft);
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.work__links a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.crumb {
  margin-bottom: clamp(1rem, 2.5vw, 2rem);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.crumb a:hover {
  color: var(--accent);
}

.pager {
  display: grid;
  gap: 1rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: var(--fs-small);
}

@media (min-width: 700px) {
  .pager {
    grid-template-columns: 1fr 1fr;
  }
}

.pager a {
  display: grid;
  gap: 0.15rem;
}

.pager__next {
  text-align: right;
  grid-column: 2;
}

.pager span {
  color: var(--ink-soft);
  font-size: 0.82em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pager a:hover {
  color: var(--accent);
}

/* Secondary images on a subpage are thumbnails — only the hero runs large. */
.work__gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
}

/* line the thumbnail strip up with the hero image above it */
@media (min-width: 900px) {
  .work__gallery {
    max-width: 72%;
  }
}

/* Equal height, natural width — a tall portrait shot can't tower over the
   landscape ones the way it would if width were the fixed dimension. */
.work__gallery figure {
  flex: 0 0 auto;
}

.work__gallery img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 15rem;
}

@media (max-width: 559px) {
  .work__gallery img {
    max-height: 11rem;
  }
}

.shows {
  margin-top: clamp(3rem, 7vw, 5rem);
}

.shows__year {
  margin-top: 1.75rem;
  font-size: var(--fs-h2);
  font-weight: 600;
}

.shows__list {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.5rem;
}

.shows__list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
}

.shows__list a:hover {
  color: var(--accent);
}

.show__date {
  display: inline-block;
  min-width: 5.5rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.contact {
  display: grid;
  grid-template-columns: auto;
  gap: 0.2rem;
  margin: 0;
}

.contact dt {
  margin-top: 1.25rem;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.contact dd {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
}

.contact a {
  border-bottom: 1px solid var(--rule);
}

.contact a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.back-link:hover {
  color: var(--accent);
}

/* ---------- 6 footer ---------------------------------------------------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2.5rem var(--gutter);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.socials {
  display: flex;
  gap: 1.25rem;
}

.socials a {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}

.socials a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.to-top a:hover {
  color: var(--accent);
}

/* ---------- 7 motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
