/* Bjørn Penk — black on white, persistent left nav (Heimir Snær–inspired) */

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

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

body {
  margin: 0;
  font-family: "Arial Narrow", Arial, sans-serif;
  color: #000;
  background: #fff;
  line-height: 1.35;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* —— Home: two panels, titles centered on image (difference blend) —— */
.landing-page {
  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: #000;
}

.landing-page a:hover,
.landing-page a:focus-visible {
  text-decoration: none;
}

.landing-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: center;
  justify-content: center;
  align-content: center;
  width: 100%;
  max-width: 56rem;
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vh, 3rem) clamp(1.25rem, 4vw, 2rem);
  box-sizing: border-box;
}

.landing-panel {
  position: relative;
  display: block;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  overflow: hidden;
  text-decoration: none;
  background: #eee;
}

.landing-panel--birding {
  aspect-ratio: 3476 / 2897;
}

.landing-panel--art {
  aspect-ratio: 3 / 2;
}

.landing-panel__media {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.landing-panel__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.landing-panel__title {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  max-width: 92%;
  font: inherit;
  font-size: clamp(1.2rem, 2.8vw, 2rem);
  font-weight: normal;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-align: center;
  color: #fff;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
  pointer-events: none;
}

.landing-panel:hover .landing-panel__img,
.landing-panel:focus-visible .landing-panel__img {
  transform: scale(1.04);
}

.landing-panel:hover .landing-panel__title,
.landing-panel:focus-visible .landing-panel__title {
  transform: translate(-50%, calc(-50% - 5px));
}

@media (max-width: 720px) {
  .landing-split {
    grid-template-columns: 1fr;
    max-width: 22rem;
  }
}

/* —— App shell (birding + artistic practice) —— */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Match .app__main top padding to first item in .app__nav (below site switch). */
  --app-site-switch-line: clamp(1.4375rem, 2.75vw, 2.0625rem);
  --app-nav-first-item-top: calc(2rem + var(--app-site-switch-line) + 0.55rem);
}

.app__sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #fff;
  overflow: visible;
  width: max-content;
  min-width: max-content;
}

.app__sidebar #site-toggle {
  flex-shrink: 0;
  padding: 1.5rem 1.25rem 0.5rem 1.5rem;
  overflow: visible;
}

/* Site switch — current title; the other site drops down in the same type */
.site-switch {
  position: relative;
  display: block;
  width: max-content;
  max-width: none;
}

.site-switch__trigger,
.site-switch__option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-family: inherit;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  font-weight: inherit;
  font-style: inherit;
  letter-spacing: inherit;
  line-height: 1.25;
  margin: 0;
  padding: 0.1rem 0;
  border: none;
  background: none;
  color: #000;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  text-align: left;
}

.site-switch__option {
  display: block;
}

.site-switch__trigger:hover,
.site-switch__trigger:focus-visible,
.site-switch__option:hover,
.site-switch__option:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
  outline: none;
}

.site-switch__caret {
  font-size: 0.55em;
  opacity: 0.85;
}

.site-switch__menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.2rem);
  z-index: 300;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  min-width: max-content;
}

.site-switch__menu li {
  margin: 0;
  padding: 0;
}

.app__body {
  flex: 1;
  display: grid;
  /* ≥22.5rem keeps “Bjørn Penk: Artistic Practice” on one line in Chrome */
  grid-template-columns: minmax(22.5rem, max-content) minmax(0, 1fr);
  min-height: 0;
}

.app__nav {
  flex: 1;
  padding: 0.25rem 1.25rem 2rem 1.5rem;
}

.app__nav a {
  display: block;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1.25;
  margin-bottom: 0.2rem;
  padding: 0.1rem 0;
  text-decoration: none;
  white-space: nowrap;
}

.app__nav a:hover,
.app__nav a:focus-visible {
  text-decoration: underline;
}

.app__nav a.is-active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.app__nav a.is-indent {
  padding-left: 0.85rem;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
}

.app__nav-divider {
  height: 1rem;
}

.app__main {
  padding: var(--app-nav-first-item-top) 2rem 3rem;
  overflow-y: auto;
  max-width: 52rem;
}

.app__main--wide {
  max-width: none;
}

.app__main h1 {
  font-size: 1.25rem;
  font-weight: normal;
  margin: 0 0 1.25rem;
}

