/* Martin Kalanda — minimalist redesign 2026
   Type: League Gothic (display), Roboto Condensed (piece), Roboto Mono (meta) */

:root {
  --ink: #000;
  --paper: #fff;
  --muted: rgba(0, 0, 0, 0.6);
  --rule: rgba(0, 0, 0, 0.15);
  --pad: 60px;
  --display: "League Gothic", "Oswald", Impact, sans-serif;
  --body: "Roboto Condensed", "Arial Narrow", sans-serif;
  --mono: "Roboto Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.muted { color: var(--muted); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 12px 16px;
}
.skip:focus { left: 0; z-index: 100; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: var(--paper);
}
.wordmark { width: 156px; height: auto; display: block; }
.nav ul { display: flex; gap: 40px; list-style: none; margin: 0; padding: 0; }
.nav a, .footer a { transition: opacity .2s; }
.nav a:hover, .footer a:hover, .nav a[aria-current="page"] { opacity: .5; }

/* Hero / page titles */
.hero, .page-head { padding: 160px var(--pad) 140px; }
.display {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(72px, 11.2vw, 160px);
  line-height: .92;
  text-transform: uppercase;
  margin: 0 0 24px;
}
.page-head { padding-bottom: 64px; }
.page-head .display { margin: 0; }

/* Work */
.work { padding: 0 var(--pad) 180px; }
.section-label {
  display: flex; justify-content: space-between;
  margin: 0 0 48px;
}
.series + .series { margin-top: 160px; }
.series, .work { scroll-margin-top: 64px; }
.series-label {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--ink);
  padding-top: 20px; margin: 0 0 56px;
}
.series-name { font-size: 56px; margin: 0; }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 60px; row-gap: 100px;
  align-items: start;
  list-style: none; margin: 0; padding: 0;
}

/* piece - default */
.piece {
  display: flex; flex-direction: column; gap: 30px;
  width: 100%;
  text-align: left;
}
/* every piece (image + title + caption) fits one browser window, with room to breathe:
   window - nav (64) - text block (~150) - breathing room (~120) */
.piece img {
  width: 100%; height: auto;
  max-height: calc(100vh - 334px);
  max-height: calc(100svh - 334px);
  object-fit: contain; object-position: left top;
  transition: opacity .3s;
}
.piece:hover img { opacity: .88; }
.piece:focus-visible { outline: 1px solid var(--ink); outline-offset: 12px; }
.piece-title {
  font-family: var(--body);
  font-size: 24px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  line-height: normal;
  margin: 0;
}
.piece-caption {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

/* Elsewhere */
.elsewhere { padding: 0 var(--pad) 160px; }
.elsewhere .section-label { margin-bottom: 32px; }
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.links li { border-bottom: 1px solid var(--rule); }
.links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 36px 0;
}
.links .big {
  display: block;
  font-family: var(--display);
  font-size: 48px; line-height: .92;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.arrow { width: 56px; height: 12px; flex: none; transition: transform .25s; }
.links a:hover .arrow { transform: translateX(8px); }

/* Footer */
.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 40px var(--pad);
  border-top: 1px solid var(--rule);
}
.footer ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }

/* Text pages */
.content { padding: 0 var(--pad) 180px; max-width: calc(720px + 2 * var(--pad)); }
.content p { font-size: 18px; line-height: 1.5; margin: 0 0 28px; }
.content .lead { font-size: 28px; }
.content h2 {
  font-family: var(--body); font-weight: 400;
  font-size: 20px; letter-spacing: 1px; text-transform: uppercase;
  margin: 40px 0 10px;
}
.content h2 + p { margin-bottom: 0; }
.email { font-size: 28px; letter-spacing: 1.2px; text-transform: uppercase; }
.email:hover { opacity: .5; }

/* Modal */
.modal {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--paper); color: var(--ink);
}
.modal:focus { outline: none; }
.modal::backdrop { background: var(--paper); }
.modal[open] { display: grid; grid-template-rows: 64px 1fr; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
}
.modal-close { width: 44px; height: 44px; display: grid; place-items: center; margin-right: -13px; }
.modal-close svg { width: 18px; height: 18px; }
.modal-stage {
  display: grid; grid-template-columns: 56px 1fr 56px; align-items: center;
  gap: 40px; padding: 32px var(--pad) 40px; min-height: 0;
}
.modal-figure {
  margin: 0; min-height: 0; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.modal-figure .frame { display: flex; flex-direction: column; gap: 24px; max-height: 100%; min-height: 0; }
.modal-figure img {
  max-height: calc(100dvh - 64px - 72px - 110px);
  width: auto; max-width: calc(100vw - 2 * var(--pad) - 192px);
  align-self: flex-start;
  object-fit: contain;
}
.modal-figure figcaption { width: 0; min-width: 100%; }
.modal-nav { width: 56px; height: 44px; display: grid; place-items: center; }
.modal-nav svg { width: 56px; height: 12px; }
.modal-nav:hover { opacity: .5; }

/* Mobile */
@media (max-width: 900px) {
  :root { --pad: 24px; }
  .wordmark { width: 130px; }
  .nav ul { gap: 20px; }
  .hero, .page-head { padding-top: 72px; padding-bottom: 64px; }
  .page-head { padding-bottom: 40px; }
  .display { font-size: 72px; margin-bottom: 16px; }
  .work { padding-bottom: 96px; }
  .section-label { margin-bottom: 32px; }
  .series + .series { margin-top: 96px; }
  .series-label { margin-bottom: 32px; padding-top: 14px; }
  .series-name { font-size: 40px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 56px; }
  .piece-caption { font-size: 14px; }
  .piece { gap: 20px; }
  .piece-title { font-size: 22px; }
  .elsewhere { padding-bottom: 96px; }
  .elsewhere .section-label { margin-bottom: 24px; }
  .links a { padding: 28px 0; }
  .links .big { font-size: 34px; }
  .footer { flex-direction: column; align-items: flex-start; padding: 32px var(--pad); }
  .content { padding-bottom: 96px; }
  .content p { font-size: 16px; }
  .content .lead { font-size: 22px; }
  .email { font-size: 22px; }

  .modal[open] { grid-template-rows: 64px 1fr auto; }
  .modal-stage { grid-template-columns: 1fr; padding: 16px var(--pad); gap: 0; }
  .modal-figure { align-items: stretch; }
  .modal-figure .frame { gap: 20px; }
  .modal-figure figcaption { width: auto; }
  .modal-figure img { width: 100%; max-width: 100%; max-height: calc(100dvh - 64px - 72px - 140px); }
  .modal-stage .modal-nav { display: none; }
  .modal-foot { display: flex; justify-content: space-between; padding: 0 var(--pad) 24px; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; row-gap: 64px; }
  .piece-caption { font-size: 16px; }
}
@media (min-width: 901px) { .modal-foot { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
