:root {
  --bg: #ffffff;
  --text: #111111;
  --info-year-width: 90px;
  --info-gap: 24px;
  --info-column-pad: 36px;
  --header-pad-y: 60px;
  --header-pad-x: 60px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
}

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

/* =========================================================
   HEADER (DESKTOP)
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--header-pad-y) var(--header-pad-x);
  pointer-events: auto;
}

.site-title {
  text-align: left;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  font-weight: 400;
  transition: font-weight 0.15s ease;
}

.site-nav a:hover,
.site-nav a.active {
  font-weight: 700;
}

/* =========================================================
   WORK PAGE
   ========================================================= */

.gallery {
  display: grid;
  align-items: start;
}

.card {
  width: 100%;
  margin: 0;
  padding: 0;
  scroll-margin-top: 60px;
}

/* NEVER STRETCH IMAGES */

.gallery.one .card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-left: 0;
  margin-right: 0;
}

/* SMALL & TALL */

.gallery.one .card.small img {
  width: auto;
  max-width: 100%;
  height: 60vh;
  margin-left: auto;
  margin-right: auto;
}

.gallery.one .card.tall img {
  width: auto;
  max-width: 100%;
  height: 86vh;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   FLOATING CAPTION
   ========================================================= */

.page-caption {
  position: fixed;
  right: 60px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 55;
  width: calc(100% - 120px);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.page-caption .info-item {
  width: 100%;
  border-bottom: 1px solid var(--text);
  padding: 0 0 6px 0;
  margin: 0;
}

.page-caption .info-row {
  display: flex;
  gap: var(--info-gap);
  align-items: baseline;
}

.page-caption .info-date {
  flex: 0 0 var(--info-year-width);
  min-width: var(--info-year-width);
  white-space: nowrap;
}

.page-caption .info-link {
  all: unset;
  font: inherit;
  flex: 1 1 auto;
  font-weight: 400;
  white-space: nowrap;
}

a:focus-visible {
  outline: 1px solid var(--text);
}

.page-caption .info-external {
  margin-left: auto;
}

/* =========================================================
   INFO PAGE
   ========================================================= */

body.info-page-active {
  background: var(--bg);
  color: var(--text);
}

body.info-page-active .site-title,
body.info-page-active .site-info,
body.info-page-active a,
body.info-page-active .info-toggle,
body.info-page-active .info-link,
body.info-page-active .info-static,
body.info-page-active .info-heading,
body.info-page-active .info-text,
body.info-page-active .info-date,
body.info-page-active .info-image-caption {
  color: var(--text);
}

body.info-page-active .info-item {
  border-bottom: 1.5px solid var(--text);
}

body.info-page-active .clients-list .info-item {
  border-bottom: none;
  padding: 0;
  margin: 0;
}

body.info-page-active .clients-list .info-static:hover {
  font-weight: 400;
   cursor: default;
}

/* =========================================================
   INFO LAYOUT
   ========================================================= */

.info-text,
.info-images,
.info-links {
  max-width: 800px;
}

.info-panel > .info-text,
.info-panel > .info-images,
.info-panel > .info-image-caption {
  max-width: 800px;
}

.info-page {
  min-height: 100vh;
  padding: 160px 0 60px;
}

.info-content {
  width: calc(100% - 120px);
  margin-left: 60px;
  margin-right: 60px;
}

.info-section:first-of-type {
  margin-top: 80px;
  margin-bottom: 120px;
}

.info-section {
  margin-bottom: 120px;
}

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

.info-links a {
  display: block;
}

/* =========================================================
   INFO ITEMS
   ========================================================= */

.info-list {
  display: flex;
  flex-direction: column;
}

.info-item {
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--text);
  padding: 0 0 6px 0;
  margin: 0 0 6px 0;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-row {
  display: flex;
  gap: 0;
  align-items: baseline;
}

.info-date {
  display: none;
}

.info-row-link {
  text-decoration: none;
  color: inherit;
}

/* CLIENTS */

.clients-list {
  display: block;
}

.clients-item {
  border: 0;
  padding: 0;
  margin: 0;
}

.clients-list .info-item {
  border-bottom: none;
}

/* =========================================================
   INFO STATES
   ========================================================= */

.info-toggle,
.info-link,
.info-static {
  all: unset;
  font: inherit;
  flex: 1 1 auto;
  cursor: pointer;
  font-weight: 400;
}

.info-static {
  cursor: default;
}

.info-toggle.active {
  font-weight: 700;
}

.info-toggle:active,
.info-row-link:active .info-link,
.info-static:active {
  font-weight: 700;
}

.info-toggle:focus {
  outline: none;
}

.info-toggle:focus-visible {
  text-decoration: underline;
}

@media (hover: hover) {
  .info-toggle:hover,
  .info-row-link:hover .info-link,
  .info-static:hover {
    font-weight: 700;
  }
}

/* =========================================================
   INFO PANEL
   ========================================================= */

.info-panel {
  display: none;
  margin-top: 8px;
  margin-left: 0;
  padding-right: 0;
}

.info-panel.open {
  display: block;
  padding-bottom: 16px;
}

.info-text {
  width: 100%;
  margin-top: 12px;
}

.info-text p {
  margin: 0 0 1em 0;
}

.info-text a {
  text-decoration: underline;
}

/* =========================================================
   INFO IMAGES
   ========================================================= */

.info-images {
  width: 100%;
  margin-top: 12px;
}

.info-image-figure {
  margin: 0 0 12px 0;
}

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

.info-image-caption {
  width: 100%;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.mobile-caption {
  display: none;
}

.page-caption {
  display: block !important;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {
  :root {
    --info-year-width: 72px;
    --info-gap: 16px;
    --info-column-pad: 12px;
     --header-pad-y: 20px;
    --header-pad-x: 20px;
  }

  body,
  .site-title,
  .site-info,
  .info-content,
  .mobile-caption,
  .info-date,
  .info-link,
  .info-image-caption {
    font-size: 14px;
  }

 .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 1000;
  }
  
  .site-title {
    margin-bottom: 8px;
  }

  .site-nav {
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
  }

  .info-page {
    padding: 120px 0 12px;
  }

  .info-content {
    width: calc(100% - 40px);
    margin: 0 20px;
  }

  .gallery.one {
    gap: 0;
  }

  .card {
    margin: 0;
    padding: 0;
  }

  .card img,
  .card figcaption {
    margin: 0;
    padding: 0;
  }

  .gallery.one .card.small img {
    height: 48vh;
  }

  .gallery.one .card.tall img {
    height: 72vh;
  }

  .page-caption {
     display: none !important;
  }

  .info-panel {
    margin-left: 0;
    padding-right: 0;
  }

 .mobile-caption {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .mobile-caption .info-item {
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--text);
  }

  .mobile-caption .info-row {
    padding: 8px 20px;
  }
}