.app__main h2 {
  font-size: 1.05rem;
  font-weight: normal;
  margin: 2rem 0 0.75rem;
}

.app__main p {
  margin: 0 0 1rem;
  max-width: 42rem;
}

.app__main .lede {
  margin-bottom: 1.5rem;
}

.works-gallery + .lede {
  margin-top: 2rem;
}

/* Works gallery: 3–5 columns, title + year only */
.works-gallery__heading {
  margin-bottom: 1.25rem;
}

.works-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem 1.25rem;
  width: 100%;
  align-items: start;
}

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

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

/* Birding: text links under a feature image (Galleries, Recordings, Press) */
.birding-text-links h2,
.photography-galleries h2 {
  margin-top: 0;
}

.birding-text-links ul,
.photography-galleries ul {
  margin: 0;
  padding: 0 0 0 0.85rem;
  list-style: none;
}

.birding-text-links li,
.photography-galleries li {
  margin-bottom: 0.35rem;
}

.birding-text-links a,
.photography-galleries a {
  font-size: 1rem;
}

/* Birding photography: full-width feature image */
.photo-feature {
  margin: 0 0 2rem;
  width: 100%;
  max-width: 100%;
}

.photo-feature__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.photo-feature__caption {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.photo-feature__caption p {
  margin: 0 0 0.1rem;
  max-width: none;
}

.photo-feature__species {
  margin: 0 0 0.1rem;
}

.photo-feature__species i {
  font-style: italic;
}

.photo-feature__meta {
  margin: 0;
}

.birding-section-about {
  margin-top: 1.75rem;
  max-width: 42rem;
}

.birding-section-about p {
  margin: 0 0 1rem;
}

/* Birding: single link thumbnail (Recording → Xeno-Canto) */
.works-gallery--birding-links-single {
  grid-template-columns: minmax(10rem, 14rem);
  margin-top: 0.5rem;
}

/* Birding / cross-disciplinary: uniform thumbs, title on image (difference blend) */
.works-gallery--overlay .works-gallery__link--overlay {
  text-decoration: none;
}

.works-gallery--overlay .works-gallery__link--overlay:hover,
.works-gallery--overlay .works-gallery__link--overlay:focus-visible {
  text-decoration: none;
}

.works-gallery--overlay .works-gallery__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee;
  line-height: 0;
}

.works-gallery--overlay .works-gallery__thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.works-gallery--overlay .works-gallery__label {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  right: 0.5rem;
  z-index: 1;
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.25;
  color: #fff;
  mix-blend-mode: difference;
  text-decoration: none;
  pointer-events: none;
}

.works-gallery--overlay .works-gallery__year {
  font-size: inherit;
  font-weight: inherit;
}

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

.works-gallery__link {
  display: block;
  color: #000;
  text-decoration: none;
}

.works-gallery__link:hover,
.works-gallery__link:focus-visible {
  text-decoration: none;
}

.works-gallery__link:hover .works-gallery__title-text,
.works-gallery__link:focus-visible .works-gallery__title-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.works-gallery__link:hover .works-gallery__year,
.works-gallery__link:focus-visible .works-gallery__year,
.works-gallery__link:hover .work-tag,
.works-gallery__link:focus-visible .work-tag {
  text-decoration: none;
}

.works-gallery__item {
  min-width: 0;
}

.works-gallery__media {
  position: relative;
  margin: 0;
  padding: 0;
  height: auto;
  line-height: 0;
  background: #eee;
  overflow: visible;
}

.works-gallery__tags {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  right: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.3rem 0.35rem;
  z-index: 1;
  line-height: 1.2;
  pointer-events: none;
}

.work-tag {
  display: inline-block;
  font-size: 0.68rem;
  line-height: 1.2;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: none;
  color: #000;
  white-space: nowrap;
  background-color: rgba(120, 120, 120, 0.75);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.work-tag--soundwalk {
  background-color: rgba(0, 200, 255, 0.75);
}

.work-tag--cross-disciplinary {
  background-color: rgba(0, 255, 120, 0.75);
}

.work-tag--platform {
  background-color: rgba(170, 255, 0, 0.75);
}

.work-tag--systemic-design {
  background-color: rgba(0, 100, 255, 0.75);
}

.work-tag--strategic-design {
  background-color: rgba(160, 0, 255, 0.75);
}

.work-tag--exhibition-design {
  background-color: rgba(255, 160, 0, 0.75);
}

.work-tag--social-design {
  background-color: rgba(255, 60, 0, 0.75);
}

.work-tag--graphic-design {
  background-color: rgba(50, 80, 255, 0.75);
}

.work-tag--community {
  background-color: rgba(255, 0, 200, 0.75);
}

.work-tag--publication {
  background-color: rgba(255, 220, 0, 0.75);
}

.work-tag--video {
  background-color: rgba(200, 0, 255, 0.75);
}

.work-tag--installation {
  background-color: rgba(255, 120, 0, 0.75);
}

.work-tag--speculative-design {
  background-color: rgba(255, 240, 0, 0.75);
}

.work-tag--performance {
  background-color: rgba(255, 0, 120, 0.75);
}

.works-gallery__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  margin: 0;
  aspect-ratio: auto;
  object-fit: unset;
}

.works-gallery__media--empty {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #eee;
  aspect-ratio: 4 / 3;
  min-height: 7rem;
}

/* Override .app__main h2 (2rem top margin) for gallery captions */
.app__main .works-gallery__title {
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.3;
  margin: 0.1rem 0 0;
}

.works-gallery__year {
  font-size: inherit;
  font-weight: normal;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}

/* Work detail */
.work-detail__meta {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.work-detail__meta p {
  margin: 0 0 0.35rem;
}

.work-detail__images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  margin: 1.5rem 0;
}

.work-detail__images img,
.work-detail__images video {
  max-height: min(52vh, 420px);
  width: auto;
  max-width: 100%;
  border: 1px solid #000;
}

.work-detail__images video {
  background: #000;
}

.work-detail__player--audio {
  display: block;
  width: min(100%, 28rem);
  height: 2.5rem;
}

.work-detail__caption {
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.work-detail__back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.guiding-block {
  margin-bottom: 2rem;
  max-width: 42rem;
}

.app__main > .guiding-block:first-child h1,
.app__main > .guiding-block:first-child h2 {
  margin-top: 0;
}

.guiding-menu {
  max-width: 42rem;
}

.guiding-menu > details {
  margin-bottom: 0.2rem;
}

.guiding-menu summary {
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.35;
  padding: 0.15rem 0;
}

.guiding-menu summary:hover,
.guiding-menu summary:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guiding-menu__nested {
  padding: 0.15rem 0 0.35rem 0.85rem;
}

.guiding-menu__nested details {
  margin-bottom: 0.15rem;
}

.guiding-menu__tours {
  margin: 0.15rem 0 0.35rem;
  padding: 0 0 0 0.85rem;
  list-style: none;
}

.guiding-menu__tours li {
  margin-bottom: 0.55rem;
}

.guiding-menu__tours a {
  font-weight: 700;
}

.guiding-menu__tours--plain a {
  font-weight: inherit;
}

.guiding-menu__note {
  display: block;
  font-size: 1rem;
}

.guiding-menu__body {
  padding: 0.35rem 0 0.5rem 0.85rem;
  max-width: 42rem;
}

.guiding-menu__body p {
  margin: 0 0 0.75rem;
}

.work-subpages {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
  max-width: 42rem;
}

.work-subpages__heading {
  font-size: 1rem;
  font-weight: normal;
  margin: 0 0 0.75rem;
}

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

.work-subpages li {
  margin-bottom: 0.35rem;
}

.work-subpages a {
  font-size: 1rem;
}

@media (min-width: 721px) {
  .site-switch__trigger,
  .site-switch__option,
  .app__nav a {
    font-size: 1.65rem;
  }
}

@media (max-width: 720px) {
  .app__body {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .app__sidebar {
    width: 100%;
    min-width: 0;
    max-width: none;
    border-right: none;
    border-bottom: 1px solid #fff;
  }

  .site-switch {
    width: max-content;
    max-width: 100%;
  }

  .app__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 1rem;
    row-gap: 0.15rem;
    flex: none;
    padding-bottom: 0.35rem;
  }

  .app__nav-divider {
    display: none;
  }

  .app__nav a {
    display: inline-block;
    margin: 0;
  }

  .app__main {
    padding-top: 1.25rem;
  }
}
